Add current_category option to wp_list_categories(). Props filosofo. fixes #6928

git-svn-id: http://svn.automattic.com/wordpress/trunk@7903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-07 19:10:36 +00:00
parent 5a9d1d9c8d
commit 87db175abe

View File

@ -272,7 +272,7 @@ function wp_list_categories($args = '') {
'style' => 'list', 'show_count' => 0,
'hide_empty' => 1, 'use_desc_for_title' => 1,
'child_of' => 0, 'feed' => '', 'feed_type' => '',
'feed_image' => '', 'exclude' => '',
'feed_image' => '', 'exclude' => '', 'current_category' => 0,
'hierarchical' => true, 'title_li' => __('Categories'),
'echo' => 1, 'depth' => 0
);
@ -309,7 +309,7 @@ function wp_list_categories($args = '') {
else
$output .= '<a href="' . get_bloginfo('url') . '">' . $show_option_all . '</a>';
if ( is_category() )
if ( empty( $r['current_category'] ) && is_category() )
$r['current_category'] = $wp_query->get_queried_object_id();
if ( $hierarchical )