Ticket #11426: 11426.diff
File 11426.diff, 3.2 KB (added by , 15 years ago) |
---|
-
wp-admin/comment.php
76 76 if ( 'spam' == $_GET['dt'] ) { 77 77 $caution_msg = __('You are about to mark the following comment as spam:'); 78 78 $button = __('Spam Comment'); 79 } elseif ( 'trash' == $_GET['dt'] ) { 80 $caution_msg = __('You are about to move the following comment to the Trash:'); 81 $button = __('Trash Comment'); 79 82 } elseif ( 'cdc' == $action ) { 80 83 $caution_msg = __('You are about to delete the following comment:'); 81 84 $button = __('Delete Comment'); … … 102 105 <input type='hidden' name='action' value='<?php echo esc_attr($formaction); ?>' /> 103 106 <?php if ( 'spam' == $_GET['dt'] ) { ?> 104 107 <input type='hidden' name='dt' value='spam' /> 108 <?php } elseif ( 'trash' == $_GET['dt'] ) { ?> 109 <input type='hidden' name='dt' value='trash' /> 105 110 <?php } ?> 106 111 <input type='hidden' name='p' value='<?php echo esc_attr($comment->comment_post_ID); ?>' /> 107 112 <input type='hidden' name='c' value='<?php echo esc_attr($comment->comment_ID); ?>' /> … … 152 157 comment_footer_die( __('You are not allowed to edit comments on this post.') ); 153 158 154 159 if ( 'spam' == $_REQUEST['dt'] ) 155 wp_set_comment_status( $comment->comment_ID, 'spam' ); 160 wp_spam_comment( $comment->comment_ID ); 161 elseif ( 'trash' == $_REQUEST['dt'] ) 162 wp_trash_comment( $comment->comment_ID ); 156 163 else 157 164 wp_delete_comment( $comment->comment_ID ); 158 165 -
wp-includes/pluggable.php
1017 1017 $subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title ); 1018 1018 } 1019 1019 $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"; 1020 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n"; 1020 if ( EMPTY_TRASH_DAYS ) 1021 $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=cdc&dt=trash&c=$comment_id") ) . "\r\n"; 1022 else 1023 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n"; 1021 1024 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n"; 1022 1025 1023 1026 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); … … 1102 1105 } 1103 1106 1104 1107 $notify_message .= sprintf( __('Approve it: %s'), admin_url("comment.php?action=mac&c=$comment_id") ) . "\r\n"; 1105 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n"; 1108 if ( EMPTY_TRASH_DAYS ) 1109 $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=cdc&dt=trash&c=$comment_id") ) . "\r\n"; 1110 else 1111 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n"; 1106 1112 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n"; 1107 1113 1108 1114 $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:',