Make WordPress Core

Changeset 19273


Ignore:
Timestamp:
11/14/2011 05:24:14 PM (14 years ago)
Author:
ryan
Message:

Link show_option_all in wp_list_categories() to the posts page if one is set. Props solarissmoke. fixes #18610

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r18815 r19273  
    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() ) ) {
Note: See TracChangeset for help on using the changeset viewer.