From dc2e7e716f1558309fd3af94fc86cd8c6be2137b Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 13 Aug 2019 05:09:56 +0000 Subject: [PATCH] Comments: Include post permalink in comment reply link. Include the post's permalink when generating reply links in `get_comment_reply_link()` to account for comments displayed on index and archive pages. This reapplies [32786] which was inadvertently reverted in [42360]. Props justinahinon, donmhico. See #33383. Fixes #47174. Built from https://develop.svn.wordpress.org/trunk@45787 git-svn-id: http://core.svn.wordpress.org/trunk@45598 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 190bb7ac13..3bae940dac 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1697,7 +1697,8 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null 'replytocom' => $comment->comment_ID, 'unapproved' => false, 'moderation-hash' => false, - ) + ), + get_permalink( $post->ID ) ) ) . '#' . $args['respond_id'], $data_attribute_string, diff --git a/wp-includes/version.php b/wp-includes/version.php index bf195e381a..16048523c9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45786'; +$wp_version = '5.3-alpha-45787'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.