From 389409556ebd8ff58b702f9e5c69ff0e6b5d7e5c Mon Sep 17 00:00:00 2001 From: LebCit Date: Mon, 3 Dec 2018 21:26:32 +0200 Subject: [PATCH] Changed wp_localize_script code --- class-full-screen-morphing-search.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/class-full-screen-morphing-search.php b/class-full-screen-morphing-search.php index d26add9..165ab1f 100644 --- a/class-full-screen-morphing-search.php +++ b/class-full-screen-morphing-search.php @@ -64,10 +64,13 @@ class Full_Screen_Morphing_Search { // Load Javascript. wp_enqueue_script( $this->plugin->name, $this->plugin->url . 'assets/js/full-screen-morphing-search.js', array( 'jquery' ), '1.0', true ); - $fsmsp_settings = array( - 'fsmsp_search_text' => get_option( 'fsmsp_options' )['fsmsp_search_form_text'], + wp_localize_script( + $this->plugin->name, + 'fsmsp_vars', + array( + 'fsmsp_is_customize_preview' => is_customize_preview(), + ) ); - wp_localize_script( 'full-screen-morphing-search', 'fsmsp_set', $fsmsp_settings ); } /**