I've been working with widgets a lot lately and have amassed a ton of widgets in the inactive widgets collection.
Can someone share a script or plugin that will remove all inactive widgets from the site?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communitysomething like:
$widgets = get_option('sidebars_widgets');
$widgets['wp_inactive_widgets'] = array();
update_option('sidebars_widgets', $widgets);
$widgets = array();
or just use update_option('sidebars_widgets', array());
Mar 30, 2011 at 18:05