Ticket #31183: 31183.diff
File 31183.diff, 1.3 KB (added by , 10 years ago) |
---|
-
wp-admin/menu.php
192 192 193 193 if ( ! is_multisite() ) { 194 194 /* translators: add new plugin */ 195 $submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), ' install_plugins', 'plugin-install.php' );195 $submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'update_plugins', 'plugin-install.php' ); 196 196 $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' ); 197 197 } 198 198 -
wp-admin/plugin-install.php
14 14 */ 15 15 require_once( dirname( __FILE__ ) . '/admin.php' ); 16 16 17 if ( ! current_user_can('install_plugins') ) 18 wp_die(__('You do not have sufficient permissions to install plugins on this site.')); 17 if ( ! ( isset( $_GET['tab'] ) && $_GET['tab'] == 'plugin-information' ) ) { 18 if ( ! current_user_can('install_plugins') ) 19 wp_die(__('You do not have sufficient permissions to install plugins on this site.')); 20 } 19 21 20 22 if ( is_multisite() && ! is_network_admin() ) { 21 23 wp_redirect( network_admin_url( 'plugin-install.php' ) );