Make WordPress Core

Changeset 46087


Ignore:
Timestamp:
09/10/2019 07:03:04 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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

See #45800.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-comment-query.php

    r46086 r46087  
    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.
     
    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.
  • trunk/src/wp-includes/class-wp-network-query.php

    r45734 r46087  
    205205         * Return a non-null value to bypass WordPress's default site queries.
    206206         *
    207          *
    208207         * @since 5.2.0
    209208         *
  • trunk/src/wp-includes/class-wp-site-query.php

    r45734 r46087  
    296296         * Return a non-null value to bypass WordPress's default site queries.
    297297         *
    298          *
    299298         * @since 5.2.0
    300299         *
Note: See TracChangeset for help on using the changeset viewer.