body_class( string|array $class = '' )
Display the classes for the body element.
Parameters
- $class
-
(Optional) One or more classes to add to the class list.
Default value: ''
Source
File: wp-includes/post-template.php
function body_class( $class = '' ) {
// Separates classes with a single space, collates classes for body element
echo 'class="' . join( ' ', get_body_class( $class ) ) . '"';
}
Changelog
Version | Description |
---|---|
WP-2.8.0 | Introduced. |