PluginProbe
Property Hive / 2.3.1
Property Hive v2.3.1
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
propertyhive / includes / admin / views / html-lightbox-contact-details.php

html-lightbox-contact-details.php in Property Hive 2.3.1, at includes/admin/views/html-lightbox-contact-details.php

39 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
5 if ( $contact_ids == '' )
6 {
7 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable in an admin view; PHPCS analyzes the view file standalone even though WordPress includes it inside a method/function scope.
8 $contact_ids = array();
9 }
10 if ( !is_array($contact_ids) && $contact_ids != '' && $contact_ids != 0 )
11 {
12 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable in an admin view; PHPCS analyzes the view file standalone even though WordPress includes it inside a method/function scope.
13 $contact_ids = array($contact_ids);
14 }
15
16 if ( !empty($contact_ids) )
17 {
18 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable in an admin view; PHPCS analyzes the view file standalone even though WordPress includes it inside a method/function scope.
19 foreach ( $contact_ids as $contact_id )
20 {
21 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable in an admin view; PHPCS analyzes the view file standalone even though WordPress includes it inside a method/function scope.
22 $contact = new PH_Contact((int)$contact_id);
23 ?>
24 <div class="contact">
25 <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>
26 <div class="contact-details">
27 <?php if ( $contact->get_formatted_full_address() != '' ) { echo esc_html($contact->get_formatted_full_address()) . '<br>'; } ?>
28 T: <?php echo esc_html(get_post_meta((int)$contact_id, '_telephone_number', TRUE)); ?><br>
29 E: <?php echo esc_html(get_post_meta((int)$contact_id, '_email_address', TRUE)); ?>
30 </div>
31 <?php do_action( 'propertyhive_lightbox_contact_details', (int)$contact_id, $post->ID ); ?>
32 </div>
33 <?php
34 }
35 }
36 else
37 {
38 echo '-';
39 }