Ticket #29991: 29991.4.diff
File 29991.4.diff, 3.7 KB (added by , 10 years ago) |
---|
-
wp-admin/includes/class-wp-comments-list-table.php
489 489 echo '<div class="row-actions">'; 490 490 foreach ( $actions as $action => $link ) { 491 491 ++$i; 492 ( ( ( 'approve' == $action || 'unapprove' == $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' |';492 ( ( ( 'approve' == $action || 'unapprove' == $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' <span class="sep">|</span> '; 493 493 494 494 // Reply and quickedit need a hide-if-no-js span when not added with ajax 495 495 if ( ( 'reply' == $action || 'quickedit' == $action ) && ! defined('DOING_AJAX') ) … … 505 505 } 506 506 echo '</div>'; 507 507 } 508 509 echo '<div class="comment-response">'; 510 _e( 'In Response To:', 'post title' ); 511 echo ' ' . $this->get_comment_post_link(); 512 $this->comments_bubble( $post->ID, $pending_comments ); 513 echo '</div>'; 508 514 } 509 515 510 516 public function column_author( $comment ) { … … 542 548 return get_comment_date( __( 'Y/m/d \a\t g:ia' ) ); 543 549 } 544 550 551 protected function get_comment_post_link() { 552 if ( current_user_can( 'edit_post', $post->ID ) ) { 553 $post_link = "<a class='comment-post-link' href='" . get_edit_post_link( $post->ID ) . "'>"; 554 $post_link .= get_the_title( $post->ID ) . '</a>'; 555 } else { 556 $post_link = get_the_title( $post->ID ); 557 } 558 559 return $post_link; 560 } 561 545 562 public function column_response() { 546 563 $post = get_post(); 547 564 … … 552 569 $pending_comments = $this->pending_count[$post->ID] = $_pending_count_temp[$post->ID]; 553 570 } 554 571 555 if ( current_user_can( 'edit_post', $post->ID ) ) {556 $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "'>";557 $post_link .= get_the_title( $post->ID ) . '</a>';558 } else {559 $post_link = get_the_title( $post->ID );560 }561 562 572 echo '<div class="response-links"><span class="post-com-count-wrapper">'; 563 echo $ post_link . '<br />';573 echo $this->get_comment_post_link(); 564 574 $this->comments_bubble( $post->ID, $pending_comments ); 565 575 echo '</span> '; 566 576 $post_type_object = get_post_type_object( $post->post_type ); -
wp-admin/css/list-tables.css
74 74 float: left; 75 75 } 76 76 77 .comment-post-link { 78 display: block; 79 } 80 77 81 /* comments */ 78 82 79 83 .commentlist li { … … 267 271 width: 74px; 268 272 } 269 273 270 .fixed .column-comment .comment-author { 274 .fixed .column-comment .comment-author, 275 .fixed .column-comment .comment-response { 271 276 display: none; 272 277 } 273 278 … … 1574 1579 .users .column-email, 1575 1580 .users .column-name, 1576 1581 .sites .column-registered, 1577 .sites .column-users { 1582 .sites .column-users, 1583 .comments .column-response { 1578 1584 display: none; 1579 1585 } 1580 1586 1581 .fixed .column-comment .comment-author { 1587 .fixed .column-comment .comment-author, 1588 .fixed .column-comment .comment-response { 1582 1589 display: block; 1583 1590 } 1584 1591 1592 .fixed .column-comment .comment-response { 1593 margin-top: 0.6em; 1594 } 1595 1596 .fixed .column-comment .response-links { 1597 float: none; 1598 } 1599 1600 .fixed .column-comment .comment-post-link { 1601 display: inline; 1602 white-space: nowrap; 1603 text-overflow: ellipsis; 1604 } 1605 1606 .fixed .column-comment .post-com-count { 1607 display: inline-block; 1608 margin-left: 0.5em; 1609 } 1610 1611 #commentsdiv .inside .row-actions, 1612 .comment .row-actions { 1613 line-height: 26px; 1614 } 1615 1616 .comment .row-actions > span { 1617 margin-right: 0.5em; 1618 } 1619 1620 .comment .row-actions a { 1621 white-space: nowrap; 1622 } 1623 1624 .comment .row-actions .sep { 1625 margin-right: 0.5em; 1626 } 1627 1585 1628 /* Posts */ 1586 1629 .column-title { 1587 1630 width: 85%;