body_class() – Displays the class names for the body element.

You appear to be a bot. Output may be restricted

Description

Displays the class names for the body element.

Usage

body_class( $class );

Parameters

$class
( string|string[] ) optional – Space-separated string or array of class names to add to the class list.

Returns

void

Source

File name: wordpress/wp-includes/post-template.php
Lines:

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

 View on GitHub View on Trac