get_current_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.

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);
}

WordPress Version: 4.5

/**
 * 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);
}

WordPress Version: 4.3

/**
 * 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);
}

WordPress Version: 4.0

/**
 * 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);
}

WordPress Version: 3.7

/**
 * 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);
}