Hello, I would like to know if I should add an unique theme prefix to all php variables I create as well as for functions?
Thanks for your advice!
Yes, its a must and good practice. I prefix all mine with ct_
Doesn’t function scope isolate our variables away from other parts of WP like plugins?
Of course you don’t need to prefix your variables, only functions, classes, global variables and constants.
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.