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.



git-svn-id: https://develop.svn.wordpress.org/trunk@51021 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Kelly Choyce-Dwan
2021-05-26 01:10:57 +00:00
parent 6476ee7f78
commit 849c811396
27 changed files with 979 additions and 519 deletions
+4
View File
@@ -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 );