Changeset 4580
- Timestamp:
- 12/01/2006 06:55:27 PM (18 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r4524 r4580 239 239 } else { 240 240 global $wp_query; 241 $r['current_category'] = $wp_query->get_queried_object_id(); 241 242 if ( is_category() ) 243 $r['current_category'] = $wp_query->get_queried_object_id(); 244 242 245 if ( $hierarchical ) 243 246 $depth = 0; // Walk the full depth. -
trunk/wp-includes/classes.php
r4579 r4580 620 620 } 621 621 622 $_current_category = get_category( $current_category ); 622 if ( $current_category ) 623 $_current_category = get_category( $current_category ); 623 624 624 625 if ( 'list' == $args['style'] ) { 625 626 $output .= "\t<li"; 626 if ( ($category->cat_ID == $current_category) && is_category() )627 if ( $current_category && ($category->cat_ID == $current_category) ) 627 628 $output .= ' class="current-cat"'; 628 elseif ( ($category->cat_ID == $_current_category->category_parent) && is_category() )629 elseif ( $_current_category && ($category->cat_ID == $_current_category->category_parent) ) 629 630 $output .= ' class="current-cat-parent"'; 630 631 $output .= ">$link\n";
Note: See TracChangeset
for help on using the changeset viewer.