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



comment_class ›

Since2.7.0
已弃用n/a
apply_filters( 'comment_class', $classes, $class, $comment->comment_ID, $comment, $post_id )
参数: (5)
  • (string[]) $classes An array of comment classes.
    Required: Yes
  • (string) $class A comma-separated list of additional classes added to the list.
    Required: Yes
  • (int) $comment_id The comment id.
    Required: Yes
  • (WP_Comment) $comment The comment object.
    Required: Yes
  • (int|WP_Post) $post_id The post ID or WP_Post object.
    Required: Yes
定义在:
文档:

Filters the returned CSS classes for the current comment.





源码

return apply_filters( 'comment_class', $classes, $class, $comment->comment_ID, $comment, $post_id );