[wp-trac] [WordPress Trac] #20439: Introduce __return_one function

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 13 20:12:33 UTC 2012


#20439: Introduce __return_one function
-----------------------------+------------------------------
 Reporter:  bananastalktome  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by bananastalktome):

 I've had to create my own {{{__return_zero()}}} in order to set defaults
 (which cannot be overwritten by users) with filters
 {{{pre_option_default_pingback_flag}}}, {{{pre_option_enable_xmlrpc}}},
 {{{pre_option_use_trackback}}}, etc., but I could just as easily see
 someone wanting to force open certain options as well with a
 {{{__return_one()}}}, which is why I decided to add this patch. Many of
 the options listed at http://codex.wordpress.org/Option_Reference use 0 or
 1 as their value, so quick returns for their filter would be at least
 useful to some.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20439#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list