PluginProbe
Property Hive / 1.4.53
Property Hive v1.4.53
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 1.4.62 All 260 releases
propertyhive / includes / admin / views / html-bulk-edit-property.php

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

129 lines 3.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 _e( 'On Market', 'propertyhive' ); ?></span>
20 <span class="input-text-wrap">
21 <select class="on_market" name="_on_market">
22 <?php
23 $options = array(
24 '' => __( '— No Change —', 'propertyhive' ),
25 'yes' => __( 'Yes', 'propertyhive' ),
26 'no' => __( 'No', 'propertyhive' ),
27 );
28 foreach ($options as $key => $value) {
29 echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
30 }
31 ?>
32 </select>
33 </span>
34 </label>
35 </div>
36
37 <div class="inline-edit-group">
38 <label class="alignleft">
39 <span class="title"><?php _e( 'Availability', 'propertyhive' ); ?></span>
40 <span class="input-text-wrap">
41 <select class="availability" name="_availability">
42 <?php
43
44 $options = array( '' => __( '— No Change —', 'propertyhive' ) );
45 $args = array(
46 'hide_empty' => false,
47 'parent' => 0
48 );
49 $terms = get_terms( 'availability', $args );
50
51 $selected_value = '';
52 if ( !empty( $terms ) && !is_wp_error( $terms ) )
53 {
54 foreach ($terms as $term)
55 {
56 $options[$term->term_id] = $term->name;
57 }
58 }
59
60 foreach ($options as $key => $value) {
61 echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
62 }
63 ?>
64 </select>
65 </span>
66 </label>
67 </div>
68
69 <div class="inline-edit-group">
70 <label class="alignleft">
71 <span class="title"><?php _e( 'Negotiator', 'propertyhive' ); ?></span>
72 <span class="input-text-wrap">
73 <?php
74 $args = array(
75 'name' => '_negotiator_id',
76 'id' => '_negotiator_id',
77 'show_option_none' => '— No Change —',
78 'role__not_in' => array('property_hive_contact')
79 );
80 wp_dropdown_users($args);
81 ?>
82 </span>
83 </label>
84 </div>
85
86 <div class="inline-edit-group">
87 <label class="alignleft">
88 <span class="title"><?php _e( 'Office', 'propertyhive' ); ?></span>
89 <span class="input-text-wrap">
90 <select class="office_id" name="_office_id">
91 <?php
92
93 $options = array( '' => __( '— No Change —', 'propertyhive' ) );
94 $args = array(
95 'post_type' => 'office',
96 'nopaging' => true,
97 'orderby' => 'title',
98 'order' => 'ASC'
99 );
100 $office_query = new WP_Query($args);
101
102 if ($office_query->have_posts())
103 {
104 while ($office_query->have_posts())
105 {
106 $office_query->the_post();
107
108 $options[get_the_ID()] = get_the_title();
109 }
110 }
111
112 $office_query->reset_postdata();
113
114 foreach ($options as $key => $value) {
115 echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
116 }
117 ?>
118 </select>
119 </span>
120 </label>
121 </div>
122
123 <?php do_action( 'propertyhive_property_bulk_edit_end' ); ?>
124
125 <input type="hidden" name="propertyhive_bulk_edit" value="1" />
126 <input type="hidden" name="propertyhive_bulk_edit_nonce" value="<?php echo wp_create_nonce( 'propertyhive_bulk_edit_nonce' ); ?>" />
127 </div>
128 </fieldset>
129