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. Built from https://develop.svn.wordpress.org/trunk@51021 git-svn-id: http://core.svn.wordpress.org/trunk@50630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -329,6 +329,10 @@ function create_initial_rest_routes() {
|
||||
$controller = new WP_REST_Block_Directory_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Pattern Directory.
|
||||
$controller = new WP_REST_Pattern_Directory_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Site Health.
|
||||
$site_health = WP_Site_Health::get_instance();
|
||||
$controller = new WP_REST_Site_Health_Controller( $site_health );
|
||||
|
||||
Reference in New Issue
Block a user