Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions templates/archive/fields/phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@
'whatsapp' => $is_whatsapp,
]
);
$phone_label = ! empty( $data['original_field']['label'] )
? $data['original_field']['label']
: ( ! empty( $data['label'] ) ? $data['label'] : $label );
?>

<?php if ( $is_action ) : ?>
<div class="directorist-listing-card-phone">
<a class="directorist-btn directorist-btn-xs directorist-btn-primary" href="<?php echo esc_url( $phone_link ); ?>">
<?php directorist_icon( $icon ); ?>
<?php echo esc_html( $data['label'] ); ?>
<?php echo esc_html( $phone_label ); ?>
</a>
</div>
<?php else : ?>
<li class="directorist-listing-card-phone">
<?php directorist_icon( $icon ); ?>
<?php $listings->print_label( $label ); ?>
<?php $listings->print_label( $phone_label ); ?>
<a href="<?php echo esc_url( $phone_link ); ?>">
<?php echo esc_html( $value ); ?>
</a>
Expand Down
8 changes: 6 additions & 2 deletions templates/single/action-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,19 @@
$phone_icon = ! empty( $action['icon'] ) ? $action['icon'] : 'las la-phone';

if ( $is_whatsapp ) :
$phone_label = ! empty( $action['form_data']['label'] ) ? $action['form_data']['label'] : __( 'WhatsApp', 'directorist' );
$phone_label = ! empty( $action['form_data']['label'] )
? $action['form_data']['label']
: ( ! empty( $action['label'] ) ? $action['label'] : '' );
?>
<a class="directorist-btn directorist-btn-sm directorist-btn-primary"
href="<?php echo esc_url( $phone_link ); ?>">
<?php directorist_icon( $phone_icon ); ?>
<?php echo esc_html( $phone_label ); ?>
</a>
<?php else :
$phone_label = ! empty( $action['form_data']['label'] ) ? $action['form_data']['label'] : __( 'Call Now', 'directorist' );
$phone_label = ! empty( $action['form_data']['label'] )
? $action['form_data']['label']
: ( ! empty( $action['label'] ) ? $action['label'] : '' );
?>
<a class="directorist-btn directorist-btn-sm directorist-btn-primary"
href="<?php echo esc_url( $phone_link ); ?>">
Expand Down