REST API: Add /wp/v2/block-navigation-areas endpoint

Copies WP_REST_Block_Navigation_Areas_Controller from the Gutenberg plugin. This
provides the /wp/v2/block-navigation-areas endpoint used by the Navigation
block.

Props antonvlasenko, TimothyBlynJacobs.
Fixes #54393.


git-svn-id: https://develop.svn.wordpress.org/trunk@52133 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2021-11-11 03:50:22 +00:00
parent 02a2f9c9f5
commit f7d670c767
8 changed files with 597 additions and 1 deletions
+4
View File
@@ -349,6 +349,10 @@ function create_initial_rest_routes() {
// Menu Locations.
$controller = new WP_REST_Menu_Locations_Controller();
$controller->register_routes();
// Block Navigation Areas
$controller = new WP_REST_Block_Navigation_Areas_Controller();
$controller->register_routes();
}
/**