get_comment_excerpt


get_comment_excerpt ( $comment_ID = 0 )

Parameters:
  • (int|WP_Comment) $comment_ID WP_Comment or ID of the comment for which to get the excerpt. Default current comment.
Returns:
  • (string) The maybe truncated comment with 20 words or less.
Defined at:
Change Log:
  • 4: .

Description

Retrieve the excerpt of the current comment.

Will cut each word and only output the first 20 words with '…' at the end. If the word count is less than 20, then no truncating is done and no '…' will appear.

Related Functions

comment_excerpt, get_comment_text, get_comment_meta, get_comment_count, get_the_excerpt

Top Google Results

User discussions

wpseek mobile