Astra_Ext_Transparent_Header_Markup::add_body_class( array $classes )

Add Body Classes


Description


Parameters

$classes

(array) (Required) Body Class Array.


Return

(array)


Source

File: inc/addons/transparent-header/classes/class-astra-ext-transparent-header-markup.php

		public function add_body_class( $classes ) {
			/** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
			$inherit_desk_logo              = astra_get_option( 'different-transparent-logo', false );
			$transparent_header_logo        = astra_get_option( 'transparent-header-logo', true );
			$transparent_header_logo_retina = astra_get_option( 'transparent-header-retina-logo', true );

			if ( '1' == $inherit_desk_logo && ( '' !== $transparent_header_logo || '' !== $transparent_header_logo_retina ) ) {
				$classes[] = 'ast-replace-site-logo-transparent';
			}

			if ( '1' !== $inherit_desk_logo ) {
				$classes[] = 'ast-inherit-site-logo-transparent';
			}

			/**
			 * Add class 'ast-theme-transparent-header'
			 */

			if ( self::is_transparent_header() ) {
				$classes[] = 'ast-theme-transparent-header';
			}

			return $classes;
		}


User Contributed Notes

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