Opened 10 years ago
Last modified 5 years ago
#30909 new defect (bug)
Allow passing ID for comment_form container and title
Reported by: | rmccue | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Comments | Keywords: | has-patch needs-testing dev-feedback |
Focuses: | Cc: |
Description
Right now, there's a div
hardcoded with #respond
and a h3
hardcoded with reply-title
. These make it hard for the comment form to be used on archive pages, as they assume the comment form is only ever output on single pages.
(There are other IDs output in the form, however these are controllable through id_form
and id_submit
)
Attachments (2)
Change History (12)
#2
@
10 years ago
- Keywords has-patch added
I am attaching a path that adds an argument to comment_form() for the hardcoded h3 ID. It also introduces a new function, for the hardcoded #respond
ID. The new function returns a filter that can be used to change the value of that ID, sanitizes it and ensures it has a hash, or not, depending on context. That way it can be used for targeting the element in JavaScript, and outputted in HTML.
#3
@
10 years ago
Could you upload a patch without the formatting changes? It would be easier to review. Thanks!
#4
in reply to:
↑ 1
@
10 years ago
Replying to SergeyBiryukov:
Note that
#respond
is also hardcoded in comments_popup_link() and get_cancel_comment_reply_link().
Related: #28314
#5
@
9 years ago
- Component changed from Themes to Comments
- Keywords needs-refresh added
- Milestone changed from Awaiting Review to Future Release
Patch still needs a refresh.
#6
@
9 years ago
@Shelob9 Interested in refreshing your patch to remove the extra formatting changes?
Note that
#respond
is also hardcoded in comments_popup_link() and get_cancel_comment_reply_link().get_comment_reply_link() and get_post_reply_link(), however, have a
respond_id
argument.