[wp-trac] [WordPress Trac] #39494: Make it possible for taxonomy query to include children in REST API

WordPress Trac noreply at wordpress.org
Wed Mar 14 16:12:06 UTC 2018


#39494: Make it possible for taxonomy query to include children in REST API
-----------------------------+-----------------------------
 Reporter:  jason_the_adams  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  REST API         |     Version:  4.7
 Severity:  normal           |  Resolution:
 Keywords:  needs-testing    |     Focuses:  rest-api
-----------------------------+-----------------------------

Comment (by jason_the_adams):

 Replying to [comment:18 birgire]:
 > But I'm still hesitated about updating previous schema, I wonder if new
 {{{$base}}} parameters would be needed instead, to introduce a new schema?
 I didn't change e.g. the schema in the
 {{{WP_REST_Posts_Controller::get_collection_params()}}}.
 >
 > I also wonder about alternatives to {{{ids}}} like {{{terms}}},
 {{{term_id}}} or {{{term_ids}}}? And how e.g. a possible future term
 slug(s) filtering support would play with this and it's naming convention?

 Thank you, @birgire, for taking the time to update the test patch! I can
 appreciate your concerns. If we weren't able to make it completely
 backwards compatible, I would have been reluctant to update the schema,
 but as it is I feel like it should be alright?

 I'm also fine with changing `ids` to something else. We could do `terms`
 and then check `$terms[0]` to indicate whether it's an array of numbers
 (ids) or strings (slugs), although it may be possible for a slug to be a
 number? Discreet keys here are probably a good idea. If we want to go this
 direction, I'm happy to put together another patch for this.

 Thanks again! Excited to see activity on this ticket!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39494#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list