- Timestamp:
- 09/03/2019 12:39:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-comments-list-table.php
r45926 r45932 218 218 219 219 $stati = array( 220 /* translators: %s: all comments count*/220 /* translators: %s: Number of comments. */ 221 221 'all' => _nx_noop( 222 222 'All <span class="count">(%s)</span>', … … 225 225 ), // singular not used 226 226 227 /* translators: %s: current user's comments count*/227 /* translators: %s: Number of comments. */ 228 228 'mine' => _nx_noop( 229 229 'Mine <span class="count">(%s)</span>', … … 232 232 ), 233 233 234 /* translators: %s: pending comments count*/234 /* translators: %s: Number of comments. */ 235 235 'moderated' => _nx_noop( 236 236 'Pending <span class="count">(%s)</span>', … … 239 239 ), 240 240 241 /* translators: %s: approved comments count*/241 /* translators: %s: Number of comments. */ 242 242 'approved' => _nx_noop( 243 243 'Approved <span class="count">(%s)</span>', … … 246 246 ), 247 247 248 /* translators: %s: spam comments count*/248 /* translators: %s: Number of comments. */ 249 249 'spam' => _nx_noop( 250 250 'Spam <span class="count">(%s)</span>', … … 253 253 ), 254 254 255 /* translators: %s: trashed comments count*/255 /* translators: %s: Number of comments. */ 256 256 'trash' => _nx_noop( 257 257 'Trash <span class="count">(%s)</span>', … … 456 456 457 457 if ( ! $post_id ) { 458 /* translators: column name or table row header*/458 /* translators: Column name or table row header. */ 459 459 $columns['response'] = __( 'In Response To' ); 460 460 } … … 619 619 if ( $comment_status && 'all' != $comment_status ) { 620 620 if ( 'approved' === $the_comment_status ) { 621 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved' class='vim-u vim-destructive aria-button-if-js' aria-label='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 621 $actions['unapprove'] = sprintf( 622 '<a href="%s" data-wp-lists="%s" class="vim-u vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 623 $unapprove_url, 624 "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=unapproved", 625 esc_attr__( 'Unapprove this comment' ), 626 __( 'Unapprove' ) 627 ); 622 628 } elseif ( 'unapproved' === $the_comment_status ) { 623 $actions['approve'] = "<a href='$approve_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved' class='vim-a vim-destructive aria-button-if-js' aria-label='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 629 $actions['approve'] = sprintf( 630 '<a href="%s" data-wp-lists="%s" class="vim-a vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 631 $approve_url, 632 "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=approved", 633 esc_attr__( 'Approve this comment' ), 634 __( 'Approve' ) 635 ); 624 636 } 625 637 } else { 626 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a aria-button-if-js' aria-label='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 627 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u aria-button-if-js' aria-label='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 638 $actions['approve'] = sprintf( 639 '<a href="%s" data-wp-lists="%s" class="vim-a aria-button-if-js" aria-label="%s">%s</a>', 640 $approve_url, 641 "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved", 642 esc_attr__( 'Approve this comment' ), 643 __( 'Approve' ) 644 ); 645 646 $actions['unapprove'] = sprintf( 647 '<a href="%s" data-wp-lists="%s" class="vim-u aria-button-if-js" aria-label="%s">%s</a>', 648 $unapprove_url, 649 "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=unapproved", 650 esc_attr__( 'Unapprove this comment' ), 651 __( 'Unapprove' ) 652 ); 628 653 } 629 654 630 655 if ( 'spam' !== $the_comment_status ) { 631 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive aria-button-if-js' aria-label='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; 656 $actions['spam'] = sprinf( 657 '<a href="%s" data-wp-lists="%s" class="vim-s vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 658 $spam_url, 659 "delete:the-comment-list:comment-{$comment->comment_ID}::spam=1", 660 esc_attr__( 'Mark this comment as spam' ), 661 /* translators: "Mark as spam" link. */ 662 _x( 'Spam', 'verb' ) 663 ); 632 664 } elseif ( 'spam' === $the_comment_status ) { 633 $actions['unspam'] = "<a href='$unspam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1' class='vim-z vim-destructive aria-button-if-js' aria-label='" . esc_attr__( 'Restore this comment from the spam' ) . "'>" . _x( 'Not Spam', 'comment' ) . '</a>'; 665 $actions['unspam'] = sprintf( 666 '<a href="%s" data-wp-lists="%s" class="vim-z vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 667 $unspam_url, 668 "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:unspam=1", 669 esc_attr__( 'Restore this comment from the spam' ), 670 _x( 'Not Spam', 'comment' ) 671 ); 634 672 } 635 673 636 674 if ( 'trash' === $the_comment_status ) { 637 $actions['untrash'] = "<a href='$untrash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1' class='vim-z vim-destructive aria-button-if-js' aria-label='" . esc_attr__( 'Restore this comment from the Trash' ) . "'>" . __( 'Restore' ) . '</a>'; 675 $actions['untrash'] = sprintf( 676 '<a href="%s" data-wp-lists="%s" class="vim-z vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 677 $untrash_url, 678 "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:untrash=1", 679 esc_attr__( 'Restore this comment from the Trash' ), 680 __( 'Restore' ) 681 ); 638 682 } 639 683 640 684 if ( 'spam' === $the_comment_status || 'trash' === $the_comment_status || ! EMPTY_TRASH_DAYS ) { 641 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::delete=1' class='delete vim-d vim-destructive aria-button-if-js' aria-label='" . esc_attr__( 'Delete this comment permanently' ) . "'>" . __( 'Delete Permanently' ) . '</a>'; 685 $actions['delete'] = sprintf( 686 '<a href="%s" data-wp-lists="%s" class="delete vim-d vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 687 $delete_url, 688 "delete:the-comment-list:comment-{$comment->comment_ID}::delete=1", 689 esc_attr__( 'Delete this comment permanently' ), 690 __( 'Delete Permanently' ) 691 ); 642 692 } else { 643 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive aria-button-if-js' aria-label='" . esc_attr__( 'Move this comment to the Trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>'; 693 $actions['trash'] = sprintf( 694 '<a href="%s" data-wp-lists="%s" class="delete vim-d vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 695 $trash_url, 696 "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", 697 esc_attr__( 'Move this comment to the Trash' ), 698 _x( 'Trash', 'verb' ) 699 ); 644 700 } 645 701 646 702 if ( 'spam' !== $the_comment_status && 'trash' !== $the_comment_status ) { 647 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>" . __( 'Edit' ) . '</a>'; 703 $actions['edit'] = sprintf( 704 '<a href="%s" aria-label="%s">%s</a>', 705 "comment.php?action=editcomment&c={$comment->comment_ID}", 706 esc_attr__( 'Edit this comment' ), 707 __( 'Edit' ) 708 ); 648 709 649 710 $format = '<button type="button" data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s button-link" aria-expanded="false" aria-label="%s">%s</button>'; 650 711 651 $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'edit', 'vim-q comment-inline', esc_attr__( 'Quick edit this comment inline' ), __( 'Quick Edit' ) ); 652 653 $actions['reply'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) ); 712 $actions['quickedit'] = sprintf( 713 $format, 714 $comment->comment_ID, 715 $comment->comment_post_ID, 716 'edit', 717 'vim-q comment-inline', 718 esc_attr__( 'Quick edit this comment inline' ), 719 __( 'Quick Edit' ) 720 ); 721 722 $actions['reply'] = sprintf( 723 $format, 724 $comment->comment_ID, 725 $comment->comment_post_ID, 726 'replyto', 727 'vim-r comment-inline', 728 esc_attr__( 'Reply to this comment' ), 729 __( 'Reply' ) 730 ); 654 731 } 655 732 … … 709 786 $name = get_comment_author( $parent ); 710 787 printf( 711 /* translators: %s: comment link*/788 /* translators: %s: Comment link. */ 712 789 __( 'In reply to %s.' ), 713 790 '<a href="' . $parent_link . '">' . $name . '</a>' … … 787 864 public function column_date( $comment ) { 788 865 $submitted = sprintf( 789 /* translators: 1: comment date, 2: comment time*/866 /* translators: 1: Comment date, 2: Comment time. */ 790 867 __( '%1$s at %2$s' ), 791 /* translators: comment date format. See https://secure.php.net/date */868 /* translators: Comment date format. See https://secure.php.net/date */ 792 869 get_comment_date( __( 'Y/m/d' ), $comment ), 793 870 get_comment_date( __( 'g:i a' ), $comment )
Note: See TracChangeset
for help on using the changeset viewer.