Make WordPress Core


Ignore:
Timestamp:
03/06/2015 02:05:05 PM (10 years ago)
Author:
helen
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-comment.php

    r31053 r31641  
    109109<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0); ?></div>
    110110</div>
     111
     112<?php
     113$post_id = $comment->comment_post_ID;
     114if ( current_user_can( 'edit_post', $post_id ) ) {
     115    $post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
     116    $post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
     117} else {
     118    $post_link = esc_html( get_the_title( $post_id ) );
     119}
     120?>
     121
     122<div class="misc-pub-section misc-pub-response-to">
     123    <?php printf( __( 'In response to: <b>%s</b>' ), $post_link ); ?>
     124</div>
     125
     126<?php
     127if ( $comment->comment_parent ) :
     128    $parent      = get_comment( $comment->comment_parent );
     129    $parent_link = esc_url( get_comment_link( $comment->comment_parent ) );
     130    $name        = get_comment_author( $parent->comment_ID );
     131?>
     132<div class="misc-pub-section misc-pub-reply-to">
     133    <?php printf( __( 'In reply to: <b><a href="%1$s">%2$s</a></b>' ), $parent_link, $name ); ?>
     134</div>
     135<?php endif; ?>
     136
    111137</div> <!-- misc actions -->
    112138<div class="clear"></div>
Note: See TracChangeset for help on using the changeset viewer.