WordPress.org

Make WordPress Core

Ticket #12188: comment.php.diff

File comment.php.diff, 1.4 KB (added by jeffstieler, 8 years ago)
  • wp-includes/comment.php

     
    547547                $dupe .= "OR comment_author_email = '$comment_author_email' ";
    548548        $dupe .= ") AND comment_content = '$comment_content' LIMIT 1";
    549549        if ( $wpdb->get_var($dupe) ) {
     550                $dupe_message = apply_filters('comment_duplicate_message', __('Duplicate comment detected; it looks as though you’ve already said that!'));
    550551                if ( defined('DOING_AJAX') )
    551                         die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
     552                        die( $dupe_message );
    552553
    553                 wp_die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
     554                wp_die( $dupe_message );
    554555        }
    555556
    556557        do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt );
     
    607608                if ( $flood_die ) {
    608609                        do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment);
    609610
     611                        $flood_message = apply_filters('comment_flood_message', __('You are posting comments too quickly.  Slow down.'));
     612
    610613                        if ( defined('DOING_AJAX') )
    611                                 die( __('You are posting comments too quickly.  Slow down.') );
     614                                die( $flood_message );
    612615
    613                         wp_die( __('You are posting comments too quickly.  Slow down.'), '', array('response' => 403) );
     616                        wp_die( $flood_message, '', array('response' => 403) );
    614617                }
    615618        }
    616619}