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
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
we will walk through how to use
apply_filterswithcomment_classto customize the CSS classes for comments in WordPress.Examples One
Examples Two