[Bug fix] Unhooking of filters not working for class methods
-
L.S.,
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
live_blogging_get_entry()
in the
/wp-content/plugins/live-blogging/live-blogging.php
file (line 1068 – line 1110 in v2.2.6) with the code I provide you with here:
https://pastebin.com/H9q2je9ZOnce 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:
class_object_variable_name, method_name
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.
Smile,
Juliette
- The topic ‘[Bug fix] Unhooking of filters not working for class methods’ is closed to new replies.