Ticket #35392: 35392.patch
| File 35392.patch, 5.7 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/css/dashboard.css
688 688 689 689 #activity-widget #the-comment-list .avatar { 690 690 position: absolute; 691 top: 1 3px;691 top: 12px; 692 692 } 693 693 694 694 #activity-widget #the-comment-list .dashboard-comment-wrap { … … 801 801 } 802 802 803 803 #activity-widget #latest-comments #the-comment-list .comment-item { 804 padding: 1em 12px; 804 /* the row-actions paragraph is output only for users with 'edit_comment' capabilities, 805 for other users this needs a min height equal to the gravatar image */ 806 min-height: 50px; 807 margin: 0; 808 padding: 12px; 805 809 } 806 810 807 811 #latest-comments #the-comment-list .pingback { -
src/wp-admin/css/list-tables.css
896 896 tr:hover .row-actions, 897 897 .mobile .row-actions, 898 898 .row-actions.visible, 899 div.comment-item:hover .row-actions {899 .comment-item:hover .row-actions { 900 900 position: static; 901 901 } 902 902 -
src/wp-admin/includes/dashboard.php
574 574 function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { 575 575 $GLOBALS['comment'] = clone $comment; 576 576 577 if ( $comment->comment_post_ID > 0 && current_user_can( 'edit_post', $comment->comment_post_ID ) ) { 577 if ( $comment->comment_post_ID > 0 ) { 578 578 579 $comment_post_title = _draft_or_post_title( $comment->comment_post_ID ); 579 $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); 580 $comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>"; 580 581 if ( current_user_can( 'edit_post', $comment->comment_post_ID ) ) { 582 $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); 583 $comment_post_link_or_title = "<a href='$comment_post_url'>$comment_post_title</a>"; 584 } else { 585 $comment_post_link_or_title = '“' . $comment_post_title . '”'; 586 } 587 581 588 } else { 582 $comment_post_link = '';589 $comment_post_link_or_title = ''; 583 590 } 584 591 585 592 $actions_string = ''; … … 644 651 $actions_string .= "<span class='$action'>$sep$link</span>"; 645 652 } 646 653 } 647 648 654 ?> 649 655 650 < divid="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>656 <li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>> 651 657 652 658 <?php echo get_avatar( $comment, 50, 'mystery' ); ?> 653 659 … … 655 661 656 662 <div class="dashboard-comment-wrap has-row-actions"> 657 663 <p class="comment-meta"> 658 <?php 659 if ( $comment_post_link ) { 660 printf( 661 /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */ 662 __( 'From %1$s on %2$s%3$s' ), 663 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>', 664 $comment_post_link, 665 ' <span class="approve">' . __( '[Pending]' ) . '</span>' 666 ); 667 } else { 668 printf( 669 /* translators: 1: comment author, 2: notification if the comment is pending */ 670 __( 'From %1$s %2$s' ), 671 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>', 672 ' <span class="approve">' . __( '[Pending]' ) . '</span>' 673 ); 674 } 675 ?> 664 <?php 665 printf( 666 /* translators: 1: comment author, 2: post title, 3: notification if the comment is pending */ 667 __( 'From %1$s on %2$s%3$s' ), 668 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>', 669 $comment_post_link_or_title, 670 ' <span class="approve" aria-hidden="true">' . __( '[Pending]' ) . '</span>' 671 ); 672 ?> 676 673 </p> 677 674 678 675 <?php … … 690 687 $type = esc_html( $type ); 691 688 ?> 692 689 <div class="dashboard-comment-wrap has-row-actions"> 693 <?php /* translators: %1$s is type of comment, %2$s is link to the post */ ?> 694 <p class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link ); ?></p> 690 <p class="comment-meta"> 691 <?php 692 /* translators: 1: type of comment, 2: post link or title */ 693 printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link_or_title ); 694 ?> 695 </p> 695 696 <p class="comment-author"><?php comment_author_link( $comment ); ?></p> 696 697 697 698 <?php endif; // comment_type ?> 699 698 700 <blockquote><p><?php comment_excerpt( $comment ); ?></p></blockquote> 701 <?php if ( $actions_string ) : ?> 699 702 <p class="row-actions"><?php echo $actions_string; ?></p> 703 <?php endif; ?> 700 704 </div> 701 </ div>705 </li> 702 706 <?php 703 707 $GLOBALS['comment'] = null; 704 708 } … … 868 872 869 873 if ( $comments ) { 870 874 echo '<div id="latest-comments" class="activity-block">'; 871 echo '<h3>' . __( ' Comments' ) . '</h3>';875 echo '<h3>' . __( 'Recent Comments' ) . '</h3>'; 872 876 873 echo '< divid="the-comment-list" data-wp-lists="list:comment">';877 echo '<ul id="the-comment-list" data-wp-lists="list:comment">'; 874 878 foreach ( $comments as $comment ) 875 879 _wp_dashboard_recent_comments_row( $comment ); 876 echo '</ div>';880 echo '</ul>'; 877 881 878 if ( current_user_can('edit_posts') ) 879 _get_list_table('WP_Comments_List_Table')->views(); 882 if ( current_user_can( 'edit_posts' ) ) { 883 echo '<h4 class="screen-reader-text">' . __( 'View more comments' ) . '</h4>'; 884 _get_list_table( 'WP_Comments_List_Table' )->views(); 885 } 880 886 881 887 wp_comment_reply( -1, false, 'dashboard', false ); 882 888 wp_comment_trashnotice();