Core Function
View Source on Trac ↗ get_comment_class()
get_comment_class( mixed $css_class = '', mixed $comment_id = null, mixed $post = null ) Returns the classes for the comment div as an array.
Parameters 3 required
| Name / Type | Description |
|---|---|
| mixed | (string | string[]) $css_class Optional. One or more classes to add to the class list. Default empty. Required |
| (int | | WP_Comment) $comment_id Optional. Comment ID or WP_Comment object. Default current comment. Required |
| (int | | WP_Post) $post Optional. Post ID or WP_Post object. Default current post. Required |
Return Value
(string[])
An array of classes.
Function Information
Since Version
2.7.0
Source File
wp-includes/comment-template.php
Advertisement