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/network/menu.php

    r38827 r40390  
    5454if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) {
    5555    $submenu['settings.php'][5]  = array( __('Network Settings'), 'manage_network_options', 'settings.php' );
    56     $submenu['settings.php'][10] = array( __('Network Setup'), 'manage_network_options', 'setup.php' );
     56    $submenu['settings.php'][10] = array( __('Network Setup'), 'setup_network', 'setup.php' );
    5757}
    5858unset($update_data);
Note: See TracChangeset for help on using the changeset viewer.