WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/01/2020 04:22:25 AM (11 months ago)
Author:
TimothyBlynJacobs
Message:

REST API: Introduce plugin management and block directory endpoints.

These endpoints facilitate the Block Directory Inserter feature in Gutenberg. Users can now install, activate, deactivate, and delete plugins over the REST API. The block directoryendpoint allows searching for available blocks from the WordPress.org block directory.

Props cklee, talldanwp, noisysocks, joen, soean, youknowriad, dufresnesteven, gziolo, dd32, tellyworth, ryelle, spacedmonkey, TimothyBlynJacobs.
Fixes #50321.

File:
1 edited

Legend:

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

    r48198 r48242  
    284284    // Themes.
    285285    $controller = new WP_REST_Themes_Controller;
     286    $controller->register_routes();
     287
     288    // Plugins.
     289    $controller = new WP_REST_Plugins_Controller();
     290    $controller->register_routes();
     291
     292    // Block Directory.
     293    $controller = new WP_REST_Block_Directory_Controller();
    286294    $controller->register_routes();
    287295
Note: See TracChangeset for help on using the changeset viewer.