WordPress at a glance
function is not described

get_site() WP 4.6.0

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.

Hooks in function
Return

WP_Site/null. The site object or null if not found.

Usage

get_site( $site );
$site(WP_Site/int/null)
Site to retrieve.
Default: current site

Code of get site: wp-includes/ms-blogs.php VER 5.0.3

<?php
function get_site( $site = null ) {
	if ( empty( $site ) ) {
		$site = get_current_blog_id();
	}

	if ( $site instanceof WP_Site ) {
		$_site = $site;
	} elseif ( is_object( $site ) ) {
		$_site = new WP_Site( $site );
	} else {
		$_site = WP_Site::get_instance( $site );
	}

	if ( ! $_site ) {
		return null;
	}

	/**
	 * Fires after a site is retrieved.
	 *
	 * @since 4.6.0
	 *
	 * @param WP_Site $_site Site data.
	 */
	$_site = apply_filters( 'get_site', $_site );

	return $_site;
}