[wp-hackers] widgets - uninstall

Rich Pedley elflop at googlemail.com
Tue Apr 13 14:23:54 UTC 2010


I'm actually testing in 3.0 beta, but I assume this would apply to 2.9 as well.

In my plugin I registered a widget, on uninstall I would like to
remove reference to those widgets from the database. So how am I
supposed to do this?

I've tried:
unregister_sidebar_widget('eshop_widget');
&
unregister_widget('eshop_widget');

neither of which appear to actually remove the data from the options
table, the widget itself obviously disappears from the widgets page,
but the data still appears in the database.

So what have I missed?
(I use a custom uninstall routine rather than the default WP uninstall
for plugins - in case that make any difference)


Rich
-- 
my mind is on a permanent tangent
http://cms.elfden.co.uk/


More information about the wp-hackers mailing list