Astra_Enqueue_Scripts::admin_body_class( String $classes )
Admin body classes.
Description
Body classes to be added to
tag in admin pageParameters
- $classes
-
(String) (Required) body classes returned from the filter.
Return
(String) body classes to be added to <body> tag in admin page
Source
File: inc/core/class-astra-enqueue-scripts.php
public function admin_body_class( $classes ) { global $pagenow; $screen = get_current_screen(); if ( ( ( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) && ( defined( 'ASTRA_ADVANCED_HOOKS_POST_TYPE' ) && ASTRA_ADVANCED_HOOKS_POST_TYPE == $screen->post_type ) ) || 'widgets.php' == $pagenow ) { return; } $post_id = get_the_ID(); if ( $post_id ) { $meta_content_layout = get_post_meta( $post_id, 'site-content-layout', true ); } if ( ( isset( $meta_content_layout ) && ! empty( $meta_content_layout ) ) && 'default' !== $meta_content_layout ) { $content_layout = $meta_content_layout; } else { $content_layout = astra_get_option( 'site-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'; } $site_layout = astra_get_option( 'site-layout' ); if ( 'ast-box-layout' === $site_layout ) { $classes .= ' ast-max-width-layout'; } $classes .= ' ast-' . astra_page_layout(); return $classes; }
Expand full source code Collapse full source code View on Trac