grant_super_admin

grant_super_admin

Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.0.1

do_action('grant_super_admin') is found 1 times:

  • /wp-includes/capabilities.php line 939
    	 * @since 3.0.0
    	 *
    	 * @param int $user_id ID of the user that is about to be granted Super Admin privileges.
    	 */
    	do_action( 'grant_super_admin', $user_id );
    
    	// Directly fetch site_admins instead of using get_super_admins().
    	$super_admins = get_site_option( 'site_admins', array( 'admin' ) );
    
    	$user = get_userdata( $user_id );
    	if ( $user && ! in_array( $user->user_login, $super_admins, true ) ) {
    

See this hook used in plugins: