Comments: Fix title not updating when replying to a comment

When replying to an existing comment, the comment form is moved to below the
existing comment with JS, but the form heading was not being updated. This
fixes the issue by introducing a new data-attribute to the reply link with the
correct heading string, and applying that string to the heading when the form
is moved.

Props isabel_brison, azaozz, peterwilsoncc.
Fixes #38009.


git-svn-id: https://develop.svn.wordpress.org/trunk@47506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2020-03-25 04:53:06 +00:00
parent 36d112d1c8
commit 251fd685dd
2 changed files with 36 additions and 12 deletions
+1
View File
@@ -1703,6 +1703,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
'postid' => $post->ID,
'belowelement' => $args['add_below'] . '-' . $comment->comment_ID,
'respondelement' => $args['respond_id'],
'replyto' => sprintf( $args['reply_to_text'], $comment->comment_author ),
);
$data_attribute_string = '';