Changeset 34492 for trunk/src/wp-includes/canonical.php
- Timestamp:
- 09/24/2015 02:03:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r34446 r34492 147 147 $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 ); 148 148 } 149 } 150 151 if ( get_query_var( 'page' ) && $wp_query->post && 152 false !== strpos( $wp_query->post->post_content, '<!--nextpage-->' ) ) { 153 $redirect['path'] = rtrim( $redirect['path'], (int) get_query_var( 'page' ) . '/' ); 154 $redirect['query'] = remove_query_arg( 'page', $redirect['query'] ); 155 $redirect_url = get_permalink( $wp_query->post->ID ); 149 156 } 150 157 … … 561 568 if ( get_query_var( 'feed' ) ) 562 569 return get_post_comments_feed_link( $post_id, get_query_var( 'feed' ) ); 563 elseif ( get_query_var( 'page' ) )570 elseif ( get_query_var( 'page' ) && 1 < get_query_var( 'page' ) ) 564 571 return trailingslashit( get_permalink( $post_id ) ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' ); 565 572 else
Note: See TracChangeset
for help on using the changeset viewer.