refresh_blog_details

The timeline below displays how wordpress function refresh_blog_details has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Clears the blog details cache.
 *
 * @since MU (3.0.0)
 *
 * @param int $blog_id Optional. Blog ID. Defaults to current blog.
 */
function refresh_blog_details($blog_id = 0)
{
    $blog_id = (int) $blog_id;
    if (!$blog_id) {
        $blog_id = get_current_blog_id();
    }
    clean_blog_cache($blog_id);
}

WordPress Version: 4.9

/**
 * Clear the blog details cache.
 *
 * @since MU (3.0.0)
 *
 * @param int $blog_id Optional. Blog ID. Defaults to current blog.
 */
function refresh_blog_details($blog_id = 0)
{
    $blog_id = (int) $blog_id;
    if (!$blog_id) {
        $blog_id = get_current_blog_id();
    }
    clean_blog_cache($blog_id);
}

WordPress Version: 4.7

/**
 * Clear the blog details cache.
 *
 * @since MU
 *
 * @param int $blog_id Optional. Blog ID. Defaults to current blog.
 */
function refresh_blog_details($blog_id = 0)
{
    $blog_id = (int) $blog_id;
    if (!$blog_id) {
        $blog_id = get_current_blog_id();
    }
    $details = get_site($blog_id);
    if (!$details) {
        // Make sure clean_blog_cache() gets the blog ID
        // when the blog has been previously cached as
        // non-existent.
        $details = (object) array('blog_id' => $blog_id, 'domain' => null, 'path' => null);
    }
    clean_blog_cache($details);
    /**
     * Fires after the blog details cache is cleared.
     *
     * @since 3.4.0
     *
     * @param int $blog_id Blog ID.
     */
    do_action('refresh_blog_details', $blog_id);
}

WordPress Version: 4.0

/**
 * Clear the blog details cache.
 *
 * @since MU
 *
 * @param int $blog_id Optional. Blog ID. Defaults to current blog.
 */
function refresh_blog_details($blog_id = 0)
{
    $blog_id = (int) $blog_id;
    if (!$blog_id) {
        $blog_id = get_current_blog_id();
    }
    $details = get_blog_details($blog_id, false);
    if (!$details) {
        // Make sure clean_blog_cache() gets the blog ID
        // when the blog has been previously cached as
        // non-existent.
        $details = (object) array('blog_id' => $blog_id, 'domain' => null, 'path' => null);
    }
    clean_blog_cache($details);
    /**
     * Fires after the blog details cache is cleared.
     *
     * @since 3.4.0
     *
     * @param int $blog_id Blog ID.
     */
    do_action('refresh_blog_details', $blog_id);
}

WordPress Version: 3.8

/**
 * Clear the blog details cache.
 *
 * @since MU
 *
 * @param int $blog_id Blog ID
 */
function refresh_blog_details($blog_id)
{
    $blog_id = (int) $blog_id;
    $details = get_blog_details($blog_id, false);
    if (!$details) {
        // Make sure clean_blog_cache() gets the blog ID
        // when the blog has been previously cached as
        // non-existent.
        $details = (object) array('blog_id' => $blog_id, 'domain' => null, 'path' => null);
    }
    clean_blog_cache($details);
    /**
     * Fires after the blog details cache is cleared.
     *
     * @since 3.4.0
     *
     * @param int $blog_id Blog ID.
     */
    do_action('refresh_blog_details', $blog_id);
}

WordPress Version: 3.7

/**
 * Clear the blog details cache.
 *
 * @since MU
 *
 * @param int $blog_id Blog ID
 */
function refresh_blog_details($blog_id)
{
    $blog_id = (int) $blog_id;
    $details = get_blog_details($blog_id, false);
    if (!$details) {
        // Make sure clean_blog_cache() gets the blog ID
        // when the blog has been previously cached as
        // non-existent.
        $details = (object) array('blog_id' => $blog_id, 'domain' => null, 'path' => null);
    }
    clean_blog_cache($details);
    do_action('refresh_blog_details', $blog_id);
}