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.
Built from https://develop.svn.wordpress.org/trunk@47255


git-svn-id: http://core.svn.wordpress.org/trunk@47055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-11 01:17:06 +00:00
parent 055af2b506
commit 8c2fb2148b
6 changed files with 14 additions and 7 deletions

View File

@ -822,7 +822,7 @@ body #dashboard-widgets .postbox form .submit {
top: 12px; top: 12px;
} }
#activity-widget #the-comment-list .dashboard-comment-wrap { #activity-widget #the-comment-list .dashboard-comment-wrap.has-avatar {
padding-right: 63px; padding-right: 63px;
} }

File diff suppressed because one or more lines are too long

View File

@ -821,7 +821,7 @@ body #dashboard-widgets .postbox form .submit {
top: 12px; top: 12px;
} }
#activity-widget #the-comment-list .dashboard-comment-wrap { #activity-widget #the-comment-list .dashboard-comment-wrap.has-avatar {
padding-left: 63px; padding-left: 63px;
} }

File diff suppressed because one or more lines are too long

View File

@ -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 ); ?>> <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 ) : ?> <?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"> <p class="comment-meta">
<?php <?php
// Comments might not have a post they relate to, e.g. programmatically created ones. // Comments might not have a post they relate to, e.g. programmatically created ones.

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-47254'; $wp_version = '5.4-alpha-47255';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.