Support » Plugin: Akismet Anti-Spam » Akismet breaks the pre_comment_approved filter for other plugins

  • There is a bug in WordPress, which is that you cannot call remove_filter on a currently active filter without breaking the whole filter – all subsequent hooks on that filter will not be called. See #9968 and #16245.

    Unfortunately this is exactly what Akismet does in the akismet_result_spam function (which is hooked to pre_comment_approved). It means that if any other plugin has added a filter to pre_comment_approved with priority greater than 10, it won’t work. Debugging this isn’t easy.

    Please change this behaviour so that it doesn’t break things for other plugins. In this case, having a simple static variable in the akismet_result_spam would be enough to make sure it runs only once.

  • The topic ‘Akismet breaks the pre_comment_approved filter for other plugins’ is closed to new replies.