get_super_admins() WordPress Function

The get_super_admins() function is used to get a list of all the super administrators on a WordPress site. This function returns an array of all the usernames of the super administrators.

get_super_admins() #

Retrieves a list of super admins.


Return

(string[]) List of super admin logins.


Top ↑

Source

File: wp-includes/capabilities.php

function get_super_admins() {
	global $super_admins;

	if ( isset( $super_admins ) ) {
		return $super_admins;
	} else {
		return get_site_option( 'site_admins', array( 'admin' ) );
	}
}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.