tags:

views:

28

answers:

2

Hi,

Does anyone know how to disable duplicate comment detection in Wordpress (2.9.2)? I'm looking for a way to do this programatically without editing core files. We're adding comments via XMLRPC and the duplicate detection in wp-includes/comment.php (line 494) is causing issues during testing.

Thanks!

+3  A: 

Currently, there are no hooks available to do this without editing core files.

The best way would be to comment out the duplicate check from wp-includes/comment.php

Adam
This means that if the same author writes more than one comment on the same post, it is considered a duplicate. Which is just plain wrong! But thanks for your answer.
codecowboy
A: 
    $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' ";
if ( $comment_author_email )
    $dupe .= "OR comment_author_email = '$comment_author_email' ";
$dupe .= ") AND comment_content = '$comment_content' LIMIT 1";
codecowboy