Changeset 58888
- Timestamp:
- 08/12/2024 09:26:27 PM (4 months ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-comments-list-table.php
r58883 r58888 706 706 $output = ''; 707 707 708 $ del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID") );709 $ approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID") );710 711 $ url = "comment.php?c=$comment->comment_ID";712 713 $approve_url = esc_url( $url . "&action=approvecomment&$approve_nonce");714 $unapprove_url = esc_url( $url . "&action=unapprovecomment&$approve_nonce");715 $spam_url = esc_url( $url . "&action=spamcomment&$del_nonce");716 $unspam_url = esc_url( $url . "&action=unspamcomment&$del_nonce");717 $trash_url = esc_url( $url . "&action=trashcomment&$del_nonce");718 $untrash_url = esc_url( $url . "&action=untrashcomment&$del_nonce");719 $delete_url = esc_url( $url . "&action=deletecomment&$del_nonce");708 $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( 'approve-comment_' . $comment->comment_ID ) ); 709 $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( 'delete-comment_' . $comment->comment_ID ) ); 710 711 $action_string = 'comment.php?action=%s&c=' . $comment->comment_ID . '&%s'; 712 713 $approve_url = sprintf( $action_string, 'approvecomment', $approve_nonce ); 714 $unapprove_url = sprintf( $action_string, 'unapprovecomment', $approve_nonce ); 715 $spam_url = sprintf( $action_string, 'spamcomment', $del_nonce ); 716 $unspam_url = sprintf( $action_string, 'unspamcomment', $del_nonce ); 717 $trash_url = sprintf( $action_string, 'trashcomment', $del_nonce ); 718 $untrash_url = sprintf( $action_string, 'untrashcomment', $del_nonce ); 719 $delete_url = sprintf( $action_string, 'deletecomment', $del_nonce ); 720 720 721 721 // Preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash. … … 738 738 $actions['unapprove'] = sprintf( 739 739 '<a href="%s" data-wp-lists="%s" class="vim-u vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 740 $unapprove_url,740 esc_url( $unapprove_url ), 741 741 "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=unapproved", 742 742 esc_attr__( 'Unapprove this comment' ), … … 746 746 $actions['approve'] = sprintf( 747 747 '<a href="%s" data-wp-lists="%s" class="vim-a vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 748 $approve_url,748 esc_url( $approve_url ), 749 749 "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=approved", 750 750 esc_attr__( 'Approve this comment' ), … … 755 755 $actions['approve'] = sprintf( 756 756 '<a href="%s" data-wp-lists="%s" class="vim-a aria-button-if-js" aria-label="%s">%s</a>', 757 $approve_url,757 esc_url( $approve_url ), 758 758 "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved", 759 759 esc_attr__( 'Approve this comment' ), … … 763 763 $actions['unapprove'] = sprintf( 764 764 '<a href="%s" data-wp-lists="%s" class="vim-u aria-button-if-js" aria-label="%s">%s</a>', 765 $unapprove_url,765 esc_url( $unapprove_url ), 766 766 "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=unapproved", 767 767 esc_attr__( 'Unapprove this comment' ), … … 773 773 $actions['spam'] = sprintf( 774 774 '<a href="%s" data-wp-lists="%s" class="vim-s vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 775 $spam_url,775 esc_url( $spam_url ), 776 776 "delete:the-comment-list:comment-{$comment->comment_ID}::spam=1", 777 777 esc_attr__( 'Mark this comment as spam' ), … … 782 782 $actions['unspam'] = sprintf( 783 783 '<a href="%s" data-wp-lists="%s" class="vim-z vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 784 $unspam_url,784 esc_url( $unspam_url ), 785 785 "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:unspam=1", 786 786 esc_attr__( 'Restore this comment from the spam' ), … … 792 792 $actions['untrash'] = sprintf( 793 793 '<a href="%s" data-wp-lists="%s" class="vim-z vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 794 $untrash_url,794 esc_url( $untrash_url ), 795 795 "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:untrash=1", 796 796 esc_attr__( 'Restore this comment from the Trash' ), … … 802 802 $actions['delete'] = sprintf( 803 803 '<a href="%s" data-wp-lists="%s" class="delete vim-d vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 804 $delete_url,804 esc_url( $delete_url ), 805 805 "delete:the-comment-list:comment-{$comment->comment_ID}::delete=1", 806 806 esc_attr__( 'Delete this comment permanently' ), … … 810 810 $actions['trash'] = sprintf( 811 811 '<a href="%s" data-wp-lists="%s" class="delete vim-d vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 812 $trash_url,812 esc_url( $trash_url ), 813 813 "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", 814 814 esc_attr__( 'Move this comment to the Trash' ), -
trunk/src/wp-admin/includes/dashboard.php
r58883 r58888 727 727 ); 728 728 729 $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); 730 $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); 731 732 $approve_url = esc_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); 733 $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); 734 $spam_url = esc_url( "comment.php?action=spamcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 735 $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 736 $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 729 $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( 'approve-comment_' . $comment->comment_ID ) ); 730 $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( 'delete-comment_' . $comment->comment_ID ) ); 731 732 $action_string = 'comment.php?action=%s&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID . '&%s'; 733 734 $approve_url = sprintf( $action_string, 'approvecomment', $approve_nonce ); 735 $unapprove_url = sprintf( $action_string, 'unapprovecomment', $approve_nonce ); 736 $spam_url = sprintf( $action_string, 'spamcomment', $del_nonce ); 737 $trash_url = sprintf( $action_string, 'trashcomment', $del_nonce ); 738 $delete_url = sprintf( $action_string, 'deletecomment', $del_nonce ); 737 739 738 740 $actions['approve'] = sprintf( 739 741 '<a href="%s" data-wp-lists="%s" class="vim-a aria-button-if-js" aria-label="%s">%s</a>', 740 $approve_url,742 esc_url( $approve_url ), 741 743 "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved", 742 744 esc_attr__( 'Approve this comment' ), … … 746 748 $actions['unapprove'] = sprintf( 747 749 '<a href="%s" data-wp-lists="%s" class="vim-u aria-button-if-js" aria-label="%s">%s</a>', 748 $unapprove_url,750 esc_url( $unapprove_url ), 749 751 "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=unapproved", 750 752 esc_attr__( 'Unapprove this comment' ), … … 769 771 $actions['spam'] = sprintf( 770 772 '<a href="%s" data-wp-lists="%s" class="vim-s vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 771 $spam_url,773 esc_url( $spam_url ), 772 774 "delete:the-comment-list:comment-{$comment->comment_ID}::spam=1", 773 775 esc_attr__( 'Mark this comment as spam' ), … … 779 781 $actions['delete'] = sprintf( 780 782 '<a href="%s" data-wp-lists="%s" class="delete vim-d vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 781 $delete_url,783 esc_url( $delete_url ), 782 784 "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", 783 785 esc_attr__( 'Delete this comment permanently' ), … … 787 789 $actions['trash'] = sprintf( 788 790 '<a href="%s" data-wp-lists="%s" class="delete vim-d vim-destructive aria-button-if-js" aria-label="%s">%s</a>', 789 $trash_url,791 esc_url( $trash_url ), 790 792 "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", 791 793 esc_attr__( 'Move this comment to the Trash' ),
Note: See TracChangeset
for help on using the changeset viewer.