I run into strange thing today. I have some custom hook declared in a custom module as following:
drupal_alter('strange_thing', $shared_var, $vars);
then in template file(template.php) I got the function:
function THEME_strange_thing_alter(&$shared_var, $vars){
//do something with $shared_var
}
The THEME_strange_thing_alter() is called if i have unchecked " Use the administration theme when editing or creating content" in the admin/appearance in the "Administration Theme" section, but it is not otherwise.
To satisfy curiosity, I moved all the logic from tempalate.php into custom module/.module file and it works like expected...the hooks are called not matter if the box is checked or unchecked for " Use the administration theme when editing or creating content"
It would be great that the hooks work in template.php no matter if there is some box checked or unchecked in the UI. Is there way to make it so? Thank You