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. Built from https://develop.svn.wordpress.org/trunk@35135 git-svn-id: http://core.svn.wordpress.org/trunk@35100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7c88e86bf6
commit
cdd8891631
@ -128,8 +128,10 @@ class WP_User_Query {
|
|||||||
* @since 4.2.0 Added 'meta_value_num' support for `$orderby` parameter. Added multi-dimensional array syntax
|
* @since 4.2.0 Added 'meta_value_num' support for `$orderby` parameter. Added multi-dimensional array syntax
|
||||||
* for `$orderby` parameter.
|
* for `$orderby` parameter.
|
||||||
* @since 4.3.0 Added 'has_published_posts' parameter.
|
* @since 4.3.0 Added 'has_published_posts' parameter.
|
||||||
* @since 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. 'role' parameter was updated to
|
* @since 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. The 'role' parameter was updated to
|
||||||
* permit an array or comma-separated list of values.
|
* permit an array or comma-separated list of values. The 'number' parameter was updated to support
|
||||||
|
* querying for all users with using -1.
|
||||||
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*
|
*
|
||||||
* @global wpdb $wpdb
|
* @global wpdb $wpdb
|
||||||
@ -175,7 +177,8 @@ class WP_User_Query {
|
|||||||
* @type int $offset Number of users to offset in retrieved results. Can be used in
|
* @type int $offset Number of users to offset in retrieved results. Can be used in
|
||||||
* conjunction with pagination. Default 0.
|
* conjunction with pagination. Default 0.
|
||||||
* @type int $number Number of users to limit the query for. Can be used in
|
* @type int $number Number of users to limit the query for. Can be used in
|
||||||
* conjunction with pagination. Value -1 (all) is not supported.
|
* conjunction with pagination. Value -1 (all) is supported, but
|
||||||
|
* should be used with caution on larger sites.
|
||||||
* Default empty (all users).
|
* Default empty (all users).
|
||||||
* @type int $paged When used with number, defines the page of results to return.
|
* @type int $paged When used with number, defines the page of results to return.
|
||||||
* Default 1.
|
* Default 1.
|
||||||
@ -419,7 +422,7 @@ class WP_User_Query {
|
|||||||
$this->query_orderby = 'ORDER BY ' . implode( ', ', $orderby_array );
|
$this->query_orderby = 'ORDER BY ' . implode( ', ', $orderby_array );
|
||||||
|
|
||||||
// limit
|
// limit
|
||||||
if ( isset( $qv['number'] ) && $qv['number'] > 0 ) {
|
if ( isset( $qv['number'] ) && $qv['number'] ) {
|
||||||
if ( $qv['offset'] ) {
|
if ( $qv['offset'] ) {
|
||||||
$this->query_limit = $wpdb->prepare("LIMIT %d, %d", $qv['offset'], $qv['number']);
|
$this->query_limit = $wpdb->prepare("LIMIT %d, %d", $qv['offset'], $qv['number']);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-35134';
|
$wp_version = '4.4-alpha-35135';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
Loading…
Reference in New Issue
Block a user