[wp-hackers] Spam comments on the old posts

Mark Jaquith mark.wordpress at txfx.net
Sat Sep 25 18:49:14 UTC 2004


>
>
>It's a good idea, don't get me wrong.  You might want to talk with the
>devs to get it integrated into the core since it *is* only 1/2 lines
>of code.
>

Personally, with regards to all the different solutions and hacks for 
managing comment spam, I think that it'd be really nice if we could hook 
in around here in comments-post.php:

>  68  if( check_comment <http://www.cenamayo.com/wpxref/_functions/check_comment.html>($author <http://www.cenamayo.com/wpxref/_variables/author.html>, $email <http://www.cenamayo.com/wpxref/_variables/email.html>, $url <http://www.cenamayo.com/wpxref/_variables/url.html>, $comment <http://www.cenamayo.com/wpxref/_variables/comment.html>, $user_ip <http://www.cenamayo.com/wpxref/_variables/user_ip.html>, $user_agent <http://www.cenamayo.com/wpxref/_variables/user_agent.html>) ) {
>  69      $approved <http://www.cenamayo.com/wpxref/_variables/approved.html> = 1;
>  70  } else {
>  71      $approved <http://www.cenamayo.com/wpxref/_variables/approved.html> = 0;
>  72  }
>
Line 73 should be:

>  73  do_action <http://www.cenamayo.com/wpxref/_functions/do_action.html>('comment_approval_check', $comment_ID <http://www.cenamayo.com/wpxref/_variables/comment_ID.html>);
>
a plugin called there could call global $approved, do its own logic 
(time calcs, 3rd party blacklist, etc), and then reset global $approved.

I've been adding that line myself for quite some time, and I think the 
plugin community could really do a lot if that hook were in 1.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/hackers_wordpress.org/attachments/20040925/56094e2b/attachment.htm


More information about the hackers mailing list