diff --git a/class-instant-articles-post.php b/class-instant-articles-post.php index 3d32a074..2443fe0c 100644 --- a/class-instant-articles-post.php +++ b/class-instant-articles-post.php @@ -187,7 +187,6 @@ public function get_the_subtitle() { * @return string The excerpt. */ public function get_the_excerpt() { - $post = get_post( $this->get_the_id() ); // This should ideally not happen, but it may do so if someone tampers with the query. @@ -201,12 +200,14 @@ public function get_the_excerpt() { /** * Apply the default WP Filters for the post excerpt. + * https://developer.wordpress.org/reference/hooks/get_the_excerpt/ * * @since 0.1 * * @param string $post_excerpt The post excerpt. + * @param WP_Post $post The post object. */ - $excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt ); + $excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ); /** * Filter the post excerpt for instant articles.