Astra_Ext_Advanced_Headers_Markup::add_scripts()

Add Styles


Description


Source

File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-markup.php

		public function add_scripts() {

			$advanced_headers_layout = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_layout_option( 'layout' );

			if ( ! self::advanced_header_enabled() || 'disable' == $advanced_headers_layout || ( is_front_page() && 'posts' == get_option( 'show_on_front' ) ) ) {
				return;
			}

			if ( SCRIPT_DEBUG ) {

				wp_enqueue_style( 'astra-advanced-headers-css', ASTRA_EXT_ADVANCED_HEADERS_URL . 'assets/css/unminified/style.css', array(), ASTRA_EXT_VER );

				wp_enqueue_style( 'astra-advanced-headers-layout-css', ASTRA_EXT_ADVANCED_HEADERS_URL . 'assets/css/unminified/' . $advanced_headers_layout . '.css', array(), ASTRA_EXT_VER );

				wp_enqueue_script( 'astra-advanced-headers-js', ASTRA_EXT_ADVANCED_HEADERS_URL . 'assets/js/unminified/advanced-headers.js', array( 'jquery' ), ASTRA_EXT_VER, false );
			} else {
				wp_enqueue_style( 'astra-advanced-headers-css', ASTRA_EXT_ADVANCED_HEADERS_URL . 'assets/css/minified/style.min.css', array(), ASTRA_EXT_VER );
				wp_enqueue_style( 'astra-advanced-headers-layout-css', ASTRA_EXT_ADVANCED_HEADERS_URL . 'assets/css/minified/' . $advanced_headers_layout . '.min.css', array(), ASTRA_EXT_VER );
				wp_enqueue_script( 'astra-advanced-headers-js', ASTRA_EXT_ADVANCED_HEADERS_URL . 'assets/js/minified/advanced-headers.min.js', array( 'jquery' ), ASTRA_EXT_VER, false );

			}
		}


User Contributed Notes

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