#31118 closed defect (bug) (fixed)
get_terms() parameters do not respect multiple $taxonomies
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | needs-patch needs-unit-tests |
Focuses: | Cc: |
Description
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.
Change History (5)
Note: See
TracTickets for help on using
tickets.
I can't help but feel partially responsible for finding this! :) Good catch.