Changeset 40390
- Timestamp:
- 04/07/2017 12:52:24 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu.php
r40313 r40390 245 245 $submenu['tools.php'][25] = array( __('Delete Site'), 'delete_site', 'ms-delete-site.php' ); 246 246 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'); 248 248 249 249 $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' ); -
trunk/src/wp-admin/network.php
r39019 r40390 16 16 require_once( dirname( __FILE__ ) . '/admin.php' ); 17 17 18 if ( ! is_super_admin() ) {18 if ( ! current_user_can( 'setup_network' ) ) { 19 19 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 20 20 } -
trunk/src/wp-admin/network/menu.php
r38827 r40390 54 54 if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) { 55 55 $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' ); 57 57 } 58 58 unset($update_data); -
trunk/src/wp-includes/capabilities.php
r39588 r40390 481 481 $caps[] = $cap; 482 482 break; 483 case 'setup_network': 484 if ( is_multisite() ) { 485 $caps[] = 'manage_network_options'; 486 } else { 487 $caps[] = 'manage_options'; 488 } 489 break; 483 490 default: 484 491 // Handle meta capabilities for custom post types. -
trunk/tests/phpunit/tests/user/capabilities.php
r39588 r40390 228 228 'delete_site' => array(), 229 229 230 'setup_network' => array( 'administrator' ), 230 231 'upload_plugins' => array( 'administrator' ), 231 232 'upload_themes' => array( 'administrator' ), … … 255 256 'manage_network_themes' => array(), 256 257 'manage_network_options' => array(), 258 'setup_network' => array(), 257 259 'upload_plugins' => array(), 258 260 'upload_themes' => array(),
Note: See TracChangeset
for help on using the changeset viewer.