get_current_blog_id()

Retrieve the current site ID.

Return

(int) Site ID.

Source

File: wp-includes/load.php

function get_current_blog_id() {
	global $blog_id;
	return absint( $blog_id );
}

Changelog

Version Description
3.1.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_current_blog_id