comment_class


comment_class ( $css_class = '', $comment = null, $post = null, $display = true )

Parameters:
  • (string|string[]) css_class Optional. One or more classes to add to the class list. Default empty.
  • (int|WP_Comment) comment Optional. Comment ID or WP_Comment object. Default current comment.
  • (int|WP_Post) post Optional. Post ID or WP_Post object. Default current post.
  • (bool) display Optional. Whether to print or return the output. Default true.
Returns:
  • (void|string) Void if `$display` argument is true, comment classes if `$display` is false.
Defined at:
Change Log:
  • 4: .

Description

Generates semantic classes for each comment element.

Related Functions

get_comment_class, comments_rss, comment_exists, comment_date, comment_link

Top Google Results

User discussions

wpseek mobile