can_add_user_to_blog

过滤钩子


apply_filters( 'can_add_user_to_blog', true, $user_id, $role, $blog_id )
参数
  • (true|WP_Error)
    $retval
    True if the user should be added to the site, error
    object otherwise.
    Required:
  • (int)
    $user_id
    User ID.
    Required:
  • (string)
    $role
    User role.
    Required:
  • (int)
    $blog_id
    Site ID.
    Required:
定义位置
  • wp-includes/ms-functions.php
    , line 173
引入
4.9.0
弃用

Filters whether a user should be added to a site.

$can_add_user = apply_filters( 'can_add_user_to_blog', true, $user_id, $role, $blog_id );