comment_excerpt filter-hookWP 1.2.0

Filters the comment excerpt for display.

Usage

add_filter( 'comment_excerpt', 'wp_kama_comment_excerpt_filter', 10, 2 );

/**
 * Function for `comment_excerpt` filter-hook.
 * 
 * @param string $comment_excerpt The comment excerpt text.
 * @param string $comment_ID      The comment ID as a numeric string.
 *
 * @return string
 */
function wp_kama_comment_excerpt_filter( $comment_excerpt, $comment_ID ){

	// filter...
	return $comment_excerpt;
}
$comment_excerpt(string)
The comment excerpt text.
$comment_ID(string)
The comment ID as a numeric string.

Changelog

Since 1.2.0 Introduced.
Since 4.1.0 The $comment_ID parameter was added.

Where the hook is called

comment_excerpt()
comment_excerpt
wp-includes/comment-template.php 656
echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment->comment_ID );

Where the hook is used in WordPress

wp-includes/default-filters.php 213
add_filter( 'comment_excerpt', 'convert_chars' );