Changeset 14355
- Timestamp:
- 05/03/2010 12:37:11 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r14162 r14355 82 82 // These tests give us a WP-generated permalink 83 83 if ( is_404() ) { 84 $redirect_url = redirect_guess_404_permalink(); 84 85 // Redirect ?page_id, ?p=, ?attachment_id= to their respective url's 86 $id = max( get_query_var('p'), get_query_var('page_id'), get_query_var('attachment_id')); 87 if ( $id && $redirect_url = get_permalink($id) ) 88 $redirect['query'] = remove_query_arg(array('p', 'page_id', 'attachment_id'), $redirect['query']); 89 90 if ( ! $redirect_url ) 91 $redirect_url = redirect_guess_404_permalink(); 92 85 93 } elseif ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) { 86 94 // rewriting of old ?p=X, ?m=2004, ?m=200401, ?m=20040101
Note: See TracChangeset
for help on using the changeset viewer.