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