WordPress.org

Make WordPress Core

Ticket #17702: 17702.diff

File 17702.diff, 1.2 KB (added by PeteMall, 3 years ago)

Quick fix for 3.2

  • wp-admin/menu.php

     
    174174        add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php'); 
    175175} 
    176176 
    177 $menu_perms = get_site_option('menu_items', array()); 
     177$menu_perms = get_site_option( 'menu_items', array() ); 
    178178if ( ! is_multisite() || is_super_admin() || ! empty( $menu_perms['plugins'] ) ) { 
    179         $count = "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>"; 
    180         if ( is_multisite() || ! current_user_can( 'update_plugins' ) ) 
    181                 $count = ''; 
     179        $count = ''; 
     180        if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) 
     181                $count = "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>"; 
     182 
    182183        $menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div' ); 
    183184         
    184185        $submenu['plugins.php'][5]  = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' );