Ticket #3453: 3453.diff
File 3453.diff, 943 bytes (added by , 19 years ago) |
---|
-
wp-includes/category.php
111 111 // Update category counts to include children. 112 112 if ( $hierarchical ) { 113 113 foreach ( $categories as $k => $category ) { 114 $progeny = $category->category_count;114 $progeny = 'link' == $type ? $category->link_count : $category->category_count; 115 115 if ( $children = _get_cat_children($category->cat_ID, $categories) ) { 116 116 foreach ( $children as $child ) 117 $progeny += $child->category_count;117 $progeny += 'link' == $type ? $child->link_count : $child->category_count; 118 118 } 119 119 if ( !$progeny && $hide_empty ) 120 120 unset($categories[$k]); 121 121 else 122 $categories[$k]-> category_count= $progeny;122 $categories[$k]->{'link' == $type ? 'link_count' : 'category_count'} = $progeny; 123 123 } 124 124 } 125 125 reset ( $categories );