Commit cf56ccb
committed
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 #9105
Discussed in https://core.trac.wordpress.org/ticket/61401
Props dmsnell, gziolo, jonsurrell, soean, tjnowell, westonruter.
Fixes #61401.
git-svn-id: https://develop.svn.wordpress.org/trunk@60939 602fd350-edb4-49c9-b593-d223f7449a821 parent 464ed1c commit cf56ccb
File tree
6 files changed
+3370
-2
lines changed- src
- wp-includes
- tests/phpunit/tests/block-processor
6 files changed
+3370
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
| 271 | + | |
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2376 | 2376 | | |
2377 | 2377 | | |
2378 | 2378 | | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
2379 | 2390 | | |
2380 | 2391 | | |
2381 | 2392 | | |
| |||
0 commit comments