Make WordPress Core


Ignore:
Timestamp:
10/18/2018 04:39:40 AM (6 years ago)
Author:
pento
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.

See #45109.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-settings.php

    r43742 r43751  
    246246require( ABSPATH . WPINC . '/class-wp-block-type.php' );
    247247require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
     248require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
    248249require( ABSPATH . WPINC . '/blocks.php' );
    249250
Note: See TracChangeset for help on using the changeset viewer.