Make WordPress Core


Ignore:
Timestamp:
11/08/2014 08:35:00 PM (10 years ago)
Author:
DrewAPicture
Message:

Cross-reference WP_Comment_Query::query() as the location for finding information on default arguments for WP_Comment_Query.

Also updates the return types on get_comments() and get_approved_comments(), as an integer can also be returned if the $count argument is true.

Fixes #30111.

File:
1 edited

Legend:

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

    r30280 r30281  
    132132 *
    133133 * @param  int   $post_id The ID of the post.
    134  * @param  array $args    Optional. See {@see WP_Comment_Query} for information
     134 * @param  array $args    Optional. See {@see WP_Comment_Query::query()} for information
    135135 *                        on accepted arguments.
    136  * @return array $comments The approved comments.
     136 * @return int|array $comments The approved comments, or number of comments if `$count`
     137 *                             argument is true.
    137138 */
    138139function get_approved_comments( $post_id = 0, $args = array() ) {
     
    212213 * The comment list can be for the blog as a whole or for an individual post.
    213214 *
    214  * The list of comment arguments are 'status', 'orderby', 'comment_date_gmt',
    215  * 'order', 'number', 'offset', and 'post_id'.
    216  *
    217215 * @since 2.7.0
    218216 *
    219217 * @global wpdb $wpdb WordPress database abstraction object.
    220218 *
    221  * @param mixed $args Optional. Array or string of options to override defaults.
    222  * @return array List of comments.
     219 * @param string|array $args Optional. Array or string of arguments. See {@see WP_Comment_Query::query()}
     220 *                           for information on accepted arguments. Default empty.
     221 * @return int|array List of comments or number of found comments if `$count` argument is true.
    223222 */
    224223function get_comments( $args = '' ) {
     
    229228/**
    230229 * WordPress Comment Query class.
     230 *
     231 * See {@see WP_Comment_Query::query()} for accepted arguments.
    231232 *
    232233 * @since 3.1.0
Note: See TracChangeset for help on using the changeset viewer.