[wp-trac] [WordPress Trac] #26903: get_terms returns no terms with 'parent' => 0 with non-empty child terms
WordPress Trac
noreply at wordpress.org
Fri Feb 7 19:53:02 UTC 2014
#26903: get_terms returns no terms with 'parent' => 0 with non-empty child terms
------------------------------+-----------------------------
Reporter: mrwweb | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.9
Component: Taxonomy | Version: 3.8
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------------
Changes (by wonderboymusic):
* owner: => wonderboymusic
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"27125"]:
{{{
#!CommitTicketReference repository="" revision="27125"
When a `term_id` matches in `_get_term_children()`, recurse through its
children until there is no more depth in the hierarchy. Since
`get_terms()` return terms with a `count` of `0` when their children are
not empty, we must return all children so that `get_terms()` can check
their count.
In [27108], #26903 was fixed, but only because we were using the example
in the ticket, leaving out infinite depth for hierarchical taxonomies.
Adds unit tests, including
`Tests_Term_getTerms::test_get_terms_seven_levels_deep()`.
Fixes #26903. Again.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26903#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list