diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 0d5f6e03d1..7340cb400d 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -589,7 +589,7 @@ form.initial-form.quickpress-open input#title { #dashboard_activity .comment-meta span.approve:before { content: "\f227"; font: 20px/.5 dashicons; - margin-left: 12px; + margin-left: 5px; vertical-align: middle; position: relative; top: -1px; @@ -693,7 +693,7 @@ form.initial-form.quickpress-open input#title { #activity-widget #the-comment-list .avatar { position: absolute; - top: 13px; + top: 12px; } #activity-widget #the-comment-list .dashboard-comment-wrap { @@ -806,7 +806,11 @@ form.initial-form.quickpress-open input#title { } #activity-widget #latest-comments #the-comment-list .comment-item { - padding: 1em 12px; + /* the row-actions paragraph is output only for users with 'edit_comment' capabilities, + for other users this needs a min height equal to the gravatar image */ + min-height: 50px; + margin: 0; + padding: 12px; } #latest-comments #the-comment-list .pingback { diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index c0b8d36ed8..d9fa19a7a7 100644 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -896,7 +896,7 @@ p.pagenav { tr:hover .row-actions, .mobile .row-actions, .row-actions.visible, -div.comment-item:hover .row-actions { +.comment-item:hover .row-actions { position: static; } diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index a0e7ccd100..a73587ae89 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -583,9 +583,10 @@ function wp_dashboard_recent_drafts( $drafts = false ) { function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $GLOBALS['comment'] = clone $comment; - if ( $comment->comment_post_ID > 0 && current_user_can( 'edit_post', $comment->comment_post_ID ) ) { + if ( $comment->comment_post_ID > 0 ) { + $comment_post_title = _draft_or_post_title( $comment->comment_post_ID ); - $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); + $comment_post_url = get_the_permalink( $comment->comment_post_ID ); $comment_post_link = "$comment_post_title"; } else { $comment_post_link = ''; @@ -653,10 +654,9 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $actions_string .= "$sep$link"; } } - ?> -
+ +
'; foreach ( $comments as $comment ) _wp_dashboard_recent_comments_row( $comment ); - echo '