Changeset 20526
- Timestamp:
- 04/19/2012 03:43:56 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/wp-admin/plugins.php
r19528 r20526 155 155 156 156 check_admin_referer('deactivate-plugin_' . $plugin); 157 if ( ! is_network_admin() && is_plugin_active_for_network() ) { 158 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); 159 exit; 160 } 157 161 deactivate_plugins($plugin); 158 162 update_option('recently_activated', array($plugin => time()) + (array)get_option('recently_activated')); … … 170 174 171 175 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); 172 $plugins = array_filter($plugins, 'is_plugin_active'); //Do not deactivate plugins which are already deactivated. 176 // Do not deactivate plugins which are already deactivated. 177 if ( is_network_admin() ) { 178 $plugins = array_filter( $plugins, 'is_plugin_active_for_network' ); 179 } else { 180 $plugins = array_filter( $plugins, 'is_plugin_active' ); 181 $plugins = array_diff( $plugins, array_filter( $plugins, 'is_plugin_active_for_network' ) ); 182 } 173 183 if ( empty($plugins) ) { 174 184 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
Note: See TracChangeset
for help on using the changeset viewer.