Ticket #4201 (closed enhancement: wontfix)
Add option to turn off widgets
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | major | Keywords: | |
| Cc: |
Description
Sidebar Widgets is integrated into the core of WordPress starting from 2.2. However, I prefer Sidebar Modules ( http://nybblelabs.org.uk/projects/sidebar-modules/) to Sidebar Widgets because the configuration is more flexible. And popular K2 theme is using Sidebar Modules as well.
After I have activated Sidebar Modules, it cannot even work. I think there is a conflict between the two. I would like to add an option to turn off Sidebar Widgets complete so that Sidebar Modules can be worked properly. Thanks.
Change History
Better than hacking core code, you can turn off widgets by adding the following line to a plugin:
remove_action('plugins_loaded','wp_maybe_load_widgets',0);
Replying to filosofo:
Better than hacking core code, you can turn off widgets by adding the following line to a plugin:
remove_action('plugins_loaded','wp_maybe_load_widgets',0);
Yeah, I realized just after commenting that using a remove_action would be the recommended way...suggestion had already been made over at http://code.google.com/p/kaytwo/issues/detail?id=284
- Status changed from new to closed
- Resolution set to invalid
It should be up to the plugin to disable widgets if it's going to be replacing them. We can't have the core code checking for every single plugin in existence.
The SBM plugin can disable widgets, they'll just have to add the remove_action line to their code if/when 2.2 comes out.

I guess I would also like to see WordPress Widgets and Sidebar Modules play nicely together. It would be cool to have a simple way of shutting these off Widgets ala #4176.
tinyau, go to /wp-includes/default-filters and comment out the line:
add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 );