Plugin Directory

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's profile tellyworth's profile tellyworth Owned by: matt's profile matt's profile 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)

#1 @solarissmoke
12 years ago

  • Cc solarissmoke added

#2 @sunnyratilal
11 years ago

  • Cc sunnyratilal added

#3 @eoigal
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed from 2.6

Using a static variable to ensure only called once rather than depend on removing the filter

Note: See TracTickets for help on using tickets.