[wp-trac] [WordPress Trac] #20357: Add Return Empty String Function

WordPress Trac noreply at wordpress.org
Sat Dec 1 06:38:48 UTC 2012


#20357: Add Return Empty String Function
-------------------------+------------------------------
 Reporter:  wpsmith      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------
Changes (by trepmal):

 * keywords:   => has-patch


Comment:

 Added a patch since this ticket wasn't closed, just in case...

 Using `__return_null` when I really want an empty string seems hackish.

 There are at least 3 plugins in the repo doing their own version of
 `__return_empty_string` but 1 returns the parameter passed to it, and
 another actually echoes an empty string. Not sure if only 3 attempts is an
 indication that there's not a big enough need, or if that 2 of 3 attempts
 doing it wrong indicates there should be a core function to save them.

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


More information about the wp-trac mailing list