Standardize comment form
|Reported by:||Otto42||Owned by:||beaulebens|
|Cc:||alexdunae, westi, beau@…, caesar@…, sirzooro, Denis-de-Bernardy, dkikizas@…, tom@…, mikeschinkel@…, zeo@…|
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:
- Copy the comments form code from default and classic themes into the core, and replace it with a function call. comment_form(), for example.
- 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.
- Encourage themes to adjust. Maybe start suggesting themes in the Expand section to use it, like threaded comments did.
Change History (62)
- Milestone changed from Future Release to 3.0
- Type changed from enhancement to task (blessed)
comment:8 beaulebens — 4 years ago
- Cc beau@… added
- Owner set to beaulebens
- Status changed from new to assigned