A WordPress-centric search engine for devs and theme authors



get_sites ›

Since4.6.0
Deprecatedn/a
get_sites ( $args = array() )
Parameters:
  • (string|array) $args { Optional. Array or query string of site query parameters. Default empty.
    Required: No
    Default: array()
See:
  • WP_Site_Query::parse_query()
Returns:
  • (array) List of sites.
Defined at:
Codex:

Retrieves a list of sites matching requested arguments.



Source

function get_sites( $args = array() ) {
	$query = new WP_Site_Query();

	return $query->query( $args );
}