Changeset 20398
- Timestamp:
- 04/07/2012 05:39:08 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r20397 r20398 102 102 if ( ! $redirect_url ) { 103 103 if ( $redirect_url = redirect_guess_404_permalink( $requested_url ) ) { 104 $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p ', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url );104 $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'page', 'feed', 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url ); 105 105 } 106 106 } … … 490 490 if ( ! $post_id ) 491 491 return false; 492 return get_permalink( $post_id ); 492 if ( get_query_var( 'feed' ) ) 493 return get_post_comments_feed_link( $post_id, get_query_var( 'feed' ) ); 494 elseif ( get_query_var( 'page' ) ) 495 return trailingslashit( get_permalink( $post_id ) ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' ); 496 else 497 return get_permalink( $post_id ); 493 498 } 494 499
Note: See TracChangeset
for help on using the changeset viewer.