the_excerpt

the_excerpt

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

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('the_excerpt') is found 5 times:

  • /wp-includes/comment.php line 3014
    3010
    3011
    3012
    3013
    3014
    3015
    3016
    3017
    3018
    3019
    3020
        /** 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 401
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
         * @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 833
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
        /** 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 1960
    1956
    1957
    1958
    1959
    1960
    1961
    1962
    1963
    1964
    1965
    1966
    /** 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
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    */
    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: