Astra_Builder_Customizer::enqueue_customizer_preview_scripts()
Add Customizer preview script.
Description
Source
File: inc/customizer/class-astra-builder-customizer.php
public function enqueue_customizer_preview_scripts() { // Enqueue Builder CSS. wp_enqueue_style( 'ahfb-customizer-preview-style', ASTRA_THEME_URI . 'inc/assets/css/customizer-preview.css', null, ASTRA_THEME_VERSION ); // Advanced Dynamic CSS. wp_enqueue_script( 'ahfb-customizer-preview', ASTRA_THEME_URI . 'inc/assets/js/customizer-preview.js', array( 'customize-preview' ), ASTRA_THEME_VERSION, true ); // Base Dynamic CSS. wp_enqueue_script( 'ahfb-base-customizer-preview', ASTRA_THEME_URI . 'inc/builder/type/base/assets/js/customizer-preview.js', array( 'customize-preview' ), ASTRA_THEME_VERSION, true ); // Localize variables for Astra Breakpoints JS. wp_localize_script( 'ahfb-base-customizer-preview', 'astraBuilderPreview', array( 'tablet_break_point' => astra_get_tablet_breakpoint(), 'mobile_break_point' => astra_get_mobile_breakpoint(), ) ); wp_localize_script( 'ahfb-customizer-preview', 'astraBuilderCustomizer', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'ajax_nonce' => wp_create_nonce( 'astra-builder-customizer-nonce' ), ) ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |