Make WordPress Core


Ignore:
Timestamp:
10/15/2025 09:51:35 PM (6 months ago)
Author:
dmsnell
Message:

Blocks: Introduce WP_Block_Processor for efficiently parsing blocks.

The Block Processor 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, especially those needing to operate on only a part of a full post.

Developed in https://github.com/WordPress/wordpress-develop/pull/9105
Discussed in https://core.trac.wordpress.org/ticket/61401

Props dmsnell, gziolo, jonsurrell, soean, tjnowell, westonruter.
Fixes #61401.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r60793 r60939  
    269269require ABSPATH . WPINC . '/html-api/class-wp-html-processor-state.php';
    270270require ABSPATH . WPINC . '/html-api/class-wp-html-processor.php';
     271require ABSPATH . WPINC . '/class-wp-block-processor.php';
    271272require ABSPATH . WPINC . '/class-wp-http.php';
    272273require ABSPATH . WPINC . '/class-wp-http-streams.php';
Note: See TracChangeset for help on using the changeset viewer.