mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +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, spacedmonkey, zieladam, jorgefilipecosta, youknowriad, kevin940726. git-svn-id: https://develop.svn.wordpress.org/trunk@50995 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