Make WordPress Core


Ignore:
Timestamp:
05/25/2021 08:26:21 AM (4 years ago)
Author:
noisysocks
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r50994 r50995  
    312312    // Plugins.
    313313    $controller = new WP_REST_Plugins_Controller();
     314    $controller->register_routes();
     315
     316    // Sidebars.
     317    $controller = new WP_REST_Sidebars_Controller();
     318    $controller->register_routes();
     319
     320    // Widget Types.
     321    $controller = new WP_REST_Widget_Types_Controller();
     322    $controller->register_routes();
     323
     324    // Widgets.
     325    $controller = new WP_REST_Widgets_Controller();
    314326    $controller->register_routes();
    315327
Note: See TracChangeset for help on using the changeset viewer.