[wp-trac] [WordPress Trac] #24799: Default comment form title and div id attributes prevent multiple use of comment form on a page
WordPress Trac
noreply at wordpress.org
Thu Jul 18 20:08:39 UTC 2013
#24799: Default comment form title and div id attributes prevent multiple use of
comment form on a page
--------------------------+-----------------------------
Reporter: BjornW | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: trunk
Severity: normal | Keywords: dev-feedback
--------------------------+-----------------------------
The current trunk implementation of the comment form will cause issues
with multiple comment forms on a page due to using non-unique id
attributes in the html. Most of this can be fixed using filters or
parameters fed to the comment_form() function, except for the id attribute
of the h3 title and the parent div. The non-unique ids of these twho html
tags prevent us from reusing the comment form multiple times on a page
without issues.
The easiest, backwards compatible, solution seems to me is adding two
optional variables to the array of parameters supplied to comment_form().
A better solution in my opinion, but which would take more time & testing,
is to make sure all id attributes in the default comment form are unique
by default. This can be done using the post-id (of the post on which the
comment replies) in the id attribute to prepend or append the id with the
unique post-id.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24799>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list