WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#35650 new enhancement

title_reply_to should work when javascript is enabled

Reported by: smerriman Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Comments Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

title_reply_to is a parameter in the comment_form function, and has even been around since 2.7 in the comment_form_title function, allowing you to display a different heading when replying to a comment, including who you are replying to. While a cancel comment reply link does appear, having a different heading is a very useful concept for making it clear to users exactly what they are doing.

Except, nobody ever sees it because it only applies when javascript is disabled. Everybody* has javascript enabled.

The javascript for replying to comments should be updated to change the heading based on this parameter.

Change History (4)

#1 @smerriman
4 years ago

  • Type changed from defect (bug) to enhancement

Sorry, meant to mark this as an enhancement since the behavior is documented as deliberate (why, I don't know.)

#2 @chriscct7
4 years ago

  • Version trunk deleted

#3 @earnjam
5 months ago

  • Keywords needs-patch added
  • Milestone set to Future Release

This is because when javascript is enabled and the reply link is clicked, it simply moves the existing comment form to directly below the comment you are replying to.

If you were to right click on the reply link and open in a new window, you'll see that it does use the supplied title_reply_to parameter.

To handle this, we'd have to store the label text as inline JS on page load, then compute it on click replacing the %s placeholder with the author's name of the comment being replied to. That would probably have to come from a new data-author attribute added to the Reply link.

#4 @earnjam
5 months ago

#46926 was marked as a duplicate.

Note: See TracTickets for help on using tickets.