diff --git a/wp-includes/query.php b/wp-includes/query.php index 559ce807d4..371a937125 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -4558,8 +4558,10 @@ class WP_Query { if ( ! $page ) $page = 1; - // Force full post content when viewing the permalink for the $post, or - // when on an RSS feed. Otherwise respect the 'more' tag. + /* + * Force full post content when viewing the permalink for the $post, + * or when on an RSS feed. Otherwise respect the 'more' tag. + */ if ( $post->ID === get_queried_object_id() && ( $this->is_page() || $this->is_single() ) ) { $more = 1; } else if ( $this->is_feed() ) { @@ -4575,9 +4577,11 @@ class WP_Query { $content = str_replace( "\n\n", '', $content ); $content = str_replace( "\n", '', $content ); $content = str_replace( "\n", '', $content ); + // Ignore nextpage at the beginning of the content. if ( 0 === strpos( $content, '' ) ) $content = substr( $content, 15 ); + $pages = explode('', $content); $numpages = count($pages); if ( $numpages > 1 ) @@ -4590,7 +4594,7 @@ class WP_Query { * Fires once the post data has been setup. * * @since 2.8.0 - * @since 4.1.0 Introduced $this parameter. + * @since 4.1.0 Introduced `$this` parameter. * * @param WP_Post &$post The Post object (passed by reference). * @param WP_Query &$this The current Query object (passed by reference). diff --git a/wp-includes/version.php b/wp-includes/version.php index 6f6c8dd4ef..cd16c73744 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30619'; +$wp_version = '4.1-beta2-30620'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.