diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php
index ad219c271..69344046b 100644
|
a
|
b
|
function redirect_canonical( $requested_url = null, $do_redirect = true ) { |
| 281 | 281 | $redirect_url = get_permalink( get_queried_object_id() ); |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | | $page = get_query_var( 'page' ); |
| | 284 | if ( $wp_query->post && false === strpos( $wp_query->post->post_content, '<!--nextpage-->' ) ) { |
| | 285 | $page = 1; |
| | 286 | } else { |
| | 287 | $page = get_query_var( 'page' ); |
| | 288 | } |
| | 289 | |
| 285 | 290 | if ( $page > 1 ) { |
| 286 | 291 | if ( is_front_page() ) { |
| 287 | 292 | $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( "$wp_rewrite->pagination_base/$page", 'paged' ); |