Astra_Ext_Spacing_Loader::preview_scripts()

Customizer Preview


Description


Source

File: addons/spacing/classes/class-astra-ext-spacing-loader.php

		public function preview_scripts() {

			if ( SCRIPT_DEBUG ) {
				wp_enqueue_script( 'astra-ext-spacing-customize-preview-js', ASTRA_EXT_SPACING_URL . 'assets/js/unminified/customizer-preview.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true );
			} else {
				wp_enqueue_script( 'astra-ext-spacing-customize-preview-js', ASTRA_EXT_SPACING_URL . 'assets/js/minified/customizer-preview.min.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true );
			}

			$localize_array = array(
				'blog_pro_enabled'   => Astra_Ext_Extension::is_active( 'blog-pro' ),
				'tablet_break_point' => astra_addon_get_tablet_breakpoint(),
				'mobile_break_point' => astra_addon_get_mobile_breakpoint(),
				'component_limit'    => astra_addon_builder_helper()->component_limit,
				'astra_not_updated'  => version_compare( ASTRA_THEME_VERSION, '3.2.0', '<' ),
			);
			wp_localize_script( 'astra-ext-spacing-customize-preview-js', 'ast_preview', $localize_array );

		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.