Gets the current network.
Description
Returns an object containing the ‘id’, ‘domain’, ‘path’, and ‘site_name’ properties of the network being viewed.
See also
Source
function get_current_site() {
global $current_site;
return $current_site;
}
Changelog
Version | Description |
---|---|
MU (3.0.0) | Introduced. |
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() .