WordPress-Plugin-Boilerplate icon indicating copy to clipboard operation
WordPress-Plugin-Boilerplate copied to clipboard

removed specialized loader class. load all hooks in run method instead

Open yaronguez opened this issue 8 years ago • 0 comments

I finally had time to revisit the discussion of the loader class. I took as minimal an approach as possible in this refactor. I removed the loader class and load all hooks in the run method. No hooks are defined in the constructor. In fact, all the constructor does it add dependencies and set the name and version. Very streamlined approach.

This also makes it very easy for those who prefer to define their hooks in the child classes. Each define_[whatever]_hooks method can still create the child class but then call a define_hooks() or init() method on that class. Very easy for a developer to choose his or her preference. Thoughts?

yaronguez avatar Dec 30 '16 02:12 yaronguez