Make WordPress Core

Ticket #42938: 42938.4.diff

File 42938.4.diff, 3.1 KB (added by ianbelanger, 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">
    701                         <p class="comment-meta">
     708                                <div class="<?php echo $show_avatars_class; ?>has-row-actions">
     709                                <p class="comment-meta">
    702710                                <?php
    703                                 // Comments might not have a post they relate to, e.g. programmatically created ones.
    704                                 if ( $comment_post_link ) {
    705                                         printf(
    706                                                 /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */
    707                                                 __( 'From %1$s on %2$s %3$s' ),
    708                                                 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
    709                                                 $comment_post_link,
    710                                                 '<span class="approve">' . __( '[Pending]' ) . '</span>'
    711                                         );
    712                                 } else {
    713                                         printf(
    714                                                 /* translators: 1: comment author, 2: notification if the comment is pending */
    715                                                 __( 'From %1$s %2$s' ),
    716                                                 '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
    717                                                 '<span class="approve">' . __( '[Pending]' ) . '</span>'
    718                                         );
    719                                 }
    720                                 ?>
    721                         </p>
     711                                        // Comments might not have a post they relate to, e.g. programmatically created ones.
     712                                        if ( $comment_post_link ) {
     713                                                printf(
     714                                                        /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */
     715                                                        __( 'From %1$s on %2$s %3$s' ),
     716                                                        '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
     717                                                        $comment_post_link,
     718                                                        '<span class="approve">' . __( '[Pending]' ) . '</span>'
     719                                                );
     720                                        } else {
     721                                                printf(
     722                                                        /* translators: 1: comment author, 2: notification if the comment is pending */
     723                                                        __( 'From %1$s %2$s' ),
     724                                                        '<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
     725                                                        '<span class="approve">' . __( '[Pending]' ) . '</span>'
     726                                                );
     727                                        }
     728                                        ?>
     729                                </p>
    722730
    723                                 <?php
     731                        <?php
    724732                        else :
    725733                                switch ( $comment->comment_type ) {
    726734                                        case 'pingback':