[wp-trac] [WordPress Trac] #40661: WP_Term_Query->parse_query() needs filter like 'get_terms'

WordPress Trac noreply at wordpress.org
Thu Jul 6 09:14:26 UTC 2017


#40661: WP_Term_Query->parse_query() needs filter like 'get_terms'
------------------------------------------+------------------------------
 Reporter:  mpol                          |       Owner:
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Taxonomy                      |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-unit-tests needs-patch  |     Focuses:
------------------------------------------+------------------------------

Comment (by mpol):

 Thanks for commenting.
 Sorry for being confused with the `parse_query` function, I now see that
 the request should be about the `get_terms` function.
 I can agree with the naming function. I was hoping to reuse a filter name
 like get_terms or get_the_terms (there are too many already), but the
 parameters are different, so it will have to be a new name.

 I have a better patch prepared, and will attach it. I added the filter
 right after the `get_results` wpdb query, because caches get updated right
 away, and I think the filter should be run before the cache gets updated.
 It works for me and the usecase of the referenced support topic.
 Please rework as you see fit.

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


More information about the wp-trac mailing list