get_current_site()

Get the current network.


Description Description

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

See also See also


Top ↑

Return Return

(WP_Network)


Top ↑

Source Source

File: wp-includes/ms-functions.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
MU (3.0.0) Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Celso Bessa

    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.