the_excerpt

the_excerpt

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('the_excerpt') is found 5 times:

  • /wp-includes/comment.php line 2986
    		/** This filter is documented in wp-includes/post-template.php */
    		$excerpt = apply_filters( 'the_content', $post->post_content, $post->ID );
    	} else {
    		/** This filter is documented in wp-includes/post-template.php */
    		$excerpt = apply_filters( 'the_excerpt', $post->post_excerpt );
    	}
    
    	$excerpt = str_replace( ']]>', ']]>', $excerpt );
    	$excerpt = wp_html_excerpt( $excerpt, 252, '…' );
    
    	/** This filter is documented in wp-includes/post-template.php */
    
  • /wp-includes/post-template.php line 399
    	 * @see get_the_excerpt()
    	 *
    	 * @param string $post_excerpt The post excerpt.
    	 */
    	echo apply_filters( 'the_excerpt', get_the_excerpt() );
    }
    
    /**
     * Retrieves the post excerpt.
     *
     * @since 0.71
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php line 812
    			/** This filter is documented in wp-includes/post-template.php */
    			$caption = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
    
    			/** This filter is documented in wp-includes/post-template.php */
    			$caption = apply_filters( 'the_excerpt', $caption );
    
    			$data['caption'] = array(
    				'raw'      => $post->post_excerpt,
    				'rendered' => $caption,
    			);
    		}
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php line 1879
    			/** This filter is documented in wp-includes/post-template.php */
    			$excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
    
    			/** This filter is documented in wp-includes/post-template.php */
    			$excerpt = apply_filters( 'the_excerpt', $excerpt );
    
    			$data['excerpt'] = array(
    				'raw'       => $post->post_excerpt,
    				'rendered'  => post_password_required( $post ) ? '' : $excerpt,
    				'protected' => (bool) $post->post_password,
    			);
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php line 861
    	 */
    	protected function prepare_excerpt_response( $excerpt, $post ) {
    
    		/** This filter is documented in wp-includes/post-template.php */
    		$excerpt = apply_filters( 'the_excerpt', $excerpt, $post );
    
    		if ( empty( $excerpt ) ) {
    			return '';
    		}
    
    		return $excerpt;
    

See this hook used in plugins: