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.7.2

apply_filters('get_the_excerpt') is found 3 times:

  • /wp-includes/post-template.php line 436
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
         *
         * @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 830
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    }
     
    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 1957
    1953
    1954
    1955
    1956
    1957
    1958
    1959
    1960
    1961
    1962
    1963
        );
    }
     
    /** 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: