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 Built from https://develop.svn.wordpress.org/trunk@39494 git-svn-id: http://core.svn.wordpress.org/trunk@39434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
113833953d
commit
597627fb92
|
@ -422,7 +422,11 @@ function map_meta_cap( $cap, $user_id ) {
|
||||||
$caps[] = 'edit_theme_options';
|
$caps[] = 'edit_theme_options';
|
||||||
break;
|
break;
|
||||||
case 'delete_site':
|
case 'delete_site':
|
||||||
$caps[] = 'manage_options';
|
if ( is_multisite() ) {
|
||||||
|
$caps[] = 'manage_options';
|
||||||
|
} else {
|
||||||
|
$caps[] = 'do_not_allow';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'edit_term':
|
case 'edit_term':
|
||||||
case 'delete_term':
|
case 'delete_term':
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-39493';
|
$wp_version = '4.8-alpha-39494';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue