On this page
is_blog_user( int $blog_id ): bool
This function has been deprecated. Use is_user_member_of_blog() instead.
Checks if the current user belong to a given site.
Description
See also
Parameters
$blog_idint Required-
Site ID
Return
bool True if the current users belong to $blog_id, false if not.
Source
File: wp-includes/deprecated.php. View all references
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 );
}
Related
Uses
| Uses | Description |
|---|---|
| is_user_member_of_blog() wp-includes/user.php | Finds out whether a user is a member of a given blog. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
| get_current_user_id() wp-includes/user.php | Gets the current user’s ID. |
Changelog
| Version | Description |
|---|---|
| 3.3.0 | Use is_user_member_of_blog() |
| MU (3.0.0) | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_blog_user