WordPress.org

Make WordPress Core

Changeset 43742


Ignore:
Timestamp:
10/18/2018 01:30:49 AM (14 months ago)
Author:
pento
Message:

Blocks: Introduce WP_Block_Type and WP_Block_Type_Registry classes.

These are the foundational classes allowing blocks to be registered and used throughout WordPress.

This commit also includes the has_block() and has_blocks() functions, which are required for unit testing these classes.

Props adamsilverstein, danielbachhuber, desrosj.
See #45097, #45109.

Location:
branches/5.0
Files:
7 added
2 edited

Legend:

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

    r43739 r43742  
    244244require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' );
    245245require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' );
     246require( ABSPATH . WPINC . '/class-wp-block-type.php' );
     247require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
     248require( ABSPATH . WPINC . '/blocks.php' );
    246249
    247250$GLOBALS['wp_embed'] = new WP_Embed();
  • branches/5.0/tests/phpunit/includes/bootstrap.php

    r43739 r43742  
    119119require dirname( __FILE__ ) . '/spy-rest-server.php';
    120120require dirname( __FILE__ ) . '/class-wp-rest-test-search-handler.php';
     121require dirname( __FILE__ ) . '/class-wp-fake-block-type.php';
    121122
    122123/**
Note: See TracChangeset for help on using the changeset viewer.