Make WordPress Core

Changeset 9214


Ignore:
Timestamp:
10/16/2008 09:14:42 PM (15 years ago)
Author:
markjaquith
Message:

Proper trailing slashes for when is_front_page() does not show the blog. fixes #7892

File:
1 edited

Legend:

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

    r9203 r9214  
    200200
    201201    // trailing slashes
    202     if ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() && !is_404() && (!is_home() || ( is_home() && (get_query_var('paged') > 1) ) ) ) {
     202    if ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() && !is_404() && (!is_front_page() || ( is_front_page() && (get_query_var('paged') > 1) ) ) ) {
    203203        $user_ts_type = '';
    204204        if ( get_query_var('paged') > 0 ) {
    205205            $user_ts_type = 'paged';
    206206        } else {
    207             foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) {
     207            foreach ( array('single', 'category', 'page', 'day', 'month', 'year', 'home') as $type ) {
    208208                $func = 'is_' . $type;
    209209                if ( call_user_func($func) ) {
     
    214214        }
    215215        $redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
    216     } elseif ( is_home() ) {
     216    } elseif ( is_front_page() ) {
    217217        $redirect['path'] = trailingslashit($redirect['path']);
    218218    }
    219219
    220     // Always trailing slash the 'home' URL
    221     if ( $redirect['path'] == $user_home['path'] )
     220    // Always trailing slash the Front Page URL
     221    if ( trailingslashit( $redirect['path'] ) == trailingslashit( $user_home['path'] ) )
    222222        $redirect['path'] = trailingslashit($redirect['path']);
    223223
Note: See TracChangeset for help on using the changeset viewer.