Changeset 34551 for trunk/src/wp-admin/plugins.php
- Timestamp:
- 09/25/2015 07:15:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugins.php
r34521 r34551 55 55 unset( $recent[ $plugin ] ); 56 56 update_option( 'recently_activated', $recent ); 57 } else { 58 $recent = (array) get_site_option( 'recently_activated' ); 59 unset( $recent[ $plugin ] ); 60 update_site_option( 'recently_activated', $recent ); 57 61 } 58 62 … … 97 101 if ( ! is_network_admin() ) { 98 102 $recent = (array) get_option('recently_activated' ); 99 foreach ( $plugins as $plugin ) 100 unset( $recent[ $plugin ] ); 103 } else { 104 $recent = (array) get_site_option('recently_activated' ); 105 } 106 107 foreach ( $plugins as $plugin ) { 108 unset( $recent[ $plugin ] ); 109 } 110 111 if ( ! is_network_admin() ) { 101 112 update_option( 'recently_activated', $recent ); 113 } else { 114 update_site_option( 'recently_activated', $recent ); 102 115 } 103 116 … … 166 179 167 180 deactivate_plugins( $plugin, false, is_network_admin() ); 168 if ( ! is_network_admin() ) 181 182 if ( ! is_network_admin() ) { 169 183 update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) ); 184 } else { 185 update_site_option( 'recently_activated', array( $plugin => time() ) + (array) get_site_option( 'recently_activated' ) ); 186 } 187 170 188 if ( headers_sent() ) 171 189 echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) . "' />"; … … 195 213 deactivate_plugins( $plugins, false, is_network_admin() ); 196 214 215 $deactivated = array(); 216 foreach ( $plugins as $plugin ) { 217 $deactivated[ $plugin ] = time(); 218 } 219 197 220 if ( ! is_network_admin() ) { 198 $deactivated = array();199 foreach ( $plugins as $plugin )200 $deactivated[ $plugin ] = time();201 221 update_option( 'recently_activated', $deactivated + (array) get_option( 'recently_activated' ) ); 222 } else { 223 update_site_option( 'recently_activated', $deactivated + (array) get_site_option( 'recently_activated' ) ); 202 224 } 203 225 … … 355 377 356 378 case 'clear-recent-list': 357 if ( ! is_network_admin() ) 379 if ( ! is_network_admin() ) { 358 380 update_option( 'recently_activated', array() ); 381 } else { 382 update_site_option( 'recently_activated', array() ); 383 } 359 384 break; 360 385 }
Note: See TracChangeset
for help on using the changeset viewer.