| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 4 |
|
| 5 |
if ( $contact_ids == '' ) |
| 6 |
{ |
| 7 |
$contact_ids = array(); |
| 8 |
} |
| 9 |
if ( !is_array($contact_ids) && $contact_ids != '' && $contact_ids != 0 ) |
| 10 |
{ |
| 11 |
$contact_ids = array($contact_ids); |
| 12 |
} |
| 13 |
|
| 14 |
if ( !empty($contact_ids) ) |
| 15 |
{ |
| 16 |
foreach ( $contact_ids as $contact_id ) |
| 17 |
{ |
| 18 |
$contact = new PH_Contact((int)$contact_id); |
| 19 |
?> |
| 20 |
<div class="contact"> |
| 21 |
<div class="name"><a href="<?php echo esc_url(get_edit_post_link((int)$contact_id)); ?>"><?php echo esc_html(get_the_title((int)$contact_id)); ?></a></div> |
| 22 |
<div class="contact-details"> |
| 23 |
<?php if ( $contact->get_formatted_full_address() != '' ) { echo esc_html($contact->get_formatted_full_address()) . '<br>'; } ?> |
| 24 |
T: <?php echo esc_html(get_post_meta((int)$contact_id, '_telephone_number', TRUE)); ?><br> |
| 25 |
E: <?php echo esc_html(get_post_meta((int)$contact_id, '_email_address', TRUE)); ?> |
| 26 |
</div> |
| 27 |
<?php do_action( 'propertyhive_lightbox_contact_details', (int)$contact_id, $post->ID ); ?> |
| 28 |
</div> |
| 29 |
<?php |
| 30 |
} |
| 31 |
} |
| 32 |
else |
| 33 |
{ |
| 34 |
echo '-'; |
| 35 |
} |