WordPress.org

Make WordPress Core

Changeset 20380


Ignore:
Timestamp:
04/06/12 19:49:34 (2 years ago)
Author:
markjaquith
Message:

Strip p, page_id, attachment_id, post_type, pagename, and name from redirect query if we get a hit on a 404-guessed permalink. fixes #20374

File:
1 edited

Legend:

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

    r19970 r20380  
    9393        } 
    9494 
    95         if ( ! $redirect_url ) 
     95        if ( ! $redirect_url ) { 
    9696            $redirect_url = redirect_guess_404_permalink( $requested_url ); 
     97            $redirect['query'] = remove_query_arg( array( 'p', 'page_id', 'attachment_id', 'post_type', 'pagename', 'name' ), $redirect['query'] ); 
     98        } 
    9799 
    98100    } elseif ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) { 
Note: See TracChangeset for help on using the changeset viewer.