mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Role/Capability: Don't assign the delete_site capability to anyone on single site installs.
This capability is not relevant on single site installs; it only applies to deleting a site on a multisite installation. Fixes #38326 git-svn-id: https://develop.svn.wordpress.org/trunk@39494 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -422,7 +422,11 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
$caps[] = 'edit_theme_options';
|
||||
break;
|
||||
case 'delete_site':
|
||||
$caps[] = 'manage_options';
|
||||
if ( is_multisite() ) {
|
||||
$caps[] = 'manage_options';
|
||||
} else {
|
||||
$caps[] = 'do_not_allow';
|
||||
}
|
||||
break;
|
||||
case 'edit_term':
|
||||
case 'delete_term':
|
||||
|
||||
Reference in New Issue
Block a user