Editor: Parse blocks in Latest Posts full content#12421
Conversation
t-hamano
left a comment
There was a problem hiding this comment.
@getdave @scruffian @MaggieCabrera, Is it possible to move this PR forward to meet the Beta 1 deadline? At a minimum, the changes in the following two files need to be reverted, as they are automatically synchronized from Gutenberg.
- src/wp-includes/blocks/latest-posts.php
- src/wp-includes/blocks/template-part.php
|
I have updated this PR according to WordPress/gutenberg#80191. This PR should simply add the |
There was a problem hiding this comment.
Unfortunately, this test fails because the code for the new blocks is not yet reflected in this PR. Perhaps the _wp_apply_block_content_filters() function itself should be tested in this PR?
|
I have removed the unit tests from this PR. This PR needs to be committed before today's Gutenberg sync, otherwise the non-existent |
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. |
|
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. |
Introduce the private `_wp_apply_block_content_filters()` function so that blocks rendering full post content, such as Latest Posts, process it through the standard content pipeline with optional recursion protection, instead of outputting raw block markup. Discussed in: #12421 Props get_dave, wildworks. See #65586. git-svn-id: https://develop.svn.wordpress.org/trunk@62726 602fd350-edb4-49c9-b593-d223f7449a82
Introduce the private `_wp_apply_block_content_filters()` function so that blocks rendering full post content, such as Latest Posts, process it through the standard content pipeline with optional recursion protection, instead of outputting raw block markup. Discussed in: WordPress/wordpress-develop#12421 Props get_dave, wildworks. See #65586. Built from https://develop.svn.wordpress.org/trunk@62726 git-svn-id: http://core.svn.wordpress.org/trunk@62010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
990eecd to
5095a4f
Compare
scruffian
left a comment
There was a problem hiding this comment.
LGTM, thanks for working on this
Apologies but I somehow missed this ping. I really appreciate you wrangling this here 🙇 |
|
Committed in https://core.trac.wordpress.org/changeset/62758 |
This PR now only adds PHPUnit coverage for the block content filtering helper used by the Latest Posts full-content rendering fix.
The implementation changes have already landed separately:
d23d8bf141added the private_wp_apply_block_content_filters()helper, discussed in this PR.The remaining diff in this PR is
tests/phpunit/tests/blocks/wpApplyBlockContentFilters.php. The tests cover applying the expected content filters, rendering block markup returned by shortcodes, passing the image filter context through, processing embeds, and clearing recursion-guard state after successful and exceptional block rendering.Trac ticket: https://core.trac.wordpress.org/ticket/65586
Use of AI Tools
AI assistance: Yes
Tool(s): ChatGPT / Codex
Model(s): GPT-5
Used for: Unit test scaffolding, command execution, and PR description drafting. Final tests and PR description were reviewed by me.
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.