In `get_comment_reply_link()`, when generating the reply link, add the `replytocom` query arg to the result of `get_permalink()` on the current `$post`, instead of the current global request URI.

Props nazmul.hossain.nihal.
Fixes #31333.


git-svn-id: https://develop.svn.wordpress.org/trunk@32786 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-06-16 00:18:39 +00:00
parent 2860548f5b
commit e88721433c
1 changed files with 1 additions and 1 deletions

View File

@ -1438,7 +1438,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
);
$link = sprintf( "<a class='comment-reply-link' href='%s' onclick='%s' aria-label='%s'>%s</a>",
esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $args['respond_id'],
esc_url( add_query_arg( 'replytocom', $comment->comment_ID, get_permalink( $post->ID ) ) ) . "#" . $args['respond_id'],
$onclick,
esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ),
$args['reply_text']