On this page
apply_filters( 'comment_class', string[] $classes, string[] $css_class, string $comment_id, WP_Comment $comment, int|WP_Post $post )
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
File: wp-includes/comment-template.php. View all references
return apply_filters( 'comment_class', $classes, $css_class, $comment->comment_ID, $comment, $post );
Related
Used By
| Used By | Description |
|---|---|
| get_comment_class() wp-includes/comment-template.php | Returns the classes for the comment div as an array. |
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/comment_class