Ticket #3498 (closed enhancement: fixed)
Deactivate All on plugins admin page
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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
Change History
comment:2
JeremyVisser — 5 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
markjaquith — 5 years ago
- Milestone changed from 2.1 to 2.2
How about a "Deactivate Plugins" plugin that, when activated, deactivates all plugins (including itself) ?
I've written a plugin that does this.
comment:6
charleshooper — 5 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
charleshooper — 5 years ago
-
attachment
wp_plugins_deactivate_all.diff
added
"Deactivate all plugins" feature addition
comment:7
markjaquith — 5 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
charleshooper — 5 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
charleshooper — 5 years ago
-
attachment
wp_plugins_cleanup.diff
added
Cleans up admin plugin page and adds "deactivate all" feature
comment:9
follow-up:
↓ 10
charleshooper — 5 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
foolswisdom — 5 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
charleshooper — 5 years ago
- Owner set to charleshooper
- Status changed from new to assigned
Excellent. Thank you.
comment:13
rob1n — 5 years ago
- Owner changed from charleshooper to rob1n
- Status changed from assigned to new
- Milestone changed from 2.3 to 2.2
comment:14
rob1n — 5 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:16
rob1n — 5 years ago
- Status changed from new to closed
- Resolution set to fixed
