Is hooks the same as theme functions drupal and what triggers what? [closed]
質問
I pretty much understand Drupal API hooks so no need to explain about that. I am interesting in theme hooks and theme functions.
It is impossible to get the full picture hope you can?
解決
The more and more I read theme functions are pretty much functions that are triggered by Drupal by the hook implementation. theme functions has following naming convention:
mytheme_theme hook name; theme functions should not be called directly but has to be invorked by the theme() a specific function with two parameters 'hookname' and $vars either string or an Array.
If you have a preprocess function - lets call it mytheme_preprocess_theme hook name
It will be called before mytheme_theme hook name - behind the scene all preprocess functions are called before theme functions.
If verified by a developer @ Drupal's support forum.