From c9913583e344bc12baa899b1893d0e5dc137e7ed Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Fri, 6 Mar 2015 14:05:05 +0000 Subject: [PATCH] Comments: Show more identifying information for moderation and editing. Attempting to moderate comments without context about the post is more difficult than necessary. The comment moderation screen you are sent to via email link was also in need of some better visual treatment. props thaicloud, seanchayes, adamsilverstein. see #23988. git-svn-id: https://develop.svn.wordpress.org/trunk@31641 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/comment.php | 59 ++++++++++++++++++++++-------- src/wp-admin/css/common.css | 15 ++------ src/wp-admin/css/edit.css | 20 ++++++---- src/wp-admin/edit-form-comment.php | 26 +++++++++++++ 4 files changed, 86 insertions(+), 34 deletions(-) diff --git a/src/wp-admin/comment.php b/src/wp-admin/comment.php index ab43f97b56..f5eb56103d 100644 --- a/src/wp-admin/comment.php +++ b/src/wp-admin/comment.php @@ -114,19 +114,17 @@ case 'spam' : ?>
-
-

comment_approved != '0' ) { // if not unapproved

- + @@ -174,22 +172,54 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved + + + + + + + +
comment_author; ?>
comment_author_url; ?>
+ comment_post_ID; + if ( current_user_can( 'edit_post', $post_id ) ) { + $post_link = ""; + $post_link .= esc_html( get_the_title( $post_id ) ) . ''; + } else { + $post_link = esc_html( get_the_title( $post_id ) ); + } + echo $post_link; + + if ( $comment->comment_parent ) { + $comment_url = esc_url( get_comment_link( $comment->comment_ID ) ); + $parent = get_comment( $comment->comment_parent ); + $parent_link = esc_url( get_comment_link( $comment->comment_parent ) ); + $name = get_comment_author( $parent->comment_ID ); + printf( ' | ' . __( 'In reply to %2$s.' ), $parent_link, $name ); + } + ?> +
+ %2$s at %3$s' ), $comment_url, + /* translators: comment date format. See http://php.net/date */ + get_comment_date( __( 'Y/m/d' ) ), + get_comment_date( get_option( 'time_format' ) ) + ); + ?> +
comment_content; ?>
-

+
- - - - - - - -
+

+ + +

@@ -197,7 +227,6 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
-
comment_date ) );  
+ +comment_post_ID; +if ( current_user_can( 'edit_post', $post_id ) ) { + $post_link = ""; + $post_link .= esc_html( get_the_title( $post_id ) ) . ''; +} else { + $post_link = esc_html( get_the_title( $post_id ) ); +} +?> + +
+ %s' ), $post_link ); ?> +
+ +comment_parent ) : + $parent = get_comment( $comment->comment_parent ); + $parent_link = esc_url( get_comment_link( $comment->comment_parent ) ); + $name = get_comment_author( $parent->comment_ID ); +?> +
+ %2$s' ), $parent_link, $name ); ?> +
+ +