1. 首页
  2. WordPress 函数手册

grant_super_admin()

grant_super_admin( int $user_id )

授予超级管理员权限。
Grants Super Admin privileges.

目录锚点:#参数#返回#源码


参数(Parameters)

参数 类型 必填 说明
$user_id (int) 必需 要授予超级管理员权限的用户的ID。

返回(Return)

(bool)成功时正确,失败时错误。当用户已经是超级管理员或定义了$super_admins全局时,此操作可能会失败。


源码(Source)


更新版本 源码位置 使用 被使用
3.0.0 wp-includes/capabilities.php:905 0 7

grant_super_admin() 为WP2原创文章,链接:https://www.wp2.cn/functions/grant_super_admin/