From 87db175abe17f53bdde805599871c1924dd51393 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 7 May 2008 19:10:36 +0000 Subject: [PATCH] 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 --- wp-includes/category-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index ba24302074..9093062e48 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -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 .= '' . $show_option_all . ''; - if ( is_category() ) + if ( empty( $r['current_category'] ) && is_category() ) $r['current_category'] = $wp_query->get_queried_object_id(); if ( $hierarchical )