WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about get_the_excerpt

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/post-template.php apply_filters 431 /**
* Filters the retrieved post excerpt.
*
* @since 1.2.0
* @since 4.5.0 Introduced the `$post` parameter.
*
* @param string $post_excerpt The post excerpt.
* @param WP_Post $post Post object.
*/
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php apply_filters 1868 /** This filter is documented in wp-includes/post-template.php */
'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),
'raw' => $post->guid,
);
}

if ( rest_is_field_included( 'modified', $fields ) ) {
$data['modified'] = $this->prepare_date_response( $post->post_modified_gmt, $post->post_modified );
}

if ( rest_is_field_included( 'modified_gmt', $fields ) ) {
/*
* For drafts, `post_modified_gmt` may not be set (see `post_date_gmt` comments
* above). In this case, shim the value based on the `post_modified` field
* with the site's timezone offset applied.
*/
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php apply_filters 741 /**
* Prepares a single attachment output for response.
*
* @since 4.7.0
* @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
*
* @param WP_Post $item Attachment object.
* @param WP_REST_Request $request Request object.
* @return WP_REST_Response Response object.
*/

Hook Parameters

Parameter Type Name Description
string $post_excerpt The post excerpt.
WP_Post $post Post object.