PluginProbe
Property Hive / 2.4.0
Property Hive v2.4.0
2.4.0 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 All 262 releases
← All changes | includes/admin/views/html-viewing-details-meta-box.php +10 -2 2.2.4 → 2.4.0 View file →
@@ -1,8 +1,9 @@
1 1 <?php
2 2
3 3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4 4
5 +// 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.
5 6 $readonly = isset($readonly) ? $readonly : false;
6 7
7 8 echo '<div class="propertyhive_meta_box">';
8 9
@@ -11,11 +12,12 @@
11 12 echo '<p class="form-field">
12 13
13 14 <label for="">' . esc_html(__('Status', 'propertyhive')) . '</label>
14 15
15 - ' . esc_html(__( ucwords(str_replace("_", " ", $viewing->status)), 'propertyhive' ));
16 + ' . esc_html(propertyhive_get_status_label( $viewing->status ));
16 17
17 18 // Add text if this a second, third etc viewing
19 + // 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.
18 20 $related_viewings = get_post_meta( $viewing->id, '_related_viewings', TRUE );
19 21 if ( isset($related_viewings['previous']) && count($related_viewings['previous']) > 0 )
20 22 {
21 23 echo ' - ' . esc_html(ph_ordinal_suffix(count($related_viewings['previous'])+1) . ' ' . __( 'Viewing', 'propertyhive' ));
@@ -24,11 +26,13 @@
24 26 if ( $viewing->status == 'offer_made' )
25 27 {
26 28 if ( get_option('propertyhive_module_disabled_offers_sales', '') != 'yes' )
27 29 {
30 + // 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.
28 31 $offer_id = get_post_meta( $viewing->id, '_offer_id', TRUE );
29 32 if ( $offer_id != '' && get_post_status($offer_id) != 'publish' )
30 33 {
34 + // 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.
31 35 $offer_id = '';
32 36 }
33 37
34 38 if ( $offer_id != '' )
@@ -61,8 +65,9 @@
61 65 </p>';
62 66 }
63 67 else
64 68 {
69 + // 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.
65 70 $args = array(
66 71 'id' => '_cancelled_reason',
67 72 'label' => __( 'Reason Cancelled', 'propertyhive' ),
68 73 'desc_tip' => false,
@@ -73,8 +78,9 @@
73 78 )
74 79 );
75 80 propertyhive_wp_textarea_input( $args );
76 81
82 + // 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.
77 83 $args = array(
78 84 'id' => '_cancelled_reason_public',
79 85 'label' => __( 'Make Reason Public?', 'propertyhive' ),
80 86 'description' => __( 'If checked, the reason for cancellation entered will be visible to applicants and owners/landlords in their login area and any cancellation emails sent.', 'propertyhive' ),
@@ -128,8 +134,9 @@
128 134 </p>';
129 135 }
130 136 else
131 137 {
138 + // 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.
132 139 $args = array(
133 140 'id' => '_feedback',
134 141 'label' => __( 'Feedback', 'propertyhive' ),
135 142 'desc_tip' => false,
@@ -145,8 +152,9 @@
145 152 }
146 153
147 154 if ( ($viewing->status == 'carried_out' || $viewing->status == 'offer_made') && ( $viewing->feedback_status == 'interested' || $viewing->feedback_status == 'not_interested' ) )
148 155 {
156 + // 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.
149 157 $datetime_format = get_option('date_format')." \a\\t ".get_option('time_format');
150 158
151 159 echo '<p class="form-field">
152 160
@@ -151,9 +159,9 @@
151 159 echo '<p class="form-field">
152 160
153 161 <label for="">' . esc_html(__('Date Feedback Received', 'propertyhive')) . '</label>';
154 162
155 - echo esc_html( !empty($viewing->feedback_received_date) ? date( $datetime_format, strtotime($viewing->feedback_received_date) ) : __( 'Unknown', 'propertyhive' ) );
163 + echo esc_html( !empty($viewing->feedback_received_date) ? gmdate( $datetime_format, strtotime($viewing->feedback_received_date) ) : __( 'Unknown', 'propertyhive' ) );
156 164
157 165 echo '</p>';
158 166
159 167 echo '<p class="form-field">