| 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 |
<?php do_action( 'propertyhive_property_bulk_edit_end' ); ?> |
| 70 |
|
| 71 |
<input type="hidden" name="propertyhive_bulk_edit" value="1" /> |
| 72 |
<input type="hidden" name="propertyhive_bulk_edit_nonce" value="<?php echo wp_create_nonce( 'propertyhive_bulk_edit_nonce' ); ?>" /> |
| 73 |
</div> |
| 74 |
</fieldset> |
| 75 |
|