Make WordPress Core

Ticket #18610: 18610.diff

File 18610.diff, 1.1 KB (added by solarissmoke, 15 years ago)
  • wp-includes/category-template.php

     
    464464                                $output .= $show_option_none;
    465465                }
    466466        } else {
    467                 if( !empty( $show_option_all ) )
     467                if( !empty( $show_option_all ) ) {
     468                        $posts_page = ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' );
     469                        $posts_page = esc_url( $posts_page );
    468470                        if ( 'list' == $style )
    469                                 $output .= '<li><a href="' .  get_bloginfo( 'url' )  . '">' . $show_option_all . '</a></li>';
     471                                $output .= "<li><a href='$posts_page'>$show_option_all</a></li>";
    470472                        else
    471                                 $output .= '<a href="' .  get_bloginfo( 'url' )  . '">' . $show_option_all . '</a>';
     473                                $output .= "<a href='$posts_page'>$show_option_all</a>";
     474                }
    472475
    473476                if ( empty( $r['current_category'] ) && ( is_category() || is_tax() || is_tag() ) ) {
    474477                        $current_term_object = get_queried_object();