stephenharris / Event-Organiser

WordPress plug-in, Event Organiser, development repository

Home Page:http://wordpress.org/extend/plugins/event-organiser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove_filter swallows next callback

stephenharris opened this issue · comments

Although this was initially reported as conflict between Event Organiser and WP-E-Commerce, it's in fact a bug with WordPress.

Essentially using remove_action()/remove_filter() in a hooked function to remove that function from the hook swallows all functions of the next priority.

The work-around is pretty naff, but it involves protecting the function from being swalloed by adding a dummy function on the previous priority. This function does nothing, but acts as a buffer.

This isn't a complete work-around (there isn't one) and the problem may reoccur with other plug-ins. But I've shifted the priority of the affected function here to 11 in the hope of avoiding similar problems.