mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 00:52:55 +01:00
Add current_category option to wp_list_categories(). Props filosofo. fixes #6928
git-svn-id: https://develop.svn.wordpress.org/trunk@7903 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
493329d0ac
commit
a2e8b5bfd7
@ -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…
x
Reference in New Issue
Block a user