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. Built from https://develop.svn.wordpress.org/trunk@50999 git-svn-id: http://core.svn.wordpress.org/trunk@50608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c649d69a9a
commit
670ec9cfa7
|
@ -228,6 +228,18 @@ if ( $post_id ) {
|
|||
</h1>
|
||||
|
||||
<?php
|
||||
if ( $post_id ) {
|
||||
$post_type_object = get_post_type_object( get_post_type( $post_id ) );
|
||||
|
||||
if ( $post_type_object ) {
|
||||
printf(
|
||||
'<a href="%1$s" class="comments-view-item-link">%2$s</a>',
|
||||
get_permalink( $post_id ),
|
||||
$post_type_object->labels->view_item
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
echo '<span class="subtitle">';
|
||||
printf(
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-50998';
|
||||
$wp_version = '5.8-alpha-50999';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue