[wp-hackers] Need WP/PHP guru eyeballs/feedback on my WP_Widget wrapper class

Micky Hulse mickyhulse.lists at gmail.com
Wed Jun 26 01:55:11 UTC 2013

Hi J.D.! Thanks so much for the additional help! Totally unexpected but
much appreciated. :)

On Tue, Jun 25, 2013 at 5:33 PM, J.D. Grimes <jdg at codesymphony.co> wrote:
> Hey Micky, I was thinking about this and I think I've found a good solution for you. Just extend the Foo_Widget class with child classes like this:


You know, that's not much more typing than my desired way of doing it.
I'll play around with your suggestion. :)

In fact, what you have posted is kinda close to my current setup:


(see "3. class.foo_widget_1.php",

The above was about as modular as I could make it without doing a lot
of repeating of code.

Anyway, thanks for the tip off. I'll play with your idea. I like the
thought of using Foo_Widget() as the code is all in one class file
(compared to the code linked to above, which uses a few different
classes to do things ... Six of one, half dozen of the other, but I
think I'd prefer Foo_Widget() and extending like you show).

Thanks again! I'll be back with my updated code/findings. :)

More information about the wp-hackers mailing list