WP_Site_Health::admin_body_class()
Adds a class to the body HTML tag.
Filters the body class string for admin pages and adds our own class for easier styling.
Method of the class: WP_Site_Health{}
No Hooks.
Return
String
. The modified body class string.
Usage
$WP_Site_Health = new WP_Site_Health(); $WP_Site_Health->admin_body_class( $body_class );
- $body_class(string) (required)
- The body class string.
Changelog
Since 5.2.0 | Introduced. |
WP_Site_Health::admin_body_class() WP Site Health::admin body class code WP 6.6.2
public function admin_body_class( $body_class ) { $screen = get_current_screen(); if ( 'site-health' !== $screen->id ) { return $body_class; } $body_class .= ' site-health'; return $body_class; }