#37545 closed defect (bug) (fixed)
`taxonomy` param of `WP_Term_Query` doesn't accept string value
| Reported by: | boonebgorges | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.6 |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | has-patch commit dev-reviewed |
| Cc: | Focuses: |
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)
#2
@
10 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
37545.diff contains tests for array vs string values, as well as a simple fix.
Ping @ocean90 for review.