Ticket #3416: cat.diff
| File cat.diff, 1.5 kB (added by andy, 2 years ago) |
|---|
-
wp-includes/category-template.php
old new 241 241 $output .= __("No categories"); 242 242 } else { 243 243 global $wp_query; 244 $r['current_category'] = $wp_query->get_queried_object_id(); 244 245 if ( is_category() ) 246 $r['current_category'] = $wp_query->get_queried_object_id(); 247 245 248 if ( $hierarchical ) 246 249 $depth = 0; // Walk the full depth. 247 250 else -
wp-includes/classes.php
old new 688 688 $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp); 689 689 } 690 690 691 $_current_category = get_category( $current_category ); 691 if ( $current_category ) 692 $_current_category = get_category( $current_category ); 692 693 693 694 if ( 'list' == $args['style'] ) { 694 695 $output .= "\t<li"; 695 if ( ($category->cat_ID == $current_category) && is_category() )696 if ( $current_category && ($category->cat_ID == $current_category) ) 696 697 $output .= ' class="current-cat"'; 697 elseif ( ($category->cat_ID == $_current_category->category_parent) && is_category() )698 elseif ( $_current_category && ($category->cat_ID == $_current_category->category_parent) ) 698 699 $output .= ' class="current-cat-parent"'; 699 700 $output .= ">$link\n"; 700 701 } else {
