Make WordPress Core

Ticket #42938: 42938.1.patch

File 42938.1.patch, 1.0 KB (added by Shital Patel, 7 years ago)
  • src/wp-admin/includes/dashboard.php

     
    689689
    690690                <li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>
    691691
    692                         <?php echo get_avatar( $comment, 50, 'mystery' ); ?>
     692                        <?php
     693                        $show_avatars  = get_option( 'show_avatars' );
     694                        $show_avatars_class = '';
     695                        if ( 1 == $show_avatars ) {
     696                                echo get_avatar( $comment, 50, 'mystery' );
     697                                $show_avatars_class = 'dashboard-comment-wrap ';
     698                        }
     699                        ?>
    693700
    694701                        <?php if ( ! $comment->comment_type || 'comment' == $comment->comment_type ) : ?>
    695702
    696                         <div class="dashboard-comment-wrap has-row-actions">
     703                        <div class="<?php echo $show_avatars_class;?>has-row-actions">
    697704                        <p class="comment-meta">
    698705                        <?php
    699706                                // Comments might not have a post they relate to, e.g. programmatically created ones.