REST API: Introduce Block Types endpoint.

This endpoint allows a user to retrieve the block type definition for all server-side registered block types.

Props spacedmonkey, aduth, gziolo, ocean90, TimothyBlynJacobs.
Fixes #47620.


git-svn-id: https://develop.svn.wordpress.org/trunk@48173 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Timothy Jacobs
2020-06-26 00:44:44 +00:00
parent be8b93c269
commit 5b90ea41b5
7 changed files with 1188 additions and 1 deletions

View File

@@ -273,6 +273,10 @@ function create_initial_rest_routes() {
$controller = new WP_REST_Block_Renderer_Controller;
$controller->register_routes();
// Block Types.
$controller = new WP_REST_Block_Types_Controller();
$controller->register_routes();
// Settings.
$controller = new WP_REST_Settings_Controller;
$controller->register_routes();