is_site_admin [ WordPress Function ]
| See: | |
| Defined at: |
|
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.
Source
<?php
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 ( ! $user->exists() )
return false;
$user_id = $user->ID;
}
return is_super_admin( $user_id );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/is site admin « WordPress Codex
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions.
codex.wordpress.org - WordPress › Support » Deprecated function: is_site_admin()
An FYI that is_site_admin() (p2/inc/p2.php:29) is deprecated in favor of is_super_admin(). Lance Willett · Theme Wrangler Posted 1 year ago #. Hi wpdavis, ...
wordpress.org - Replace is_site_admin functionality with WP_Role based ...
So, I was digging around in the WPMU core today (and have been in the past as well), and discovered that instead of a traditional has_cap() call, a WPMU only ...
mu.wordpress.org - Call to undefined function is_site_admin()
Jan 18, 2011 ... It's been a while since I logged into my wordpress site, but I get the following message when I attempt to log in: Call to undefined function ...
premium.wpmudev.org