It's more general question. Just to clarify. I can use preprocess function in my template.php file in a way:
function mytheme_preprocess_node(&$vars) {
// Do some stuff
}
But is there a way to preprocess node in a module? I've been searching for function hook_preprocess_node() in drupal API, but there's no such function for D7, although it does exists for all other versions of drupal, including 8. May I treat template_preprocess_node() as a function which I can use in my module? For example, if my module has name 'custom' then can I use it this way?
function custom_preprocess_node(&$vars) {
// Do some stuff
}
How can I override node in custom module?