get_body_class()
get_body_class( string|string[] $class = ” )
检索body元素的类名数组。
Retrieves an array of the class names for the body element.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$class | (string | string[]) | 可选 | 要添加到类列表中的用空格分隔的字符串或类名数组。 |
返回(Return)
(string[])类名数组。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.8.0 | wp-includes/post-template.php:606 | 1 function | 40 |
get_body_class() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_body_class/