Astra_Heading_Colors_Loader::preview_scripts()

Customizer Preview


Description


Source

File: inc/addons/heading-colors/class-astra-heading-colors-loader.php

	public function preview_scripts() {
		/**
		 * Load unminified if SCRIPT_DEBUG is true.
		 */
		/* Directory and Extension */
		$dir_name    = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
		$file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
		wp_enqueue_script( 'astra-heading-colors-customizer-preview-js', ASTRA_THEME_HEADING_COLORS_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true );

		wp_localize_script(
			'astra-heading-colors-customizer-preview-js',
			'astraHeadingColorOptions',
			array(
				'maybeApplyHeadingColorForTitle' => astra_has_global_color_format_support(),
			)
		);

	}

Changelog

Changelog
Version Description
2.2.0 Introduced.


User Contributed Notes

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