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.

Merges [43734], [43735] to trunk.

props desrosj.
Fixes #45016.


git-svn-id: https://develop.svn.wordpress.org/trunk@43985 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt
2018-12-12 03:32:21 +00:00
parent a73e82011f
commit 140a95cf08
6 changed files with 628 additions and 0 deletions
+4
View File
@@ -233,6 +233,10 @@ function create_initial_rest_routes() {
// Settings.
$controller = new WP_REST_Settings_Controller;
$controller->register_routes();
// Themes.
$controller = new WP_REST_Themes_Controller;
$controller->register_routes();
}
/**