| @@ -261,12 +261,13 @@ | ||
| 261 | 261 | 'wpApiSettings' => [ |
| 262 | 262 | 'root'=> esc_url_raw(rest_url()), |
| 263 | 263 | 'nonce'=> wp_create_nonce('wp_rest'), |
| 264 | 264 | 'wdk_secure_nonce'=> wp_create_nonce('wdk_secure_ajax'), |
| 265 | - ] | |
| 265 | + ], | |
| 266 | + 'fields_data' => wdk_cached_field_get(), | |
| 267 | + 'wdk_ai_search_fields' => get_option( 'wdk_ai_search_fields', []), | |
| 266 | 268 | ); |
| 267 | - | |
| 268 | - wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpdirectorykit-public.js', array( 'jquery' ), $this->version, false ); | |
| 269 | + wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpdirectorykit-public.js', array( 'jquery' ,'wp-i18n'), $this->version, false ); | |
| 269 | 270 | wp_localize_script( $this->plugin_name, 'script_parameters', $params); |
| 270 | 271 | wp_localize_script( $this->plugin_name, 'wdk_script_parameters', $params); |
| 271 | 272 | |
| 272 | 273 | wp_register_style('jquery-ui', WPDIRECTORYKIT_URL. 'public/css/jquery-ui.css', array(), '1.12.1' ); |
| @@ -298,9 +299,9 @@ | ||
| 298 | 299 | if(isset($_POST['function']))$function = sanitize_text_field($_POST['function']); |
| 299 | 300 | |
| 300 | 301 | /* protect access only to ajax controller */ |
| 301 | 302 | if($page != 'wdk_frontendajax' && $page != 'wdk_backendajax') { |
| 302 | - exit(esc_html__('Access denied','wdk-bookings')); | |
| 303 | + exit(esc_html__('Access denied','wpdirectorykit')); | |
| 303 | 304 | } |
| 304 | 305 | |
| 305 | 306 | $WMVC = &wdk_get_instance(); |
| 306 | 307 | $WMVC->load_controller($page, $function, array()); |