Make WordPress Core


Ignore:
Timestamp:
12/17/2010 09:53:47 PM (13 years ago)
Author:
ryan
Message:

Remove the delete action link from the network admin if the plugin is active on the main site. Remove the plugin(s) from the deletion list for the bulk actions and shows an error if no other plugin was selected for bulk-deletion. Props PeteMall. see #15709

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-plugins-list-table.php

    r17004 r17033  
    363363                    if ( current_user_can( 'manage_network_plugins' ) )
    364364                        $actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>';
    365                     if ( current_user_can('delete_plugins') )
     365                    if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) )
    366366                        $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>';
    367367                }
Note: See TracChangeset for help on using the changeset viewer.