comment_class


comment_class ( $class = '', $comment = null, $post_id = null, $echo = true )

Parameters:
  • (string|array) $class Optional. One or more classes to add to the class list. Default empty.
  • (int|WP_Comment) $comment Comment ID or WP_Comment object. Default current comment.
  • (int|WP_Post) $post_id Post ID or WP_Post object. Default current post.
  • (bool) $echo Optional. Whether to cho or return the output. Default true.
Returns:
  • (string) If `$echo` is false, the class will be returned. Void otherwise.
Defined at:
Change Log:
  • 4: .

Description

Generates semantic classes for each comment element.

Related Functions

get_comment_class, comments_rss, comment_exists, comment_link, comment_date

Top Google Results

User discussions

wpseek mobile