Docs: Clarify the `int` return value in `comments_pre_query` filter DocBlock.

See #45800.
Built from https://develop.svn.wordpress.org/trunk@46087


git-svn-id: http://core.svn.wordpress.org/trunk@45899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-09-10 19:04:56 +00:00
parent b3e64f0947
commit c9071ca2e6
4 changed files with 4 additions and 5 deletions

View File

@ -386,14 +386,15 @@ class WP_Comment_Query {
* *
* Return a non-null value to bypass WordPress's default comment queries. * 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: * 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 `$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. * 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. * Otherwise the filter should return an array of WP_Comment objects.
* *
* @since 5.3.0 * @since 5.3.0
* *
* @param array|int|null $comment_data Return an array of comment data to short-circuit WP's comment query, * @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. * or null to allow WP to run its normal queries.
* @param WP_Comment_Query $this The WP_Comment_Query instance, passed by reference. * @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. * Return a non-null value to bypass WordPress's default site queries.
* *
*
* @since 5.2.0 * @since 5.2.0
* *
* @param array|null $site_ids Return an array of site data to short-circuit WP's site query, * @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. * Return a non-null value to bypass WordPress's default site queries.
* *
*
* @since 5.2.0 * @since 5.2.0
* *
* @param array|null $site_ids Return an array of site data to short-circuit WP's site query, * @param array|null $site_ids Return an array of site data to short-circuit WP's site query,

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-46086'; $wp_version = '5.3-alpha-46087';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.