Make WordPress Core

Ticket #33149: 33149.2.diff

File 33149.2.diff, 4.2 KB (added by obenland, 10 years ago)

No wrap for .column-response action links.

  • src/wp-admin/css/list-tables.css

     
    1 .response-links {
    2         display: block;
    3         margin-bottom: 1em;
    4 }
    5 
    6 .response-links a {
    7         display: block;
    8 }
    9 
    10 .response-links a.comments-edit-item-link {
    11         font-weight: 600;
    12 }
    13 
    14 .response-links a.comments-view-item-link {
    15         font-size: 12px;
    16 }
    17 
    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 
    291.post-com-count-wrapper strong {
    302        font-weight: 400;
    313}
    324
    33 .column-response .post-com-count.post-com-count-pending {
    34         color: #bb2a2a;
    35 }
    36 
    375.comments-view-item-link {
    386        display: inline-block;
    397        clear: both;
     
    5018        vertical-align: top;
    5119}
    5220
    53 .column-response .post-com-count {
    54         display: block;
    55 }
    56 
    5721/* comments bubble approved */
    5822.column-comments .post-com-count-no-comments,
    5923.column-comments .post-com-count-approved {
     
    255219    border-top: 1px solid rgba(0, 0, 0, 0.03);
    256220}
    257221
     222.wp-list-table.comments .column-response .row-actions a {
     223        white-space: nowrap;
     224}
     225
    258226/* table vim shortcuts */
    259227.vim-current,
    260228.vim-current th,
     
    313281        display: none;
    314282}
    315283
    316 .fixed .column-response,
    317284.fixed .column-categories,
    318285.fixed .column-tags,
    319286.fixed .column-rel,
     
    321288        width: 15%;
    322289}
    323290
     291.fixed .column-response,
    324292.fixed .column-slug {
    325293        width: 25%;
    326294}
     
    18411809                box-shadow: none;
    18421810        }
    18431811
    1844         #the-comment-list .is-expanded td:last-child {
     1812        #the-comment-list .is-expanded .column-response {
    18451813                -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    18461814                box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
     1815                padding: 8px 10px;
     1816        }
     1817
     1818        #the-comment-list .is-expanded .column-response::before {
     1819                left: auto;
     1820                overflow: auto;
     1821                position: relative;
     1822                width: auto;
    18471823        }
    18481824
    18491825        /* Show comment bubble as text instead */
  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    670670         * @access public
    671671         */
    672672        public function column_response() {
    673                 $post = get_post();
    674 
    675                 if ( isset( $this->pending_count[$post->ID] ) ) {
    676                         $pending_comments = $this->pending_count[$post->ID];
    677                 } else {
    678                         $_pending_count_temp = get_pending_comments_num( array( $post->ID ) );
    679                         $pending_comments = $this->pending_count[$post->ID] = $_pending_count_temp[$post->ID];
    680                 }
     673                $post      = get_post();
     674                $post_link = '<strong>' . esc_html( get_the_title( $post->ID ) ) . '</strong>';
    681675
    682676                if ( current_user_can( 'edit_post', $post->ID ) ) {
    683                         $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "' class='comments-edit-item-link'>";
    684                         $post_link .= esc_html( get_the_title( $post->ID ) ) . '</a>';
    685                 } else {
    686                         $post_link = esc_html( get_the_title( $post->ID ) );
     677                        $post_link = '<a href="' . get_edit_post_link( $post->ID ) . '" class="comments-edit-item-link">' . $post_link . '</a>';
    687678                }
    688679
    689                 echo '<div class="response-links">';
     680                $action_links = array(
     681                        sprintf( '<a href="%1$s">%2$s</a>', esc_url( get_permalink( $post->ID ) ), get_post_type_object( $post->post_type )->labels->view_item ),
     682                        sprintf( '<a href="%1$s">%2$s</a>', esc_url( add_query_arg( 'p', $post->ID, admin_url( 'edit-comments.php' ) ) ), __( 'Manage Comments' ) ),
     683                );
     684
    690685                echo $post_link;
    691                 $post_type_object = get_post_type_object( $post->post_type );
    692                 echo "<a href='" . get_permalink( $post->ID ) . "' class='comments-view-item-link'>" . $post_type_object->labels->view_item . '</a>';
     686
     687                echo '<div class="row-actions">';
     688                echo implode( ' | ', $action_links );
     689                echo '</div>';
     690
    693691                if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) {
    694692                        echo $thumb;
    695693                }
    696                 echo '</div>';
    697                 echo '<span class="post-com-count-wrapper">';
    698                 $this->comments_bubble( $post->ID, $pending_comments );
    699                 echo '</span> ';
    700694        }
    701695
    702696        /**