Changeset 48050
- Timestamp:
- 06/15/2020 11:04:27 PM (4 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/comment.php
r47785 r48050 35 35 $action = 'trash'; 36 36 } 37 } 38 39 // Prevent actions on a comment associated with a trashed post. 40 $comment_id = absint( $_GET['c'] ); 41 $comment = get_comment( $comment_id ); 42 43 if ( 'trash' === get_post_status( $comment->comment_post_ID ) ) { 44 wp_die( 45 __( 'You can’t edit this comment because the associated post is in the Trash. Please restore the post first, then try again.' ) 46 ); 37 47 } 38 48 … … 61 71 require_once ABSPATH . 'wp-admin/admin-header.php'; 62 72 63 $comment_id = absint( $_GET['c'] );64 65 $comment = get_comment( $comment_id );66 73 if ( ! $comment ) { 67 74 comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'javascript:history.go(-1)' ) ); … … 88 95 $title = __( 'Moderate Comment' ); 89 96 90 $comment_id = absint( $_GET['c'] );91 92 $comment = get_comment( $comment_id );93 97 if ( ! $comment ) { 94 98 wp_redirect( admin_url( 'edit-comments.php?error=1' ) ); -
trunk/src/wp-admin/css/list-tables.css
r47879 r48050 76 76 } 77 77 78 .column-response .post-com-count-approved:hover .comment-count-approved,79 .column-response .post-com-count-approved:focus .comment-count-approved,80 .column-comments .post-com-count-approved:hover .comment-count-approved,81 .column-comments .post-com-count-approved:focus .comment-count-approved {78 .column-response a.post-com-count-approved:hover .comment-count-approved, 79 .column-response a.post-com-count-approved:focus .comment-count-approved, 80 .column-comments a.post-com-count-approved:hover .comment-count-approved, 81 .column-comments a.post-com-count-approved:focus .comment-count-approved { 82 82 background: #0073aa; 83 83 } 84 84 85 .column-response .post-com-count-approved:hover:after,86 .column-response .post-com-count-approved:focus:after,87 .column-comments .post-com-count-approved:hover:after,88 .column-comments .post-com-count-approved:focus:after {85 .column-response a.post-com-count-approved:hover:after, 86 .column-response a.post-com-count-approved:focus:after, 87 .column-comments a.post-com-count-approved:hover:after, 88 .column-comments a.post-com-count-approved:focus:after { 89 89 border-top-color: #0073aa; 90 90 } -
trunk/src/wp-admin/includes/class-wp-list-table.php
r47915 r48050 683 683 ); 684 684 685 // No comments at all.686 685 if ( ! $approved_comments && ! $pending_comments ) { 686 // No comments at all. 687 687 printf( 688 688 '<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>', 689 689 __( 'No comments' ) 690 690 ); 691 // Approved comments have different display depending on some conditions. 691 } elseif ( $approved_comments && 'trash' === get_post_status( $post_id ) ) { 692 // Don't link the comment bubble for a trashed post. 693 printf( 694 '<span 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></span>', 695 $approved_comments_number, 696 $pending_comments ? $approved_phrase : $approved_only_phrase 697 ); 692 698 } elseif ( $approved_comments ) { 699 // Link the comment bubble to approved comments. 693 700 printf( 694 701 '<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>', … … 706 713 ); 707 714 } else { 715 // Don't link the comment bubble when there are no approved comments. 708 716 printf( 709 717 '<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>',
Note: See TracChangeset
for help on using the changeset viewer.