WP_Network_Query::query( string|array $query ): array|int
- Since
- 4.6.0
- Source
wp-includes/class-wp-network-query.php:176
Sets up the WordPress query for retrieving networks.
Parameters
$querystring|array- 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.
Uses · 2
- wp_parse_args()Merges user defined arguments into defaults array.
- WP_Network_Query::get_networks()Gets a list of networks matching the query vars.
Used by · 1
- WP_Network_Query::__construct()Constructor.
Source
public function query( $query ) { $this->query_vars = wp_parse_args( $query ); return $this->get_networks(); }History
Introduced in 4.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/class-wp-network-query.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.