Make WordPress Core

Changeset 33490


Ignore:
Timestamp:
07/29/2015 06:07:03 PM (9 years ago)
Author:
helen
Message:

Comments list table: Display that cute lil comment bubble.

The comments list table suffers from "wall of text" problems, which the two plain text links compounded.

props obenland. fixes #33149.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/list-tables.css

    r33269 r33490  
    1616}
    1717
    18 .column-response .post-com-count .screen-reader-text {
    19     position: static;
    20     width: auto;
    21     height: auto;
    22     margin: 0;
    23 }
    24 
    25 .column-response .post-com-count [aria-hidden="true"] {
    26     display: none;
    27 }
    28 
    2918.post-com-count-wrapper strong {
    3019    font-weight: 400;
    31 }
    32 
    33 .column-response .post-com-count.post-com-count-pending {
    34     color: #bb2a2a;
    3520}
    3621
     
    4025}
    4126
     27.column-response .post-com-count-wrapper,
    4228.column-comments .post-com-count-wrapper {
    4329    white-space: nowrap;
     
    4632
    4733/* comments bubble common */
     34.column-response .post-com-count,
    4835.column-comments .post-com-count {
    4936    display: inline-block;
     
    5138}
    5239
    53 .column-response .post-com-count {
    54     display: block;
    55 }
    56 
    5740/* comments bubble approved */
     41.column-response .post-com-count-no-comments,
     42.column-response .post-com-count-approved,
    5843.column-comments .post-com-count-no-comments,
    5944.column-comments .post-com-count-approved {
     
    6146}
    6247
     48.column-response .comment-count-no-comments,
     49.column-response .comment-count-approved,
    6350.column-comments .comment-count-no-comments,
    6451.column-comments .comment-count-approved {
     
    7966}
    8067
     68.ie8 .column-response .comment-count-no-comments,
     69.ie8 .column-response .comment-count-approved,
    8170.ie8 .column-comments .comment-count-no-comments,
    8271.ie8 .column-comments .comment-count-approved {
     
    8473}
    8574
     75.column-response .post-com-count-no-comments:after,
     76.column-response .post-com-count-approved:after,
    8677.column-comments .post-com-count-no-comments:after,
    8778.column-comments .post-com-count-approved:after {
     
    9586}
    9687
     88.column-response .post-com-count-approved:hover .comment-count-approved,
     89.column-response .post-com-count-approved:focus .comment-count-approved,
    9790.column-comments .post-com-count-approved:hover .comment-count-approved,
    9891.column-comments .post-com-count-approved:focus .comment-count-approved {
     
    10093}
    10194
     95.column-response .post-com-count-approved:hover:after,
     96.column-response .post-com-count-approved:focus:after,
    10297.column-comments .post-com-count-approved:hover:after,
    10398.column-comments .post-com-count-approved:focus:after {
     
    106101
    107102/* comments bubble pending */
     103.column-response .post-com-count-pending,
    108104.column-comments .post-com-count-pending {
    109105    position: relative;
     
    207203.commentlist .avatar {
    208204    vertical-align: text-top;
    209 }
    210 
    211 #the-comment-list .attachment-80x60 {
    212     padding: 4px 8px;
    213205}
    214206
     
    18551847    }
    18561848
     1849    .column-response .post-com-count-no-comments:after,
     1850    .column-response .post-com-count-approved:after,
    18571851    .column-comments .post-com-count-no-comments:after,
    18581852    .column-comments .post-com-count-approved:after {
     
    18601854    }
    18611855
     1856    .column-response .post-com-count [aria-hidden="true"],
    18621857    .column-comments .post-com-count [aria-hidden="true"] {
    18631858        display: none;
    18641859    }
    18651860
     1861    .column-response .post-com-count-wrapper,
    18661862    .column-comments .post-com-count-wrapper {
    18671863        white-space: normal;
    18681864    }
    18691865
     1866    .column-response .post-com-count-wrapper > a,
    18701867    .column-comments .post-com-count-wrapper > a {
    18711868        display: block;
    18721869    }
    18731870
     1871    .column-response .post-com-count-no-comments,
     1872    .column-response .post-com-count-approved,
    18741873    .column-comments .post-com-count-no-comments,
    18751874    .column-comments .post-com-count-approved {
     
    18781877    }
    18791878
     1879    .column-response .post-com-count-pending,
    18801880    .column-comments .post-com-count-pending {
    18811881        position: static;
     
    18931893    }
    18941894
     1895    .column-response .post-com-count-pending:hover,
    18951896    .column-comments .post-com-count-pending:hover {
    18961897        color: #dc3232;
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r33436 r33490  
    688688
    689689        echo '<div class="response-links">';
     690        if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) {
     691            echo $thumb;
     692        }
    690693        echo $post_link;
    691694        $post_type_object = get_post_type_object( $post->post_type );
    692695        echo "<a href='" . get_permalink( $post->ID ) . "' class='comments-view-item-link'>" . $post_type_object->labels->view_item . '</a>';
    693         if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) {
    694             echo $thumb;
    695         }
    696         echo '</div>';
    697696        echo '<span class="post-com-count-wrapper">';
    698697        $this->comments_bubble( $post->ID, $pending_comments );
    699698        echo '</span> ';
     699        echo '</div>';
    700700    }
    701701
Note: See TracChangeset for help on using the changeset viewer.