PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 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 All 37 releases
wpdirectorykit / application / views / search_fields / CHECKBOX.php

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

46 lines 1.9 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 // Dynamic field values are registered in the translation catalog separately.
20 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
21 $placeholder = esc_html__($placeholder,'wpdirectorykit');
22
23 if(isset($predefinedfields_query) && !empty($predefinedfields_query[$field_key])) {
24 $field_value = sanitize_text_field($predefinedfields_query[$field_key]);
25 }
26
27 if(isset($_GET[$field_key]) && $_GET[$field_key] == 1) {
28 $field_value = true;
29 }
30
31 $prefix_unique = uniqid();
32
33 wdk_search_fields_toggle();
34 ?>
35 <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)); ?>
36 wdk_field_id_<?php echo esc_attr(wmvc_show_data('idfield',$field_data));?>">
37 <div class="wdk-field-group">
38 <label for="<?php echo esc_attr($prefix_unique.$field_attr_id); ?>" class="wdk-field-label">
39 <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($prefix_unique.$field_attr_id); ?>" value="1">
40 <?php
41 // Dynamic field values are registered in the translation catalog separately.
42 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
43 echo esc_html__(wmvc_show_data('field_label', $field_data),'wpdirectorykit'); ?>
44 </label>
45 </div>
46 </div>