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?
$widgets = get_option('sidebars_widgets');
$widgets['wp_inactive_widgets'] = array();
$widgets = array();
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
4 years ago