Changeset 33828
- Timestamp:
- 08/31/2015 08:58:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-comments-list-table.php
r33826 r33828 43 43 $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0; 44 44 45 if ( get_option('show_avatars') ) 46 add_filter( 'comment_author', 'floated_admin_avatar' ); 45 if ( get_option( 'show_avatars' ) ) { 46 add_filter( 'comment_author', array( $this, 'floated_admin_avatar' ), 10, 2 ); 47 } 47 48 48 49 parent::__construct( array( … … 52 53 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, 53 54 ) ); 55 } 56 57 public function floated_admin_avatar( $name, $comment_ID ) { 58 $comment = get_comment( $comment_ID ); 59 $avatar = get_avatar( $comment, 32, 'mystery' ); 60 return "$avatar $name"; 54 61 } 55 62 … … 592 599 printf( __( 'Submitted on <a href="%1$s">%2$s at %3$s</a>' ), $comment_url, 593 600 /* translators: comment date format. See http://php.net/date */ 594 get_comment_date( __( 'Y/m/d' ) ),595 get_comment_date( get_option( 'time_format' ) )601 get_comment_date( __( 'Y/m/d' ), $comment->comment_ID ), 602 get_comment_date( get_option( 'time_format' ), $comment->comment_ID ) 596 603 ); 597 604 … … 604 611 605 612 echo '</div>'; 606 comment_text( );613 comment_text( $comment->comment_ID ); 607 614 if ( $this->user_can ) { ?> 608 615 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> … … 629 636 global $comment_status; 630 637 631 $author_url = get_comment_author_url( );638 $author_url = get_comment_author_url( $comment->comment_ID ); 632 639 if ( 'http://' == $author_url ) { 633 640 $author_url = ''; … … 640 647 641 648 642 echo "<strong>"; comment_author( ); echo '</strong><br />';649 echo "<strong>"; comment_author( $comment->comment_ID ); echo '</strong><br />'; 643 650 if ( !empty( $author_url ) ) { 644 651 echo "<a title='$author_url' href='$author_url'>$author_url_display</a><br />"; … … 647 654 if ( $this->user_can ) { 648 655 if ( !empty( $comment->comment_author_email ) ) { 656 $GLOBALS['comment'] = $comment; 649 657 comment_author_email_link(); 650 658 echo '<br />'; 659 unset( $GLOBALS['comment'] ); 651 660 } 652 661 653 $author_ip = get_comment_author_IP( );662 $author_ip = get_comment_author_IP( $comment->comment_ID ); 654 663 if ( $author_ip ) { 655 664 $author_ip_url = add_query_arg( array( 's' => $author_ip, 'mode' => 'detail' ), 'edit-comments.php' ); … … 666 675 * @return string 667 676 */ 668 public function column_date( ) {669 return get_comment_date( __( 'Y/m/d \a\t g:i a' ) );677 public function column_date( $comment ) { 678 return get_comment_date( __( 'Y/m/d \a\t g:i a' ), $comment->comment_ID ); 670 679 } 671 680
Note: See TracChangeset
for help on using the changeset viewer.