Changeset 21741
- Timestamp:
- 09/04/2012 08:53:05 PM (12 years ago)
- Location:
- branches/3.4/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.4/wp-admin/includes/class-wp-plugins-list-table.php
r20853 r21741 91 91 foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { 92 92 // Filter into individual sections 93 if ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) { 93 if ( is_multisite() && ! $screen->is_network && is_network_only_plugin( $plugin_file ) ) { 94 unset( $plugins['all'][ $plugin_file ] ); 95 } elseif ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) { 94 96 unset( $plugins['all'][ $plugin_file ] ); 95 97 } elseif ( ( ! $screen->is_network && is_plugin_active( $plugin_file ) ) -
branches/3.4/wp-admin/plugins.php
r20871 r21741 52 52 53 53 if ( ! is_network_admin() ) { 54 if ( is_network_only_plugin( $plugin ) ) { 55 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); 56 exit; 57 } 58 54 59 $recent = (array) get_option( 'recently_activated' ); 55 60 unset( $recent[ $plugin ] ); … … 73 78 74 79 // Only activate plugins which are not already active. 75 $check = is_network_admin() ? 'is_plugin_active_for_network' : 'is_plugin_active'; 76 foreach ( $plugins as $i => $plugin ) 77 if ( $check( $plugin ) ) 78 unset( $plugins[ $i ] ); 80 if ( is_network_admin() ) { 81 foreach ( $plugins as $i => $plugin ) { 82 if ( is_plugin_active_for_network( $plugin ) ) 83 unset( $plugins[ $i ] ); 84 } 85 } else { 86 foreach ( $plugins as $i => $plugin ) { 87 if ( is_plugin_active( $plugin ) || is_network_only_plugin( $plugin ) ) 88 unset( $plugins[ $i ] ); 89 } 90 } 79 91 80 92 if ( empty($plugins) ) {
Note: See TracChangeset
for help on using the changeset viewer.