Ticket #11333: 11333.diff
File 11333.diff, 2.3 KB (added by , 15 years ago) |
---|
-
wp-comments-post.php
26 26 exit; 27 27 } elseif ( !comments_open($comment_post_ID) ) { 28 28 do_action('comment_closed', $comment_post_ID); 29 wp_die( __('Sorry, comments are closed for this item.') );29 wp_die( __('Sorry, comments are closed for this item.'), '', array('response' => 403) ); 30 30 } elseif ( in_array($status->post_status, array('draft', 'pending') ) ) { 31 31 do_action('comment_on_draft', $comment_post_ID); 32 32 exit; … … 58 58 } 59 59 } else { 60 60 if ( get_option('comment_registration') || 'private' == $status->post_status ) 61 wp_die( __('Sorry, you must be logged in to post a comment.') );61 wp_die( __('Sorry, you must be logged in to post a comment.'), '', array('response' => 403) ); 62 62 } 63 63 64 64 $comment_type = ''; 65 65 66 66 if ( get_option('require_name_email') && !$user->ID ) { 67 67 if ( 6 > strlen($comment_author_email) || '' == $comment_author ) 68 wp_die( __('Error: please fill the required fields (name, email).') );68 wp_die( __('Error: please fill the required fields (name, email).'), '', array('response' => 403) ); 69 69 elseif ( !is_email($comment_author_email)) 70 wp_die( __('Error: please enter a valid email address.') );70 wp_die( __('Error: please enter a valid email address.'), '', array('response' => 403) ); 71 71 } 72 72 73 73 if ( '' == $comment_content ) 74 wp_die( __('Error: please type a comment.') );74 wp_die( __('Error: please type a comment.'), '', array('response' => 403) ); 75 75 76 76 $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; 77 77 -
wp-includes/comment.php
501 501 if ( defined('DOING_AJAX') ) 502 502 die( __('Duplicate comment detected; it looks as though you’ve already said that!') ); 503 503 504 wp_die( __('Duplicate comment detected; it looks as though you’ve already said that!') );504 wp_die( __('Duplicate comment detected; it looks as though you’ve already said that!'), '', array('response' => 403) ); 505 505 } 506 506 507 507 do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt );