WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get super admins

Description

Retrieve a list of super admins.

Uses $super_admins Super admins global variable, if set.

Usage

 <?php get_super_admins(); ?> 

Parameters

None.

Return Values

(array) 
List of super admin logins

Examples

Display a list of super admin users

<?php
$super_admins = get_super_admins();
echo 'List of super-admin users:<ul>';
foreach ($super_admins as $admin) {
  echo '<li>' . $admin . '</li>';
}
echo '</ul>';
?>

Change Log

Since: 3.0

Source File

get_super_admins() is located in wp-includes/capabilities.php

Related