get_active_blog_for_user()
get_active_blog_for_user( int $user_id )
获取用户的活动博客之一
Get one of a user’s active blogs
说明(Description)
返回用户的主博客(如果他们有且该博客处于活动状态)。如果不活动,则函数返回用户的另一个活动博客。如果未找到任何用户,则会将该用户添加为仪表板日志的订阅服务器,并返回该日志。
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$user_id | (int) | 必需 | 用户的唯一ID |
返回(Return)
(WP|Site|void)博客对象
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
MU (3.0.0) | wp-includes/ms-functions.php:45 | 3 | 9 |
get_active_blog_for_user() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_active_blog_for_user/