Advertisements

is_site_admin

Definition:
function is_site_admin( $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.

Parameters

  • $user_login

Source code

function is_site_admin( $user_login = '' ) {

	_deprecated_function( __FUNCTION__, '3.0', 'is_super_admin()' );



	if ( empty( $user_login ) ) {

		$user_id = get_current_user_id();

		if ( !$user_id )

			return false;

	} else {

		$user = get_user_by( 'login', $user_login );

		if ( empty( $user->ID ) )

			return false;

		$user_id = $user->ID;

	}



	return is_super_admin( $user_id );

}

2187

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: