Make WordPress Core


Ignore:
Timestamp:
07/10/2015 09:43:32 PM (11 years ago)
Author:
helen
Message:

List tables: Better accessibility and design for the comments bubble.

It is now plain text in the comments list table's "In Response To" column, where it was visually a bit confusing to have the bubble. For other list tables, it now shows a little notification bubble with the number of pending comments. The bubble and notification become plain text in the responsive list table view. It also shows no bubble when there are no comments at all, reducing some of the visual noise.

props picard102, afercia, karinchristen.
fixes #32152.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r33101 r33155  
    679679
    680680                if ( current_user_can( 'edit_post', $post->ID ) ) {
    681                         $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "'>";
     681                        $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "' class='comments-edit-item-link'>";
    682682                        $post_link .= esc_html( get_the_title( $post->ID ) ) . '</a>';
    683683                } else {
    … …  
    685685                }
    686686
    687                 echo '<div class="response-links"><span class="post-com-count-wrapper">';
    688                 echo $post_link . '<br />';
     687                echo '<div class="response-links">';
     688                echo $post_link;
     689                $post_type_object = get_post_type_object( $post->post_type );
     690                echo "<a href='" . get_permalink( $post->ID ) . "' class='comments-view-item-link'>" . $post_type_object->labels->view_item . '</a>';
     691                if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) {
     692                        echo $thumb;
     693                }
     694                echo '</div>';
     695                echo '<span class="post-com-count-wrapper">';
    689696                $this->comments_bubble( $post->ID, $pending_comments );
    690697                echo '</span> ';
    691                 $post_type_object = get_post_type_object( $post->post_type );
    692                 echo "<a href='" . get_permalink( $post->ID ) . "'>" . $post_type_object->labels->view_item . '</a>';
    693                 echo '</div>';
    694                 if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) )
    695                         echo $thumb;
    696698        }
    697699
Note: See TracChangeset for help on using the changeset viewer.