WordPress.org

Make WordPress Core

Changeset 13434


Ignore:
Timestamp:
02/26/2010 07:06:09 PM (8 years ago)
Author:
nacin
Message:

Add comment_duplicate_trigger hook that is fired when a duplicate comment is detected. Fixes #12188

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r13382 r13434  
    532532 * @uses $wpdb
    533533 * @uses apply_filters() Calls 'pre_comment_approved' hook on the type of comment
     534 * @uses apply_filters() Calls 'comment_duplicate_trigger' hook on commentdata.
    534535 * @uses do_action() Calls 'check_comment_flood' hook on $comment_author_IP, $comment_author_email, and $comment_date_gmt
    535536 *
     
    548549    $dupe .= ") AND comment_content = '$comment_content' LIMIT 1";
    549550    if ( $wpdb->get_var($dupe) ) {
     551        do_action( 'comment_duplicate_trigger', $commentdata );
    550552        if ( defined('DOING_AJAX') )
    551553            die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
Note: See TracChangeset for help on using the changeset viewer.