get_comment_excerpt filter-hookWP 1.5.0

Filters the retrieved comment excerpt.


add_filter( 'get_comment_excerpt', 'wp_kama_get_comment_excerpt_filter', 10, 3 );

 * Function for `get_comment_excerpt` filter-hook.
 * @param string     $comment_excerpt The comment excerpt text.
 * @param string     $comment_id      The comment ID as a numeric string.
 * @param WP_Comment $comment         The comment object.
 * @return string
function wp_kama_get_comment_excerpt_filter( $comment_excerpt, $comment_id, $comment ){

	// filter...
	return $comment_excerpt;
The comment excerpt text.
The comment ID as a numeric string.
The comment object.


Since 1.5.0 Introduced.
Since 4.1.0 The $comment_id and $comment parameters were added.

Where the hook is called

wp-includes/comment-template.php 679
return apply_filters( 'get_comment_excerpt', $comment_excerpt, $comment->comment_ID, $comment );

Where the hook is used in WordPress

Usage not found.