comment_class

过滤钩子


apply_filters( 'comment_class', $classes, $css_class, $comment->comment_ID, $comment, $post )
参数
  • (string[])
    $classes
    An array of comment classes.
    Required:
  • (string[])
    $css_class
    An array of additional classes added to the list.
    Required:
  • (string)
    $comment_id
    The comment ID as a numeric string.
    Required:
  • (WP_Comment)
    $comment
    The comment object.
    Required:
  • (int|WP_Post)
    $post
    The post ID or WP_Post object.
    Required:
定义位置
  • wp-includes/comment-template.php
    , line 539
引入
2.7.0
弃用

Filters the returned CSS classes for the current comment.

return apply_filters( 'comment_class', $classes, $css_class, $comment->comment_ID, $comment, $post );