WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#3498 closed enhancement (fixed)

Deactivate All on plugins admin page

Reported by: shorty114 Owned by: rob1n
Milestone: 2.2 Priority: low
Severity: minor Version: 2.1
Component: Administration Keywords: has-patch commit
Focuses: 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 (5)

wp_plugins_deactivate_all.diff (2.2 KB) - added by charleshooper 9 years ago.
"Deactivate all plugins" feature addition
wp_plugins_cleanup.diff (6.5 KB) - added by charleshooper 9 years ago.
Cleans up admin plugin page and adds "deactivate all" feature
3498.diff (1.4 KB) - added by rob1n 8 years ago.
3498.2.diff (1.7 KB) - added by rob1n 8 years ago.
3498.3.diff (1.4 KB) - added by rob1n 8 years ago.
Whoops

Download all attachments as: .zip

Change History (21)

comment:1 @shorty1149 years ago

  • Owner shorty114 deleted

comment:2 @JeremyVisser9 years ago

(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.

comment:3 @markjaquith9 years ago

  • Milestone changed from 2.1 to 2.2

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

comment:4 @mwdmeyer9 years ago

I've written a plugin that does this.

Download Here

comment:5 @shorty1149 years ago

Just a simple link for 2.1, maybe?

comment:6 @charleshooper9 years ago

  • Keywords has-patch needs-testing added

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

@charleshooper9 years ago

"Deactivate all plugins" feature addition

comment:7 @markjaquith9 years ago

  • 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).

comment:8 @charleshooper9 years ago

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

@charleshooper9 years ago

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

comment:9 follow-up: @charleshooper9 years ago

(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

comment:10 in reply to: ↑ 9 @foolswisdom9 years ago

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 .

comment:11 @charleshooper9 years ago

  • Owner set to charleshooper
  • Status changed from new to assigned

Excellent. Thank you.

comment:12 @foolswisdom8 years ago

  • Milestone changed from 2.2 to 2.3

comment:13 @rob1n8 years ago

  • Milestone changed from 2.3 to 2.2
  • Owner changed from charleshooper to rob1n
  • Status changed from assigned to new

@rob1n8 years ago

comment:14 @rob1n8 years ago

  • Keywords commit added; needs-testing removed
  • Status changed from new to assigned

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

comment:15 @rob1n8 years ago

  • Status changed from assigned to new

@rob1n8 years ago

@rob1n8 years ago

Whoops

comment:16 @rob1n8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.