[wp-trac] [WordPress Trac] #10910: Standardize comment form
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 5 20:04:51 UTC 2009
#10910: Standardize comment form
-------------------------+--------------------------------------------------
Reporter: Otto42 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Comments | Version: 2.9
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Every theme includes a substantially similar piece of code: the comments
form. Largely, this form goes unchanged, except in extremely minor ways,
from theme to theme. It's ripe for being pulled out of the theme and
standardized in the core.
Points of note:
* The form contains all the same elements (name, email, url, comment
text), which must have all the same names in order for the comment form to
actually work.
* Virtually every theme uses styling to adjust the form, not changes to
the HTML.
* Any plugin which enhances comments has to have code manually inserted
into the theme, in most all cases. A more standardized form could have
useful action hooks around the elements in the form, letting plugins work
on the form in a simpler way (adding fields to sane locations, etc).
I suggest that this proceed in phases:
1. Copy the comments form code from default and classic themes into the
core, and replace it with a function call. comment_form(), for example.
2. Add action hooks everywhere in it. Maybe some filters on the minor
amounts of text in it, if it makes sense to do so. Add to these as needed,
as the theme authors complain about not being able to easily adjust the
HTML anymore. Should be a minority, almost all themes leave this verbatim
from whatever theme they started out with.
3. Encourage themes to adjust. Maybe start suggesting themes in the Expand
section to use it, like threaded comments did.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10910>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list