wpseek.com
A WordPress-centric search engine for devs and theme authors



body_class › WordPress Function

Since2.8.0
Deprecatedn/a
body_class ( $css_class = '' )
Parameters:
  • (string|string[]) $css_class Optional. Space-separated string or array of class names to add to the class list. Default empty.
    Required: No
    Default: (empty)
Defined at:
Codex:

Displays the class names for the body element.



Source

function body_class( $css_class = '' ) {
	// Separates class names with a single space, collates class names for body element.
	echo 'class="' . esc_attr( implode( ' ', get_body_class( $css_class ) ) ) . '"';
}