PluginProbe
WP Directory Kit / 1.1.6
WP Directory Kit v1.1.6
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / application / views / search_fields / CHECKBOX.php

CHECKBOX.php in WP Directory Kit 1.1.6, at application/views/search_fields/CHECKBOX.php

38 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Search field CHECKBOX.
4 *
5 * This is the template that field layout for search form
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13 <?php
14
15 $field_key = 'field_'.wmvc_show_data('idfield',$field_data);
16 $field_attr_id = 'wdk_field_'.wmvc_show_data('idfield', $field_data);
17 $placeholder = wmvc_show_data('field_label', $field_data);
18 $field_value = false;
19
20 if(isset($predefinedfields_query) && !empty($predefinedfields_query[$field_key])) {
21 $field_value = sanitize_text_field($predefinedfields_query[$field_key]);
22 }
23
24 if(isset($_GET[$field_key]) && $_GET[$field_key] == 1) {
25 $field_value = true;
26 }
27
28 wdk_search_fields_toggle();
29 ?>
30 <div class="wdk-field wdk-col wdk_search_<?php echo esc_attr($field_key);?> <?php echo esc_attr(wmvc_show_data('field_type', $field_data)); ?> <?php echo esc_attr(wmvc_show_data('class', $field_data)); ?>
31 wdk_field_id_<?php echo wmvc_show_data('idfield',$field_data);?>">
32 <div class="wdk-field-group">
33 <label for="<?php echo esc_attr($field_attr_id); ?>" class="wdk-field-label">
34 <input class="wdk-control" name="<?php echo esc_attr($field_key); ?>" <?php if($field_value):?> checked="checked" <?php endif;?> type="checkbox" id="<?php echo esc_attr($field_attr_id); ?>" value="1">
35 <?php echo esc_html(wmvc_show_data('field_label', $field_data)); ?>
36 </label>
37 </div>
38 </div>