get_sites
get_sites ( $args = array() )
Parameters:- (string|array) args Optional. Array or string of arguments. See WP_Site_Query::__construct() for information on accepted arguments. Default empty array.
See:- WP_Site_Query::parse_query()
Returns:- (WP_Site[]|int[]|int) List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', or the number of sites when 'count' is passed as a query var.
Defined at:Change Log: - Introduced in WordPress: 4.6.0
- Deprecated in WordPress: —
Description
Retrieves a list of sites matching requested arguments.