Changeset 5528 for trunk/wp-includes/category.php
- Timestamp:
- 05/23/2007 05:28:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category.php
r5525 r5528 85 85 $cat_id = (int) $cat_id; 86 86 $category = &get_category($cat_id); 87 return $category-> cat_name;87 return $category->name; 88 88 } 89 89 … … 175 175 176 176 function _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'); 190 178 } 191 179
Note: See TracChangeset
for help on using the changeset viewer.