wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_sites › WordPress Function

Desde4.6.0
Obsoleton/a
get_sites ( $args = array() )
Parâmetros:
  • (string|array) $args Optional. Array or string of arguments. See WP_Site_Query::__construct() for information on accepted arguments. Default empty array.
    Required: No
    Padrão: array()
Ver:
  • WP_Site_Query::parse_query()
Retorna:
  • (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.
Definido em:
Codex:
Log de mudanças:
  • 4.8.0

Retrieves a list of sites matching requested arguments.



Fonte

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

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