From 0b761497c5473ab064ffff3275867fec5752d8a7 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Fri, 12 Feb 2016 21:42:03 +0000 Subject: [PATCH] =?UTF-8?q?Comments:=20In=20the=20comments=20list=20table,?= =?UTF-8?q?=20only=20link=20rows=20inside=20the=20=E2=80=9CSubmitted=20On?= =?UTF-8?q?=E2=80=9D=20column=20to=20the=20comment=20if=20it=20is=20public?= =?UTF-8?q?ly=20viewable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The date within the comments list table “Submitted On” column will only be wrapped in `get_comment_link()` if the comment is approved and associated with a valid `comment_post_ID`. Fixes #35279. git-svn-id: https://develop.svn.wordpress.org/trunk@36521 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-comments-list-table.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index f12565a95f..a5f96939d5 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -716,15 +716,23 @@ class WP_Comments_List_Table extends WP_List_Table { * @param WP_Comment $comment The comment object. */ public function column_date( $comment ) { - echo '
'; - echo ''; /* translators: 1: comment date, 2: comment time */ - printf( __( '%1$s at %2$s' ), + $submitted = sprintf( __( '%1$s at %2$s' ), /* translators: comment date format. See http://php.net/date */ get_comment_date( __( 'Y/m/d' ), $comment ), get_comment_date( __( 'g:i a' ), $comment ) ); - echo ''; + + echo ''; }