WordPress.org

Make WordPress Core

Ticket #14704: taxonomy.php.patch

File taxonomy.php.patch, 516 bytes (added by aaires, 9 years ago)
  • wp-includes/taxonomy.php

    diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
    index 69f9c28..467287d 100644
    a b function _get_term_hierarchy($taxonomy) { 
    22992299                return array();
    23002300        $children = get_option("{$taxonomy}_children");
    23012301
    2302         if ( is_array($children) )
     2302        if ( is_array($children) && !empty($children) )
    23032303                return $children;
    23042304        $children = array();
    23052305        $terms = get_terms($taxonomy, array('get' => 'all', 'orderby' => 'id', 'fields' => 'id=>parent'));