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:
  • (array|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:
  • 4: .

Description

Retrieves a list of sites matching requested arguments.

Related Functions

get_site, wp_get_sites, get_sitestats, get_users, get_posts

Top Google Results

User discussions

wpseek mobile