excerpt_length

excerpt_length

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('excerpt_length') is found 2 times:

  • /wp-includes/blocks/latest-posts.php line 151
    			 * Adds a "Read more" link with screen reader text.
    			 * […] is the default excerpt ending from wp_trim_excerpt() in Core.
    			 */
    			if ( str_ends_with( $trimmed_excerpt, ' […]' ) ) {
    				$excerpt_length = (int) apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length );
    				if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) {
    					$trimmed_excerpt  = substr( $trimmed_excerpt, 0, -11 );
    					$trimmed_excerpt .= sprintf(
    						/* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
    						__( '… <a href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
    						esc_url( $post_link ),
    
  • /wp-includes/formatting.php line 4019
    		 * @since 2.7.0
    		 *
    		 * @param int $number The maximum number of words. Default 55.
    		 */
    		$excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length );
    
    		/**
    		 * Filters the string in the "more" link displayed after a trimmed excerpt.
    		 *
    		 * @since 2.9.0
    		 *
    

See this hook used in plugins: