excerpt_length filter-hook . WP 2.7.0
Filters the maximum number of words in a post excerpt.
Usage
add_filter( 'excerpt_length', 'filter_function_name_2911' ); function filter_function_name_2911( $number ){ // filter... return $number; }
- $number(int)
- The maximum number of words.
Default: 55
Changelog
Since 2.7.0 | Introduced. |
Where the hook is called
wp-includes/formatting.php 3835
$excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length );
Where in WP core the hook is used 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 );