Astra_Ext_Header_Sections_Markup::header_classes( array $classes )
Add Header Classes
Description
Parameters
- $classes
-
(array) (Required) Header Class Array.
Return
(array)
Source
File: addons/header-sections/classes/class-astra-ext-header-sections-markup.php
public function header_classes( $classes ) { // Apply Above header layout class to the header. $above_header_enabled = $this->astra_above_header_enabled(); $above_header_layout = astra_get_option( 'above-header-layout' ); $above_header_swap = astra_get_option( 'above-header-swap-mobile' ); $above_header_merge = astra_get_option( 'above-header-merge-menu' ); if ( $above_header_enabled ) { $classes[] = 'ast-above-header-enabled'; if ( $this->astra_above_header_merged_enabled() && $this->astra_above_header_has_menu() ) { $classes[] = 'ast-above-header-merged-responsive'; } else { $classes[] = 'ast-above-header-section-separated'; } } if ( $above_header_enabled && $above_header_swap && 'above-header-layout-1' === $above_header_layout ) { $classes[] = 'ast-swap-above-header-sections'; } // Apply Below header layout class to the header. $below_header_enabled = $this->astra_below_header_enabled(); if ( $below_header_enabled ) { $classes[] = 'ast-below-header-enabled'; if ( $this->astra_below_header_merged_enabled() && $this->astra_below_header_has_menu() ) { $classes[] = 'ast-below-header-merged-responsive'; } else { $classes[] = 'ast-below-header-section-separated'; } } $below_header_layout = astra_get_option( 'below-header-layout' ); $below_header_swap = astra_get_option( 'below-header-swap-mobile' ); $below_header_merge = astra_get_option( 'below-header-merge-menu' ); if ( $below_header_enabled && $below_header_swap && ! $below_header_merge && 'below-header-layout-1' === $below_header_layout ) { $classes[] = 'ast-swap-below-header-sections'; } // Apply Above / Below header mobile align class. $classes[] = 'ast-above-header-mobile-' . astra_get_option( 'above-header-menu-align' ); $classes[] = 'ast-below-header-mobile-' . astra_get_option( 'below-header-menu-align' ); return $classes; }
Expand full source code Collapse full source code View on Trac