Make WordPress Core


Ignore:
Timestamp:
05/23/2007 05:28:13 PM (17 years ago)
Author:
ryan
Message:

wp_insert_category(), cat_rows(), and others using taxonomy. see #4189

File:
1 edited

Legend:

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

    r5525 r5528  
    8585    $cat_id = (int) $cat_id;
    8686    $category = &get_category($cat_id);
    87     return $category->cat_name;
     87    return $category->name;
    8888}
    8989
     
    175175
    176176function _get_category_hierarchy() {
    177     $children = get_option('category_children');
    178     if ( is_array($children) )
    179         return $children;
    180 
    181     $children = array();
    182     $categories = get_categories('hide_empty=0&hierarchical=0');
    183     foreach ( $categories as $cat ) {
    184         if ( $cat->category_parent > 0 )
    185             $children[$cat->category_parent][] = $cat->cat_ID;
    186     }
    187     update_option('category_children', $children);
    188 
    189     return $children;
     177    return _get_term_hierarchy('category');
    190178}
    191179
Note: See TracChangeset for help on using the changeset viewer.