Action hook 'granted_super_admin'

in WP Core File wp-includes/capabilities.php at line 1220

View Source

granted_super_admin

Action Hook
Description
Fires after the user is granted Super Admin privileges.

Hook Information

File Location wp-includes/capabilities.php View on GitHub
Hook Type Action
Line Number 1220

Hook Parameters

Type Name Description
int $user_id ID of the user that was granted Super Admin privileges.

Usage Examples

Basic Usage
<?php
// Hook into granted_super_admin
add_action('granted_super_admin', 'my_custom_function', 10, 1);

function my_custom_function($user_id) {
    // Your custom code here
}

Source Code Context

wp-includes/capabilities.php:1220 - How this hook is used in WordPress core
<?php
1215  		 *
1216  		 * @since 3.0.0
1217  		 *
1218  		 * @param int $user_id ID of the user that was granted Super Admin privileges.
1219  		 */
1220  		do_action( 'granted_super_admin', $user_id );
1221  		return true;
1222  	}
1223  	return false;
1224  }
1225  

PHP Documentation

<?php
/**
		 * Fires after the user is granted Super Admin privileges.
		 *
		 * @since 3.0.0
		 *
		 * @param int $user_id ID of the user that was granted Super Admin privileges.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-includes/capabilities.php
Related Hooks

Related hooks will be displayed here in future updates.