WordPress.org

Make WordPress Core

Ticket #13117: 13117.patch

File 13117.patch, 761 bytes (added by solarissmoke, 8 years ago)

wp-die if no plugins installed. Also removed some superfluous <p> tags from another wp-die statement

  • plugin-editor.php

     
    1010require_once('./admin.php');
    1111
    1212if ( !current_user_can('edit_plugins') )
    13         wp_die('<p>'.__('You do not have sufficient permissions to edit plugins for this blog.').'</p>');
     13        wp_die( __('You do not have sufficient permissions to edit plugins for this blog.') );
    1414
    1515$title = __("Edit Plugins");
    1616$parent_file = 'plugins.php';
     
    2525        $plugin = stripslashes($_REQUEST['file']);
    2626
    2727if ( empty($plugin) ) {
     28        if( empty($plugins) )
     29                wp_die( __('There are no plugins installed on this blog.') );
     30
    2831        $plugin = array_keys($plugins);
    2932        $plugin = $plugin[0];
    3033}