[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




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

Site API: WP_Site_Query class

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

Defines 1 class

WP_Site_Query:: (9 methods):

Class: WP_Site_Query  - X-Ref

Core class used for querying sites.

__construct( $query = '' )   X-Ref
Sets up the site query, based on the query vars passed.

param: string|array $query {

parse_query( $query = '' )   X-Ref
Parses arguments passed to the site query with default query parameters.

param: string|array $query Array or string of WP_Site_Query arguments. See WP_Site_Query::__construct().

query( $query )   X-Ref
Sets up the WordPress query for retrieving sites.

param: string|array $query Array or URL query string of parameters.
return: array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',

get_sites()   X-Ref
Retrieves a list of sites matching the query vars.

return: array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',

get_site_ids()   X-Ref
Used internally to get a list of site IDs matching the query vars.

return: int|array A single count of site IDs if a count query. An array of site IDs if a full query.

set_found_sites()   X-Ref
Populates found_sites and max_num_pages properties for the current query
if the limit clause was used.

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

param: string   $string  Search string.
param: string[] $columns Array of columns to search.
return: string Search SQL.

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

param: string $orderby Alias for the field to order by.
return: string|false Value to used in the ORDER clause. False otherwise.

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

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

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1