[wp-hackers] Widget definitions inside classes
wphackers at jamietalbot.com
Sat Aug 26 01:56:41 GMT 2006
I'd like to keep code to define a widget and its control neatly inside a class definition, but it
doesn't seem to be possible. Has anyone found a way to do this? There doesn't seem to be a
mechanism for doing so, like exists for filters and actions.
doesn't work, and would be no good anyway as it would be a static function and there's no $this
register_sidebar_widget('MyWidget', array(& $this, 'my_widget'));
add_filter('the_content', array(& $this, 'my_the_content_filter'));
would be useful.
More information about the wp-hackers