Make WordPress Core

Ticket #42938: 42938.patch

File 42938.patch, 995 bytes (added by Shital Patel, 7 years ago)

Created patch for Avatar in Recent Comments section on Dashboard

  • 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                        if ($show_avatars == 1) {
     695                                echo get_avatar( $comment, 50, 'mystery' );
     696                        }
     697                        ?>
    693698
    694699                        <?php if ( ! $comment->comment_type || 'comment' == $comment->comment_type ) : ?>
    695700
    696                         <div class="dashboard-comment-wrap has-row-actions">
     701                        <div class="<?php if ($show_avatars == 1) {?>dashboard-comment-wrap<?php }?> has-row-actions">
    697702                        <p class="comment-meta">
    698703                        <?php
    699704                                // Comments might not have a post they relate to, e.g. programmatically created ones.