excerpt_length хук-фильтр . WP 2.7.0
Filters the maximum number of words in a post excerpt.
Использование
add_filter( 'excerpt_length', 'filter_function_name_3588' ); function filter_function_name_3588( $number ){ // filter... return $number; }
- $number(число)
- The maximum number of words.
По умолчанию: 55
Список изменений
С версии 2.7.0 | Введена. |
Где вызывается хук
wp-includes/formatting.php 3835
$excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length );
Где используется хук в ядре WordPress
wp-includes/formatting.php 154
remove_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 );
wp-includes/formatting.php 47
add_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 );