1. 首页
  2. WordPress钩子手册

can_add_user_to_blog

apply_filters( ‘can_add_user_to_blog’, bool|WP_Error $retval, int $user_id, string $role, int $blog_id )

筛选挂钩:筛选是否应将用户添加到网站。
Filter Hook: Filters whether a user should be added to a site.

目录锚点:#参数#源码


参数(Parameters)

参数 类型 说明
$retval (bool | WP_Error) 如果应将用户添加到站点,则为True;否则为false或error对象。
$user_id (int) 用户ID。
$role (string) 用户角色。
$blog_id (int) 站点ID。

源码(Source)


更新版本 源码位置 使用 被使用
4.9.0 wp-includes/ms-functions.php:185 1 0

can_add_user_to_blog 为WP2原创文章,链接:https://www.wp2.cn/hook/can_add_user_to_blog/