ASTRA_Ext_Edd_Markup::add_styles()
Add Styles
Description
Source
File: addons/edd/classes/class-astra-ext-edd-markup.php
public function add_styles() {
/*** Start Path Logic */
/* Define Variables */
$uri = ASTRA_EXT_EDD_URI . 'assets/css/';
$path = ASTRA_EXT_EDD_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 */
/* Add style.css */
Astra_Minify::add_css( $gen_path . 'style' . $file_prefix . '.css' );
// Shop page style.
$shop_page_style = astra_get_option( 'edd-archive-style' );
if ( 'edd-archive-page-list-style' == $shop_page_style ) {
$shop_page_style = Astra_Addon_Builder_Helper::apply_flex_based_css() ? $shop_page_style . '-grid' : $shop_page_style;
Astra_Minify::add_css( $gen_path . $shop_page_style . $file_prefix . '.css' );
}
}
Expand full source code Collapse full source code View on Trac