Astra_Primary_Header_Loader::astra_body_header_classes( array $classes )
Adds custom classes to the array of body classes.
Description
Parameters
- $classes
-
(array) (Required) Classes for the body element.
Return
(array)
Source
File: inc/builder/type/header/primary-header/class-astra-primary-header-loader.php
public function astra_body_header_classes( $classes ) { if ( wp_is_mobile() ) { $classes[] = 'ast-header-break-point'; } else { $classes[] = 'ast-desktop'; } if ( astra_is_amp_endpoint() ) { $classes[] = 'ast-amp'; } // Apply separate container class to the body. $content_layout = astra_get_content_layout(); if ( 'content-boxed-container' == $content_layout ) { $classes[] = 'ast-separate-container'; } elseif ( 'boxed-container' == $content_layout ) { $classes[] = 'ast-separate-container ast-two-container'; } elseif ( 'page-builder' == $content_layout ) { $classes[] = 'ast-page-builder-template'; } elseif ( 'plain-container' == $content_layout ) { $classes[] = 'ast-plain-container'; } // Sidebar location. $page_layout = 'ast-' . astra_page_layout(); $classes[] = esc_attr( $page_layout ); // Current Astra verion. $classes[] = esc_attr( 'astra-' . ASTRA_THEME_VERSION ); /** * Add class for header width */ $header_content_layout = astra_get_option( 'hb-header-main-layout-width' ); if ( 'full' == $header_content_layout ) { $classes[] = 'ast-full-width-primary-header'; } return $classes; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |