-
Notifications
You must be signed in to change notification settings - Fork 651
Support taxonomy collection args on posts endpoint. #2287
Conversation
| $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 ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__() instead of _()
|
Should we error if an invalid term id is provided? |
|
I think not, all the checking for a large amount of terms would be slow IMO. |
|
Ok, just one nit then |
|
👍 fixed in 6c1a4d1 |
|
This is just by ID, correct—so |
I would expect to just get an empty collection back |
|
Final Q: does this give any ability to query by multiple categories? |
Correct
Yes |
Although, I believe this is |
|
When the filter[tax_query] is in you can specify that in addition to get either |
Can you demonstrate what that query would look like? |
Support taxonomy collection args on posts endpoint.
See #2277