Astra_Ext_Advanced_Headers_Markup::body_classes( array $classes )

Add Body Classes


Description


Parameters

$classes

(array) (Required) Body Class Array.


Return

(array)


Source

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

		public function body_classes( $classes ) {

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

			$custom_logo_id = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_option( 'logo-id' );

			// Site logo.
			if ( $custom_logo_id && $transparent_header ) {
				$classes[] = 'ast-advanced-headers-different-logo';
			}

			if ( $advanced_headers_layout ) {
				$classes[] = 'ast-advanced-headers';
			}

			if ( 'enabled' == $transparent_header && 'disable' == $advanced_headers_layout ) {
				// Add class.
				$classes[] = 'ast-transparent-header';

			}

			return $classes;
		}


User Contributed Notes

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