Need a way to PROGRAMMATICALLY empty Inactive Widgets area
-
I need a way to empty the Inactive Widgets area without dragging each one to its death one at a time. I have far too many WP sites for the manual way to be practical or even possible.
The fact is, WP’s widgets implementation is fragile, to put it kindly. WP will merrily destroy your entire widget configuration at the drop of a hat, sometimes for no apparent reason. If you are lucky, some of the wreckage will land in the inactive area, often much is just plain lost.
The result is that the inactive area quickly fills with junk, and ironically, once a widget gets there, it becomes IMMORTAL. I’ve tried everything I can think of to get rid of them, and they just re-spawn like a video game.
I’ve been wracking my brain over the widget handling code to try to adapt it to automation, but with all the AJAX interactions and general obtuseness, I am stymied. I have tried deleting every persistent structure in the database and emptying every related variable, and it does no good. While you can easily destroy a normal sidebar, the Inactive area is bulletproof.
Does anyone know a way to just blow away all the inactive widgets with a click? Can some genius come up with a plugin with a button to do this? You’d think that ability would be in there already.
TIA
The topic ‘Need a way to PROGRAMMATICALLY empty Inactive Widgets area’ is closed to new replies.