diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index c9eb07c2e6..4cc5729353 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -565,8 +565,6 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $comment_post_link = $comment_post_title; } - $comment_link = '#'; - $actions_string = ''; if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) { // Pre-order it: Approve | Reply | Edit | Spam | Trash. @@ -575,7 +573,8 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { 'reply' => '', 'edit' => '', 'spam' => '', - 'trash' => '', 'delete' => '' + 'trash' => '', 'delete' => '', + 'view' => '', ); $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); @@ -592,10 +591,16 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $actions['edit'] = "". __('Edit') . ''; $actions['reply'] = ' '; $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; - if ( !EMPTY_TRASH_DAYS ) + + if ( ! EMPTY_TRASH_DAYS ) { $actions['delete'] = "" . __('Delete Permanently') . ''; - else + } else { $actions['trash'] = "" . _x('Trash', 'verb') . ''; + } + + if ( '1' === $comment->comment_approved ) { + $actions['view'] = '' . _x( 'View', 'verb' ) . ''; + } /** * Filter the action links displayed for each comment in the 'Recent Comments' @@ -634,7 +639,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
' . get_comment_author_link() . '', $comment_post_link.' '.$comment_link, ' ' . __( '[Pending]' ) . '' ); ?> + '' . get_comment_author_link() . '', $comment_post_link, ' ' . __( '[Pending]' ) . '' ); ?>
$type", $comment_post_link." ".$comment_link ); ?>
+$type", $comment_post_link ); ?>