Make WordPress Core

Changeset 12711


Ignore:
Timestamp:
01/12/2010 08:12:04 PM (15 years ago)
Author:
ryan
Message:

Make _get_term_hierarchy() query more efficient.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r12699 r12711  
    20672067
    20682068    $children = array();
    2069     $terms = get_terms($taxonomy, array('get' => 'all'));
     2069    $terms = get_terms($taxonomy, array('get' => 'all', 'orderby' => 'id', 'fields' => 'ids'));
    20702070    foreach ( $terms as $term ) {
    20712071        if ( $term->parent > 0 )
Note: See TracChangeset for help on using the changeset viewer.