[wp-trac] [WordPress Trac] #46635: Improve identifying of non–trivial callbacks in hooks
WordPress Trac
noreply at wordpress.org
Wed Apr 3 19:30:43 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 johnbillion):
Using a closure for a callback is ''far'' from doing it wrong. Only when
the callback needs to potentially be unhooked is using a closure wrong.
Also, closures have been a feature of PHP for the last decade. I can't
believe these conversations still take place.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46635#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list