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

WordPress Trac noreply at wordpress.org
Fri Apr 3 00:19:02 UTC 2020


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

Comment (by johnbillion):

 Follow-up because it's interesting. In PHP 7.4+ you can use a short
 closure which has very terse syntax:

 {{{
 add_filter( 'twentyseventeen_front_page_sections', fn() => 6 );
 }}}

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


More information about the wp-trac mailing list