[wp-trac] [WordPress Trac] #39033: WP REST API: Consider adding `supports` object to `/types` response

WordPress Trac noreply at wordpress.org
Fri Dec 2 19:49:15 UTC 2016


#39033: WP REST API: Consider adding `supports` object to `/types` response
----------------------------+-----------------------------
 Reporter:  timmydcrawford  |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  REST API        |    Version:
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39033>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list