WordPress Version: 6.3
/**
* Retrieves the current site ID.
*
* @since 3.1.0
*
* @global int $blog_id
*
* @return int Site ID.
*/
function get_current_blog_id()
{
global $blog_id;
return absint($blog_id);
}
The timeline below displays how wordpress function get_current_blog_id has changed across different WordPress versions. If a version is not listed, refer to the next available version below.
/**
* Retrieves the current site ID.
*
* @since 3.1.0
*
* @global int $blog_id
*
* @return int Site ID.
*/
function get_current_blog_id()
{
global $blog_id;
return absint($blog_id);
}
/**
* Retrieve the current site ID.
*
* @since 3.1.0
*
* @global int $blog_id
*
* @return int Site ID.
*/
function get_current_blog_id()
{
global $blog_id;
return absint($blog_id);
}
/**
* Retrieve the current blog ID.
*
* @since 3.1.0
*
* @global int $blog_id
*
* @return int Blog id
*/
function get_current_blog_id()
{
global $blog_id;
return absint($blog_id);
}
/**
* Retrieve the current blog ID.
*
* @since 3.1.0
*
* @return int Blog id
*/
function get_current_blog_id()
{
global $blog_id;
return absint($blog_id);
}
/**
* Retrieve the current blog id
*
* @since 3.1.0
*
* @return int Blog id
*/
function get_current_blog_id()
{
global $blog_id;
return absint($blog_id);
}