WordPress.org

Make WordPress Core

Ticket #24866: 24866.patch

File 24866.patch, 722 bytes (added by mordauk, 9 months ago)
  • wp-admin/menu.php

    diff --git wp-admin/menu.php wp-admin/menu.php
    index 365b459..b8fcf19 100644
    $menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plu 
    165165 
    166166$submenu['plugins.php'][5]  = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' ); 
    167167 
    168         if ( ! is_multisite() ) { 
     168        if ( ! is_multisite() || ( current_user_can( 'manage_network' ) && current_user_can( 'install_plugins' ) ) ) { 
    169169                /* translators: add new plugin */ 
    170170                $submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php' ); 
    171171                $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );