comment_excerpt_length
Filters the maximum number of words used in the comment excerpt.
Использование
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.
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
comment_excerpt_length
wp-includes/comment-template.php 665
$comment_excerpt_length = apply_filters( 'comment_excerpt_length', $comment_excerpt_length );