[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

User API: WP_User_Query class

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

Defines 1 class

WP_User_Query:: (16 methods):
  __construct()
  fill_query_vars()
  prepare_query()
  query()
  get()
  set()
  get_search_sql()
  get_results()
  get_total()
  parse_orderby()
  parse_order()
  __get()
  __set()
  __isset()
  __unset()
  __call()


Class: WP_User_Query  - X-Ref

Core class used for querying users.

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

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

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

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

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

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',
since: 5.1.0 Introduced the 'meta_compare_key' parameter.
since: 5.3.0 Introduced the 'meta_type_key' parameter.
since: 5.9.0 Added 'capability', 'capability__in', and 'capability__not_in' parameters.
param: string|array $query {

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

since: 3.1.0

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

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

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

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

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

since: 3.1.0
return: string
param: string   $search  Search string.
param: string[] $columns Array of columns to search.
param: bool     $wild    Whether to allow wildcard searches. Default is false for Network Admin, true for single site.

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

since: 3.1.0
return: array Array of results.

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

since: 3.1.0
return: int Number of total users.

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

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

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

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

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

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

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

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

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

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

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

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

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

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



Generated: Wed Jun 29 01:00:03 2022 Cross-referenced by PHPXref 0.7.1