Uses
Uses | Description |
---|---|
wp-includes/class-wp-site-query.php: WP_Site_Query::get_sites() | Retrieves a list of sites matching the query vars. |
wp-includes/functions.php: wp_parse_args() | Merge user defined arguments into defaults array. |
Sets up the WordPress query for retrieving sites.
(string|array) (Required) Array or URL query string of parameters.
(array|int) List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', or the number of sites when 'count' is passed as a query var.
File: wp-includes/class-wp-site-query.php
public function query( $query ) { $this->query_vars = wp_parse_args( $query ); return $this->get_sites(); }
Version | Description |
---|---|
4.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_query/query