Make WordPress Core

Ticket #42938: 42938-3.diff

File 42938-3.diff, 1.5 KB (added by sgastard, 6 years ago)
  • src/wp-admin/css/dashboard.css

     
    999999        word-wrap: break-word;
    10001000}
    10011001
     1002.dashboard-comment-wrap-no-avatar {
     1003        word-wrap: break-word;
     1004}
     1005
    10021006/* Browser Nag */
    10031007#dashboard_browser_nag a.update-browser-link {
    10041008        font-size: 1.2em;
  • src/wp-admin/includes/dashboard.php

     
    693693
    694694                <li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>
    695695
    696                         <?php echo get_avatar( $comment, 50, 'mystery' ); ?>
     696                        <?php
     697                        $show_avatars  = get_option( 'show_avatars' );
     698                        $show_avatars_class = 'dashboard-comment-wrap-no-avatar ';
     699                       
     700                        if ( 1 === $show_avatars ) {
     701                                echo get_avatar( $comment, 50, 'mystery' );
     702                                $show_avatars_class = 'dashboard-comment-wrap ';
     703                        }
     704                        ?>
    697705
    698706                        <?php if ( ! $comment->comment_type || 'comment' == $comment->comment_type ) : ?>
    699707
    700                         <div class="dashboard-comment-wrap has-row-actions">
     708                        <div class="<?php echo $show_avatars_class;?>has-row-actions">
    701709                        <p class="comment-meta">
    702                                 <?php
     710                        <?php
    703711                                // Comments might not have a post they relate to, e.g. programmatically created ones.
    704712                                if ( $comment_post_link ) {
    705713                                        printf(