diff --git a/library/Helper/Post.php b/library/Helper/Post.php index ef59a956f..22878fd2a 100644 --- a/library/Helper/Post.php +++ b/library/Helper/Post.php @@ -302,6 +302,7 @@ public static function getFilteredContent(object $postObject): string } // Apply the_content + $excerpt = apply_filters('the_excerpt', $excerpt); $content = apply_filters('the_content', $content); if ($postObject->hasQuicklinksAfterFirstBlock) { diff --git a/tests/phpunit/tests/Helper/Post/GetFilteredContent.php b/tests/phpunit/tests/Helper/Post/GetFilteredContent.php index 120fabb0d..4ab8cfce3 100644 --- a/tests/phpunit/tests/Helper/Post/GetFilteredContent.php +++ b/tests/phpunit/tests/Helper/Post/GetFilteredContent.php @@ -36,7 +36,7 @@ public function testContentFilterIsAppliedToContentAndExcerpt() 'hasQuicklinksAfterFirstBlock' => false ]); - WP_Mock::expectFilter('the_content', '
Excerpt
'); + WP_Mock::expectFilter('the_excerpt', 'Excerpt
'); WP_Mock::expectFilter('the_content', 'Body
'); Post::getFilteredContent($mockPost);