[wp-trac] [WordPress Trac] #35981: Convert WP_Widget into an abstract class
WordPress Trac
noreply at wordpress.org
Tue May 17 14:29:32 UTC 2016
#35981: Convert WP_Widget into an abstract class
-------------------------------------------------+-------------------------
Reporter: johnbillion | Owner: ocean90
Type: enhancement | Status: reopened
Priority: low | Milestone: 4.6
Component: Widgets | Version: 2.8
Severity: normal | Resolution:
Keywords: has-patch dev-feedback commit | Focuses:
needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by kraftbj):
For additional context for my previous comment:
For plugin authors: If your widget does not include a widget() function,
you'll need to add an noop function to prevent fatals.
`class PluginWidget extends WP_Widget{ ... }` which provides some basic
setup for a plugin's multiple widgets without the `widget()` call, then
with a `class PluginWidgetAwesome extends PluginWidget{...}` which
includes a `widget()` function for the actual widget.
This setup worked previously and now fatals. Need to add a `function
widget() {}` in the `PluginWidget` class.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35981#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list