函数原型
get_dashboard_blog(): WP_Site
函数描述
Get the “dashboard blog”, the blog where users without a blog edit their profile data.
是否弃用
Warning: This function has been deprecated. Use get_site() instead.
函数参数
无
函数返回值
WP_Site Current site object.
函数位置
File: wp-includes/ms-deprecated.php.
函数源码
function get_dashboard_blog() {
_deprecated_function( __FUNCTION__, '3.1.0', 'get_site()' );
if ( $blog = get_site_option( 'dashboard_blog' ) ) {
return get_site( $blog );
}
return get_site( get_network()->site_id );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.1.0 | Use get_site() |
| MU (3.0.0) | Introduced. |

