Akismet breaks the pre_comment_approved filter for other plugins (1 post)

  1. Samir Shah
    Posted 3 years ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Akismet
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic