From e88721433c0cf2d1315c731b6ba83532139a12a9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 16 Jun 2015 00:18:39 +0000 Subject: [PATCH] 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 --- src/wp-includes/comment-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index b8d2e43357..0cde7f5700 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -1438,7 +1438,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null ); $link = sprintf( "%s", - 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']