I have a plugin (Subscribe2) that is written as a PHP class. Until now I have used the old (pre WordPress 2.8) API to add a widget but I'm trying to get up to date.
I've managed to pull the widget code out into a stand alone file but I'd like to try and keep the activation option that I currently have in the main plugin class.
How would I go about enabling (registering) the widget from within my current class? I've tried all sorts of code but the registration seems to fail.
I've tried a require_once to the new widget file and then a register_widget, I've put both of this on a function within my class. Anyone any ideas?