mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
REST API: Add endpoints for blocks.
`WP_REST_Block_Renderer_Controller` allows rendering of server-side rendered blocks, whilst `WP_REST_Blocks_Controller` allows retrieving of reusable blocks. Merges [43805] and [43806] from the 5.0 branch to trunk. Props desrosj, danielbachhuber, pento, Presskopp, swissspidy. See #45065, #45098. git-svn-id: https://develop.svn.wordpress.org/trunk@44150 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -249,6 +249,10 @@ function create_initial_rest_routes() {
|
||||
$controller = new WP_REST_Search_Controller( $search_handlers );
|
||||
$controller->register_routes();
|
||||
|
||||
// Block Renderer.
|
||||
$controller = new WP_REST_Block_Renderer_Controller;
|
||||
$controller->register_routes();
|
||||
|
||||
// Settings.
|
||||
$controller = new WP_REST_Settings_Controller;
|
||||
$controller->register_routes();
|
||||
@@ -256,6 +260,7 @@ function create_initial_rest_routes() {
|
||||
// Themes.
|
||||
$controller = new WP_REST_Themes_Controller;
|
||||
$controller->register_routes();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user