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:
rob1n 2007-04-13 23:20:14 +00:00
parent 1357a729bb
commit 9548071ffa
1 changed files with 7 additions and 1 deletions

View File

@ -248,7 +248,13 @@ function wp_list_categories($args = '') {
$output .= __("No categories");
} else {
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() )
$r['current_category'] = $wp_query->get_queried_object_id();