Wordpress 钩子:comment_class
文章目录
过滤返回的CSS类以获取当前注释。
原型
apply_filters( 'comment_class', array $classes, string $class, int $comment_id, WP_Comment $comment, int|WP_Post $post_id )
参数
$classes
(array)
一系列评论类。
$class
(string)
以逗号分隔的其他类列表添加到列表中。
$comment_id
(int)
评论ID。
$comment
(WP_Comment)
评论对象。
$post_id
(int|WP_Post)
帖子ID或WP_Post对象。
源文件
路径:wp-includes/comment-template.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/comment_class/
文章作者 iBllex
上次更新 2019-02-14