I have a quite simple class loaded from the plugin directory, it
s basically a wrapper to remove som unwanted actions. The problem is when I try to call this class outside the plugin file - then its not working. If I move the new class stuff and accessing the methods in, let`s say a theme file, it looks like everything run smoothly, no errors, the remove_action returns 1(for success), but the action is actually not removed.
remove_action(‘wp_head’, ‘rsd_link’); for example.
If I instantiate the class in the same file where the class itself is – in the a file in the plugin directory – everything goes as planned – but not when called outside that file. Why?
- The topic ‘Can`t call plugin class methods outside the plugin file.’ is closed to new replies.