Make WordPress Core


Ignore:
Timestamp:
05/26/2021 01:10:57 AM (3 years ago)
Author:
ryelle
Message:

Block Editor: Add support for the pattern directory.

Add an endpoint for fetching block patterns from WordPress.org, and load the block patterns from this new API. Remove the block patterns that have already been moved to WordPress.org/patterns.

Props ryelle, iandunn, youknowriad, timothyblynjacobs.
Fixes #53246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r50995 r51021  
    328328    // Block Directory.
    329329    $controller = new WP_REST_Block_Directory_Controller();
     330    $controller->register_routes();
     331
     332    // Pattern Directory.
     333    $controller = new WP_REST_Pattern_Directory_Controller();
    330334    $controller->register_routes();
    331335
Note: See TracChangeset for help on using the changeset viewer.