[wp-trac] [WordPress Trac] #31118: get_terms() parameters do not respect multiple $taxonomies

WordPress Trac noreply at wordpress.org
Sat Jan 24 19:03:00 UTC 2015


#31118: get_terms() parameters do not respect multiple $taxonomies
--------------------------+------------------------------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Taxonomy      |    Version:
 Severity:  normal        |   Keywords:  needs-patch needs-unit-tests
  Focuses:                |
--------------------------+------------------------------------------
 When passing an array of `$taxonomies` to `get_terms()`, a number of
 parameters only consider the first of these taxonomies: 'child_of',
 'parent', 'pad_counts'. In addition, 'hierarchical' and 'pad_counts' will
 be forced to `false` if the first item in `$taxonomies` is non-
 hierarchical (eg, `array( 'post_tag', 'category' )`).

 As far as I can tell, the pattern of looking only at the first of
 `$taxonomies` comes from the original porting of category functionality to
 the taxonomy component. My guess is that using `$taxonomies[0]` in place
 of `$category` was the quickest way to do a straight port. See [5525]. No
 one has ever come back to clean these bits up.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31118>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list