[wp-trac] [WordPress Trac] #33369: Cannot intelligently target using the `get_terms_args` filter

WordPress Trac noreply at wordpress.org
Fri Aug 14 00:07:46 UTC 2015

#33369: Cannot intelligently target using the `get_terms_args` filter
 Reporter:  johnjamesjacoby  |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Taxonomy         |     Version:  2.2
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:

Comment (by johnjamesjacoby):

 33369.01.patch] proposes the following changes in `get_terms()`:
 * Prefer `$r` over `$args` so that the original `$args` parameter remains
 * Pass both `$r` and `$args` into relevant filters
 * Remove old byref `$empty_array` variable and just use `array()` instead
 * Remove unused `$single_taxonomy` variable
 * Existing terms tests all pass

 A few things that I anticipate:
 * Big ugly patch; will go stale quickly
 * Taxonomy terms going through multi-cycle refactoring; touching this is
 scary for less important reasons
 * On a long enough timeline, the guts of `get_terms()` should be moved to
 a modern `WP_Term_Query` class which would likely nullify the efforts in
 this patch anyways

Ticket URL: <https://core.trac.wordpress.org/ticket/33369#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list