On this page
WP_Network_Query::query( string|array $query ): array|int
Sets up the WordPress query for retrieving networks.
Parameters
$querystring|array Required-
Array or URL query string of parameters.
Return
array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids', or the number of networks when 'count' is passed as a query var.
Source
File: wp-includes/class-wp-network-query.php. View all references
public function query( $query ) {
$this->query_vars = wp_parse_args( $query );
return $this->get_networks();
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Network_Query::get_networks() wp-includes/class-wp-network-query.php | Gets a list of networks matching the query vars. |
| wp_parse_args() wp-includes/functions.php | Merges user defined arguments into defaults array. |
Used By
| Used By | Description |
|---|---|
| WP_Network_Query::__construct() wp-includes/class-wp-network-query.php | Constructor. |
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_network_query/query