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

Sets up the WordPress query for retrieving networks.


Parameters

$query string|array Required
Array or URL query string of parameters.

Top ↑

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.


Top ↑

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();
}


Top ↑

Changelog

Changelog
Version Description
4.6.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.