grant_super_admin
Fires before the user is granted Super Admin privileges.
Description
Parameters (1)
- 0. $user_id (int)
- ID of the user that is about to be granted Super Admin privileges.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'grant_super_admin', $user_id );
- The following example is for adding a hook callback.
- // define the grant_super_admin callback
- function action_grant_super_admin( $user_id ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'grant_super_admin', 'action_grant_super_admin', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'grant_super_admin', 'action_grant_super_admin', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/capabilities.php
- do_action( 'grant_super_admin', $user_id );