WPDev.one
Core Function
View Source on Trac ↗

get_body_class()

get_body_class( mixed $css_class = '' )

Retrieves an array of the class names for the body element.

Parameters 1 required

Name / Type Description
mixed

(string | string[]) $css_class Optional. Space-separated string or array of class names to add to the class list. Default empty.

Required

Return Value

(string[])
Array of class names.

Function Information

Since Version
2.8.0
Source File
wp-includes/post-template.php
Advertisement