Astra_Ext_Header_Sections_Markup::add_styles()
Add Styles
Description
Source
File: addons/header-sections/classes/class-astra-ext-header-sections-markup.php
public function add_styles() { $below_header_layout = astra_get_option( 'below-header-layout' ); $below_header_meta = astra_get_option_meta( 'ast-below-header-display' ); $above_header_layout = astra_get_option( 'above-header-layout' ); $above_header_layout_meta = astra_get_option_meta( 'ast-above-header-display' ); /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_EXT_HEADER_SECTIONS_URL . 'assets/css/'; $path = ASTRA_EXT_HEADER_SECTIONS_DIR . 'assets/css/'; $rtl = ''; if ( is_rtl() ) { $rtl = '-rtl'; } /* Directory and Extension */ $file_prefix = $rtl . '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = $rtl; $dir_name = 'unminified'; } $css_uri = $uri . $dir_name . '/'; $css_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $css_uri; } else { $gen_path = $css_dir; } /*** End Path Logic */ Astra_Minify::add_css( $gen_path . 'style' . $file_prefix . '.css' ); if ( 'disabled' != $below_header_layout && 'disabled' != $below_header_meta ) { /* Add style.css */ Astra_Minify::add_css( $gen_path . 'below-header-style' . $file_prefix . '.css' ); if ( 'disabled' == $below_header_layout ) { return; } Astra_Minify::add_css( $gen_path . $below_header_layout . $file_prefix . '.css' ); } if ( 'disabled' != $above_header_layout && 'disabled' != $above_header_layout_meta ) { Astra_Minify::add_css( $gen_path . 'above-header-style' . $file_prefix . '.css' ); } }
Expand full source code Collapse full source code View on Trac