WP_Site_Health::admin_body_class( string $body_class )

Add a class to the body HTML tag.

Description Description

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

Top ↑

Parameters Parameters


(string) (Required) The body class string.

Top ↑

Return Return

(string) The modified body class string.

Top ↑

Source Source

File: wp-admin/includes/class-wp-site-health.php

	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;

Top ↑

Changelog Changelog

Version Description
5.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.