[wp-trac] [WordPress Trac] #46635: Improve identifying of non–trivial callbacks in hooks
WordPress Trac
noreply at wordpress.org
Mon May 27 20:56:46 UTC 2019
#46635: Improve identifying of non–trivial callbacks in hooks
-------------------------+-------------------------------
Reporter: Rarst | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses: coding-standards
-------------------------+-------------------------------
Comment (by pabline):
> All of advanced callbacks, closures included, can currently be removed
by API with access to original instance.
This is key for me. If we made `add_action` return a reference to the
callback that was passed in, then that could be made available for other
developers to use to remove it.
This doesn't solve the problem of existing code registering unremovable
callbacks, but is that so much of a problem? If there are mechanisms in
place to make it possible to remove hook and filter callbacks, then it is
up to developers to follow guidelines (or rules) to use them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46635#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list