body_class
apply_filters( ‘body_class’, string[] $classes , string[] $class )
过滤钩子:过滤当前文章或页面的CSS主体类名列表。
Filter Hook: Filters the list of CSS body class names for the current post or page.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$classes | (string[]) | 主体类名称的数组。 |
$class | (string[]) | 添加到正文中的附加类名数组。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.8.0 | wp-includes/post-template.php:834 | 1 | 0 |
笔记(Notes)
删除类
添加新类
body_class 为WP2原创文章,链接:https://www.wp2.cn/hook/body_class/