Ticket #10015: #10015.diff
File #10015.diff, 1.2 KB (added by , 16 years ago) |
---|
-
wp-admin/includes/template.php
71 71 // If the page starts in a subtree, print the parents. 72 72 if ( $count == $start && $category->parent > 0 ) { 73 73 74 $my_parents = array(); 75 $p = $category->parent; 76 while ( $p ) { 77 $my_parent = get_category( $p ); 74 $my_parents = array(); 75 $my_parent = $category->parent; 76 do 77 { 78 $my_parent = get_category( $my_parent ); 78 79 $my_parents[] = $my_parent; 79 if ( $my_parent->parent == 0 ) 80 break; 81 $p = $my_parent->parent; 80 $my_parent = $my_parent->parent; 82 81 } 82 while ($my_parent); 83 83 84 $num_parents = count($my_parents);84 $num_parents = $plevel = count($my_parents); 85 85 while( $my_parent = array_pop($my_parents) ) { 86 echo "\t" . _cat_row( $my_parent, $ level - $num_parents );86 echo "\t" . _cat_row( $my_parent, $plevel - $num_parents ); 87 87 $num_parents--; 88 88 } 89 echo "\t" . _cat_row( $category, $plevel ); 90 unset( $categories[ $key ] ); 91 $count++; 92 93 continue; 89 94 } 90 95 91 96 if ( $count >= $start )