Ticket #35392: 35392.2.patch
| File 35392.2.patch, 5.8 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 // translators: %s: post title 586 $comment_post_link_or_title = sprintf( __( '“%s”' ), $comment_post_title ); 587 } 588 581 589 } else { 582 $comment_post_link = '';590 $comment_post_link_or_title = ''; 583 591 } 584 592 585 593 $actions_string = ''; … … 644 652 $actions_string .= "<span class='$action'>$sep$link</span>"; 645 653 } 646 654 } 647 648 655 ?> 649 656 650 < divid="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>657 <li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>> 651 658 652 659 <?php echo get_avatar( $comment, 50, 'mystery' ); ?> 653 660 … … 655 662 656 663 <div class="dashboard-comment-wrap has-row-actions"> 657 664 <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 ?> 665 <?php 666 printf( 667 /* translators: 1: comment author, 2: post title, 3: notification if the comment is pending */ 668 __( 'From %1$s on %2$s%3$s' ), 669 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>', 670 $comment_post_link_or_title, 671 ' <span class="approve" aria-hidden="true">' . __( '[Pending]' ) . '</span>' 672 ); 673 ?> 676 674 </p> 677 675 678 676 <?php … … 690 688 $type = esc_html( $type ); 691 689 ?> 692 690 <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> 691 <p class="comment-meta"> 692 <?php 693 /* translators: 1: type of comment, 2: post link or title */ 694 printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link_or_title ); 695 ?> 696 </p> 695 697 <p class="comment-author"><?php comment_author_link( $comment ); ?></p> 696 698 697 699 <?php endif; // comment_type ?> 700 698 701 <blockquote><p><?php comment_excerpt( $comment ); ?></p></blockquote> 702 <?php if ( $actions_string ) : ?> 699 703 <p class="row-actions"><?php echo $actions_string; ?></p> 704 <?php endif; ?> 700 705 </div> 701 </ div>706 </li> 702 707 <?php 703 708 $GLOBALS['comment'] = null; 704 709 } … … 868 873 869 874 if ( $comments ) { 870 875 echo '<div id="latest-comments" class="activity-block">'; 871 echo '<h3>' . __( ' Comments' ) . '</h3>';876 echo '<h3>' . __( 'Recent Comments' ) . '</h3>'; 872 877 873 echo '< divid="the-comment-list" data-wp-lists="list:comment">';878 echo '<ul id="the-comment-list" data-wp-lists="list:comment">'; 874 879 foreach ( $comments as $comment ) 875 880 _wp_dashboard_recent_comments_row( $comment ); 876 echo '</ div>';881 echo '</ul>'; 877 882 878 if ( current_user_can('edit_posts') ) 879 _get_list_table('WP_Comments_List_Table')->views(); 883 if ( current_user_can( 'edit_posts' ) ) { 884 echo '<h4 class="screen-reader-text">' . __( 'View more comments' ) . '</h4>'; 885 _get_list_table( 'WP_Comments_List_Table' )->views(); 886 } 880 887 881 888 wp_comment_reply( -1, false, 'dashboard', false ); 882 889 wp_comment_trashnotice();