Changeset 6048
- Timestamp:
- 09/06/2007 04:34:06 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r6026 r6048 515 515 if ( $pad_counts ) 516 516 _pad_category_counts($type, $categories); 517 */ 517 518 518 519 // Make sure we show empty categories that have children. 519 520 if ( $hierarchical && $hide_empty ) { 520 foreach ( $ categories as $k => $category) {521 if ( ! $ category->{'link' == $type ? 'link_count' : 'category_count'}) {522 $children = _get_ cat_children($category->cat_ID, $categories);521 foreach ( $terms as $k => $term ) { 522 if ( ! $term->count ) { 523 $children = _get_term_children($term->term_id, $terms, $taxonomies[0]); 523 524 foreach ( $children as $child ) 524 if ( $child-> {'link' == $type ? 'link_count' : 'category_count'})525 if ( $child->count ) 525 526 continue 2; 526 527 527 528 // It really is empty 528 unset($ categories[$k]);529 unset($terms[$k]); 529 530 } 530 531 } 531 532 } 532 reset ( $categories ); 533 */ 533 reset ( $terms ); 534 534 535 535 $cache[ $key ] = $terms;
Note: See TracChangeset
for help on using the changeset viewer.