Skip to content

Conversation

@dmsnell
Copy link
Member

@dmsnell dmsnell commented Sep 11, 2025

Trac ticket: Core-61401
See: #9105, (#9841), #9842 -> #10291, #9843 -> #10292

Merged into a singular WP_Block_Scanner class in #9105

Adds a higher-level sibling to the Block Scanner class, providing block semantics over block delimiter traversal.

@github-actions
Copy link

Test using WordPress Playground

The 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

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@dmsnell dmsnell force-pushed the blocks/add-block-processor branch 5 times, most recently from ef4351d to 63ba461 Compare September 16, 2025 12:43
@dmsnell dmsnell force-pushed the blocks/add-block-processor branch 6 times, most recently from b5924bd to 899adaf Compare September 25, 2025 18:47
@dmsnell dmsnell force-pushed the blocks/add-block-processor branch 4 times, most recently from 05e318b to e299d90 Compare October 2, 2025 20:48
The Block Scanner follows the HTML API in providing a streaming,
near-zero-overhead, lazy, re-entrant parser for traversing block
structure. This class provides an alternate interface to
`parse_blocks()` which is more amenable to a number of common
server-side operations on posts, such as:

 - Generating an excerpt from only the first N blocks in a post.
 - Determining which block types are present in a post.
 - Determining which posts contain a block of a given type.
 - Generating block supports content for a post.
@dmsnell dmsnell force-pushed the blocks/add-block-processor branch from e299d90 to 3880b1c Compare October 2, 2025 20:58
@dmsnell dmsnell force-pushed the blocks/add-block-processor branch from 3880b1c to b56da74 Compare October 2, 2025 21:23
@dmsnell
Copy link
Member Author

dmsnell commented Oct 3, 2025

Merged into a singular WP_Block_Scanner class in #9105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants