WordPress.org

Make WordPress Core

Ticket #14447: garyc40.14447.diff

File garyc40.14447.diff, 794 bytes (added by garyc40, 3 years ago)

there's a patch for that

  • wp-admin/menu.php

    diff --git wp-admin/menu.php wp-admin/menu.php
    index 30d0169..30a5cec 100644
    if ( !empty($update_plugins->response) ) 
    171171$menu_perms = get_site_option('menu_items', array()); 
    172172if ( ! is_multisite() || is_super_admin() || ! empty( $menu_perms['plugins'] ) ) { 
    173173        $count = "<span class='update-plugins count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>"; 
    174         if ( is_multisite() ) 
     174        if ( is_multisite() || ! current_user_can( 'update_plugins' ) ) 
    175175                $count = ''; 
     176 
    176177        $menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div' ); 
    177178                if ( ! is_multisite() ) { 
    178179                        /* translators: add new plugin */