Created
January 7, 2019 18:44
-
-
Save kellenmace/5c46f969b020012e13409e1874d67c6b to your computer and use it in GitHub Desktop.
Get all Super Admin users in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get all Super Admin users on the current site. | |
* | |
* @return array WP_User objects. | |
*/ | |
function get_all_superadmin_users() { | |
return get_users([ | |
'login__in' => get_super_admins() | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment