钩子文档

granted_super_admin

💡 云策文档标注

概述

granted_super_admin 是一个 WordPress 动作钩子,在用户被授予超级管理员权限后触发,用于执行相关操作。

关键要点

  • 这是一个动作钩子,通过 do_action('granted_super_admin', $user_id) 调用。
  • 参数 $user_id 是整数类型,表示被授予超级管理员权限的用户 ID。
  • 首次引入于 WordPress 3.0.0 版本。

相关函数

  • grant_super_admin():位于 wp-includes/capabilities.php,用于授予超级管理员权限。

📄 原文内容

Fires after the user is granted Super Admin privileges.

Parameters

$user_idint
ID of the user that was granted Super Admin privileges.

Source

do_action( 'granted_super_admin', $user_id );

Changelog

Version Description
3.0.0 Introduced.