Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@joehoyle
Copy link
Member

See #2277

@joehoyle joehoyle added this to the 2.0 Beta 13 milestone Feb 17, 2016
@joehoyle joehoyle self-assigned this Feb 17, 2016
$base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;

$params[ $base ] = array(
'description' => sprintf( _( 'Limit result set to all items that have the specified term assigned in the %s taxonomy.' ), $base ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__() instead of _()

@danielbachhuber
Copy link
Member

Should we error if an invalid term id is provided?

@joehoyle
Copy link
Member Author

I think not, all the checking for a large amount of terms would be slow IMO.

@danielbachhuber
Copy link
Member

Ok, just one nit then

@joehoyle
Copy link
Member Author

👍 fixed in 6c1a4d1

@kadamwhite
Copy link
Contributor

This is just by ID, correct—so tags=tagslug wouldn't work? Fine if so, just making sure I understand the code

@kadamwhite
Copy link
Contributor

Should we error if an invalid term id is provided?

I would expect to just get an empty collection back

@kadamwhite
Copy link
Contributor

Final Q: does this give any ability to query by multiple categories?

@danielbachhuber
Copy link
Member

This is just by ID, correct

Correct

Final Q: does this give any ability to query by multiple categories?

Yes

@danielbachhuber
Copy link
Member

Final Q: does this give any ability to query by multiple categories?

Although, I believe this is AND and not OR

@BE-Webdesign
Copy link
Member

When the filter[tax_query] is in you can specify that in addition to get either AND or OR. I also believe the default is OR but could be wrong don't remember. #2273

@kadamwhite
Copy link
Contributor

Final Q: does this give any ability to query by multiple categories?

Yes

Can you demonstrate what that query would look like?

danielbachhuber added a commit that referenced this pull request Mar 15, 2016
Support taxonomy collection args on posts endpoint.
@danielbachhuber danielbachhuber merged commit 86f1459 into develop Mar 15, 2016
@danielbachhuber danielbachhuber deleted the posts-endpoints-taxonomies-args branch March 15, 2016 18:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants