Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#4201 closed enhancement (wontfix)

Add option to turn off widgets

Reported by: tinyau's profile tinyau Owned by:
Milestone: Priority: high
Severity: major Version:
Component: Administration Keywords:
Focuses: 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 (6)

#1 @schulte
17 years ago

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

#2 follow-up: @filosofo
17 years ago

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

#3 in reply to: ↑ 2 @schulte
17 years ago

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

#4 @Otto42
17 years ago

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

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.

#5 @Nazgul
17 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#6 @Nazgul
17 years ago

  • Milestone 2.2 deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.