Changeset 21740 for trunk/wp-admin/plugins.php
- Timestamp:
- 09/04/2012 08:51:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r21198 r21740 45 45 46 46 if ( ! is_network_admin() ) { 47 if ( is_network_only_plugin( $plugin ) ) { 48 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); 49 exit; 50 } 51 47 52 $recent = (array) get_option( 'recently_activated' ); 48 53 unset( $recent[ $plugin ] ); … … 66 71 67 72 // Only activate plugins which are not already active. 68 $check = is_network_admin() ? 'is_plugin_active_for_network' : 'is_plugin_active'; 69 foreach ( $plugins as $i => $plugin ) 70 if ( $check( $plugin ) ) 71 unset( $plugins[ $i ] ); 73 if ( is_network_admin() ) { 74 foreach ( $plugins as $i => $plugin ) { 75 if ( is_plugin_active_for_network( $plugin ) ) 76 unset( $plugins[ $i ] ); 77 } 78 } else { 79 foreach ( $plugins as $i => $plugin ) { 80 if ( is_plugin_active( $plugin ) || is_network_only_plugin( $plugin ) ) 81 unset( $plugins[ $i ] ); 82 } 83 } 72 84 73 85 if ( empty($plugins) ) {
Note: See TracChangeset
for help on using the changeset viewer.