From fdb0b54389ab2d49a8e3ff6ee75737e42f8a04bb Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 28 Nov 2014 12:18:22 +0000 Subject: [PATCH] 4.1 Docs Audit: Improve inline documentation for the new `WP_Query::setup_postdata()` method. See #30469. Built from https://develop.svn.wordpress.org/trunk@30620 git-svn-id: http://core.svn.wordpress.org/trunk@30610 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 10 +++++++--- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) 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.