Make WordPress Core


Ignore:
Timestamp:
10/29/2010 07:09:04 PM (14 years ago)
Author:
scribu
Message:

Fix bulk actions for Network Admin -> plugins. See #14435

File:
1 edited

Legend:

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

    r16061 r16089  
    6464
    6565            $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
    66             $plugins = array_filter($plugins, create_function('$plugin', 'return !is_plugin_active($plugin);') ); // Only activate plugins which are not already active.
     66
     67            // Only activate plugins which are not already active.
     68            $check = $network_wide ? 'is_plugin_active_for_network' : 'is_plugin_active';
     69            foreach ( $plugins as $i => $plugin )
     70                if ( $check( $plugin ) )
     71                    unset( $plugins[ $i ] );
     72
    6773            if ( empty($plugins) ) {
    6874                wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
Note: See TracChangeset for help on using the changeset viewer.