Make WordPress Core


Ignore:
Timestamp:
02/14/2010 02:46:38 PM (14 years ago)
Author:
nacin
Message:

Add "Network Activate" option to Bulk Actions menu on plugins.php. See #11644, #12139

File:
1 edited

Legend:

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

    r13100 r13155  
    4040if ( !empty($action) ) {
    4141    $network_wide = false;
    42     if ( isset($_GET['networkwide']) && is_multisite() && is_super_admin() )
     42    if ( ( isset( $_GET['networkwide'] ) || 'network-activate-selected' == $action ) && is_multisite() && is_super_admin() )
    4343        $network_wide = true;
    4444
     
    6464            break;
    6565        case 'activate-selected':
     66        case 'network-activate-selected':
    6667            if ( ! current_user_can('activate_plugins') )
    6768                wp_die(__('You do not have sufficient permissions to activate plugins for this blog.'));
     
    7071
    7172            $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
    72             $plugins = array_filter($plugins, create_function('$plugin', 'return !is_plugin_active($plugin);') ); //Only activate plugins which are not already active.
     73            $plugins = array_filter($plugins, create_function('$plugin', 'return !is_plugin_active($plugin);') ); // Only activate plugins which are not already active.
    7374            if ( empty($plugins) ) {
    7475                wp_redirect("plugins.php?plugin_status=$status&paged=$page");
     
    565566            <option value="activate-selected"><?php _e('Activate'); ?></option>
    566567    <?php endif; ?>
     568    <?php if ( is_multisite() && 'network' != $context ) : ?>
     569            <option value="network-activate-selected"><?php _e('Network Activate'); ?></option>
     570    <?php endif; ?>
    567571    <?php if ( 'inactive' != $context && 'recent' != $context ) : ?>
    568572            <option value="deactivate-selected"><?php _e('Deactivate'); ?></option>
Note: See TracChangeset for help on using the changeset viewer.