[wp-hackers] Widget definitions inside classes

Jamie Talbot wphackers at jamietalbot.com
Sun Aug 27 06:37:01 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean Hickey wrote:
> Then I guess I'm just confused.  The following code works fine for me.
> 
> class MyPlugin {
>     function MyPlugin() {
>         register_sidebar_widget('My Plugin', array(&$this, 'show'));
>     }
>     function show() {
>         // Do something here
>     }
> }
> 
> - Sean

Heh, and now it works for me too...  I must've screwed something else up somewhere along the line.
Thanks for forcing me to take a second look!

Cheers,

Jamie.

- --
http://jamietalbot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE8T2MrovxfShShFARAv+8AJ95oRZRIsjCj6ze4N9ZKg/xiD/8LQCeL5Xf
F08Wl8IDmC6rNexT+lwh0vI=
=rBpa
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list