comment_excerpt_length filter-hookWP 4.4.0

Filters the maximum number of words used in the comment excerpt.

Usage

add_filter( 'comment_excerpt_length', 'wp_kama_comment_excerpt_length_filter' );

/**
 * Function for `comment_excerpt_length` filter-hook.
 * 
 * @param int $comment_excerpt_length The amount of words you want to display in the comment excerpt.
 *
 * @return int
 */
function wp_kama_comment_excerpt_length_filter( $comment_excerpt_length ){

	// filter...
	return $comment_excerpt_length;
}
$comment_excerpt_length(int)
The amount of words you want to display in the comment excerpt.

Changelog

Since 4.4.0 Introduced.

Where the hook is called

get_comment_excerpt()
comment_excerpt_length
wp-includes/comment-template.php 665
$comment_excerpt_length = apply_filters( 'comment_excerpt_length', $comment_excerpt_length );

Where the hook is used in WordPress

Usage not found.