From 3311bc878371efd362c93dc519b52dcc5a7bf4ec Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 8 Jul 2020 11:11:04 +0000 Subject: [PATCH] Docs: Improve documentation for `have_posts()`, `have_comments()`, and their `WP_Query` counterparts. Props stevenlinx. Fixes #50610. Built from https://develop.svn.wordpress.org/trunk@48406 git-svn-id: http://core.svn.wordpress.org/trunk@48175 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-query.php | 4 ++-- wp-includes/query.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index 6508e7f64e..4f9430ae92 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -3319,7 +3319,7 @@ class WP_Query { * * @since 1.5.0 * - * @return bool True if posts are available, false if end of loop. + * @return bool True if posts are available, false if end of the loop. */ public function have_posts() { if ( $this->current_post + 1 < $this->post_count ) { @@ -3405,7 +3405,7 @@ class WP_Query { * * @since 2.2.0 * - * @return bool True, if more comments. False, if no more posts. + * @return bool True if comments are available, false if no more comments. */ public function have_comments() { if ( $this->current_comment + 1 < $this->comment_count ) { diff --git a/wp-includes/query.php b/wp-includes/query.php index d30f037047..d4e743ccd5 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -921,7 +921,7 @@ function is_main_query() { * * @global WP_Query $wp_query WordPress Query object. * - * @return bool + * @return bool True if posts are available, false if end of the loop. */ function have_posts() { global $wp_query; @@ -981,7 +981,7 @@ function the_post() { * * @global WP_Query $wp_query WordPress Query object. * - * @return bool + * @return bool True if comments are available, false if no more comments. */ function have_comments() { global $wp_query; diff --git a/wp-includes/version.php b/wp-includes/version.php index 0e6df4ca00..71232591fd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta1-48405'; +$wp_version = '5.5-beta1-48406'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.