From 55572ad66429fbe411d7394be4cb7787a5a1737c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 25 May 2021 12:25:14 +0000 Subject: [PATCH] Comments: Include a "View Post" link on the Comments screen for a single post. This makes it easier to view the post on the front end of the site when moderating comments, without having to open the editor first. Props trejder, audrasjb, vladytimy, lukecarbis, ayeshrajans, chaion07, paaljoachim, hareesh-pillai, SergeyBiryukov. Fixes #52353. git-svn-id: https://develop.svn.wordpress.org/trunk@50999 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-comments.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wp-admin/edit-comments.php b/src/wp-admin/edit-comments.php index 253d60b961..38f2bdd80b 100644 --- a/src/wp-admin/edit-comments.php +++ b/src/wp-admin/edit-comments.php @@ -228,6 +228,18 @@ if ( $post_id ) { %2$s', + get_permalink( $post_id ), + $post_type_object->labels->view_item + ); + } +} + if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { echo ''; printf(