WordPress at a glance
filter is not described

excerpt_length filter-hook . WP 2.7.0

Filters the maximum number of words in a post excerpt.

Использование

add_filter( 'excerpt_length', 'filter_function_name_4076' );
function filter_function_name_4076( $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_trim_excerpt()
excerpt_length
wp-includes/formatting.php 3832
$excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length );

Where in WP core the hook is used WordPress

wp-includes/formatting.php 145
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 );