WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/13/2018 05:39:59 PM (2 years ago)
Author:
desrosj
Message:

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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-settings.php

    r44108 r44116  
    247247require( ABSPATH . WPINC . '/class-wp-block-type.php' );
    248248require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
     249require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
    249250require( ABSPATH . WPINC . '/blocks.php' );
    250251
Note: See TracChangeset for help on using the changeset viewer.