[wp-trac] [WordPress Trac] #38607: Add `rest_base` to response objects of `wp/v2/taxonomies` and `wp/v2/types` on the REST Api
WordPress Trac
noreply at wordpress.org
Mon Nov 7 05:24:40 UTC 2016
#38607: Add `rest_base` to response objects of `wp/v2/taxonomies` and
`wp/v2/types` on the REST Api
--------------------------------------+------------------------------
Reporter: youknowriad | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: rest-api
--------------------------------------+------------------------------
Comment (by jnylen0):
Given the decision in #38439, `rest_base` is no longer useful for building
URLs. We should still add it though. Here's another example where it
would be useful:
1. I'm looking at a taxonomy response e.g. `/wp/v2/taxonomies/post_tag`
2. I follow the `collection` link to find some interesting terms in this
taxonomy
3. I want to add one of these terms to a post. Which property name do I
use?
In step 3 I want the taxonomy's `rest_base`, but it's not available.
Currently the only way I see to get it is by looking at the last piece of
the `collection` URL.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38607#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list