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
← All changes | application/views/search_fields/LOCATION.php +16 -6 1.5.3 → 1.5.9 View file →
@@ -21,9 +21,9 @@
21 21 $field_value = intval($predefinedfields_query[$field_key]);
22 22 }
23 23
24 24 if(isset($_GET['location_root'])) {
25 - $predefinedfields_query['custom_location_root'] = sanitize_text_field($_GET['location_root']);
25 + $predefinedfields_query['custom_location_root'] = sanitize_text_field(wp_unslash($_GET['location_root']));
26 26 }
27 27
28 28 if(isset($predefinedfields_query) && !empty($predefinedfields_query['custom_location_root'])) {
29 29 $custom_field_value = intval($predefinedfields_query['custom_location_root']);
@@ -129,9 +129,11 @@
129 129
130 130 <div data-level="<?php echo esc_attr($level);?>" data-field="<?php echo esc_attr($field_key); ?>" class="wdk-field wdk-col wdk_treefield_dropdown <?php echo esc_attr(wmvc_show_data('field_type', $field_data)); ?> <?php echo esc_attr(wmvc_show_data('class', $field_data)); ?>">
131 131 <label class="wdk-field-label"><?php echo esc_html(wmvc_show_data('field_label', $field_data)); ?></label>
132 132 <div class="wdk-field-group">
133 - <?php echo wmvc_select_option('location_'.$level, $values_list, $location, 'class="wdk-control"');?>
133 + <?php
134 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
135 + echo wmvc_select_option('location_'.$level, $values_list, $location, 'class="wdk-control"');?>
134 136 </div>
135 137 </div>
136 138
137 139 <?php
@@ -151,9 +153,11 @@
151 153
152 154 <div data-level="<?php echo esc_attr($level);?>" data-field="<?php echo esc_attr($field_key); ?>" class="wdk-field wdk-col wdk_treefield_dropdown <?php echo esc_attr(wmvc_show_data('field_type', $field_data)); ?> <?php echo esc_attr(wmvc_show_data('class', $field_data)); ?>">
153 155 <label class="wdk-field-label"><?php echo esc_html(wmvc_show_data('field_label', $field_data)); ?></label>
154 156 <div class="wdk-field-group">
155 - <?php echo wmvc_select_option('location_'.$level, $values_list, NULL, 'class="wdk-control"');?>
157 + <?php
158 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
159 + echo wmvc_select_option('location_'.$level, $values_list, NULL, 'class="wdk-control"');?>
156 160 </div>
157 161 </div>
158 162
159 163 <?php
@@ -166,18 +170,24 @@
166 170 <div class="wdk-field wdk-col <?php echo esc_attr(wmvc_show_data('field_type', $field_data)); ?> <?php echo esc_attr(wmvc_show_data('class', $field_data)); ?>">
167 171 <label class="wdk-field-label"><?php echo esc_html(wmvc_show_data('field_label', $field_data)); ?></label>
168 172 <div class="wdk-field-group">
169 173 <?php if(wdk_get_option('wdk_multi_locations_search_field_type') == 'select2'):?>
170 - <?php echo wdk_treefield_select_ajax ($field_key.'[]', 'location_m', $field_value, 'location_title','idlocation', '', __('All Locations', 'wpdirectorykit'), $filter_ids);?>
174 + <?php
175 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
176 + echo wdk_treefield_select_ajax ($field_key.'[]', 'location_m', $field_value, 'location_title','idlocation', '', __('All Locations', 'wpdirectorykit'), $filter_ids);?>
171 177 <?php elseif(wdk_get_option('wdk_multi_locations_search_field_type') == 'wdk_treefield_checkboxes'):?>
172 178 <?php
173 179 wp_enqueue_style( 'wdk-treefield-checkboxes');
174 180 wp_enqueue_script( 'wdk-treefield-checkboxes');
175 181 ?>
176 - <?php echo wdk_treefield_option_checkboxes ('search_location', 'location_m', $field_value, 'location_title', '', __('All Locations', 'wpdirectorykit'), $filter_ids);?>
182 + <?php
183 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
184 + echo wdk_treefield_option_checkboxes ('search_location', 'location_m', $field_value, 'location_title', '', __('All Locations', 'wpdirectorykit'), $filter_ids);?>
177 185 <?php else:?>
178 - <?php echo wdk_treefield_option ('search_location', 'location_m', $field_value, 'location_title', '', __('All Locations', 'wpdirectorykit'), $filter_ids, FALSE, '', $hide_fields);?>
186 + <?php
187 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
188 + echo wdk_treefield_option ('search_location', 'location_m', $field_value, 'location_title', '', __('All Locations', 'wpdirectorykit'), $filter_ids, FALSE, '', $hide_fields);?>
179 189 <?php endif;?>
180 190 </div>
181 191 </div>
182 192
183 193 <?php endif;?>