[wp-hackers] Comment Hook

Ammar Ibrahim ammar at gnuix.com
Fri Nov 12 01:05:04 UTC 2004


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




More information about the hackers mailing list