Ticket #35392: 35392.4.patch
| File 35392.4.patch, 5.7 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/css/dashboard.css
693 693 694 694 #activity-widget #the-comment-list .avatar { 695 695 position: absolute; 696 top: 1 3px;696 top: 12px; 697 697 } 698 698 699 699 #activity-widget #the-comment-list .dashboard-comment-wrap { … … 806 806 } 807 807 808 808 #activity-widget #latest-comments #the-comment-list .comment-item { 809 padding: 1em 12px; 809 /* the row-actions paragraph is output only for users with 'edit_comment' capabilities, 810 for other users this needs a min height equal to the gravatar image */ 811 min-height: 50px; 812 margin: 0; 813 padding: 12px; 810 814 } 811 815 812 816 #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
583 583 function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { 584 584 $GLOBALS['comment'] = clone $comment; 585 585 586 if ( $comment->comment_post_ID > 0 && current_user_can( 'edit_post', $comment->comment_post_ID ) ) { 586 if ( $comment->comment_post_ID > 0 ) { 587 587 588 $comment_post_title = _draft_or_post_title( $comment->comment_post_ID ); 588 $comment_post_url = get_ edit_post_link( $comment->comment_post_ID );589 $comment_post_url = get_the_permalink( $comment->comment_post_ID ); 589 590 $comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>"; 590 591 } else { 591 592 $comment_post_link = ''; … … 653 654 $actions_string .= "<span class='$action'>$sep$link</span>"; 654 655 } 655 656 } 656 657 657 ?> 658 658 659 < divid="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>659 <li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>> 660 660 661 661 <?php echo get_avatar( $comment, 50, 'mystery' ); ?> 662 662 … … 664 664 665 665 <div class="dashboard-comment-wrap has-row-actions"> 666 666 <p class="comment-meta"> 667 <?php 667 <?php 668 // Comments might not have a post they relate to, e.g. programmatically created ones. 668 669 if ( $comment_post_link ) { 669 670 printf( 670 /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */671 __( 'From %1$s on %2$s %3$s' ),671 /* translators: 1: comment author, 2: post title, 3: notification if the comment is pending */ 672 __( 'From %1$s on %2$s %3$s' ), 672 673 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>', 673 674 $comment_post_link, 674 ' <span class="approve">' . __( '[Pending]' ) . '</span>'675 '<span class="approve">' . __( '[Pending]' ) . '</span>' 675 676 ); 676 677 } else { 677 678 printf( … … 678 679 /* translators: 1: comment author, 2: notification if the comment is pending */ 679 680 __( 'From %1$s %2$s' ), 680 681 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>', 681 ' <span class="approve">' . __( '[Pending]' ) . '</span>'682 '<span class="approve">' . __( '[Pending]' ) . '</span>' 682 683 ); 683 684 } 684 ?>685 ?> 685 686 </p> 686 687 687 688 <?php … … 699 700 $type = esc_html( $type ); 700 701 ?> 701 702 <div class="dashboard-comment-wrap has-row-actions"> 702 <?php /* translators: %1$s is type of comment, %2$s is link to the post */ ?> 703 <p class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link ); ?></p> 703 <p class="comment-meta"> 704 <?php 705 // Pingbacks, Trackbacks or custom comment types might not have a post they relate to, e.g. programmatically created ones. 706 if ( $comment_post_link ) { 707 /* translators: 1: type of comment, 2: post link or title */ 708 printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link ); 709 } else { 710 /* translators: 1: type of comment */ 711 printf( _x( '%1$s', 'dashboard' ), "<strong>$type</strong>" ); 712 } 713 ?> 714 </p> 704 715 <p class="comment-author"><?php comment_author_link( $comment ); ?></p> 705 716 706 717 <?php endif; // comment_type ?> 707 718 <blockquote><p><?php comment_excerpt( $comment ); ?></p></blockquote> 719 <?php if ( $actions_string ) : ?> 708 720 <p class="row-actions"><?php echo $actions_string; ?></p> 721 <?php endif; ?> 709 722 </div> 710 </ div>723 </li> 711 724 <?php 712 725 $GLOBALS['comment'] = null; 713 726 } … … 877 890 878 891 if ( $comments ) { 879 892 echo '<div id="latest-comments" class="activity-block">'; 880 echo '<h3>' . __( ' Comments' ) . '</h3>';893 echo '<h3>' . __( 'Recent Comments' ) . '</h3>'; 881 894 882 echo '< divid="the-comment-list" data-wp-lists="list:comment">';895 echo '<ul id="the-comment-list" data-wp-lists="list:comment">'; 883 896 foreach ( $comments as $comment ) 884 897 _wp_dashboard_recent_comments_row( $comment ); 885 echo '</ div>';898 echo '</ul>'; 886 899 887 if ( current_user_can('edit_posts') ) 888 _get_list_table('WP_Comments_List_Table')->views(); 900 if ( current_user_can( 'edit_posts' ) ) { 901 echo '<h3 class="screen-reader-text">' . __( 'View more comments' ) . '</h3>'; 902 _get_list_table( 'WP_Comments_List_Table' )->views(); 903 } 889 904 890 905 wp_comment_reply( -1, false, 'dashboard', false ); 891 906 wp_comment_trashnotice();