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.


git-svn-id: https://develop.svn.wordpress.org/trunk@45787 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson
2019-08-13 05:08:14 +00:00
parent 3d53fdba73
commit feb0830c79
2 changed files with 42 additions and 1 deletions

View File

@@ -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,