Make WordPress Core


Ignore:
Timestamp:
12/04/2016 10:06:36 PM (9 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r39464 r39494  
    423423        break;
    424424    case 'delete_site':
    425         $caps[] = 'manage_options';
     425        if ( is_multisite() ) {
     426            $caps[] = 'manage_options';
     427        } else {
     428            $caps[] = 'do_not_allow';
     429        }
    426430        break;
    427431    case 'edit_term':
Note: See TracChangeset for help on using the changeset viewer.