get_the_excerpt

get_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('get_the_excerpt') is found 3 times:

  • /wp-includes/post-template.php line 434
    	 *
    	 * @param string  $post_excerpt The post excerpt.
    	 * @param WP_Post $post         Post object.
    	 */
    	return apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
    }
    
    /**
     * Determines whether the post has a custom excerpt.
     *
     * For more information on this and similar theme functions, check out
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php line 809
    		}
    
    		if ( in_array( 'caption', $fields, true ) ) {
    			/** 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,
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php line 1876
    		}
    
    		if ( rest_is_field_included( 'excerpt', $fields ) ) {
    			/** 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,
    

See this hook used in plugins: