WordPress.org

Make WordPress Core

Changeset 20397


Ignore:
Timestamp:
04/07/12 05:18:50 (3 years ago)
Author:
markjaquith
Message:

Properly handle paged permalink URLs even when we are not already 301ing. fixes #20385

File:
1 edited

Legend:

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

    r20396 r20397  
    210210 
    211211        // Post Paging 
    212         if ( is_singular() && get_query_var('page') && $redirect_url ) { 
     212        if ( is_singular() && get_query_var('page') ) { 
     213            if ( !$redirect_url ) 
     214                $redirect_url = get_permalink( get_queried_object_id() ); 
    213215            $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' ); 
    214216            $redirect['query'] = remove_query_arg( 'page', $redirect['query'] ); 
Note: See TracChangeset for help on using the changeset viewer.