PluginProbe
Property Hive / 2.3.0
Property Hive v2.3.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 1.4.61 All 261 releases
propertyhive / includes / admin / views / html-bulk-edit-property.php

html-bulk-edit-property.php in Property Hive 2.3.0, at includes/admin/views/html-bulk-edit-property.php

166 lines 8.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin View: Bulk Edit Properties
4 */
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 ?>
11
12 <fieldset class="inline-edit-col-right">
13 <div id="propertyhive-fields-bulk" class="inline-edit-col">
14
15 <?php do_action( 'propertyhive_property_bulk_edit_start' ); ?>
16
17 <div class="inline-edit-group">
18 <label class="alignleft">
19 <span class="title"><?php echo esc_html(__( 'On Market', 'propertyhive' )); ?></span>
20 <span class="input-text-wrap">
21 <select class="on_market" name="_on_market">
22 <?php
23 // 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.
24 $options = array(
25 '' => __( '— No Change —', 'propertyhive' ),
26 'yes' => __( 'Yes', 'propertyhive' ),
27 'no' => __( 'No', 'propertyhive' ),
28 );
29 // 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.
30 foreach ($options as $key => $value) {
31 echo '<option value="' . esc_attr( $key ) . '">' . esc_html($value) . '</option>';
32 }
33 ?>
34 </select>
35 </span>
36 </label>
37 </div>
38
39 <div class="inline-edit-group">
40 <label class="alignleft">
41 <span class="title"><?php echo esc_html(__( 'Featured', 'propertyhive' )); ?></span>
42 <span class="input-text-wrap">
43 <select class="featured" name="_featured">
44 <?php
45 // 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.
46 $options = array(
47 '' => __( '— No Change —', 'propertyhive' ),
48 'yes' => __( 'Yes', 'propertyhive' ),
49 'no' => __( 'No', 'propertyhive' ),
50 );
51 // 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.
52 foreach ($options as $key => $value) {
53 echo '<option value="' . esc_attr( $key ) . '">' . esc_html($value) . '</option>';
54 }
55 ?>
56 </select>
57 </span>
58 </label>
59 </div>
60
61 <div class="inline-edit-group">
62 <label class="alignleft">
63 <span class="title"><?php echo esc_html(__( 'Availability', 'propertyhive' )); ?></span>
64 <span class="input-text-wrap">
65 <select class="availability" name="_availability">
66 <?php
67
68 // 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.
69 $options = array( '' => __( '— No Change —', 'propertyhive' ) );
70 // 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.
71 $args = array(
72 'hide_empty' => false,
73 'parent' => 0
74 );
75 // 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.
76 $terms = get_terms( array_merge( wp_parse_args( $args ), array( 'taxonomy' => 'availability' ) ) );
77
78 // 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.
79 $selected_value = '';
80 if ( !empty( $terms ) && !is_wp_error( $terms ) )
81 {
82 foreach ($terms as $term)
83 {
84 // 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.
85 $options[$term->term_id] = $term->name;
86 }
87 }
88
89 // 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.
90 foreach ($options as $key => $value) {
91 echo '<option value="' . esc_attr( $key ) . '">' . esc_html($value) . '</option>';
92 }
93 ?>
94 </select>
95 </span>
96 </label>
97 </div>
98
99 <div class="inline-edit-group">
100 <label class="alignleft">
101 <span class="title"><?php echo esc_html(__( 'Negotiator', 'propertyhive' )); ?></span>
102 <span class="input-text-wrap">
103 <?php
104 // 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.
105 $args = array(
106 'name' => '_negotiator_id',
107 'id' => '_negotiator_id',
108 'show_option_none' => '— No Change —',
109 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Legacy Property Negotiator compatibility filter; existing role filters depend on this exact public hook name.
110 'role__not_in' => apply_filters( 'property_negotiator_exclude_roles', array('property_hive_contact', 'subscriber') )
111 );
112 wp_dropdown_users($args);
113 ?>
114 </span>
115 </label>
116 </div>
117
118 <div class="inline-edit-group">
119 <label class="alignleft">
120 <span class="title"><?php echo esc_html(__( 'Office', 'propertyhive' )); ?></span>
121 <span class="input-text-wrap">
122 <select class="office_id" name="_office_id">
123 <?php
124
125 // 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.
126 $options = array( '' => __( '— No Change —', 'propertyhive' ) );
127 // 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.
128 $args = array(
129 'post_type' => 'office',
130 'nopaging' => true,
131 'orderby' => 'title',
132 'order' => 'ASC'
133 );
134 // 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.
135 $office_query = new WP_Query($args);
136
137 if ($office_query->have_posts())
138 {
139 while ($office_query->have_posts())
140 {
141 $office_query->the_post();
142
143 // 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.
144 $options[get_the_ID()] = get_the_title();
145 }
146 }
147
148 $office_query->reset_postdata();
149
150 // 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.
151 foreach ($options as $key => $value) {
152 echo '<option value="' . esc_attr( $key ) . '">' . esc_html($value) . '</option>';
153 }
154 ?>
155 </select>
156 </span>
157 </label>
158 </div>
159
160 <?php do_action( 'propertyhive_property_bulk_edit_end' ); ?>
161
162 <input type="hidden" name="propertyhive_bulk_edit" value="1" />
163 <input type="hidden" name="propertyhive_bulk_edit_nonce" value="<?php echo esc_attr(wp_create_nonce( 'propertyhive_bulk_edit_nonce' )); ?>" />
164 </div>
165 </fieldset>
166