[wp-trac] [WordPress Trac] #15015: Customisable submit button for comment form
WordPress Trac
noreply at wordpress.org
Tue Mar 10 16:42:22 UTC 2015
#15015: Customisable submit button for comment form
------------------------------------+-----------------------
Reporter: morpheu5 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.2
Component: Comments | Version: 3.0.1
Severity: normal | Resolution:
Keywords: dev-feedback has-patch | Focuses: template
------------------------------------+-----------------------
Comment (by coffee2code):
@boonebgorges: I have no strong opposition to your suggestion beyond this
round of justification for [attachment:15015.3.diff]:
The implementation proposed was largely for consistency. There are 5 other
filterable comment_form_fields that include the containing `<p>`:
comment_field, must_log_in, logged_in_as, comment_notes_before,
comment_notes_after
(''[https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes
/comment-template.php#L2200 reference]''). And the move of
`comment_id_fields()` seemed reasonable since it only output hidden
fields.
Generally I would not be in favor of filtering container markup, but
that's how it has been handled here. Since this is all output on the
front-end, that approach does lead to maximal customization. With that in
mind, the latter of your suggestions (something akin to `<p class="form-
submit">%1$s %2$s</p>`) is preferable to the former. Primarily for back-
compat reasons, I support that latter suggestion.
I scanned the Plugin Directory and there are a couple (less than a half
dozen though) that make use of the `comment_id_fields` filter to output
visible markup on comment forms. While I didn't delve into whether these
would actually be affected by the move of the filter out of the containing
`<p>`, it seems reasonable not to risk it.
Attached is [attachment:15015.4.diff] that tweaks the .3 patch to target
just filtering the submit input.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/15015#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list