[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

User API: WP_User_Query class

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

Defines 1 class

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


Class: WP_User_Query  - X-Ref

Core class used for querying users.

__construct( $query = null )   X-Ref
Constructor.

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

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

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

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

param: string|array $query {

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


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

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

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

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.

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.
return: string

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

return: array Array of results.

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

return: int Number of total users.

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

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

generate_cache_key( array $args, $sql )   X-Ref
Generate cache key.

param: array  $args Query arguments.
param: string $sql  SQL statement.
return: string Cache key.

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

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

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

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

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

param: string $name  Property to check if set.
param: mixed  $value Property value.

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

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

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

param: string $name Property to unset.

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

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



Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref