WordPress开发者和主题制作者的搜索引擎



get_sites ›

Since4.6.0
已弃用n/a
get_sites ( $args = array() )
参数:
  • (string|array) $args { Optional. Array or query string of site query parameters. Default empty.
    Required: No
    默认: array()
查看:
  • WP_Site_Query::parse_query()
返回:
  • (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.
定义在:
文档:
Change Log:
  • 4.8.0

Retrieves a list of sites matching requested arguments.



源码

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

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