[wp-trac] [WordPress Trac] #36902: Function __return_on

WordPress Trac noreply at wordpress.org
Thu Mar 12 06:04:28 UTC 2020


#36902: Function __return_on
-------------------------+----------------------
 Reporter:  Compute      |       Owner:  (none)
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  General      |     Version:  4.6
 Severity:  normal       |  Resolution:  wontfix
 Keywords:  has-patch    |     Focuses:
-------------------------+----------------------
Changes (by noisysocks):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 While we'll never remove any of the `__return` functions from WordPress
 due to backwards compatibility, I don't think we should be adding any more
 now that PHP supports anonymous functions.

 The best thing to do here is to use an anonymous function e.g. `function()
 { return 'on'; }`.

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


More information about the wp-trac mailing list