[Resolved] [Bug fix] Unhooking of filters not working for class methods
I encountered a quite annoying oversight in the offered ‘unhooking of filters’-functionality.
The Live-blogging plugin poses that it provides a way to unhook filters from the_content. However, it only allow for unhooking of global namespace functions, not for the unhooking of class methods – which is the more commonly used/preferred way of building plugins-.
I’ve rewritten the relevant code to allow for both functions and class methods.
You will need to replace the function
/wp-content/plugins/live-blogging/live-blogging.phpfile (line 1068 – line 1110 in v2.2.6) with the code I provide you with here:
Once the function has been replaced, the user can add the following to the Live Blogging Settings -> Advanced Settings to make the unhooking work for class method:
where class_object_variable_name is the variable name of the instantiatied object in the global namespace.
Hope this helps & that you will include this fix in the next version of the plugin.
- The topic ‘[Resolved] [Bug fix] Unhooking of filters not working for class methods’ is closed to new replies.