get_site


get_site ( $site = null )

Parameters:
  • (WP_Site|int|null) $site Optional. Site to retrieve. Default is the current site.
Returns:
  • (WP_Site|null) The site object or null if not found.
Defined at:

Description

Retrieves site data given a site ID or site object.

Site data will be cached and returned after being passed through a filter. If the provided site is empty, the current site global will be used.

Related Functions

get_sites, get_site_url, wp_get_sites, get_sitestats, get_site_meta

Top Google Results

User discussions

wpseek mobile