WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/19/2012 03:41:29 AM (10 years ago)
Author:
nacin
Message:

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().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugin-editor.php

    r19593 r20525  
    6666                deactivate_plugins($file, true);
    6767
    68             update_option('recently_activated', array($file => time()) + (array)get_option('recently_activated'));
     68            if ( ! is_network_admin() )
     69                update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) );
    6970
    7071            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));
Note: See TracChangeset for help on using the changeset viewer.