Support taxonomy collection args on posts endpoint.#2287
Support taxonomy collection args on posts endpoint.#2287danielbachhuber merged 4 commits intodevelopfrom
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 ), |
|
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