Skip to content

Commit

Permalink
Docs: Improve documentation for have_posts(), have_comments(), an…
Browse files Browse the repository at this point in the history
…d their `WP_Query` counterparts.

Props stevenlinx.
Fixes #50610.

git-svn-id: https://develop.svn.wordpress.org/trunk@48406 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jul 8, 2020
1 parent e763076 commit 3dc074e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-query.php
Expand Up @@ -3319,7 +3319,7 @@ public function the_post() {
*
* @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 ) {
Expand Down Expand Up @@ -3405,7 +3405,7 @@ public function the_comment() {
*
* @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 ) {
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/query.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3dc074e

Please sign in to comment.