WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/16/2018 10:27:05 PM (22 months 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-settings.php

    r41721 r43734  
    235235require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
    236236require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
     237require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
    237238require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
    238239require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
Note: See TracChangeset for help on using the changeset viewer.