comment_excerpt_length
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
comment_excerpt_length
wp-includes/comment-template.php 677
$comment_excerpt_length = apply_filters( 'comment_excerpt_length', $comment_excerpt_length );