[wp-trac] [WordPress Trac] #32993: get_terms with child_of only works with uninterrupted hierarchies
WordPress Trac
noreply at wordpress.org
Tue Jul 14 13:00:46 UTC 2015
#32993: get_terms with child_of only works with uninterrupted hierarchies
--------------------------+-----------------------------
Reporter: eclev91 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.2.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Similar to #14477 -
If I use `get_terms()` with both search and child_of, the filtered results
are passed to `_get_term_children()`, and if those results don't include
an uninterrupted heirarchy, it returns an empty array. Something like...
{{{
get_terms(array(
'search'=>$search_term,
'child_of'=>6
));
}}}
won't return grandchildren of 6 that match `$search_term`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32993>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list