[wp-hackers] Need WP/PHP guru eyeballs/feedback on my WP_Widget wrapper class
Micky Hulse
mickyhulse.lists at gmail.com
Sat Jun 29 22:15:26 UTC 2013
On Sat, Jun 29, 2013 at 2:47 PM, J.D. Grimes <jdg at codesymphony.co> wrote:
>> Maybe if I passed __CLASS__ from the child class into the parent
>> class's register_widget()? I'll have to play around with that.
> I think you could do this instead of using __CLASS__:
> $class = get_class( $this );
> See here:
> http://stackoverflow.com/a/1166592/1924128
> I'm not sure if that works in all versions of PHP, but according to the poster there it works in 5.2.9.
Ooooh, that's cool!
get_class($this) looks really convenient. I'll play around with that.
Thanks again J.D.! You rock! :)
Have an awesome weekend.
Cheers,
Micky
More information about the wp-hackers
mailing list