Astra_Ext_Transparent_Header_Loader::preview_scripts()
Customizer Preview
Description
Source
File: inc/addons/transparent-header/classes/class-astra-ext-transparent-header-loader.php
public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-transparent-header-customizer-preview-js', ASTRA_THEME_TRANSPARENT_HEADER_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); // Localize variables for further JS. wp_localize_script( 'astra-transparent-header-customizer-preview-js', 'AstraBuilderTransparentData', array( 'is_astra_hf_builder_active' => Astra_Builder_Helper::$is_header_footer_builder_active, 'is_flex_based_css' => Astra_Builder_Helper::apply_flex_based_css(), ) ); }
Expand full source code Collapse full source code View on Trac