From 20580bed82836da6ba47f583cb1ba71f639cd289 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 15 Jan 2016 19:27:57 +0000 Subject: [PATCH] Post: After [36319], add `$post` parameter to the `get_the_excerpt` filter. Props sebastian.pisula. Fixes #35474. git-svn-id: https://develop.svn.wordpress.org/trunk@36321 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post-template.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 9c28e5c524..4cc857306d 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -380,10 +380,12 @@ function get_the_excerpt( $post = null ) { * Filter 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. */ - return apply_filters( 'get_the_excerpt', $post->post_excerpt ); + return apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ); } /**