W3cubDocs

/WordPress

apply_filters( 'body_class', string[] $classes, string[] $class )

Filters the list of CSS body class names for the current post or page.

Parameters

$classes

(string[]) An array of body class names.

$class

(string[]) An array of additional class names added to the body.

Source

File: wp-includes/post-template.php

View on Trac

Changelog

Version Description
2.8.0 Introduced.

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