Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › Some admin menu items aren’t exposed to URE › Reply To: Some admin menu items aren’t exposed to URE
12/08/2020 at 06:31
#6980
Vladimir
Keymaster
“Tools->Delete Site” is protected by default by ‘delete_site’ capability, which is mapped by WordPress to ‘manage_options’, wp-includes/capabilities.php:
case 'delete_site':
if ( is_multisite() ) {
$caps[] = 'manage_options';
} else {
$caps[] = 'do_not_allow';
}
break;
So if role does not have ‘manage_options’ capability URE will not show this menu item in the “Admin menu” dialog.
My test shows that “Admin menu” allows to block “Tools->Delete Site” successfully in case role has ‘manage_options’ capability for other purpose.