get_current_site(): WP_Network

Gets the current network.

Description

Returns an object containing the ‘id’, ‘domain’, ‘path’, and ‘site_name’ properties of the network being viewed.

See also

Return

WP_Network The current network.

Source

function get_current_site() {
	global $current_site;
	return $current_site;
}

Changelog

VersionDescription
MU (3.0.0)Introduced.

User Contributed Notes

  1. Skip to note 2 content

    An importante note from the original Codex page:

    Note: get_current_site() was inherited from MU, and is named based on the old terminology which spoke of multiple “blogs” on a “site”. We now speak of multiple “sites” on a “network” instead, but some of the old terminology still lives on in some function names. This function returns information about the current network. To get information about the current site on the network, see get_current_blog_id() and get_blog_details() .

You must log in before being able to contribute a note or feedback.