W3cubDocs

/WordPress

apply_filters( ‘admin_body_class’, string $classes )

Filters the CSS classes for the body tag in the admin.

Description

This filter differs from the ‘post_class’ and ‘body_class’ filters in two important ways:

  1. $classes is a space-separated string of class names instead of an array.
  2. Not all core admin classes are filterable, notably: wp-admin, wp-core-ui, and no-js cannot be removed.

Parameters

$classesstring
Space-separated list of CSS classes.

Source

$admin_body_classes = apply_filters( 'admin_body_class', '' );

Changelog

Version Description
2.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/admin_body_class