Administration: Remove a blank space in the Recent Comments dashboard widget if avatars are disabled on Discussion Settings screen.
Props Marius84, shital-patel, GaryJ, ianbelanger, sgastard, lgrev01, donmhico, garrett-eclipse, audrasjb, SergeyBiryukov. Fixes #42938. git-svn-id: https://develop.svn.wordpress.org/trunk@47255 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8650885f85
commit
196fc7ab60
@ -821,7 +821,7 @@ body #dashboard-widgets .postbox form .submit {
|
||||
top: 12px;
|
||||
}
|
||||
|
||||
#activity-widget #the-comment-list .dashboard-comment-wrap {
|
||||
#activity-widget #the-comment-list .dashboard-comment-wrap.has-avatar {
|
||||
padding-left: 63px;
|
||||
}
|
||||
|
||||
|
@ -775,11 +775,18 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
||||
|
||||
<li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>
|
||||
|
||||
<?php echo get_avatar( $comment, 50, 'mystery' ); ?>
|
||||
<?php
|
||||
$comment_row_class = '';
|
||||
|
||||
if ( get_option( 'show_avatars' ) ) {
|
||||
echo get_avatar( $comment, 50, 'mystery' );
|
||||
$comment_row_class .= ' has-avatar';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( ! $comment->comment_type || 'comment' == $comment->comment_type ) : ?>
|
||||
|
||||
<div class="dashboard-comment-wrap has-row-actions">
|
||||
<div class="dashboard-comment-wrap <?php echo $comment_row_class; ?> has-row-actions">
|
||||
<p class="comment-meta">
|
||||
<?php
|
||||
// Comments might not have a post they relate to, e.g. programmatically created ones.
|
||||
|
Loading…
Reference in New Issue
Block a user