summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wp-includes/class-wp.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wp-includes/class-wp.php b/src/wp-includes/class-wp.php
index 11a0b9e6f8..ce88c102cf 100644
--- a/src/wp-includes/class-wp.php
+++ b/src/wp-includes/class-wp.php
@@ -747,15 +747,14 @@ class WP {
$content_found = true;
if ( is_singular() ) {
- $post = isset( $wp_query->post ) ? $wp_query->post : null;
- $next = '<!--nextpage-->';
- $page_qv = is_front_page() ? 'paged' : 'page';
+ $post = isset( $wp_query->post ) ? $wp_query->post : null;
+ $next = '<!--nextpage-->';
// Check for paged content that exceeds the max number of pages.
- if ( $post && ! empty( $this->query_vars[ $page_qv ] ) ) {
+ if ( $post && ! empty( $this->query_vars['page'] ) ) {
// Check if content is actually intended to be paged.
if ( str_contains( $post->post_content, $next ) ) {
- $page = trim( $this->query_vars[ $page_qv ], '/' );
+ $page = trim( $this->query_vars['page'], '/' );
$content_found = (int) $page <= ( substr_count( $post->post_content, $next ) + 1 );
} else {
$content_found = false;