#action #discussion #filter #hook #quick tip #wp
When you post a comment to a wordpress site too fast after your previous comment, you get this blank page with a single line of text saying:
“You are posting comments too quickly. Slow down.”
WordPress has a so called comment flood prevention built in which prevents users (mostly spam bots) from submitting multiple comments too fast. Besides the usability fail caused by the blank page, there are situations where this preventive behaviour is unwelcome and you would like to disable it (think importing a bunch of comments programmatically, using the comments database table for something other than comments etc.). Personally I was experimenting with a technique where i save submitted form data as a comment to then check if Akismet marked it as spam.
Going through the code i found the function to be checking the result of the filter “comment_flood_filter”, before executing. Since this seemed rather undocumented in the codex or anywhere else, here’s how to disable the said comment flood prevention. Make sure you know what consequences this has for actual comment submissions.
Add this to your theme’s functions.php:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>