akismet
Opened 12 years ago
Closed 10 years ago
#1625 closed defect (fixed)
Don't remove the filter on pre_comment_approved
Reported by: | tellyworth | Owned by: | matt |
---|---|---|---|
Priority: | high | Severity: | normal |
Plugin: | akismet | Keywords: | |
Cc: | solarissmoke, sunnyratilal |
Description
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.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Fixed from 2.6
Using a static variable to ensure only called once rather than depend on removing the filter