Don't remove the filter on pre_comment_approved
|Reported by:||tellyworth||Owned by:||matt|
A user writes:
In the function akismet_result_spam, there is a call to remove_filter on pre_comment_approved, which is the filter that is currently being applied. Dynamically removing a filter in this way breaks all filters that were scheduled to run after the current one. This is a known issue - see https://core.trac.wordpress.org/ticket/9968 . The result is that any plugins that had hooked filters onto pre_comment_approved to be run after Akismet, will not work.
Please see if you can fix this behaviour. You should be able to ensure the function runs only once by having a static variable instead.