[wp-hackers] Comment Hook

Mark Jaquith mark.wordpress at txfx.net
Fri Nov 12 05:37:36 UTC 2004


If it's WP 1.2 or 1.2.1, you can't.  In WP 1.3, declare $approved global 
for the function and set $approved = 0;

Ammar Ibrahim wrote:

> I'm writing a plugin that should stop spammers.
>
> Now I found the hook to attach my file to, here's how it looks like
>
> function surble_spam_check($commentID) //this is the function that 
> should check to see if it's spam or not
>
> and then I have:
>
> //add the spam checker to the hook( 'comment_post' )
> add_action('comment_post', 'surble_spam_check');
>
>
> Now inside the function, how can I stop the comment from being posted? 
> How can I tell wordpress to put it for admin approval?
>
> Regards,
>    Ammar Ibrahim
>
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
>
>




More information about the hackers mailing list