[wp-trac] [WordPress Trac] #20110: Add a valued() function to encourage consistency in input fields

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 24 19:55:28 UTC 2012


#20110: Add a valued() function to encourage consistency in input fields
-----------------------------------+------------------------------
 Reporter:  jeremyfelt             |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Template               |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------------------

Comment (by jeremyfelt):

 > You get +100 psychic points if you can guess what those two false values
 represent, without looking at the definition.

 That could be the case with many functions. I think the true/false for
 echo/return works here.

 I do think {{{placeholder}}} is a useful addition for UI purposes, but see
 how it could be considered fluff in a function that could provide values
 for more than {{{type="text"}}}.

 With the default values of the function though, only this is required:

 {{{<input type="text" <?php valued( $possible_num ); ?>>}}}

 I don't have any reasons to leave out a blank {{{value=""}}}, so it may be
 that the {{{if}}} statement is unnecessary. Of course once you take that
 out, it appears I may be overreaching a bit.

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


More information about the wp-trac mailing list