diff --git a/wp-admin/comment.php b/wp-admin/comment.php index 557bcfd37b..bee82259ec 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -41,23 +41,27 @@ case 'editcomment': break; case 'confirmdeletecomment': +case 'mailapprovecomment': require_once('./admin-header.php'); $comment = (int) $_GET['comment']; $p = (int) $_GET['p']; + $formaction = 'confirmdeletecomment' == $action ? 'deletecomment' : 'approvecomment'; if ( ! $comment = get_comment($comment) ) die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) - die( __('You are not allowed to delete comments on this post.') ); + die( 'confirmdeletecomment' == $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); echo "
" . __('Caution: You are about to mark the following comment as spam:') . "
\n"; - else + elseif ( 'confirmdeletecomment' == $action ) echo "" . __('Caution: You are about to delete the following comment:') . "
\n"; + else + echo "" . __('Caution: You are about to approve the following comment:') . "
\n"; echo "" . __('Author:') . " | $comment->comment_author |
" . __('E-mail:') . " | $comment->comment_author_email |