[wp-trac] [WordPress Trac] #32144: get_terms with child_of

WordPress Trac noreply at wordpress.org
Wed Apr 29 12:55:31 UTC 2015


#32144: get_terms with child_of
--------------------------+---------------------------
 Reporter:  shifty51      |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.2.2
Component:  General       |     Version:  4.2
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"32326"]:
 {{{
 #!CommitTicketReference repository="" revision="32326"
 Improve performance of loop detection in `_get_term_children()`.

 Using an array keyed by term_id allows us to use `isset()` rather than the
 slower `in_array()`. In addition, it lets us avoid the use of
 `wp_list_pluck()`
 on large arrays, and helps us to avoid arrays that are unnecessarily large
 due
 to duplicate entries.

 Fixes #32144 for trunk.
 }}}

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


More information about the wp-trac mailing list