Is it possible to have a function call within one module which calls a function of a different module even if that function has not been defined as a hook?


Yes. You can call all function is write in file .module. If function don't write in file .module. You need use function module_load_include and you can call it.


Yes, you can. In your .module file, first load the module name in which your function exists, then, the name of that file. For example:

module_load_include('your_file_extension','your_module_name','your_file_path'); for better undersatnding:


and there should exist a folder name include and in this folder put your "file.inc"

and call this function inside hook_init.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.