mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-27 11:38:01 +01:00
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. Built from https://develop.svn.wordpress.org/branches/5.0@43734 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f09938cd01
commit
81a4d0a10c
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43733';
|
||||
$wp_version = '5.0-alpha-43734';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -234,6 +234,7 @@ require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.p
|
||||
require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
|
||||
require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
|
||||
require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
|
||||
require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
|
||||
require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
|
||||
require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
|
||||
require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
|
||||
|
Loading…
Reference in New Issue
Block a user