remove_action or remove_filter with external classes?
The best thing to do here is to use a static class. The following code should be instructional: class MyClass { function __construct() { add_action( ‘wp_footer’, array( $this, ‘my_action’ ) ); } function my_action() { print ‘<h1>’ . __class__ . ‘ – ‘ . __function__ . ‘</h1>’; } } new MyClass(); class MyStaticClass { public … Read more