Admin::body_status_classes( string $classes )
Body status classes.
Description
Adds CSS classes to the admin body tag.
Fired by admin_body_class
filter.
Parameters
Name | Type | Required | Description |
---|---|---|---|
$classes | string |
Required | Space-separated list of CSS classes. |
Return
(string) Space-separated list of CSS classes.
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |
Source
core/admin/admin.php
public function body_status_classes( $classes ) { global $pagenow; if ( in_array( $pagenow, [ 'post.php', 'post-new.php' ], true ) && Utils::is_post_support() ) { $post = get_post(); $mode_class = Plugin::$instance->db->is_built_with_elementor( $post->ID ) ? 'elementor-editor-active' : 'elementor-editor-inactive'; $classes .= ' ' . $mode_class; } return $classes; }
Uses
- includes/utils.php: Utils::is_post_support()