Astra_Customizer::enqueue_customizer_scripts()
Add customizer script.
Description
Source
File: inc/customizer/class-astra-customizer.php
public function enqueue_customizer_scripts() { // Localize variables for Dev mode > Customizer JS. wp_localize_script( SCRIPT_DEBUG ? 'astra-custom-control-react-script' : 'astra-custom-control-script', 'AstraBuilderCustomizerData', array( 'contexts' => self::get_contexts(), 'dynamic_setting_options' => self::$dynamic_options['settings'], 'choices' => self::get_choices(), 'js_configs' => self::get_js_configs(), 'tabbed_sections' => self::get_tabbed_sections(), 'component_limit' => Astra_Builder_Helper::$component_limit, 'is_site_rtl' => is_rtl(), 'defaults' => $this->get_control_defaults(), 'astraRegenerateFonts' => wp_create_nonce( 'astra-regenerate-local-fonts' ), 'initialFlushText' => __( 'Flush Local Font Files', 'astra' ), 'successFlushed' => __( 'Successfully Flushed', 'astra' ), 'failedFlushed' => __( 'Failed, Please try again later.', 'astra' ), ) ); if ( is_rtl() ) { $builder_customizer_css_file = 'ast-builder-customizer-rtl'; } else { $builder_customizer_css_file = 'ast-builder-customizer'; } // Enqueue Builder CSS. wp_enqueue_style( 'ahfb-customizer-style', ASTRA_THEME_URI . 'inc/assets/css/' . $builder_customizer_css_file . '.css', array( 'wp-components' ), ASTRA_THEME_VERSION ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |