[wp-trac] [WordPress Trac] #36851: Widgets don't remove hooks after being unregistered
WordPress Trac
noreply at wordpress.org
Wed Jun 28 16:29:46 UTC 2017
#36851: Widgets don't remove hooks after being unregistered
--------------------------+-----------------------------
Reporter: westonruter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Widgets | Version: 2.8
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Comment (by welcher):
@westonruter I like the idea of the `unregister` method coupled with a
`do_action( 'widget_unregistered' )` whenever a widget is unregistered.
Adding a `WP_Wiget:: register()` method is also a great idea, however, I
don't think we can assume that hooks added in a subclass will be there
moving ahead. Perhaps it's something that we add and then make
recommendations to use that instead of in the constructor in the docs.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36851#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list