Ticket #3498 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Deactivate All on plugins admin page

Reported by: shorty114 Assigned to: rob1n
Priority: low Milestone: 2.2
Component: Administration Version: 2.1
Severity: minor Keywords: has-patch commit
Cc:

Description

It would be handy to have a "Deactivate All" button on the WordPress Plugins admin page. I just had to go through and deactivate each and every one by hand to debug an error, and it wasn't fun.

Attachments

wp_plugins_deactivate_all.diff (2.2 kB) - added by charleshooper on 01/31/07 06:54:35.
"Deactivate all plugins" feature addition
wp_plugins_cleanup.diff (6.5 kB) - added by charleshooper on 01/31/07 08:17:03.
Cleans up admin plugin page and adds "deactivate all" feature
3498.diff (1.4 kB) - added by rob1n on 03/31/07 19:24:22.
3498.2.diff (1.7 kB) - added by rob1n on 03/31/07 20:55:02.
3498.3.diff (1.4 kB) - added by rob1n on 03/31/07 20:56:07.
Whoops

Change History

12/26/06 08:53:52 changed by shorty114

  • owner deleted.

12/26/06 09:10:49 changed by JeremyVisser

(Offtopic) Is that the same error you reported on the WP-SlimStat? website? To fix it, you need to work around a bug in the plugin by changing the WPLANG value in wp-config.php from blank to 'en'.

When I am bulk deactivating plugins, I simply use the middle-mouse button and close all the tabs that I have opened after they have finished loading. I find that is quite fast enough for my needs.

12/27/06 03:26:27 changed by markjaquith

  • milestone changed from 2.1 to 2.2.

How about a "Deactivate Plugins" plugin that, when activated, deactivates all plugins (including itself) ?

12/27/06 06:58:42 changed by mwdmeyer

I've written a plugin that does this.

Download Here

01/16/07 18:49:08 changed by shorty114

Just a simple link for 2.1, maybe?

01/31/07 06:53:25 changed by charleshooper

  • keywords set to has-patch needs-testing.

This seemed like an excellent opportunity for me to get the WordPress core a little better so I've created a patch to add a "deactivate all plugins" link to the plugins page. It can be found below the list of plugins on wp-admin/plugins.php

01/31/07 06:54:35 changed by charleshooper

  • attachment wp_plugins_deactivate_all.diff added.

"Deactivate all plugins" feature addition

01/31/07 07:20:22 changed by markjaquith

  • version set to 2.1.

charleshooper,

Good first effort! Only thing I see that definitely needs to change is the calling of wp_nonce_url() It won't work the way you have it. Instead of manually coding the action=deactivate-all part into the query string, try passing 'deactivate-all' as a second parameter.

wp_nonce_url('plugins.php', 'deactivate-all')

That'll take care of adding the action part to the URL as well as integrating the action name into the nonce itself (making it specific to the action, in addition to the other things that go into the mix like user and time).

01/31/07 08:14:33 changed by charleshooper

That doesn't seem to work. All of the other calls to wp_nonce_url() also look similar to mine, perhaps I'm missing something?

I've got another patch ... this one just cleans up wp-admin/plugins.php and creates 3 new functions: plugin_activate($plugin), plugin_deactivate($plugin), plugin_deactivate_all() and plugin_sanity_check()

These are just created from what was in wp-admin/plugins.php already. These can be found in wp-admin/plugin-functions.php and is required by wp-admin/admin.php

01/31/07 08:17:03 changed by charleshooper

  • attachment wp_plugins_cleanup.diff added.

Cleans up admin plugin page and adds "deactivate all" feature

(follow-up: ↓ 10 ) 01/31/07 08:26:10 changed by charleshooper

(offtopic) If I were to accept these tickets would they be noticed by the people who make the changesets?

It'd be easier for me to keep track of what I've submitted patches to if I could but if that's something that's reserved more for the people committing the changes then I don't want to make things more difficult

(in reply to: ↑ 9 ) 01/31/07 17:34:15 changed by foolswisdom

Replying to charleshooper:

(offtopic) If I were to accept these tickets would they be noticed by the people who make the changesets?

People that create the patch generally assign it to themselves, so what you were doing is fine. You can also add your username to the Cc: list .

01/31/07 19:55:44 changed by charleshooper

  • owner set to charleshooper.
  • status changed from new to assigned.

Excellent. Thank you.

03/27/07 00:38:16 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

03/31/07 04:43:46 changed by rob1n

  • owner changed from charleshooper to rob1n.
  • status changed from assigned to new.
  • milestone changed from 2.3 to 2.2.

03/31/07 19:24:22 changed by rob1n

  • attachment 3498.diff added.

03/31/07 19:25:27 changed by rob1n

  • keywords changed from has-patch needs-testing to has-patch commit.
  • status changed from new to assigned.

Added new patch with support for nonces, etc. Tested too.

03/31/07 19:28:00 changed by rob1n

  • status changed from assigned to new.

03/31/07 20:55:02 changed by rob1n

  • attachment 3498.2.diff added.

03/31/07 20:56:07 changed by rob1n

  • attachment 3498.3.diff added.

Whoops

03/31/07 20:56:57 changed by rob1n

  • status changed from new to closed.
  • resolution set to fixed.

(In [5156]) Deactivate All Plugins feature. fixes #3498