Make WordPress Core

Changeset 5597


Ignore:
Timestamp:
05/30/2007 01:39:47 AM (17 years ago)
Author:
ryan
Message:

Category hierarchy fixes. see #4189

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r5566 r5597  
    105105        foreach ( $cats as $cat) {
    106106            // TODO fix hierarchy
    107             //$result[$cat]['children'] = get_nested_categories( $default, $cat);
     107            $result[$cat]['children'] = get_nested_categories( $default, $cat);
    108108            $result[$cat]['cat_ID'] = $cat;
    109109            $result[$cat]['checked'] = in_array( $cat, $checked_categories );
  • trunk/wp-includes/taxonomy.php

    r5596 r5597  
    701701
    702702    $children = array();
    703     $terms = get_terms($taxonomy, 'hide_empty=0&hierarchical=0');
     703    $terms = get_terms($taxonomy, 'get=all');
    704704    foreach ( $terms as $term ) {
    705705        if ( $term->parent > 0 )
    706             $children[$cterm->parent][] = $term->term_id;
     706            $children[$term->parent][] = $term->term_id;
    707707    }
    708708    update_option("{$taxonomy}_children", $children);
Note: See TracChangeset for help on using the changeset viewer.