apply_filters( ‘comment_class’, string[] $classes, string[] $css_class, string $comment_id, WP_Comment $comment, int|WP_Post $post )

In this article

Filters the returned CSS classes for the current comment.

Parameters

$classesstring[]
An array of comment classes.
$css_classstring[]
An array of additional classes added to the list.
$comment_idstring
The comment ID as a numeric string.
$commentWP_Comment
The comment object.
$postint|WP_Post
The post ID or WP_Post object.

Source

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

Changelog

VersionDescription
2.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.