#37545 closed defect (bug) (fixed)
`taxonomy` param of `WP_Term_Query` doesn't accept string value
Reported by: | boonebgorges | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
...even though it says it does.
I vaguely remember it being a conscious choice not to accept string values for taxonomy
, but somehow it snuck into the documentation. In retrospect, I think it's fine (and consistent with other Query classes) to accept a string here.
Attachments (1)
Change History (5)
#1
@
8 years ago
- Keywords has-patch needs-review added
- Owner set to boonebgorges
- Status changed from new to assigned
#2
@
8 years ago
- Keywords commit dev-reviewed added; needs-review removed
37545.diff looks good to me. Core does the same in get_terms(). (The extra check for null
is superfluous.)
Note: See
TracTickets for help on using
tickets.
37545.diff contains tests for array vs string values, as well as a simple fix.
Ping @ocean90 for review.