mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
5a9d1d9c8d
commit
87db175abe
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user