[ Index ]

PHP Cross Reference of WordPress




/wp-includes/ -> class-wp-user-query.php (summary)

User API: WP_User_Query class

File Size: 894 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_User_Query:: (16 methods):

Class: WP_User_Query  - X-Ref

Core class used for querying users.

__construct( $query = null )   X-Ref
PHP5 constructor.

param: null|string|array $query Optional. The query variables.
since: 3.1.0

fill_query_vars( $args )   X-Ref
Fills in missing query variables with default values.

param: array $args Query vars, as passed to `WP_User_Query`.
since: 4.4.0
return: array Complete query variables with undefined ones filled in with defaults.

prepare_query( $query = array()   X-Ref
Prepare the query variables.

param: string|array $query {
since: 3.1.0
since: 4.1.0 Added the ability to order by the `include` value.
since: 4.2.0 Added 'meta_value_num' support for `$orderby` parameter. Added multi-dimensional array syntax
since: 4.3.0 Added 'has_published_posts' parameter.
since: 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. The 'role' parameter was updated to
since: 4.7.0 Added 'nicename', 'nicename__in', 'nicename__not_in', 'login', 'login__in',

query()   X-Ref
Execute the query, with the current variables.

since: 3.1.0

get( $query_var )   X-Ref
Retrieve query variable.

param: string $query_var Query variable key.
since: 3.5.0
return: mixed

set( $query_var, $value )   X-Ref
Set query variable.

param: string $query_var Query variable key.
param: mixed  $value     Query variable value.
since: 3.5.0

get_search_sql( $string, $cols, $wild = false )   X-Ref
Used internally to generate an SQL string for searching across multiple columns

param: string $string
param: array  $cols
param: bool   $wild   Whether to allow wildcard searches. Default is false for Network Admin, true for single site.
since: 3.1.0
return: string

get_results()   X-Ref
Return the list of users.

since: 3.1.0
return: array Array of results.

get_total()   X-Ref
Return the total number of users for the current query.

since: 3.1.0
return: int Number of total users.

parse_orderby( $orderby )   X-Ref
Parse and sanitize 'orderby' keys passed to the user query.

param: string $orderby Alias for the field to order by.
since: 4.2.0
return: string Value to used in the ORDER clause, if `$orderby` is valid.

parse_order( $order )   X-Ref
Parse an 'order' query variable and cast it to ASC or DESC as necessary.

param: string $order The 'order' query variable.
since: 4.2.0
return: string The sanitized 'order' query variable.

__get( $name )   X-Ref
Make private properties readable for backward compatibility.

param: string $name Property to get.
since: 4.0.0
return: mixed Property.

__set( $name, $value )   X-Ref
Make private properties settable for backward compatibility.

param: string $name  Property to check if set.
param: mixed  $value Property value.
since: 4.0.0
return: mixed Newly-set property.

__isset( $name )   X-Ref
Make private properties checkable for backward compatibility.

param: string $name Property to check if set.
since: 4.0.0
return: bool Whether the property is set.

__unset( $name )   X-Ref
Make private properties un-settable for backward compatibility.

param: string $name Property to unset.
since: 4.0.0

__call( $name, $arguments )   X-Ref
Make private/protected methods readable for backward compatibility.

param: string $name      Method to call.
param: array  $arguments Arguments to pass when calling.
since: 4.0.0
return: mixed Return value of the callback, false otherwise.

Generated: Sat Oct 24 01:00:04 2020 Cross-referenced by PHPXref 0.7.1