mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Clean up plugins.php with regards to recently edited files, deactivations, and the network admin. see #20468, #20104.
* Limit recently_activated to the site dashboard, and properly remove bulk-activated plugins from the array. * Remove code used from before the network admin, such as the unused 'network' plugin_status. * Don't try to deactivate a plugin already deactivated. * Use more specific caps (manage_network_plugins) rather than is_super_admin(). git-svn-id: https://develop.svn.wordpress.org/trunk@20525 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -65,7 +65,8 @@ case 'update':
|
||||
if ( is_plugin_active($file) )
|
||||
deactivate_plugins($file, true);
|
||||
|
||||
update_option('recently_activated', array($file => time()) + (array)get_option('recently_activated'));
|
||||
if ( ! is_network_admin() )
|
||||
update_option( 'recently_activated', array( $file => time() ) + (array) get_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;
|
||||
|
||||
Reference in New Issue
Block a user