Astra_Ext_Sticky_Header_Markup::add_body_class( array $classes )
Add Body Classes
Description
Parameters
- $classes
-
(array) (Required) Body Class Array.
Return
(array)
Source
File: addons/sticky-header/classes/class-astra-ext-sticky-header-markup.php
public function add_body_class( $classes ) { /** * Add class 'ast-transparent-header' if page / post meta != 'disabled' */ $main_stick = astra_get_option( 'header-main-stick' ); $above_stick = astra_get_option( 'header-above-stick' ); $below_stick = astra_get_option( 'header-below-stick' ); $shrink_main = astra_get_option( 'header-main-shrink' ); $header_logo = astra_get_option( 'sticky-header-logo' ); $inherit_desk_logo = astra_get_option( 'different-sticky-logo', false ); $sticky_header_meta = astra_get_option_meta( 'stick-header-meta' ); $sticky_primary_header_meta = astra_get_option_meta( 'header-main-stick-meta' ); $astra_main_header_shrink_status = apply_filters( 'astra_main_header_shrink_disable', false ); if ( ! $astra_main_header_shrink_status && '1' == $main_stick && '1' == $shrink_main ) { $classes[] = 'ast-sticky-main-shrink'; } if ( ! $astra_main_header_shrink_status && '1' == $above_stick && '1' == $shrink_main ) { $classes[] = 'ast-sticky-above-shrink'; } if ( ! $astra_main_header_shrink_status && '1' == $below_stick && '1' == $shrink_main ) { $classes[] = 'ast-sticky-below-shrink'; } if ( Astra_Ext_Extension::is_active( 'sticky-header' ) && $shrink_main ) { $classes[] = 'ast-sticky-header-shrink'; } if ( '1' !== $inherit_desk_logo ) { $classes[] = 'ast-inherit-site-logo-sticky'; } if ( '1' == $inherit_desk_logo && '1' == $main_stick && '' !== $header_logo ) { $classes[] = 'ast-sticky-custom-logo'; } if ( true === astra_addon_builder_helper()->is_header_footer_builder_active && '1' == $inherit_desk_logo && '' !== $header_logo ) { $classes[] = 'ast-sticky-custom-logo'; } if ( ( '1' == $main_stick || ( 'enabled' == $sticky_header_meta && 'on' == $sticky_primary_header_meta ) ) ) { $classes[] = 'ast-primary-sticky-enabled'; } return $classes; }
Expand full source code Collapse full source code View on Trac