[wp-trac] [WordPress Trac] #31118: get_terms() parameters do not respect multiple $taxonomies

WordPress Trac noreply at wordpress.org
Sun Jan 25 02:45:13 UTC 2015


#31118: get_terms() parameters do not respect multiple $taxonomies
------------------------------------------+-----------------------------
 Reporter:  boonebgorges                  |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Taxonomy                      |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------------

Comment (by boonebgorges):

 In [changeset:"31276"]:
 {{{
 #!CommitTicketReference repository="" revision="31276"
 In `get_terms()`, check hierarchy for all `$taxonomies` before bailing
 early from 'parent' or 'child_of'.

 There is a pre-check in `get_terms()` that prevents an unnecessary
 database
 query if the 'parent' or 'child_of' parameter is not found in the cached
 term
 hierarchy (since a term without an index in the hierarchy cache has no
 descendants). Previously, only the first item in the `$taxonomies` array
 was
 being checked, with the result that an empty array was being erroneously
 returned in cases where the 'parent' or 'child_of' term is in a subsequent
 taxonomy.

 See #31118.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31118#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list