[wp-trac] [WordPress Trac] #20490: Move submit_button to wp-includes for frontend inclusion & use with comment-template.php

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 19 18:29:27 UTC 2012


#20490: Move submit_button to wp-includes for frontend inclusion & use with
comment-template.php
-------------------------+------------------------------
 Reporter:  wpsmith      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by scribu):

 Yes, the reason is that it makes for very unreadable code. For example,
 when I see this:

 {{{
 submit_button( $args['label_submit'], 'button', 'submit', false, array(
 'id' => $args['id_submit'] ) )
 }}}

 I have no idea what that `false` parameter is for, without looking up the
 defition for submit_button().

 Plus, it's not that much shorter than writing the HTML by hand, which is
 clear as day:

 {{{
 <input name="submit" type="submit" id="<?php echo esc_attr(
 $args['id_submit'] ); ?>" value="<?php echo esc_attr(
 $args['label_submit'] ); ?>" />
 }}}

 Similar: http://core.trac.wordpress.org/ticket/20110#comment:8

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


More information about the wp-trac mailing list