[wp-trac] [WordPress Trac] #32470: Abstracting the Widget Classes
WordPress Trac
noreply at wordpress.org
Sat May 23 12:40:58 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:3 welcher]:
> I think abstracting the code can start with `WP_Widget` itself. The
`widget()` method is extremely generic and I would start by having it call
three new public methods:
>
> 1. `before_widget()`
> 2. `widget_markup()`
> 3. `after_widget()`
I've done something similar to this with the base widget class in one of
my plugins.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32470#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list