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/wdk/index.php +293 -92 1.5.7 → 1.5.9 View file →
@@ -13,9 +13,9 @@
13 13 ?>
14 14
15 15 <!-- This file should primarily consist of HTML with a little bit of PHP. -->
16 16 <div class="wrap wdk-wrap">
17 - <h1 class="wp-heading-inline"><?php echo __('Listings Management', 'wpdirectorykit'); ?> <a href="<?php echo get_admin_url() . "admin.php?page=wdk_listing"; ?>" class="button button-primary" title="<?php echo esc_attr__('Add Listing', 'wpdirectorykit'); ?>" id="add_listing_button"><?php echo __('Add Listing', 'wpdirectorykit'); ?></a></h1>
17 + <h1 class="wp-heading-inline"><?php echo esc_html__('Listings Management', 'wpdirectorykit'); ?> <a href="<?php echo esc_url(get_admin_url()) . "admin.php?page=wdk_listing"; ?>" class="button button-primary" title="<?php echo esc_attr__('Add Listing', 'wpdirectorykit'); ?>" id="add_listing_button"><?php echo esc_html__('Add Listing', 'wpdirectorykit'); ?></a></h1>
18 18 <?php
19 19 if (
20 20 !get_option('wdk_listing_page') || get_post_status(get_option('wdk_listing_page')) != 'publish'
21 21 || !get_option('wdk_results_page') || get_post_status(get_option('wdk_results_page')) != 'publish'
@@ -21,11 +21,11 @@
21 21 || !get_option('wdk_results_page') || get_post_status(get_option('wdk_results_page')) != 'publish'
22 22 ): ?>
23 23 <div class="notice notice-success">
24 24 <p>
25 - <?php echo __('Listing Preview page or Listings Result page missing', 'wpdirectorykit'); ?>
25 + <?php echo esc_html__('Listing Preview page or Listings Result page missing', 'wpdirectorykit'); ?>
26 26 <a href="<?php echo esc_url(get_admin_url()) . "admin.php?page=wdk_settings&function=import_demo"; ?>" class="button button-primary" id="reset_data_field_button">
27 - <?php echo __('Import Demo Data', 'wpdirectorykit'); ?>
27 + <?php echo esc_html__('Import Demo Data', 'wpdirectorykit'); ?>
28 28 </a>
29 29 </p>
30 30 </div>
31 31 <?php endif; ?>
@@ -32,11 +32,11 @@
32 32
33 33 <?php if (!function_exists('run_wdk_membership')): ?>
34 34 <div class="notice notice-warning">
35 35 <p>
36 - <?php echo __('Do you want that your visitors add own listings and earn money by selling subscription packages?', 'wpdirectorykit'); ?>
36 + <?php echo esc_html__('Do you want that your visitors add own listings and earn money by selling subscription packages?', 'wpdirectorykit'); ?>
37 37 <a href="https://wpdirectorykit.com/plugins/wp-directory-membership.html" target="_blank">
38 - <?php echo __('Purchase our premium Membership feature and support our work!', 'wpdirectorykit'); ?>
38 + <?php echo esc_html__('Purchase our premium Membership feature and support our work!', 'wpdirectorykit'); ?>
39 39 </a>
40 40 </p>
41 41 </div>
42 42 <?php endif; ?>
@@ -68,11 +68,11 @@
68 68
69 69 <?php if (!$flag): ?>
70 70 <div class="notice notice-success">
71 71 <p>
72 - <?php echo __('Result page missing or Results widget for all results not exists on page', 'wpdirectorykit'); ?>
72 + <?php echo esc_html__('Result page missing or Results widget for all results not exists on page', 'wpdirectorykit'); ?>
73 73 <a href="#" class="button button-primary ajax_query_rest_pages" data-function="reinstall_page" data-arg="wdk_results_page">
74 - <?php echo __('RESET RESULTS PAGE', 'wpdirectorykit'); ?>
74 + <?php echo esc_html__('RESET RESULTS PAGE', 'wpdirectorykit'); ?>
75 75 </a>
76 76 </p>
77 77 </div>
78 78
@@ -116,9 +116,9 @@
116 116 };
117 117
118 118 self.addClass('wdk_btn_load_indicator out');
119 119 self.attr('disabled', 'disabled');
120 - $.post("<?php echo admin_url('admin-ajax.php'); ?>", ajax_param,
120 + $.post("<?php echo esc_url(admin_url('admin-ajax.php')); ?>", ajax_param,
121 121 function(data) {
122 122
123 123 if (data.popup_text_success)
124 124 wdk_log_notify(data.popup_text_success);
@@ -156,29 +156,113 @@
156 156 <div class="tablenav top">
157 157 <div class="alignleft actions">
158 158 <input type="hidden" name="page" value="wdk" />
159 159
160 + <label class="screen-reader-text" for="search"><?php echo esc_html__('Filter by keyword', 'wpdirectorykit'); ?></label>
161 + <input type="text" name="search" id="search" class="postform left" value="<?php echo esc_attr(wmvc_show_data('search', $db_data, '')); ?>" placeholder="<?php echo esc_html__('Filter by keyword', 'wpdirectorykit'); ?>" />
160 162
163 +
161 164 <?php if (get_option('wdk_is_location_enabled', FALSE)): ?>
162 - <label class="screen-reader-text" for="location_id"><?php echo __('Filter by location', 'wpdirectorykit'); ?></label>
163 - <?php echo wmvc_select_option('location_id', $locations, wmvc_show_data('location_id', $db_data, ''), NULL, __('Location', 'wpdirectorykit')); ?>
165 + <label class="screen-reader-text" for="location_id"><?php echo esc_html__('Filter by location', 'wpdirectorykit'); ?></label>
166 + <?php echo wp_kses(
167 + wmvc_select_option(
168 + 'location_id',
169 + $locations,
170 + wmvc_show_data('location_id', $db_data, ''),
171 + NULL,
172 + __('Location', 'wpdirectorykit')
173 + ),
174 + array(
175 + 'select' => array(
176 + 'name' => true,
177 + 'id' => true,
178 + 'class' => true,
179 + 'autocomplete' => true,
180 + 'tabindex' => true,
181 + ),
182 + 'option' => array(
183 + 'value' => true,
184 + 'selected' => true,
185 + 'disabled' => true,
186 + 'label' => true,
187 + ),
188 + )
189 + ); ?>
190 +
164 191 <?php endif; ?>
165 192
166 193 <?php if (get_option('wdk_is_category_enabled', FALSE)): ?>
167 - <label class="screen-reader-text" for="category_id"><?php echo __('Filter by category', 'wpdirectorykit'); ?></label>
168 - <?php echo wmvc_select_option('category_id', $categories, wmvc_show_data('category_id', $db_data, ''), NULL, __('Category', 'wpdirectorykit')); ?>
194 + <label class="screen-reader-text" for="category_id"><?php echo esc_html__('Filter by category', 'wpdirectorykit'); ?></label>
195 + <?php echo wp_kses(
196 + wmvc_select_option(
197 + 'category_id',
198 + $categories,
199 + wmvc_show_data('category_id', $db_data, ''),
200 + NULL,
201 + __('Category', 'wpdirectorykit')
202 + ),
203 + array(
204 + 'select' => array(
205 + 'name' => true,
206 + 'id' => true,
207 + 'class' => true,
208 + 'autocomplete' => true,
209 + 'tabindex' => true,
210 + ),
211 + 'option' => array(
212 + 'value' => true,
213 + 'selected' => true,
214 + 'disabled' => true,
215 + 'label' => true,
216 + ),
217 + )
218 + ); ?>
219 +
169 220 <?php endif; ?>
170 221
171 222 <label class="screen-reader-text" for="user_id_editor"><?php echo esc_html__('Filter by user', 'wpdirectorykit'); ?></label>
172 - <?php echo wmvc_select_option('user_id_editor', $users, wmvc_show_data('user_id_editor', $db_data, ''), NULL, __('User', 'wpdirectorykit')); ?>
223 + <?php echo wp_kses(
224 + wmvc_select_option('user_id_editor', $users, wmvc_show_data('user_id_editor', $db_data, ''), NULL, __('User', 'wpdirectorykit')),
225 + array(
226 + 'select' => array(
227 + 'name' => true,
228 + 'id' => true,
229 + 'class' => true,
230 + 'autocomplete' => true,
231 + 'tabindex' => true,
232 + ),
233 + 'option' => array(
234 + 'value' => true,
235 + 'selected' => true,
236 + 'disabled' => true,
237 + 'label' => true,
238 + ),
239 + )
240 + ); ?>
241 +
173 242
174 - <label class="screen-reader-text" for="search"><?php echo __('Filter by keyword', 'wpdirectorykit'); ?></label>
175 - <input type="text" name="search" id="search" class="postform left" value="<?php echo esc_attr(wmvc_show_data('search', $db_data, '')); ?>" placeholder="<?php echo __('Filter by keyword', 'wpdirectorykit'); ?>" />
243 + <label class="screen-reader-text" for="order_by"><?php echo esc_html__('Order By', 'wpdirectorykit'); ?></label>
244 + <?php echo wp_kses(
245 + wmvc_select_option('order_by', $order_by, wmvc_show_data('order_by', $db_data, ''), NULL, __('Order by', 'wpdirectorykit')),
246 + array(
247 + 'select' => array(
248 + 'name' => true,
249 + 'id' => true,
250 + 'class' => true,
251 + 'autocomplete' => true,
252 + 'tabindex' => true,
253 + ),
254 + 'option' => array(
255 + 'value' => true,
256 + 'selected' => true,
257 + 'disabled' => true,
258 + 'label' => true,
259 + ),
260 + )
261 + ); ?>
262 +
176 263
177 - <label class="screen-reader-text" for="order_by"><?php echo __('Order By', 'wpdirectorykit'); ?></label>
178 - <?php echo wmvc_select_option('order_by', $order_by, wmvc_show_data('order_by', $db_data, ''), NULL, __('Order by', 'wpdirectorykit')); ?>
179 264
180 -
181 265 <?php
182 266 $custom_field_init = false;
183 267 foreach ($_GET as $key => $value) {
184 268 if (stripos($key, 'c_field_') !== FALSE && stripos($key, '_field', 8) !== FALSE) {
@@ -184,11 +268,59 @@
184 268 if (stripos($key, 'c_field_') !== FALSE && stripos($key, '_field', 8) !== FALSE) {
185 269 $field_id = substr($key, 8, (stripos($key, '_', 8) - 8));
186 270 ?>
187 271 <span class="custom_parameter" data-key="<?php echo esc_attr($field_id); ?>">
188 - <?php echo wmvc_select_option('c_field_' . $field_id . '_field', $fields_list, wmvc_show_data('c_field_' . $field_id . '_field', $_GET, ''), 'class="cus_p_field"', __('Field', 'wpdirectorykit')); ?>
189 - <?php echo wmvc_select_option('c_field_' . $field_id . '_like', array('==' => '=', '>' => '>', '<' => '<'), wmvc_show_data('c_field_' . $field_id . '_like', $_GET, ''), 'class="cus_p_like"'); ?>
190 - <input type="text" name="c_field_<?php echo esc_attr($field_id); ?>_value" value="<?php echo esc_attr(wmvc_show_data('c_field_' . $field_id . '_value', $_GET, '')); ?>" class="cus_p_value" placeholder="<?php echo __('Value', 'wpdirectorykit'); ?>" />
272 + <?php
273 + echo wp_kses(
274 + wmvc_select_option(
275 + 'c_field_' . $field_id . '_field',
276 + $fields_list,
277 + wmvc_show_data('c_field_' . $field_id . '_field', $_GET, ''),
278 + 'class="cus_p_field"',
279 + __('Field', 'wpdirectorykit')
280 + ),
281 + array(
282 + 'select' => array(
283 + 'name' => true,
284 + 'id' => true,
285 + 'class' => true,
286 + 'autocomplete' => true,
287 + 'tabindex' => true,
288 + ),
289 + 'option' => array(
290 + 'value' => true,
291 + 'selected' => true,
292 + 'disabled' => true,
293 + 'label' => true,
294 + ),
295 + )
296 + );
297 + echo wp_kses(
298 + wmvc_select_option(
299 + 'c_field_' . $field_id . '_like',
300 + array('==' => '=', '>' => '>', '<' => '<'),
301 + wmvc_show_data('c_field_' . $field_id . '_like', $_GET, ''),
302 + 'class="cus_p_like"'
303 + ),
304 + array(
305 + 'select' => array(
306 + 'name' => true,
307 + 'id' => true,
308 + 'class' => true,
309 + 'autocomplete' => true,
310 + 'tabindex' => true,
311 + ),
312 + 'option' => array(
313 + 'value' => true,
314 + 'selected' => true,
315 + 'disabled' => true,
316 + 'label' => true,
317 + ),
318 + )
319 + );
320 + ?>
321 +
322 + <input type="text" name="c_field_<?php echo esc_attr($field_id); ?>_value" value="<?php echo esc_attr(wmvc_show_data('c_field_' . $field_id . '_value', $_GET, '')); ?>" class="cus_p_value" placeholder="<?php echo esc_html__('Value', 'wpdirectorykit'); ?>" />
191 323 </span>
192 324 <?php
193 325 $custom_field_init = true;
194 326 }
@@ -195,11 +327,59 @@
195 327 };
196 328 ?>
197 329 <?php if (!$custom_field_init): ?>
198 330 <span class="custom_parameter">
199 - <?php echo wmvc_select_option('c_field_1_field', $fields_list, wmvc_show_data('c_field_1_field', $db_data, ''), 'class="cus_p_field"', __('Field', 'wpdirectorykit')); ?>
200 - <?php echo wmvc_select_option('c_field_1_like', array('==' => '=', '>' => '>', '<' => '<'), wmvc_show_data('c_field_1_like', $db_data, ''), 'class="cus_p_like"'); ?>
201 - <input type="text" name="c_field_1_value" value="<?php echo esc_attr(wmvc_show_data('c_field_1_value', $db_data, '')); ?>" class="cus_p_value" placeholder="<?php echo __('Value', 'wpdirectorykit'); ?>" />
331 + <?php
332 + echo wp_kses(
333 + wmvc_select_option(
334 + 'c_field_1_field',
335 + $fields_list,
336 + wmvc_show_data('c_field_1_field', $db_data, ''),
337 + 'class="cus_p_field"',
338 + __('Field', 'wpdirectorykit')
339 + ),
340 + array(
341 + 'select' => array(
342 + 'name' => true,
343 + 'id' => true,
344 + 'class' => true,
345 + 'autocomplete' => true,
346 + 'tabindex' => true,
347 + ),
348 + 'option' => array(
349 + 'value' => true,
350 + 'selected' => true,
351 + 'disabled' => true,
352 + 'label' => true,
353 + ),
354 + )
355 + );
356 + echo wp_kses(
357 + wmvc_select_option(
358 + 'c_field_1_like',
359 + array('==' => '=', '>' => '>', '<' => '<'),
360 + wmvc_show_data('c_field_1_like', $db_data, ''),
361 + 'class="cus_p_like"'
362 + ),
363 + array(
364 + 'select' => array(
365 + 'name' => true,
366 + 'id' => true,
367 + 'class' => true,
368 + 'autocomplete' => true,
369 + 'tabindex' => true,
370 + ),
371 + 'option' => array(
372 + 'value' => true,
373 + 'selected' => true,
374 + 'disabled' => true,
375 + 'label' => true,
376 + ),
377 + )
378 + );
379 + ?>
380 +
381 + <input type="text" name="c_field_1_value" value="<?php echo esc_attr(wmvc_show_data('c_field_1_value', $db_data, '')); ?>" class="cus_p_value" placeholder="<?php echo esc_html__('Value', 'wpdirectorykit'); ?>" />
202 382 </span>
203 383 <?php endif; ?>
204 384
205 385 <a href="" class="btn_parameter remove"><span class="dashicons dashicons-minus"></span></a>
@@ -204,14 +384,26 @@
204 384
205 385 <a href="" class="btn_parameter remove"><span class="dashicons dashicons-minus"></span></a>
206 386 <a href="" class="btn_parameter add"><span class="dashicons dashicons-plus-alt2"></span></a>
207 387
208 - <input type="submit" name="filter_action" id="post-query-submit" class="button" value="<?php echo __('Filter', 'wpdirectorykit'); ?>">
388 + <input type="submit" name="filter_action" id="post-query-submit" class="button" value="<?php echo esc_html__('Filter', 'wpdirectorykit'); ?>">
209 389
210 390 <input type="hidden" name="is_featured" value="<?php echo esc_attr(wmvc_show_data('is_featured', $db_data, '')); ?>">
211 391 <input type="hidden" name="is_activated" value="<?php echo esc_attr(wmvc_show_data('is_activated', $db_data, '')); ?>">
212 392 </div>
213 - <?php echo wmvc_xss_clean($pagination_output); ?>
393 + <?php echo wp_kses($pagination_output, array(
394 + 'div' => array('class' => true, 'id' => true, 'style' => true),
395 + 'span' => array('class' => true, 'id' => true, 'style' => true),
396 + 'a' => array('href' => true, 'class' => true, 'id' => true, 'style' => true, 'title' => true, 'rel' => true),
397 + 'ul' => array('class' => true, 'id' => true, 'style' => true),
398 + 'li' => array('class' => true, 'id' => true, 'style' => true),
399 + 'b' => array(),
400 + 'strong' => array(),
401 + 'em' => array(),
402 + 'i' => array(),
403 + 'br' => array(),
404 + )); ?>
405 +
214 406 <br class="clear">
215 407 </div>
216 408 </form>
217 409
@@ -224,16 +416,16 @@
224 416 <form method="GET" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" novalidate="novalidate">
225 417 <table class="wp-list-table widefat fixed striped table-view-list pages">
226 418 <thead>
227 419 <tr>
228 - <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1"><?php echo __('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-1" type="checkbox"></td>
229 - <th style="width:50px;"><?php echo __('#ID', 'wpdirectorykit'); ?></th>
230 - <th><?php echo __('Title', 'wpdirectorykit'); ?></th>
420 + <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-1" type="checkbox"></td>
421 + <th style="width:50px;"><?php echo esc_html__('#ID', 'wpdirectorykit'); ?></th>
422 + <th><?php echo esc_html__('Title', 'wpdirectorykit'); ?></th>
231 423 <?php if (get_option('wdk_is_category_enabled', FALSE)): ?>
232 - <th><?php echo __('Category', 'wpdirectorykit'); ?></th>
424 + <th><?php echo esc_html__('Category', 'wpdirectorykit'); ?></th>
233 425 <?php endif; ?>
234 - <th style="text-align: center;"><?php echo __('Image', 'wpdirectorykit'); ?></th>
235 - <th><?php echo __('Post Date', 'wpdirectorykit'); ?></th>
426 + <th style="text-align: center;"><?php echo esc_html__('Image', 'wpdirectorykit'); ?></th>
427 + <th><?php echo esc_html__('Post Date', 'wpdirectorykit'); ?></th>
236 428 <?php if (function_exists('PLL')): ?>
237 429 <?php $pll_langs = pll_the_languages(array('raw' => 1));
238 430 foreach ($pll_langs as $pll_lang): ?>
239 431 <th class="manage-column column-language_<?php echo esc_attr($pll_lang['slug']); ?>"><img src="<?php echo esc_attr($pll_lang['flag']); ?>" /></th>
@@ -238,17 +430,44 @@
238 430 foreach ($pll_langs as $pll_lang): ?>
239 431 <th class="manage-column column-language_<?php echo esc_attr($pll_lang['slug']); ?>"><img src="<?php echo esc_attr($pll_lang['flag']); ?>" /></th>
240 432 <?php endforeach; ?>
241 433 <?php endif; ?>
242 - <th class="static"><?php echo __('Views', 'wpdirectorykit'); ?></th>
243 - <th class="static"><?php echo __('Showed in results', 'wpdirectorykit'); ?></th>
244 - <th class="actions_column"><?php echo __('Actions', 'wpdirectorykit'); ?></th>
434 + <th class="static"><?php echo esc_html__('Views', 'wpdirectorykit'); ?></th>
435 + <th class="static"><?php echo esc_html__('Showed in results', 'wpdirectorykit'); ?></th>
436 + <th class="actions_column"><?php echo esc_html__('Actions', 'wpdirectorykit'); ?></th>
245 437 </tr>
246 438 </thead>
247 439 <tbody>
248 440 <?php if (count($listings) == 0) : ?>
249 441 <tr class="no-items">
250 - <td class="colspanchange" colspan="9"><?php echo __('No Listings found.', 'wpdirectorykit'); ?></td>
442 + <td class="colspanchange" colspan="9">
443 + <div class="wdk-empty-state">
444 + <img
445 + src="<?php echo esc_url(WPDIRECTORYKIT_URL . 'admin/img/no-listings.svg'); ?>"
446 + class="wdk-empty-state__image"
447 + alt=""
448 + width="220"
449 + height="178"
450 + />
451 +
452 + <h3 class="wdk-empty-state__title">
453 + <?php echo esc_html__('No Listings Yet', 'wpdirectorykit'); ?>
454 + </h3>
455 +
456 + <p class="wdk-empty-state__description">
457 + <?php echo esc_html__(
458 + 'You haven’t created any listings yet. Start by creating your first listing to see it here.',
459 + 'wpdirectorykit'
460 + ); ?>
461 + </p>
462 +
463 + <a class="button-primary"
464 + href="<?php echo esc_url(get_admin_url()) . "admin.php?page=wdk_listing"; ?>">
465 + <span aria-hidden="true">+</span>
466 + <?php echo esc_html__('Create Listing', 'wpdirectorykit'); ?>
467 + </a>
468 + </div>
469 + </td>
251 470 </tr>
252 471 <?php endif; ?>
253 472 <?php foreach ($listings as $listing) : ?>
254 473 <tr>
@@ -255,9 +474,9 @@
255 474 <th scope="row" class="check-column">
256 475 <input id="cb-select-<?php echo esc_attr(wmvc_show_data('ID', $listing, '-')); ?>" type="checkbox" name="post[]" value="<?php echo esc_attr(wmvc_show_data('ID', $listing, '-')); ?>">
257 476 <div class="locked-indicator">
258 477 <span class="locked-indicator-icon" aria-hidden="true"></span>
259 - <span class="screen-reader-text"><?php echo __('Is Locked', 'wpdirectorykit'); ?></span>
478 + <span class="screen-reader-text"><?php echo esc_html__('Is Locked', 'wpdirectorykit'); ?></span>
260 479 </div>
261 480 </th>
262 481 <td>
263 482 <?php echo esc_html(wmvc_show_data('ID', $listing, '-')); ?>
@@ -265,9 +484,9 @@
265 484 <td class="title column-title has-row-actions column-primary page-title" data-colname="Title">
266 485 <strong>
267 486 <a class="row-title" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_listing&id=" . wmvc_show_data('ID', $listing, '-')); ?>"><?php echo esc_html(wmvc_show_data('post_title', $listing, '-')); ?></a>
268 487 <?php if (!wmvc_show_data('is_activated', $listing, 0)): ?>
269 - <span class="label label-danger"><?php echo __('Not activated', 'wpdirectorykit'); ?></span>
488 + <span class="label label-danger"><?php echo esc_html__('Not activated', 'wpdirectorykit'); ?></span>
270 489 <?php endif; ?>
271 490 <?php if (!wmvc_show_data('is_approved', $listing, 0) && function_exists('run_wdk_membership')): ?>
272 491 <span class="label label-danger"><?php echo esc_html__('Not approved', 'wpdirectorykit'); ?></span>
273 492 <?php endif; ?>
@@ -274,16 +493,16 @@
274 493
275 494 <?php if (wdk_get_option('wdk_is_featured_enabled', FALSE)): ?>
276 495 <?php if (wmvc_show_data('is_featured', $listing, 0)): ?>
277 496 <span class="label label-info"><?php echo esc_html__('featured', 'wpdirectorykit'); ?></span>
278 - <?php endif; ?>
279 497 <?php endif; ?>
498 + <?php endif; ?>
280 499
281 500 </strong>
282 501 <div class="row-actions">
283 - <span class="edit"><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_listing&id=" . wmvc_show_data('ID', $listing, '-')); ?>"><?php echo __('Edit', 'wpdirectorykit'); ?></a> | </span>
284 - <span class="trash "><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk&function=delete&paged=" . esc_attr($paged) . "&id=" . wmvc_show_data('ID', $listing, '-')); ?>&_wpnonce=<?php echo wp_create_nonce('wdk-listing-delete_' . wmvc_show_data('ID', $listing, '-')); ?>" class="submitdelete question_sure"><?php echo __('Delete', 'wpdirectorykit'); ?></a> | </span>
285 - <span class="view"><a href="<?php echo get_permalink($listing); ?>" target="blank"><?php echo __('View', 'wpdirectorykit'); ?></a></span>
502 + <span class="edit"><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_listing&id=" . wmvc_show_data('ID', $listing, '-')); ?>"><?php echo esc_html__('Edit', 'wpdirectorykit'); ?></a> | </span>
503 + <span class="trash "><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk&function=delete&paged=" . esc_attr($paged) . "&id=" . wmvc_show_data('ID', $listing, '-')); ?>&_wpnonce=<?php echo esc_attr(wp_create_nonce('wdk-listing-delete_' . wmvc_show_data('ID', $listing, '-'))); ?>" class="submitdelete question_sure"><?php echo esc_html__('Delete', 'wpdirectorykit'); ?></a> | </span>
504 + <span class="view"><a href="<?php echo esc_url(get_permalink($listing)); ?>" target="blank"><?php echo esc_html__('View', 'wpdirectorykit'); ?></a></span>
286 505 </div>
287 506
288 507
289 508 <?php if (get_option('wdk_sub_listings_enable')): ?>
@@ -313,9 +532,9 @@
313 532 <img src="<?php echo esc_url(wdk_image_src($listing)); ?>" alt="thumb" style="height:70px;width:110px;object-fit:cover;text-align: center;" />
314 533 </a>
315 534 </td>
316 535 <td>
317 - <?php echo wdk_get_date($listing->post_date, false); ?>
536 + <?php echo esc_html(wdk_get_date($listing->post_date, false)); ?>
318 537 </td>
319 538 <?php if (function_exists('PLL')): ?>
320 539
321 540 <?php foreach ($pll_langs as $pll_lang): ?>
@@ -337,55 +556,25 @@
337 556 <td class="static">
338 557 <?php echo esc_html(wmvc_show_data('counter_results_views', $listing, '-')); ?>
339 558 </td>
340 559 <td class="actions_column">
341 - <a href="<?php echo get_permalink($listing); ?>" title="<?php echo esc_attr__('View', 'wpdirectorykit'); ?>" target="blank"><span class="dashicons dashicons-visibility"></span></a>
560 + <a href="<?php echo esc_html(get_permalink($listing)); ?>" title="<?php echo esc_attr__('View', 'wpdirectorykit'); ?>" target="blank"><span class="dashicons dashicons-visibility"></span></a>
342 561 <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_listing&id=" . wmvc_show_data('ID', $listing, '-')); ?>" title="<?php echo esc_attr__('Edit', 'wpdirectorykit'); ?>"><span class="dashicons dashicons-edit"></span></a>
343 - <a class="question_sure" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk&function=delete&paged=" . esc_attr($paged) . "&id=" . wmvc_show_data('ID', $listing, '-') . "&_wpnonce=" . wp_create_nonce('wdk-listing-delete_' . wmvc_show_data('ID', $listing, '-'))); ?>" title="<?php echo esc_attr__('Remove', 'wpdirectorykit'); ?>"><span class="dashicons dashicons-no"></span></a>
562 + <a class="question_sure" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk&function=delete&paged=" . esc_attr($paged) . "&id=" . wmvc_show_data('ID', $listing, '-') . "&_wpnonce=" . esc_attr(wp_create_nonce('wdk-listing-delete_' . wmvc_show_data('ID', $listing, '-')))); ?>" title="<?php echo esc_attr__('Remove', 'wpdirectorykit'); ?>"><span class="dashicons dashicons-no"></span></a>
344 563 </td>
345 564 </tr>
346 -
347 - <?php if (get_option('wdk_sub_listings_enable')): ?>
348 - <?php if (!empty(wmvc_show_data('listing_related_ids', $listing))): ?>
349 - <?php if (false) foreach (explode(',', wmvc_show_data('listing_related_ids', $listing, '')) as $key => $child_idlisting): ?>
350 - <tr class="child">
351 - <th scope="row"></th>
352 - <td scope="row"></td>
353 - <td colspan="1">
354 - <a target="_blank" href="<?php echo esc_url(admin_url('admin.php?page=wdk_listing&id=' . $child_idlisting)); ?>"><?php echo esc_html('#' . $child_idlisting . ', ' . wdk_field_value('post_title', $child_idlisting)); ?></a>
355 - </td>
356 - <td>
357 - <?php echo wdk_field_value('category_id', $categories); ?>
358 - </td>
359 - <td style="text-align: center;">
360 - <a class="img-link" href="<?php echo get_admin_url() . "admin.php?page=wdk_listing&id=" . $child_idlisting; ?>">
361 - <img src="<?php echo esc_url(wdk_image_src(array('listing_images' => wdk_field_value('listing_images', $child_idlisting)))); ?>" alt="thumb" style="height:50px;width:65px;object-fit:cover;text-align: center;" />
362 - </a>
363 - </td>
364 - <td>
365 - <?php echo wdk_get_date(wdk_field_value('date', $child_idlisting), false); ?>
366 - </td>
367 - <td class="actions_column">
368 - <a href="<?php echo get_permalink($child_idlisting); ?>" title="<?php echo esc_attr__('View', 'wpdirectorykit'); ?>" target="blank"><span class="dashicons dashicons-visibility"></span></a>
369 - <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_listing&id=" . $child_idlisting); ?>" title="<?php echo esc_attr__('Edit', 'wpdirectorykit'); ?>"><span class="dashicons dashicons-edit"></span></a>
370 - <a class="question_sure" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk&function=delete&paged=" . esc_attr($paged) . "&id=" . $child_idlisting . "&_wpnonce=" . wp_create_nonce('wdk-listing-delete_' . wmvc_show_data('ID', $listing, '-'))); ?>" title="<?php echo esc_attr__('Remove', 'wpdirectorykit'); ?>"><span class="dashicons dashicons-no"></span></a>
371 - </td>
372 - </tr>
373 - <?php endforeach; ?>
374 - <?php endif; ?>
375 - <?php endif; ?>
376 565 <?php endforeach; ?>
377 566 </tbody>
378 567 <tfoot>
379 568 <tr>
380 - <td class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-2"><?php echo __('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-2" type="checkbox"></td>
381 - <th style="width:50px;"><?php echo __('#ID', 'wpdirectorykit'); ?></th>
382 - <th><?php echo __('Title', 'wpdirectorykit'); ?></th>
569 + <td class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-2"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-2" type="checkbox"></td>
570 + <th style="width:50px;"><?php echo esc_html__('#ID', 'wpdirectorykit'); ?></th>
571 + <th><?php echo esc_html__('Title', 'wpdirectorykit'); ?></th>
383 572 <?php if (get_option('wdk_is_category_enabled', FALSE)): ?>
384 - <th><?php echo __('Category', 'wpdirectorykit'); ?></th>
573 + <th><?php echo esc_html__('Category', 'wpdirectorykit'); ?></th>
385 574 <?php endif; ?>
386 - <th style="text-align: center;"><?php echo __('Image', 'wpdirectorykit'); ?></th>
387 - <th><?php echo __('Post Date', 'wpdirectorykit'); ?></th>
575 + <th style="text-align: center;"><?php echo esc_html__('Image', 'wpdirectorykit'); ?></th>
576 + <th><?php echo esc_html__('Post Date', 'wpdirectorykit'); ?></th>
388 577 <?php if (function_exists('PLL')): ?>
389 578 <?php foreach ($pll_langs as $pll_lang): ?>
390 579 <th><img src="<?php echo esc_attr($pll_lang['flag']); ?>" /></th>
391 580 <?php endforeach; ?>
@@ -391,9 +580,9 @@
391 580 <?php endforeach; ?>
392 581 <?php endif; ?>
393 582 <th class=""></th>
394 583 <th class=""></th>
395 - <th class="actions_column"><?php echo __('Actions', 'wpdirectorykit'); ?></th>
584 + <th class="actions_column"><?php echo esc_html__('Actions', 'wpdirectorykit'); ?></th>
396 585 </tr>
397 586 </tfoot>
398 587 </table>
399 588 <div class="tablenav bottom">
@@ -398,17 +587,17 @@
398 587 </table>
399 588 <div class="tablenav bottom">
400 589 <div class="alignleft actions bulkactions">
401 590 <?php wp_nonce_field('wdk-listing-bulk', '_wpnonce'); ?>
402 - <label for="bulk-action-selector-bottom" class="screen-reader-text"><?php echo __('Select bulk action', 'wpdirectorykit'); ?></label>
591 + <label for="bulk-action-selector-bottom" class="screen-reader-text"><?php echo esc_html__('Select bulk action', 'wpdirectorykit'); ?></label>
403 592 <select name="action" id="bulk-action-selector-bottom">
404 - <option value="-1"><?php echo __('Bulk actions', 'wpdirectorykit'); ?></option>
405 - <option value="delete" class="hide-if-no-js"><?php echo __('Delete', 'wpdirectorykit'); ?></option>
406 - <option value="deactivate" class="hide-if-no-js"><?php echo __('Deactivate', 'wpdirectorykit'); ?></option>
407 - <option value="activate" class="hide-if-no-js"><?php echo __('Activate', 'wpdirectorykit'); ?></option>
593 + <option value="-1"><?php echo esc_html__('Bulk actions', 'wpdirectorykit'); ?></option>
594 + <option value="delete" class="hide-if-no-js"><?php echo esc_html__('Delete', 'wpdirectorykit'); ?></option>
595 + <option value="deactivate" class="hide-if-no-js"><?php echo esc_html__('Deactivate', 'wpdirectorykit'); ?></option>
596 + <option value="activate" class="hide-if-no-js"><?php echo esc_html__('Activate', 'wpdirectorykit'); ?></option>
408 597 <?php if (function_exists('run_wdk_membership')): ?>
409 - <option value="deapprove" class="hide-if-no-js"><?php echo __('Deapprove', 'wpdirectorykit'); ?></option>
410 - <option value="approve" class="hide-if-no-js"><?php echo __('Approve', 'wpdirectorykit'); ?></option>
598 + <option value="deapprove" class="hide-if-no-js"><?php echo esc_html__('Deapprove', 'wpdirectorykit'); ?></option>
599 + <option value="approve" class="hide-if-no-js"><?php echo esc_html__('Approve', 'wpdirectorykit'); ?></option>
411 600 <?php endif; ?>
412 601 </select>
413 602 <input type="hidden" name="page" value="wdk" />
414 603 <input type="submit" id="table_action" class="button action" name="table_action" value="<?php echo esc_attr__('Apply', 'wpdirectorykit'); ?>">
@@ -413,9 +602,21 @@
413 602 <input type="hidden" name="page" value="wdk" />
414 603 <input type="submit" id="table_action" class="button action" name="table_action" value="<?php echo esc_attr__('Apply', 'wpdirectorykit'); ?>">
415 604 </div>
416 605
417 - <?php echo wmvc_xss_clean($pagination_output); ?>
606 + <?php echo wp_kses($pagination_output, array(
607 + 'div' => array('class' => true, 'id' => true, 'style' => true),
608 + 'span' => array('class' => true, 'id' => true, 'style' => true),
609 + 'a' => array('href' => true, 'class' => true, 'id' => true, 'style' => true, 'title' => true, 'rel' => true),
610 + 'ul' => array('class' => true, 'id' => true, 'style' => true),
611 + 'li' => array('class' => true, 'id' => true, 'style' => true),
612 + 'b' => array(),
613 + 'strong' => array(),
614 + 'em' => array(),
615 + 'i' => array(),
616 + 'br' => array(),
617 + )); ?>
618 +
418 619 <br class="clear">
419 620 </div>
420 621 </form>
421 622 </div>
@@ -455,9 +656,9 @@
455 656 "listing_id": listing_id,
456 657 "_wpnonce": '<?php echo esc_js(wp_create_nonce('wdk-backendajax')); ?>',
457 658 };
458 659
459 - jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", ajax_param,
660 + jQuery.post("<?php echo esc_url(admin_url('admin-ajax.php')); ?>", ajax_param,
460 661 function(data) {
461 662
462 663 if (data.popup_text_success)
463 664 wdk_log_notify(data.popup_text_success);
@@ -538,9 +739,9 @@
538 739 var tr = self.closest('tr');
539 740
540 741 self.addClass('wdk_btn_load_indicator out');
541 742
542 - jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", ajax_param,
743 + jQuery.post("<?php echo esc_url(admin_url('admin-ajax.php')); ?>", ajax_param,
543 744 function(data) {
544 745
545 746 if (data.popup_text_success)
546 747 wdk_log_notify(data.popup_text_success);