Astra_Customizer::preview_init()
Customizer Preview Init
Description
Return
(void)
Source
File: inc/customizer/class-astra-customizer.php
public function preview_init() {
// Update variables.
Astra_Theme_Options::refresh();
$js_prefix = '.min.js';
$dir = 'minified';
if ( SCRIPT_DEBUG ) {
$js_prefix = '.js';
$dir = 'unminified';
}
wp_enqueue_script( 'astra-customizer-preview-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/customizer-preview' . $js_prefix, array( 'customize-preview' ), ASTRA_THEME_VERSION, null );
$localize_array = array(
'headerBreakpoint' => astra_header_break_point(),
'includeAnchorsInHeadindsCss' => Astra_Dynamic_CSS::anchors_in_css_selectors_heading(),
'googleFonts' => Astra_Font_Families::get_google_fonts(),
'page_builder_button_style_css' => Astra_Dynamic_CSS::page_builder_button_style_css(),
'elementor_default_color_font_setting' => Astra_Dynamic_CSS::elementor_default_color_font_setting(),
'dynamic_partial_options' => self::$dynamic_options['partials'],
'gb_outline_buttons_patterns_support' => Astra_Dynamic_CSS::gutenberg_core_patterns_compat(),
'font_weights_widget_title_support' => Astra_Dynamic_CSS::support_font_css_to_widget_and_in_editor(),
'is_content_bg_option_to_load' => astra_has_gcp_typo_preset_compatibility(),
'content_layout' => astra_get_content_layout(),
'site_layout' => astra_get_option( 'site-layout' ),
'has_block_editor_support' => Astra_Dynamic_CSS::is_block_editor_support_enabled(),
'updated_gb_outline_button_patterns' => astra_button_default_padding_updated(),
);
wp_localize_script( 'astra-customizer-preview-js', 'astraCustomizer', $localize_array );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |