diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index bd9cd6853f..0d5bce4804 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2066,7 +2066,7 @@ function _get_term_hierarchy($taxonomy) { return $children; $children = array(); - $terms = get_terms($taxonomy, array('get' => 'all')); + $terms = get_terms($taxonomy, array('get' => 'all', 'orderby' => 'id', 'fields' => 'ids')); foreach ( $terms as $term ) { if ( $term->parent > 0 ) $children[$term->parent][] = $term->term_id;