wppaste
WordPress

WP_Network_Query::query( string|array $query ): array|int

Since
4.6.0
Source
wp-includes/class-wp-network-query.php:185
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

Used by · 1

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.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 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.