WP REST API: Add `supports` object to `/types` response
|Reported by:||timmydcrawford||Owned by:||rachelbaker|
|Component:||REST API||Keywords:||has-patch has-unit-tests commit|
While working on a Calypso [pull request](https://github.com/Automattic/wp-calypso/pull/9751) to utilize the post types endpoint on WordPress.com, I hit a bit of a stumbling block with the current implementation.
In the [WordPress.com API](https://github.com/Automattic/jetpack/blob/master/json-endpoints/class.wpcom-json-api-list-post-types-endpoint.php#L61), the output of [get_all_post_type_supports](https://developer.wordpress.org/reference/functions/get_all_post_type_supports/) is returned in a supports object for each post type.
Adding this object to the response stream was easy enough to do as a plugin via register_rest_field, but I figured it might be worth considering including in the core endpoint.
Change History (7)
4 months ago
- Keywords needs-patch needs-unit-tests added
- Milestone changed from Awaiting Review to 4.8
- Summary changed from WP REST API: Consider adding `supports` object to `/types` response to WP REST API: Add `supports` object to `/types` response
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed