Astra_Addon_Header_Menu_Component_Loader::preview_scripts()
Customizer Preview
Description
Source
File: classes/builder/type/header/menu/classes/class-astra-addon-header-menu-component-loader.php
public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-ext-header-menu-customizer-preview-js', ASTRA_ADDON_HEADER_MENU_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-addon-customizer-preview-js' ), ASTRA_EXT_VER, true ); // Localize variables for menu JS. wp_localize_script( 'astra-ext-header-menu-customizer-preview-js', 'AstraAddonMenuData', array( 'component_limit' => astra_addon_builder_helper()->component_limit, ) ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |