Astra_Theme_Extension::controls_scripts()
Enqueues the needed CSS/JS for the customizer.
Description
Return
(void)
Source
File: classes/class-astra-theme-extension.php
public function controls_scripts() { wp_enqueue_script( 'ast-ext-admin-settings', ASTRA_EXT_URI . 'admin/assets/js/customizer-controls.js', array(), ASTRA_EXT_VER, false ); // Enqueue Customizer React.JS script. $custom_controls_react_deps = array( 'astra-custom-control-plain-script', 'wp-i18n', 'wp-components', 'wp-element', 'wp-media-utils', 'wp-block-editor', ); wp_enqueue_script( 'astra-ext-custom-control-react-script', ASTRA_EXT_URI . 'classes/customizer/extend-controls/build/index.js', $custom_controls_react_deps, ASTRA_EXT_VER, true ); if ( function_exists( 'astra_get_option' ) ) { $show_deprecated_no_toggle_style = 'no-toggle' == astra_get_option( 'mobile-menu-style' ) ? true : false; wp_localize_script( 'ast-ext-admin-settings', 'astAdminLacalizeVars', array( 'astra_no_toggle_menu_style_deprecate' => apply_filters( 'astra_no_toggle_menu_style_deprecate', $show_deprecated_no_toggle_style ), ) ); } }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0 | Introduced. |