wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_sites › WordPress Function

Od4.6.0
Przestarzałyn/a
get_sites ( $args = array() )
Parametry:
  • (string|array) $args Optional. Array or string of arguments. See WP_Site_Query::__construct() for information on accepted arguments. Default empty array.
    Wymagane: Nie
    Domyślny: array()
Zobacz:
  • WP_Site_Query::parse_query()
Powrót:
  • (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.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 4.8.0

Retrieves a list of sites matching requested arguments.



Źródło

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

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