From bcc6275b3a3398c84b496aa557879e5e66e42812 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 14 Nov 2011 17:24:14 +0000 Subject: [PATCH] Link show_option_all in wp_list_categories() to the posts page if one is set. Props solarissmoke. fixes #18610 git-svn-id: http://svn.automattic.com/wordpress/trunk@19273 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index d1a4ca0daa..2be9eed793 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -464,11 +464,14 @@ function wp_list_categories( $args = '' ) { $output .= $show_option_none; } } else { - if( !empty( $show_option_all ) ) + if ( ! empty( $show_option_all ) ) { + $posts_page = ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' ); + $posts_page = esc_url( $posts_page ); if ( 'list' == $style ) - $output .= '
  • ' . $show_option_all . '
  • '; + $output .= "
  • $show_option_all
  • "; else - $output .= '' . $show_option_all . ''; + $output .= "$show_option_all"; + } if ( empty( $r['current_category'] ) && ( is_category() || is_tax() || is_tag() ) ) { $current_term_object = get_queried_object();