[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 19:01:28 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 wpsmith):
Granted that it is not as intuitive as the markup; however, it does mean
that it's not readable. submit_button() is what WP has installed to use on
the admin side and used in the admin. Those who use it or want to use it
will know (or know how to look it up easily/quickly).
Personally, I would like that false to become more than just a boolean
where I can enter my own wrap pattern, e.g. '<p class="my-submit">%s</p>'.
And it probably belongs as the last argument IMHO, but nonetheless, it is
what it is.
My argument is not really for shortness as it is for consistency and the
ability to filter. While I think about it, it may be better not to filter
in the comment-template (if submit_button is used on the frontend) but to
filter get_submit_button(). So something like this:
{{{
return apply_filters( 'get_submit_button', $button, $text, $type, $name,
$wrap, $other_attributes );
}}}
However, if we don't move in favor of using submit_button() on the
frontend, I would like to filter the comments HTML. Maybe something like
(though I am not convinced at its efficiency):
{{{
<input name="submit" type="submit" id="<?php echo esc_attr(
$args['id_submit'] ); ?>" value="<?php echo esc_attr(
$args['label_submit'] ); ?>"<?php echo apply_filters(
'comment_form_submit', '', $args ); ?> />
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20490#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list