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 | admin/class-wpdirectorykit-admin.php +30 -11 1.5.4 → 1.5.9 View file →
@@ -97,12 +97,13 @@
97 97
98 98 // Register and enqueue Tribute.js style
99 99 wp_register_style(
100 100 'tribute-css',
101 - 'https://cdn.jsdelivr.net/npm/[email protected]/dist/tribute.css',
101 + WPDIRECTORYKIT_URL . 'public/js/tribute/tribute.css',
102 102 [],
103 103 '5.1.3'
104 104 );
105 +
105 106
106 107 }
107 108
108 109 /**
@@ -128,13 +129,14 @@
128 129
129 130 // Register and enqueue Tribute.js script
130 131 wp_register_script(
131 132 'tribute-js',
132 - 'https://cdn.jsdelivr.net/npm/[email protected]/dist/tribute.min.js',
133 + WPDIRECTORYKIT_URL . 'public/js/tribute/tribute.min.js',
133 134 [],
134 135 '5.1.3',
135 136 true
136 137 );
138 +
137 139
138 140 wp_register_script('wdk-treefield', WPDIRECTORYKIT_URL . 'public/js/wdk_treefield/treefield.js', array('jquery'), false, false);
139 141 wp_register_script('wpmediaelement_file', WPDIRECTORYKIT_URL . 'admin/js/jquery.wpmediaelement_file.js', array('jquery'), false, false);
140 142
@@ -216,8 +218,14 @@
216 218
217 219 if (isset($_POST['page'])) $page = sanitize_text_field($_POST['page']);
218 220 if (isset($_POST['function'])) $function = sanitize_text_field($_POST['function']);
219 221
222 + /* protect access only to ajax controller */
223 + if($page != 'wdk_frontendajax' && $page != 'wdk_backendajax' && $page != 'wdk_fields') {
224 + exit(esc_html__('Access denied','wpdirectorykit'));
225 + }
226 +
227 +
220 228 $Winter_MVC_WDK->load_controller($page, $function, array());
221 229 }
222 230
223 231 /**
@@ -344,17 +352,28 @@
344 352 'wdk_location',
345 353 array($this, 'admin_page_display')
346 354 );
347 355
348 - add_submenu_page(
349 - 'wdk',
350 - __('Search Form', 'wpdirectorykit'),
351 - __('Search Form', 'wpdirectorykit'),
352 - 'wdk_listings_manage',
353 - 'wdk_searchform',
354 - array($this, 'admin_page_display')
355 - );
356 -
356 +
357 + add_submenu_page(
358 + 'wdk',
359 + __('Search Form', 'wpdirectorykit'),
360 + __('Search Form', 'wpdirectorykit'),
361 + 'wdk_listings_manage',
362 + 'wdk_searchform',
363 + array($this, 'admin_page_display')
364 + );
365 +
366 + if (function_exists('fpai_register_settings')) {
367 + add_submenu_page(
368 + 'wdk',
369 + __('Ai Search', 'wpdirectorykit'),
370 + __('Ai Search', 'wpdirectorykit'),
371 + 'wdk_listings_manage',
372 + 'wdk_aisearch',
373 + array($this, 'admin_page_display')
374 + );
375 + }
357 376 add_submenu_page(
358 377 'wdk',
359 378 __('Result Card', 'wpdirectorykit'),
360 379 __('Result Card', 'wpdirectorykit'),