WordPress.org

Make WordPress Core

Ticket #16184: 16184.diff

File 16184.diff, 1.3 KB (added by nacin, 3 years ago)
  • wp-admin/menu.php

     
    169169        $update_count = count( $update_plugins->response ); 
    170170 
    171171$menu_perms = get_site_option('menu_items', array()); 
    172 if ( is_super_admin() || ( is_multisite() && isset($menu_perms['plugins']) && $menu_perms['plugins'] ) ) { 
     172if ( ! is_multisite() || ! empty( $menu_perms['plugins'] ) ) { 
    173173        $count = "<span class='update-plugins count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>"; 
    174174        if ( is_multisite() ) 
    175175                $count = ''; 
     
    206206        $submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' ); 
    207207        if ( is_multisite() && !is_main_site() ) 
    208208                $submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' ); 
    209         if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() ) 
     209        if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE ) 
    210210                $submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php'); 
    211211 
    212212$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div' );