Sim Posted December 20, 2020 Share Posted December 20, 2020 What is the best approach to go about having any functions that can be used in those three files without rewriting the functions in each file and without editing any files outside the module. @Dayo Quote Link to comment Share on other sites More sharing options...
Dayo Posted December 21, 2020 Share Posted December 21, 2020 (edited) Just declare the function in module.hooks.php and you can use it everywhere Edited December 21, 2020 by Dayo 1 1 Quote Link to comment Share on other sites More sharing options...
Sim Posted December 21, 2020 Author Share Posted December 21, 2020 Anywhere as in any module? Quote Link to comment Share on other sites More sharing options...
Dayo Posted December 22, 2020 Share Posted December 22, 2020 all *.hooks.php files are included in every page so yes you can put it in test.hooks.php and have access to it in test3.inc.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.