WordPress at Your Fingertips
function is not described

WP_Site_Health::admin_body_class() public WP 5.2.0

Add a class to the body HTML tag.

Filters the body class string for admin pages and adds our own class for easier styling.

{} It's a method of the class: WP_Site_Health{}

No Hooks.


String. The modified body class string.


$WP_Site_Health = new WP_Site_Health();
$WP_Site_Health->admin_body_class( $body_class );
$body_class(string) (required)
The body class string.


Since 5.2.0 Introduced.

Code of WP_Site_Health::admin_body_class() WP 5.8.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;