[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Site API: WP_Site_Query class
File Size: | 866 lines (31 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Site_Query:: (9 methods):
__construct()
parse_query()
query()
get_sites()
get_site_ids()
set_found_sites()
get_search_sql()
parse_orderby()
parse_order()
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 { since: 4.6.0 since: 4.8.0 Introduced the 'lang_id', 'lang__in', and 'lang__not_in' parameters. since: 5.1.0 Introduced the 'update_site_meta_cache', 'meta_query', 'meta_key', since: 5.3.0 Introduced the 'meta_type_key' parameter. |
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(). since: 4.6.0 |
query( $query ) X-Ref |
Sets up the WordPress query for retrieving sites. return: array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', param: string|array $query Array or URL query string of parameters. since: 4.6.0 |
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', since: 4.6.0 |
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. since: 4.6.0 |
set_found_sites() X-Ref |
Populates found_sites and max_num_pages properties for the current query if the limit clause was used. since: 4.6.0 |
get_search_sql( $search, $columns ) X-Ref |
Used internally to generate an SQL string for searching across multiple columns. return: string Search SQL. param: string $search Search string. param: string[] $columns Array of columns to search. since: 4.6.0 |
parse_orderby( $orderby ) X-Ref |
Parses and sanitizes 'orderby' keys passed to the site query. return: string|false Value to used in the ORDER clause. False otherwise. param: string $orderby Alias for the field to order by. since: 4.6.0 |
parse_order( $order ) X-Ref |
Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary. return: string The sanitized 'order' query variable. param: string $order The 'order' query variable. since: 4.6.0 |
Generated: Sat Nov 23 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |