Ticket #4201 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 2 years ago

Add option to turn off widgets

Reported by: tinyau Assigned to: anonymous
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

05/01/07 16:24:24 changed by schulte

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 );

(follow-up: ↓ 3 ) 05/01/07 16:48:05 changed by 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);

(in reply to: ↑ 2 ) 05/01/07 17:03:27 changed by schulte

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

05/01/07 19:08:16 changed by Otto42

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

05/01/07 19:13:43 changed by Nazgul

  • status changed from closed to reopened.
  • resolution deleted.

05/01/07 19:13:54 changed by Nazgul

  • status changed from reopened to closed.
  • resolution set to wontfix.
  • milestone deleted.