WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/07/2017 12:52:24 PM (3 years ago)
Author:
flixos90
Message:

Multisite: Introduce a setup_network capability for setting up multisite.

setup_network is a new meta capability that brings more granular control over the permissions to setup a multisite environment. In a non-multisite environment it falls back to manage_options while in a multisite it falls back to manage_network_options. The introduction of this capability furthermore allows replacing an is_super_admin() check.

Props ashokkumar24 for the original patch.
Fixes #39206. See #37616.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/menu.php

    r40313 r40390  
    245245        $submenu['tools.php'][25] = array( __('Delete Site'), 'delete_site', 'ms-delete-site.php' );
    246246    if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE )
    247         $submenu['tools.php'][50] = array(__('Network Setup'), 'manage_options', 'network.php');
     247        $submenu['tools.php'][50] = array(__('Network Setup'), 'setup_network', 'network.php');
    248248
    249249$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
Note: See TracChangeset for help on using the changeset viewer.