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
This commit is contained in:
Sergey Biryukov
2019-09-10 19:03:04 +00:00
parent 4ba54c2104
commit b3b64db570
3 changed files with 3 additions and 4 deletions

View File

@@ -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.
*/

View File

@@ -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,

View File

@@ -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,