[wp-trac] [WordPress Trac] #39240: Add a generic return value function

WordPress Trac noreply at wordpress.org
Wed Aug 2 01:04:46 UTC 2017


#39240: Add a generic return value function
-------------------------+----------------------
 Reporter:  fjarrett     |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  General      |     Version:  4.8
 Severity:  normal       |  Resolution:  wontfix
 Keywords:               |     Focuses:
-------------------------+----------------------
Changes (by johnbillion):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 This can be achieved without `create_function()` and without magic getters
 or any other type of hack (see
 https://gist.github.com/johnbillion/a5113d0362fb5238742bf773d3da9c4f), but
 I don't think this belongs in core. It's kind of an anti-pattern, and
 makes code hard to debug and unhook when you've got unreferenceable
 callback functions hooked in.

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


More information about the wp-trac mailing list