WordPress.org

Make WordPress Core

Changeset 16036


Ignore:
Timestamp:
10/28/10 08:30:37 (3 years ago)
Author:
nacin
Message:

Remove unnecessary bulk actions for plugins re: network admin. props PeteMall, see #14435.

File:
1 edited

Legend:

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

    r15985 r16036  
    264264        if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) 
    265265            $actions['delete-selected'] = __( 'Delete' ); 
     266             
     267        if ( is_multisite() && !is_network_admin() ) { 
     268            unset( $actions['network-activate-selected'] ); 
     269            unset( $actions['update-selected'] ); 
     270            unset( $actions['delete-selected'] ); 
     271        } 
    266272 
    267273        return $actions; 
     
    361367                        $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>'; 
    362368 
    363                         if ( current_user_can('delete_plugins') ) 
     369                        if ( ! is_multisite() && current_user_can('delete_plugins') ) 
    364370                            $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>'; 
    365371                    } // end if $is_active 
Note: See TracChangeset for help on using the changeset viewer.