Function: get_networks

get_networks( string | array $args )

Retrieves a list of networks.


Name Type(s) Default Value Description
$args string | array array()

Optional. Array or string of arguments. See WP_Network_Query::parse_query() for information on accepted arguments. Default empty array.


array | integer

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.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.