refresh_blog_details()
refresh_blog_details( int $blog_id ) 清除博客详细信息缓存。Clear t…
refresh_blog_details( int $blog_id )
清除博客详细信息缓存。
Clear the blog details cache.
清除博客详细信息缓存。
Clear the blog details cache.
目录锚点:#参数#返回#源码
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| $blog_id | (int) | 可选 | 博客ID。默认为当前博客。 |
返回(Return)
无返回值
源码(Source)
/**
* 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 );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| MU (3.0.0) | wp-includes/ms-blogs.php:273 | 0 | 2 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

还没有任何评论,赶紧来占个楼吧!