Skip to content

Commit b3b64db

Browse files
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
1 parent 4ba54c2 commit b3b64db

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/wp-includes/class-wp-comment-query.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,14 +386,15 @@ public function get_comments() {
386386
*
387387
* Return a non-null value to bypass WordPress's default comment queries.
388388
*
389-
* The expected return type from this filter depends on the value passed in the request query_vars:
390-
* When $this->query_vars['count'] is set, the filter should return the comment count as an int.
389+
* The expected return type from this filter depends on the value passed in the request query_vars.
390+
* When `$this->query_vars['count']` is set, the filter should return the comment count as an int.
391391
* When `'ids' == $this->query_vars['fields']`, the filter should return an array of comment ids.
392392
* Otherwise the filter should return an array of WP_Comment objects.
393393
*
394394
* @since 5.3.0
395395
*
396396
* @param array|int|null $comment_data Return an array of comment data to short-circuit WP's comment query,
397+
* the comment count as an integer if `$this->query_vars['count']` is set,
397398
* or null to allow WP to run its normal queries.
398399
* @param WP_Comment_Query $this The WP_Comment_Query instance, passed by reference.
399400
*/

src/wp-includes/class-wp-network-query.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ public function get_networks() {
204204
*
205205
* Return a non-null value to bypass WordPress's default site queries.
206206
*
207-
*
208207
* @since 5.2.0
209208
*
210209
* @param array|null $site_ids Return an array of site data to short-circuit WP's site query,

src/wp-includes/class-wp-site-query.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ public function get_sites() {
295295
*
296296
* Return a non-null value to bypass WordPress's default site queries.
297297
*
298-
*
299298
* @since 5.2.0
300299
*
301300
* @param array|null $site_ids Return an array of site data to short-circuit WP's site query,

0 commit comments

Comments
 (0)