WordPress.org

Make WordPress Core

Changeset 12979


Ignore:
Timestamp:
02/06/10 03:40:24 (4 years ago)
Author:
dd32
Message:

Redirect home_url variants to home_url(). See #11991

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/canonical.php

    r12889 r12979  
    101101            if ( $redirect_url = get_permalink(get_query_var('page_id')) ) 
    102102                $redirect['query'] = remove_query_arg('page_id', $redirect['query']); 
     103        } elseif ( is_page() && isset($wp_query->queried_object) && 'page' == get_option('show_on_front') && $wp_query->queried_object->ID == get_option('page_on_front')  && ! $redirect_url ) { 
     104            $redirect_url = home_url('/'); 
    103105        } elseif ( !empty($_GET['m']) && ( is_year() || is_month() || is_day() ) ) { 
    104106            $m = get_query_var('m'); 
     
    135137        } 
    136138 
    137     // paging and feeds 
     139        // paging and feeds 
    138140        if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) { 
    139141            if ( !$redirect_url ) 
  • trunk/wp-includes/link-template.php

    r12978 r12979  
    235235 
    236236    if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) 
    237         $link = home_url(); 
     237        $link = home_url('/'); 
    238238    else 
    239239        $link = _get_page_link( $id , $leavename, $sample ); 
Note: See TracChangeset for help on using the changeset viewer.