Fix excerpt generation to include list-item block content in excerpts#7807
Fix excerpt generation to include list-item block content in excerpts#7807geekofshire wants to merge 1 commit intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| * As the excerpt should be a small string of text relevant to the full post content, | ||
| * this function renders the blocks that are most likely to contain such text. | ||
| * | ||
| * @since 5.0.0 |
There was a problem hiding this comment.
Can another since tag be added to mention the changes to the function?
There was a problem hiding this comment.
I also mentioned it in trac, but it'd be great to update the existing unit tests (Tests_Formatting_ExcerptRemoveBlocks) so that they check list item blocks aren't stripped.
This PR resolves an issue where content within list-item blocks was excluded from post excerpts. The function excerpt_remove_blocks() now allows core/list-item as part of $allowed_inner_blocks, ensuring that list content is correctly included in generated excerpts.
Trac ticket: https://core.trac.wordpress.org/ticket/62417
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.