is_plugin_preview() && is_front_page() ) { wp_enqueue_script( 'hestia-builder-integration', get_template_directory_uri() . '/assets/js/admin/hestia-pagebuilder.js', array(), HESTIA_VERSION ); wp_localize_script( 'hestia-builder-integration', 'hestiaBuilderIntegration', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'hestia-pagebuilder-nonce' ), 'hideString' => esc_html__( 'Disable section', 'hestia' ), ) ); } $had_elementor = get_option( 'hestia_had_elementor' ); // Ask user if he wants to disable default styling for plugin. if ( $had_elementor == 'no' && $this->is_plugin_preview() ) { wp_enqueue_script( 'hestia-elementor-notice', get_template_directory_uri() . '/assets/js/admin/hestia-elementor-notice.js', array(), HESTIA_VERSION ); wp_localize_script( 'hestia-elementor-notice', 'hestiaElementorNotice', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'hestia-elementor-notice-nonce' ), ) ); } } }