Skip to content

What is the right place for adding helper class? #27

Answered by smileBeda
borahh asked this question in Q&A
Discussion options

You must be logged in to vote

The way I do it if I need other than the existing public or admin classes, Is that i add a new file with the new class in the respective folder (admin or public) and load the new class in the main includes file where all other classes are loaded.

you could also include it in one of the existing classes (as a dependency).

you can see an example where I did this here
https://github.com/TukuToi/tukutoi-shortcodes

In this case here I extended the loader class with an autoloader instead:
https://github.com/TukuToi/tukutoi-cp-directory-integration
so you don’t need to worry about inclusion anymore…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@borahh
Comment options

@smileBeda
Comment options

@borahh
Comment options

@smileBeda
Comment options

Answer selected by borahh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #26 on August 01, 2022 06:19.