mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-25 07:44:34 +00:00
Don't show plugin editor when there are no plugins. props solarissmoke, fixes #13117.
git-svn-id: https://develop.svn.wordpress.org/trunk@14290 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
require_once('./admin.php');
|
||||
|
||||
if ( !current_user_can('edit_plugins') )
|
||||
wp_die('<p>'.__('You do not have sufficient permissions to edit plugins for this blog.').'</p>');
|
||||
wp_die( __('You do not have sufficient permissions to edit plugins for this site.') );
|
||||
|
||||
$title = __("Edit Plugins");
|
||||
$parent_file = 'plugins.php';
|
||||
@@ -21,6 +21,9 @@ wp_admin_css( 'theme-editor' );
|
||||
|
||||
$plugins = get_plugins();
|
||||
|
||||
if( empty($plugins) )
|
||||
wp_die( __('There are no plugins installed on this site.') );
|
||||
|
||||
if ( isset($_REQUEST['file']) )
|
||||
$plugin = stripslashes($_REQUEST['file']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user