WordPress.org

Make WordPress Core

Changeset 35135


Ignore:
Timestamp:
10/13/15 15:15:30 (2 years ago)
Author:
DrewAPicture
Message:

Docs: Add a changelog entry mentioning that the number argument now supports -1 (all).

Also fixes the argument description.

-1 support was added in [35114].

See #28631.

File:
1 edited

Legend:

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

    r35114 r35135  
    129129     *              for `$orderby` parameter. 
    130130     * @since 4.3.0 Added 'has_published_posts' parameter. 
    131      * @since 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. 'role' parameter was updated to 
    132      *              permit an array or comma-separated list of values. 
     131     * @since 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. The 'role' parameter was updated to 
     132     *              permit an array or comma-separated list of values. The 'number' parameter was updated to support 
     133     *              querying for all users with using -1. 
     134     * 
    133135     * @access public 
    134136     * 
     
    176178     *                                             conjunction with pagination. Default 0. 
    177179     *     @type int          $number              Number of users to limit the query for. Can be used in 
    178      *                                             conjunction with pagination. Value -1 (all) is not supported. 
     180     *                                             conjunction with pagination. Value -1 (all) is supported, but 
     181     *                                             should be used with caution on larger sites. 
    179182     *                                             Default empty (all users). 
    180183     *     @type int          $paged               When used with number, defines the page of results to return. 
     
    420423 
    421424        // limit 
    422         if ( isset( $qv['number'] ) && $qv['number'] > 0 ) { 
     425        if ( isset( $qv['number'] ) && $qv['number'] ) { 
    423426            if ( $qv['offset'] ) { 
    424427                $this->query_limit = $wpdb->prepare("LIMIT %d, %d", $qv['offset'], $qv['number']); 
Note: See TracChangeset for help on using the changeset viewer.