I have a some code being dynamically added into my Footer via add_action('wp_footer' ...)
. Unfortunately I'm not sure how to remove it using conventional methods, I've looked at the following question and tried to use the solutions there:
remove_action or remove_filter with external classes?
But had no luck with any of the answers so now I'm looking for Alternatives. Is there a way to actually to run some kind of preg_replace
on the contents of wp_footer()
? Are there any other ways to remove things in wp_footer
without using remove_action()
?
More Information:
The plugin has an output file. On line 697 is where the action actually gets added:
add_action('wp_footer', array($this, 'add_inline_styles'));
The actual function is defined on line 1743
I wasn't sure whether to reference RevOperations::
or RevSliderFront::
- Here's the initial setup file in the root of the plugin folder.
$this
and I've tried at least 50 combinations of classes and functions to figure out how to remove it (referencing the linked question above) but couldn't. I'll add in some code detail on Monday though.rev_slider
shortcode and start from there, doing some code rewrites. A possible "hacky" shortcut might be to check the data in$GLOBALS['wp_filter']['wp_footer']
and see if you can identify it there so you could remove it before thewp_footer
hook is activated.add_action( 'wp_footer', function() { remove_object_filter( 'wp_footer', 'RevSliderOutput', 'add_inline_styles', 10 ); }, 0);