Ticket #12456: 12456.diff
File 12456.diff, 933 bytes (added by , 15 years ago) |
---|
-
wp-includes/canonical.php
61 61 $redirect_url = false; 62 62 63 63 // Notice fixing 64 if ( !isset($redirect['path']) ) $redirect['path'] = ''; 65 if ( !isset($redirect['query']) ) $redirect['query'] = ''; 64 if ( !isset($redirect['path']) ) 65 $redirect['path'] = ''; 66 if ( !isset($redirect['query']) ) 67 $redirect['query'] = ''; 66 68 67 69 if ( is_singular() && 1 > $wp_query->post_count && ($id = get_query_var('p')) ) { 68 70 … … 164 166 } 165 167 166 168 } 169 } elseif ( is_singular() ) { 170 $post_url = get_permalink( $wp_query->get_queried_object_id() ); 171 if ( strpos($requested_url, $post_url) === false ) // If the full post's URL is not within the requested url, lets redirect there. 172 $redirect_url = $post_url; 167 173 } 168 174 169 175 // paging and feeds