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:
Andrew Nacin
2010-04-29 05:34:24 +00:00
parent 6eb29c7e74
commit 23cd92c6ff
2 changed files with 8 additions and 3 deletions

View File

@@ -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']);