Function: is_site_admin

is_site_admin( string $user_login )

Determine if user is a site admin.

Plugins should use is_multisite() instead of checking if this function exists to determine if multisite is enabled.

This function must reside in a file included only if is_multisite() due to legacy function_exists() checks to determine if multisite is enabled.

Parameters

Name Type(s) Default Value Description
$user_login string ''

Optional. Username for the user to check. Default empty.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.