Reference › Hooks apply_filters( 'admin_body_class' , string $classes )
Since 2.3.0 Description Parameters Fired at Source History 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: <ol> <li>$classes is a space-separated string of class names instead of an array.</li> <li>Not all core admin classes are filterable, notably: wp-admin, wp-core-ui, and no-js cannot be removed.</li> </ol>
Parameters
$classesstring Space-separated list of CSS classes. Fired at · 2 wp-admin/admin-header.php:252file scope wp-admin/includes/template.php:2186iframe_header() Source View on Trac ↗ View on GitHub ↗
246 * and no-js cannot be removed. 247 * 248 * @since 2.3.0 249 * 250 * @param string $classes Space-separated list of CSS classes. 251 */ 252 $admin_body_classes = apply_filters( 'admin_body_class', '' ); 253 $admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class ); 254 ?> 255 < body class = " wp-admin wp-core-ui no-js <?php echo esc_attr ( $admin_body_classes ) ; ?> " > 256 < script type = " text/javascript" > 257 document. body. className = document. body. className. replace ( 'no-js' , 'js' ) ; 258 </ script> History Introduced in 2.3.0 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
About this page Parsed data Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.