Respect show_option_all in wp_list_categories(). Props westi. fixes #4145

git-svn-id: http://svn.automattic.com/wordpress/trunk@5265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-04-13 23:20:14 +00:00
parent cb5e9836c1
commit 24e1d66471
1 changed files with 7 additions and 1 deletions

View File

@ -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();