Add Embeddable Taxonomy Term Links to the Post Response#1048
Add Embeddable Taxonomy Term Links to the Post Response#1048danielbachhuber merged 24 commits intodevelopfrom
Conversation
|
In v1 the taxonomy terms were included in the Post response, this moves them to embeddable resource links. Any taxonomy that is returned by |
There was a problem hiding this comment.
Shouldn't we validate the taxonomy for the post type?
…th the given taxonomy.
|
@danielbachhuber db2c077 adds checks to be sure a post exists and that the taxonomy is related to the post. |
There was a problem hiding this comment.
Why isn't this just returning bool? I don't understand why you'd need $taxonomy returned when you're passing it in the first place.
There was a problem hiding this comment.
Need to check the taxonomy isn't private. This would benefit from a test.
There was a problem hiding this comment.
WordPress doesn't have private taxonomies: https://core.trac.wordpress.org/ticket/21949 Related #419
There was a problem hiding this comment.
We still need to check. Otherwise we will be exposing private data.
|
Just a few nits. |
|
I found a big hole in my logic here. I need to check that a user has permission to read a post before we return the terms associated with it. Still a WIP. |
… and get_item methods.
- Renamed method check_valid_taxonomy_for_post to check_post_taxonomy_permission. - Return either a WP_Error or null.
…ost_tag taxonomy.
…am from taxonomy validation.
|
Includes:
|
There was a problem hiding this comment.
It just returns....what would you do?
|
@danielbachhuber Both pieces of recent feedback have been addressed in |
Add Embeddable Taxonomy Term Links to the Post Response
Fixes #900
The _links in the Post response now include embeddable references for each object taxonomy.