apply_filters( 'comment_class', string[] $classes, string[] $class, int $comment_id, WP_Comment $comment, int|WP_Post $post_id )

Filters the returned CSS classes for the current comment.

Parameters

$classes

(string[]) An array of comment classes.

$class

(string[]) An array of additional classes added to the list.

$comment_id

(int) The comment ID.

$comment

(WP_Comment) The comment object.

$post_id

(int|WP_Post) The post ID or WP_Post object.

Source

File: wp-includes/comment-template.php

View on Trac

Changelog

Version Description
2.7.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/comment_class