Is there a possible to override a module's hook? What I want is, write a
search__query_alter() hook to restrict search results. But to achive this, I should write the hook in built-in module search's .module file.
This way, I'm hacking into core drupal files, which must be bad. Is there a way to write the hook for another module in my theme's
template.php file or somewhere else, not touching the core drupal files? When I write
search_query_alter() in my theme's
template.php file it simply doesn't work.
From my question, you may understand I'm very new to Drupal! Thank you for helping.