[wp-trac] [WordPress Trac] #46635: Improve identifying of non–trivial callbacks in hooks

WordPress Trac noreply at wordpress.org
Wed Apr 3 19:51:35 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 azaozz):

 Replying to [comment:11 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.

 Exactly. Closures are great for all "inline" callbacks, except when they
 break an existing API :)

 I really hope a good solution can be found for the hooks API.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46635#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list