Ticket #6928: wp_list_categories-current_category.diff

File wp_list_categories-current_category.diff, 0.8 kB (added by filosofo, 4 months ago)
  • wp-includes/category-template.php

    old new  
    272272                'style' => 'list', 'show_count' => 0, 
    273273                'hide_empty' => 1, 'use_desc_for_title' => 1, 
    274274                'child_of' => 0, 'feed' => '', 'feed_type' => '', 
    275                 'feed_image' => '', 'exclude' => '', 
     275                'feed_image' => '', 'exclude' => '', 'current_category' => 0, 
    276276                'hierarchical' => true, 'title_li' => __('Categories'), 
    277277                'echo' => 1, 'depth' => 0 
    278278        ); 
     
    309309                        else 
    310310                                $output .= '<a href="' .  get_bloginfo('url')  . '">' . $show_option_all . '</a>'; 
    311311 
    312                 if ( is_category() ) 
     312                if ( empty( $r['current_category'] ) && is_category() ) 
    313313                        $r['current_category'] = $wp_query->get_queried_object_id(); 
    314314 
    315315                if ( $hierarchical )