mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
REST API: Add widget endpoints
Adds the sidebars, widgets and widget-types REST API endpoints from the Gutenberg plugin. Fixes #41683. Props TimothyBlynJacobs. git-svn-id: https://develop.svn.wordpress.org/trunk@50993 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -313,6 +313,18 @@ function create_initial_rest_routes() {
|
||||
$controller = new WP_REST_Plugins_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Sidebars.
|
||||
$controller = new WP_REST_Sidebars_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Widget Types.
|
||||
$controller = new WP_REST_Widget_Types_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Widgets.
|
||||
$controller = new WP_REST_Widgets_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Block Directory.
|
||||
$controller = new WP_REST_Block_Directory_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
Reference in New Issue
Block a user