Make WordPress Core


Ignore:
Timestamp:
10/16/2018 10:27:05 PM (6 years ago)
Author:
kadamwhite
Message:

REST API: Introduce themes endpoint to expose theme-supports values for the active theme.

In order to correctly render parts of its UI, the new editor needs to be aware of the active theme's post-formats and post-thumbnails support. This data is exposed by querying for the active theme on a new /wp/v2/themes endpoint for sufficiently privileged users.

props desrosj.
Fixes #45016.

File:
1 edited

Legend:

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

    r42000 r43734  
    233233    // Settings.
    234234    $controller = new WP_REST_Settings_Controller;
     235    $controller->register_routes();
     236
     237    // Themes.
     238    $controller = new WP_REST_Themes_Controller;
    235239    $controller->register_routes();
    236240}
Note: See TracChangeset for help on using the changeset viewer.