Ticket #32152: 32152.4.diff
| File 32152.4.diff, 10.7 KB (added by , 11 years ago) |
|---|
-
wp-admin/css/list-tables.css
1 /* List table styles */2 .post-com-count-wrapper {3 min-width: 22px;4 }5 1 6 .post-com-count { 7 background: none; 8 height: 1.3em; 9 line-height: 1.1em; 2 .response-links { 10 3 display: block; 11 text-decoration: none; 12 padding: 0 0 6px; 13 cursor: pointer; 14 background-position: center -80px; 15 background-repeat: no-repeat; 16 color: #fff; 4 margin-bottom: 12px; 17 5 } 18 6 19 .post-com-count:after { /* draw bubble connector using CSS! */ 20 content: ""; 7 .response-links a { 21 8 display: block; 22 width: 0;23 height: 0;24 margin-left: 8px;25 border-top: 5px solid #b4b9be;26 border-right: 5px solid transparent;27 9 } 28 10 29 .post-com-count span { 30 font-size: 11px; 11 .response-links a.comments-edit-item-link { 31 12 font-weight: 600; 32 height: 1.4em;33 line-height: 1.4em;34 min-width: 0.7em;35 padding: 0 6px;36 display: inline-block;37 -webkit-border-radius: 5px;38 border-radius: 5px;39 background-color: #b4b9be;40 color: #fff;41 13 } 42 14 43 . post-com-count:hover{44 background-position: center -3px;15 .response-links a.comments-view-item-link { 16 font-size: 12px; 45 17 } 46 18 47 .post-com-count:hover span { 48 background-color: #00a0d2; 19 .column-response .post-com-count .screen-reader-text { 20 position: static; 21 width: auto; 22 height: auto; 23 margin: 0; 49 24 } 50 25 51 . post-com-count:hover:after{52 border-top: 5px solid #00a0d2;26 .column-response .post-com-count [aria-hidden="true"] { 27 display: none; 53 28 } 54 29 55 strong .post-com-count{56 background-position: center -55px;30 .column-response .post-com-count-wrapper strong { 31 font-weight: 400; 57 32 } 58 33 59 strong .post-com-count span{60 background-color: #0073aa;34 .column-response .post-com-count.post-com-count-pending { 35 color: #bf461d; 61 36 } 62 37 63 strong .post-com-count:after{64 border-top: 5px solid #0073aa;38 .post-com-count { 39 display: block; 65 40 } 66 41 67 .column-response .post-com-count { 68 float: left; 69 margin-right: 5px; 70 text-align: center; 42 .fixed .column-comments { 43 width: 14em; 71 44 } 72 45 73 .response-links { 74 float: left; 46 .comments-view-item-link { 47 display: inline-block; 48 clear: both; 75 49 } 76 50 51 .ie8 .post-com-count .screen-reader-text { 52 position: static; 53 width: auto; 54 height: auto; 55 margin: 0; 56 } 57 58 .ie8 .post-com-count [aria-hidden="true"] { 59 display: none; 60 } 61 62 .ie8 .post-com-count-wrapper strong { 63 font-weight: 400; 64 } 65 66 .ie8 .post-com-count.post-com-count-pending { 67 color: #bf461d; 68 } 69 70 @media screen and ( max-width: 782px ) { 71 .post-com-count .screen-reader-text { 72 position: static; 73 width: auto; 74 height: auto; 75 margin: 0; 76 } 77 78 .post-com-count [aria-hidden="true"] { 79 display: none; 80 } 81 82 .post-com-count-wrapper strong { 83 font-weight: 400; 84 } 85 86 .column-comments .post-com-count.post-com-count-pending { 87 color: #bf461d; 88 } 89 } 90 91 @media screen and ( min-width: 782px ) { 92 .fixed .column-comments { 93 width: 4em; 94 } 95 96 /* List table styles */ 97 .column-comments .post-com-count-wrapper, 98 .column-comments .post-com-count-wrapper .has-pending { 99 float: left; 100 } 101 102 .column-comments .post-com-count { 103 float: right; 104 background: none; 105 text-decoration: none; 106 color: #fff; 107 margin-top: 5px; 108 } 109 110 .column-comments .post-com-count-no-comments:after, 111 .column-comments .post-com-count-approved:after { 112 content: ""; 113 display: block; 114 width: 0; 115 height: 0; 116 margin-left: 8px; 117 border-top: 5px solid #72777c; 118 border-right: 5px solid transparent; 119 } 120 121 .column-comments .comment-count-pending { 122 display: none; 123 } 124 125 .column-comments .comment-count-no-comments, 126 .column-comments .comment-count-approved, 127 .column-comments .has-pending .comment-count-pending { 128 display: block; 129 font-weight: 400; 130 vertical-align: top; 131 overflow: hidden; 132 -webkit-box-sizing: border-box; 133 -moz-box-sizing: border-box; 134 box-sizing: border-box; 135 } 136 137 .column-comments .comment-count-no-comments, 138 .column-comments .comment-count-approved { 139 min-width: 24px; 140 height: 2em; 141 padding: 0 8px; 142 line-height: 1.90909090; /* 1.92857142 */ 143 font-size: 11px; 144 text-align: center; 145 background-color: #72777c; 146 color: #fff; 147 -webkit-border-radius: 5px; 148 border-radius: 5px; 149 } 150 151 .column-comments .has-pending .comment-count-pending { 152 position: relative; 153 top: -4px; 154 left: -3px; 155 min-width: 21px; 156 height: 21px; 157 border: 2px solid #fff; 158 padding: 0 5px; 159 line-height: 17px; 160 font-size: 9px; 161 font-weight: 400; 162 text-align: center; 163 background: #ca4a1f; 164 color: #fff; 165 -webkit-border-radius: 50%; 166 border-radius: 50%; 167 } 168 169 .column-comments .post-com-count-pending:focus { 170 outline: none; 171 -webkit-box-shadow: none; 172 box-shadow: none; 173 } 174 175 .column-comments .post-com-count-approved:hover .comment-count-approved, 176 .column-comments .post-com-count-approved:focus .comment-count-approved { 177 background: #0073aa; 178 } 179 180 .column-comments .post-com-count-approved:hover:after, 181 .column-comments .post-com-count-approved:focus:after { 182 border-top-color: #0073aa; 183 } 184 185 .column-comments .post-com-count-pending:hover .comment-count-pending, 186 .column-comments .post-com-count-pending:focus .comment-count-pending { 187 -webkit-box-shadow: 188 0 0 0 1px #5b9dd9, 189 0 1px 2px 1px rgba(30, 140, 190, .8); 190 box-shadow: 191 0 0 0 1px #5b9dd9, 192 0 1px 2px 1px rgba(30, 140, 190, .8); 193 } 194 } 195 77 196 /* comments */ 78 197 79 198 .commentlist li { … … 283 402 } 284 403 285 404 .fixed .column-comments { 286 width: 4em;287 405 padding: 8px 0; 288 406 text-align: left; 289 407 } … … 292 410 padding-left: 3px; 293 411 } 294 412 295 .fixed .column-comments a {296 float: left;297 }298 299 413 /* Media file column */ 300 414 table.media .column-title { 301 415 position: relative; -
wp-admin/includes/class-wp-comments-list-table.php
674 674 } 675 675 676 676 if ( current_user_can( 'edit_post', $post->ID ) ) { 677 $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "' >";677 $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "' class='comments-edit-item-link'>"; 678 678 $post_link .= esc_html( get_the_title( $post->ID ) ) . '</a>'; 679 679 } else { 680 680 $post_link = esc_html( get_the_title( $post->ID ) ); 681 681 } 682 682 683 echo '<div class="response-links"><span class="post-com-count-wrapper">'; 684 echo $post_link . '<br />'; 683 echo '<div class="response-links">'; 684 echo $post_link; 685 $post_type_object = get_post_type_object( $post->post_type ); 686 echo "<a href='" . get_permalink( $post->ID ) . "' class='comments-view-item-link'>" . $post_type_object->labels->view_item . '</a>'; 687 if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) 688 echo $thumb; 689 echo '</div>'; 690 echo '<span class="post-com-count-wrapper">'; 685 691 $this->comments_bubble( $post->ID, $pending_comments ); 686 692 echo '</span> '; 687 $post_type_object = get_post_type_object( $post->post_type ); 688 echo "<a href='" . get_permalink( $post->ID ) . "'>" . $post_type_object->labels->view_item . '</a>'; 689 echo '</div>'; 690 if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) 691 echo $thumb; 693 694 695 692 696 } 693 697 694 698 /** -
wp-admin/includes/class-wp-list-table.php
13 13 /** 14 14 * The current list of items 15 15 * 16 * @since 3.1.0 16 * @since 3.1.0 17 17 * @var array 18 18 * @access public 19 19 */ … … 612 612 * @param int $pending_comments Number of pending comments. 613 613 */ 614 614 protected function comments_bubble( $post_id, $pending_comments ) { 615 $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) ); 615 $approved_comments = get_comments_number(); 616 $approved_comments_number = number_format_i18n( $approved_comments ); 617 $pending_comments_number = number_format_i18n( $pending_comments ); 618 $total_phrase = sprintf( _n( '%s comment', '%s comments', $approved_comments ), $approved_comments_number ); 619 $approved_phrase = sprintf( _n( '%s approved comment', '%s approved comments', $approved_comments ), $approved_comments_number ); 620 $pending_phrase = sprintf( _n( '%s pending comment', '%s pending comments', $pending_comments ), $pending_comments_number ); 616 621 617 if ( $pending_comments ) 618 echo '<strong>'; 622 if ( $pending_comments ) { 623 echo '<strong class="has-pending">'; 624 } 619 625 620 echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>"; 626 $no_comments_output = sprintf( '<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>', 627 $approved_comments_number, 628 $pending_comments ? __( 'No approved comments' ) : __( 'No comments' ) 629 ); 621 630 622 if ( $pending_comments ) 631 $total_comments_output = sprintf( '<a href="%s" class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 632 esc_url( add_query_arg( array( 'p' => $post_id, 'comment_status' => 'approved' ), admin_url( 'edit-comments.php' ) ) ), 633 $approved_comments_number, 634 $total_phrase 635 ); 636 637 $approved_comments_output = sprintf( '<a href="%s" class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 638 esc_url( add_query_arg( array( 'p' => $post_id, 'comment_status' => 'approved' ), admin_url( 'edit-comments.php' ) ) ), 639 $approved_comments_number, 640 $approved_phrase 641 ); 642 643 $pending_comments_output = sprintf( '<a href="%s" class="post-com-count post-com-count-pending"><span class="comment-count-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 644 esc_url( add_query_arg( array( 'p' => $post_id, 'comment_status' => 'moderated' ), admin_url( 'edit-comments.php' ) ) ), 645 $pending_comments_number, 646 $pending_phrase 647 ); 648 649 if ( $pending_comments_number ) { 650 echo $pending_comments_output; 651 } 652 653 if ( $approved_comments_number && $pending_comments ) { 654 655 echo $approved_comments_output; 656 657 } elseif ( $approved_comments_number ) { 658 659 echo $total_comments_output; 660 661 } else { 662 echo $no_comments_output; 663 } 664 665 if ( $pending_comments ) { 623 666 echo '</strong>'; 667 } 624 668 } 625 669 626 670 /**