函数原型
is_blog_user( int $blog_id ): bool
函数描述
Checks if the current user belong to a given site.
是否弃用
Warning: This function has been deprecated. Use is_user_member_of_blog() instead.
函数参数
-
$blog_id
int
Required - Site ID
函数返回值
bool True if the current users belong to $blog_id, false if not.
函数位置
File: wp-includes/deprecated.php.
函数源码
function is_blog_user( $blog_id = 0 ) {
_deprecated_function( __FUNCTION__, '3.3.0', 'is_user_member_of_blog()' );
return is_user_member_of_blog( get_current_user_id(), $blog_id );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.3.0 | Use is_user_member_of_blog() |
| MU (3.0.0) | Introduced. |

