Astra_Ext_Adv_Footer_Markup::add_styles()

Add Styles Callback


Description


Source

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

		public function add_styles() {

			$advanced_footer_layout = astra_get_option( 'footer-adv' );
			if ( 'disabled' == $advanced_footer_layout ) {
				return;
			}

			/*** Start Path Logic */

			/* Define Variables */
			$uri  = ASTRA_EXT_ADVANCED_FOOTER_URL . 'assets/css/';
			$path = ASTRA_EXT_ADVANCED_FOOTER_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 ( 'layout-2' == $advanced_footer_layout ) {
				return;
			}

			Astra_Minify::add_css( $gen_path . $advanced_footer_layout . $file_prefix . '.css' );
		}


User Contributed Notes

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