Blocks: Introduce the block parser.

The `WP_Block_Parser` class, and the accompanying `parse_blocks()` helper function, can be used to parse an array of blocks out of a content string.

`WP_Block_Parser` is copied from the `@wordpress/block-serialization-default-parser` package. To ensure it stays in sync with the JavaScript parser, changes should be implemented in the package first, then the package version should be upgraded to include the changes.

Props pento.

Merges [43751] to trunk.

See #45109.
Built from https://develop.svn.wordpress.org/trunk@44116


git-svn-id: http://core.svn.wordpress.org/trunk@43946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj
2018-12-13 17:40:39 +00:00
parent 5db34748e6
commit 24f247267f
4 changed files with 512 additions and 1 deletions

View File

@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-alpha-44115';
$wp_version = '5.1-alpha-44116';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.