WordPress.org

Make WordPress Core

Changeset 18169


Ignore:
Timestamp:
06/06/11 16:59:24 (4 years ago)
Author:
ryan
Message:

Fix warnings in menu.php when plugins.php is enabled for non-supes. Props PeteMall. fixes #17702

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r18157 r18169  
    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     
Note: See TracChangeset for help on using the changeset viewer.