Implement 'Recently Active' functionality for network-wide plugins in the Network Admin.

Fixes #20468
Thanks to WordCamp RI attendees for testing!


git-svn-id: https://develop.svn.wordpress.org/trunk@34551 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2015-09-25 19:15:08 +00:00
parent a6d1621736
commit a6a00a3625
3 changed files with 52 additions and 15 deletions

View File

@@ -71,8 +71,11 @@ case 'update':
if ( is_plugin_active($file) )
deactivate_plugins($file, true);
if ( ! is_network_admin() )
if ( ! is_network_admin() ) {
update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) );
} else {
update_site_option( 'recently_activated', array( $file => time() ) + (array) get_site_option( 'recently_activated' ) );
}
wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide));
exit;