Respect show_option_all in wp_list_categories(). Props westi. fixes #4145
git-svn-id: https://develop.svn.wordpress.org/trunk@5265 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1357a729bb
commit
9548071ffa
@ -248,7 +248,13 @@ function wp_list_categories($args = '') {
|
|||||||
$output .= __("No categories");
|
$output .= __("No categories");
|
||||||
} else {
|
} else {
|
||||||
global $wp_query;
|
global $wp_query;
|
||||||
|
|
||||||
|
if( !empty($show_option_all) )
|
||||||
|
if ('list' == $style )
|
||||||
|
$output .= '<li><a href="' . get_bloginfo('url') . '">' . $show_option_all . '</a></li>';
|
||||||
|
else
|
||||||
|
$output .= '<a href="' . get_bloginfo('url') . '">' . $show_option_all . '</a>';
|
||||||
|
|
||||||
if ( is_category() )
|
if ( is_category() )
|
||||||
$r['current_category'] = $wp_query->get_queried_object_id();
|
$r['current_category'] = $wp_query->get_queried_object_id();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user