Wordpress remove all inactive widgets

May 1, 2012   

Removing all those pesky inactive wordpress widgets can be achieved with a few lines of code.

Something like this:

$widgets = get_option('sidebars_widgets');
$widgets['wp_inactive_widgets'] = array();
update_option('sidebars_widgets', $widgets);

blog comments powered by Disqus