[wp-trac] [WordPress Trac] #32470: Abstracting the Widget Classes

WordPress Trac noreply at wordpress.org
Mon May 25 13:54:55 UTC 2015

#32470: Abstracting the Widget Classes
 Reporter:  welcher       |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Widgets       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:

Comment (by jdgrimes):

 Replying to [comment:11 welcher]:
 > Replying to [comment:10 jdgrimes]:
 > > I think that probably in 90% of cases that's the only one that would
 need to be overridden. But if the user needed to, they could always just
 override the `widget()` method as a whole in the traditional manner.
 > >
 > That makes sense and aligns with my experiences using a similar
 approach. I'd love to get a working version of this as a patch and get
 some more eyes on it.

 A test of the usefulness of the bootstrap would be to apply it to the core
 widgets and see how much duplication is removed. Working on that might
 also show other parts that could be abstracted.

 Also, IMO, the patch is hard to follow because there are so many
 extraneous whitespace changes in it. Maybe you could strip it down to just
 the functional code changes, and it would be easier to work with?

Ticket URL: <https://core.trac.wordpress.org/ticket/32470#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list