WordPress at a glance
filter is not described

admin_body_class filter-hook . WP 2.3.0

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

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.


add_filter( 'admin_body_class', 'filter_function_name_7394' );
function filter_function_name_7394( $classes ){
	// filter...

	return $classes;
Space-separated list of CSS classes.


Since 2.3.0 Introduced.

Where the hook is called

In file: /wp-admin/admin-header.php
wp-admin/admin-header.php 220
$admin_body_classes = apply_filters( 'admin_body_class', '' );
wp-admin/includes/template.php 2017
$admin_body_classes = apply_filters( 'admin_body_class', '' );

Where in WP core the hook is used

wp-admin/includes/class-wp-site-health.php 44
add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
wp-admin/nav-menus.php 526
add_filter( 'admin_body_class', 'wp_nav_menu_max_depth' );
wp-admin/widgets.php 32
add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );