WordPress开发者和主题制作者的搜索引擎



body_class ›

Since2.8.0
已弃用n/a
body_class ( $class = '' )
参数:
  • (string|string[]) $class Space-separated string or array of class names to add to the class list.
    Required: No
    默认: (empty)
定义在:
文档:

Displays the class names for the body element.



源码

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