Changeset 3011 for trunk/wp-includes/template-functions-category.php
- Timestamp:
- 11/07/2005 09:56:03 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-category.php
r2978 r3011 127 127 128 128 function get_category_children($id, $before = '/', $after = '') { 129 global $cache_categories; 130 131 if ( !isset($cache_categories) ) 132 update_category_cache(); 133 134 $c_cache = $cache_categories; // Can't do recursive foreach on a global, have to make a copy 135 $chain = ''; 136 foreach ( $c_cache as $category ) { 129 $cat_ids = get_all_category_ids(); 130 foreach ( $cat_ids as $cat_id ) { 131 if ( $cat_id == $id) 132 continue; 133 134 $category = get_category($cat_id); 137 135 if ( $category->category_parent == $id ) { 138 136 $chain .= $before.$category->cat_ID.$after;
Note: See TracChangeset
for help on using the changeset viewer.