[wp-trac] [WordPress Trac] #49037: Expose all theme supports in /themes endpoint
WordPress Trac
noreply at wordpress.org
Thu Dec 19 11:12:31 UTC 2019
#49037: Expose all theme supports in /themes endpoint
-------------------------+-----------------------------
Reporter: adamboro | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 5.3.1
Severity: normal | Keywords:
Focuses: rest-api |
-------------------------+-----------------------------
The /themes endpoint exposes just three of values stored in
$_wp_theme_features:
https://core.trac.wordpress.org/browser/tags/5.3/src/wp-includes/rest-
api/endpoints/class-wp-rest-themes-controller.php#L108
This is different than how get_theme_support
(https://developer.wordpress.org/reference/functions/get_theme_support)
function works, which exposes all of them.
As it is now, In order to retrieve a theme support - which is not one of
the three values - via REST API, a custom endpoint has to be created. This
is pretty cumbersome - why shouldn't /themes expose all theme features?
Related: #45016, #48798
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49037>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list