Take the 2-minute tour ×  I'm developing a plugin that uses
custom capabilities. Some of those capabilities need to be added
to all users who are super admins. Currently, I'm using this
code:  $supers = get_super_admins(); foreach ( $supers as $admin
) {     $user = new WP_User( 0, $admin );     $user->add_cap(
'my_cap' );     $user->add_cap( 'my_second_cap' );  However, I'm
concerned that this code is just adding the capabilities to the
individual users, as opposed to the role as I usually would. If
a new super admin is created, they will not have these
capabilities as this function only runs on plugin activation.
Is there a better way of adding custom capabilities to super
admins?  share|improve this question add comment  2 Answers  up
vote 5 down vote accepted  Although this isn't well documented,
"Super Admin" is not a role (in that it is not an actual role
object). It's more like a special "status".  A list of users who
are Super Admins (also called "network admins" or "site admins")
are stored in a dat