WordPress.org

Make WordPress Core

Ticket #15358: 15358.diff

File 15358.diff, 1.0 KB (added by PeteMall, 4 years ago)
  • wp-admin/network/menu.php

     
    1818$submenu['sites.php'][10]  = array( __('Add New'), 'create_sites', 'site-new.php' ); 
    1919 
    2020$menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div'); 
    21 $submenu['users.php'][5]  = array( __('Users'), 'manage_network_users', 'users.php' ); 
    22 $submenu['users.php'][10]  = array( __('Add New'), 'create_users', 'user-new.php' ); 
     21if( current_user_can( 'create_users') ) { 
     22        $submenu['users.php'][5]  = array( __('Users'), 'manage_network_users', 'users.php' ); 
     23        $submenu['users.php'][10]  = array( __('Add New'), 'create_users', 'user-new.php' ); 
     24} 
    2325 
    2426$menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div'); 
    2527$submenu['themes.php'][5]  = array( __('Themes'), 'manage_network_themes', 'themes.php' );