[wp-trac] [WordPress Trac] #10882: Add default data to get_*_meta()

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 30 21:01:26 UTC 2009


#10882: Add default data to get_*_meta()
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:        
     Type:  defect (bug)       |      Status:  new   
 Priority:  normal             |   Milestone:  2.9   
Component:  General            |     Version:  2.9   
 Severity:  major              |    Keywords:  commit
-------------------------------+--------------------------------------------

Comment(by hakre):

 IMHO it should return false or WP_Error in case of error. Returning an
 empty string (or an array containing an empty string [instead of just an
 empty {{{array()}}}] is pretty much useless for a data getting function.

 Returning a user defined default value is much appreceated by me, I use
 that principle often with own implementations and it's very useable.

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


More information about the wp-trac mailing list