Astra_Customizer::controls_scripts()
Customizer Controls
Description
Return
(void)
Source
File: inc/customizer/class-astra-customizer.php
public function controls_scripts() { $js_prefix = '.min.js'; $css_prefix = '.min.css'; $dir = 'minified'; if ( SCRIPT_DEBUG ) { $js_prefix = '.js'; $css_prefix = '.css'; $dir = 'unminified'; } if ( is_rtl() ) { $css_prefix = '.min-rtl.css'; if ( SCRIPT_DEBUG ) { $css_prefix = '-rtl.css'; } } wp_enqueue_style( 'wp-components' ); wp_enqueue_script( 'thickbox' ); wp_enqueue_style( 'thickbox' ); // Customizer Core. wp_enqueue_script( 'astra-customizer-controls-toggle-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/customizer-controls-toggle' . $js_prefix, array(), ASTRA_THEME_VERSION, true ); // Extended Customizer Assets - Panel extended. wp_enqueue_style( 'astra-extend-customizer-css', ASTRA_THEME_URI . 'assets/css/' . $dir . '/extend-customizer' . $css_prefix, null, ASTRA_THEME_VERSION ); wp_enqueue_script( 'astra-extend-customizer-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/extend-customizer' . $js_prefix, array(), ASTRA_THEME_VERSION, true ); // Customizer Controls. wp_enqueue_style( 'astra-customizer-controls-css', ASTRA_THEME_URI . 'assets/css/' . $dir . '/customizer-controls' . $css_prefix, null, ASTRA_THEME_VERSION ); $string = $this->generate_font_dropdown(); $template = '<div class="ast-field-settings-modal"> <ul class="ast-fields-wrap"> </ul> </div>'; wp_localize_script( 'astra-customizer-controls-toggle-js', 'astra', apply_filters( 'astra_theme_customizer_js_localize', array( 'customizer' => array( 'settings' => array( 'sidebars' => array( 'single' => array( 'single-post-sidebar-layout', 'single-page-sidebar-layout', ), 'archive' => array( 'archive-post-sidebar-layout', ), ), 'container' => array( 'single' => array( 'single-post-content-layout', 'single-page-content-layout', ), 'archive' => array( 'archive-post-content-layout', ), ), 'google_fonts' => $string, ), 'group_modal_tmpl' => $template, 'is_pro' => defined( 'ASTRA_EXT_VER' ), 'upgrade_link' => htmlspecialchars_decode( astra_get_pro_url( 'https://wpastra.com/pricing/', 'customizer', 'upgrade-link', 'upgrade-to-pro' ) ), 'is_block_widget' => astra_has_widgets_block_editor(), ), 'theme' => array( 'option' => ASTRA_THEME_SETTINGS, ), ) ) ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |