Retrieves a list of sites matching requested arguments.
$argsstring|arrayoptional
Default:array()
'fields' is set to 'ids', or the number of sites when 'count' is passed as a query var.function get_sites( $args = array() ) {
$query = new WP_Site_Query();
return $query->query( $args );
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_sites