0

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?

0

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.

| improve this answer | |
0

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:

module_load_include('inc','module_name','includes/file');

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

and call this function inside hook_init.

| improve this answer | |

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.