[wp-trac] [WordPress Trac] #12435: use __return_false|true instead of create_function

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 1 09:52:00 UTC 2010


#12435: use __return_false|true instead of create_function
-------------------------+--------------------------------------------------
 Reporter:  TobiasBg     |       Owner:                  
     Type:  enhancement  |      Status:  new             
 Priority:  normal       |   Milestone:  3.0             
Component:  General      |     Version:                  
 Severity:  normal       |    Keywords:  has-patch commit
-------------------------+--------------------------------------------------
 The newly added functions {{{__return_false}}} and {{{__return_true}}}
 from #12381 should be used throughout core to replace those ugly
 {{{create_function( ..., 'return true|false;' );}}} calls.

 A quick grep only showed one occurance though, which can be changed with
 the attached patch.

 I also suggest back-porting those two functions to BackPress.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12435>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list