#31118 closed defect (bug) (fixed)
get_terms() parameters do not respect multiple $taxonomies
| Reported by: | boonebgorges | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.2 |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | needs-patch needs-unit-tests |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I can't help but feel partially responsible for finding this! :) Good catch.