Astra_Ext_Colors_Loader::preview_scripts()

Customizer Preview


Description


Source

File: addons/colors-and-background/classes/class-astra-ext-colors-loader.php

		public function preview_scripts() {

			if ( SCRIPT_DEBUG ) {
				$js_path = 'assets/js/unminified/customizer-preview.js';
			} else {
				$js_path = 'assets/js/minified/customizer-preview.min.js';
			}

			wp_enqueue_script( 'astra-ext-colors-customize-preview-js', ASTRA_EXT_COLORS_URI . $js_path, array( 'customize-preview', 'astra-customizer-preview-js', 'astra-addon-customizer-preview-js' ), ASTRA_EXT_VER, true );

			$localize_array = array(
				'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', '<' ),
				'is_content_bg_option_to_load' => astra_addon_has_gcp_typo_preset_compatibility(),
			);

			wp_localize_script( 'astra-ext-colors-customize-preview-js', 'astColors', $localize_array );

		}


User Contributed Notes

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