mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function. This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation. Props spacedmonkey. See #28290. git-svn-id: https://develop.svn.wordpress.org/trunk@34778 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -336,7 +336,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
$caps[] = $cap;
|
||||
if ( is_multisite() ) {
|
||||
// update_, install_, and delete_ are handled above with is_super_admin().
|
||||
$menu_perms = get_site_option( 'menu_items', array() );
|
||||
$menu_perms = get_network_option( 'menu_items', array() );
|
||||
if ( empty( $menu_perms['plugins'] ) )
|
||||
$caps[] = 'manage_network_plugins';
|
||||
}
|
||||
@@ -352,7 +352,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
case 'create_users':
|
||||
if ( !is_multisite() )
|
||||
$caps[] = $cap;
|
||||
elseif ( is_super_admin( $user_id ) || get_site_option( 'add_new_users' ) )
|
||||
elseif ( is_super_admin( $user_id ) || get_network_option( 'add_new_users' ) )
|
||||
$caps[] = $cap;
|
||||
else
|
||||
$caps[] = 'do_not_allow';
|
||||
@@ -578,7 +578,7 @@ function get_super_admins() {
|
||||
if ( isset($super_admins) )
|
||||
return $super_admins;
|
||||
else
|
||||
return get_site_option( 'site_admins', array('admin') );
|
||||
return get_network_option( 'site_admins', array('admin') );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user