DevinVinson / WordPress-Plugin-Boilerplate

[WordPress] A foundation for WordPress Plugin Development that aims to provide a clear and consistent guide for building your plugins.
http://wppb.io
7.66k stars 2.25k forks source link

Need to use an action hook within a function from the public class. How do I access the loader then refer to the public class itself? #502

Open devcon7 opened 5 years ago

devcon7 commented 5 years ago

Inside of the core plugin class, I am inserting a filter or an action hook under the "define_public_hooks".

Then the function called within the public class checks for conditions and needs to call another function from the same class via add_filter or add_action. Unfortunately, all hooks must go through the loader and referencing itself without using the loader doesn't work.

Any idea on how I can achieve this?

Thanks a lot for your help in advance!