From b3b64db5705f28baf8692f41e9abee6b2b640636 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 10 Sep 2019 19:03:04 +0000 Subject: [PATCH] Docs: Clarify the `int` return value in `comments_pre_query` filter DocBlock. See #45800. git-svn-id: https://develop.svn.wordpress.org/trunk@46087 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-comment-query.php | 5 +++-- src/wp-includes/class-wp-network-query.php | 1 - src/wp-includes/class-wp-site-query.php | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php index 28ac6082e3..988d106c9e 100644 --- a/src/wp-includes/class-wp-comment-query.php +++ b/src/wp-includes/class-wp-comment-query.php @@ -386,14 +386,15 @@ class WP_Comment_Query { * * Return a non-null value to bypass WordPress's default comment queries. * - * The expected return type from this filter depends on the value passed in the request query_vars: - * When $this->query_vars['count'] is set, the filter should return the comment count as an int. + * The expected return type from this filter depends on the value passed in the request query_vars. + * When `$this->query_vars['count']` is set, the filter should return the comment count as an int. * When `'ids' == $this->query_vars['fields']`, the filter should return an array of comment ids. * Otherwise the filter should return an array of WP_Comment objects. * * @since 5.3.0 * * @param array|int|null $comment_data Return an array of comment data to short-circuit WP's comment query, + * the comment count as an integer if `$this->query_vars['count']` is set, * or null to allow WP to run its normal queries. * @param WP_Comment_Query $this The WP_Comment_Query instance, passed by reference. */ diff --git a/src/wp-includes/class-wp-network-query.php b/src/wp-includes/class-wp-network-query.php index 9a0f97a912..9db0a60462 100644 --- a/src/wp-includes/class-wp-network-query.php +++ b/src/wp-includes/class-wp-network-query.php @@ -204,7 +204,6 @@ class WP_Network_Query { * * Return a non-null value to bypass WordPress's default site queries. * - * * @since 5.2.0 * * @param array|null $site_ids Return an array of site data to short-circuit WP's site query, diff --git a/src/wp-includes/class-wp-site-query.php b/src/wp-includes/class-wp-site-query.php index ae91c8269e..ec42cde2d2 100644 --- a/src/wp-includes/class-wp-site-query.php +++ b/src/wp-includes/class-wp-site-query.php @@ -295,7 +295,6 @@ class WP_Site_Query { * * Return a non-null value to bypass WordPress's default site queries. * - * * @since 5.2.0 * * @param array|null $site_ids Return an array of site data to short-circuit WP's site query,