get_the_excerpt хук-фильтр . WP 1.0
This filter is documented in wp-includes/post-template.php
Использование
add_filter( 'get_the_excerpt', 'filter_function_name_8741', 10, 2 ); function filter_function_name_8741( $post_excerpt, $post ){ // filter... return $post_excerpt; }
- $post_excerpt
- -
- $post
- -
Где вызывается хук
get_the_excerpt
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php 700
$caption = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 1733
$excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
wp-includes/post-template.php 429
return apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
Где используется хук в ядре WordPress
wp-includes/default-filters.php 186
add_filter( 'get_the_excerpt', 'wp_trim_excerpt', 10, 2 );