diff --git a/core/includes/theme.inc b/core/includes/theme.inc index da8b328..4547623 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -794,6 +794,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * @link themeable theme function or template @endlink, by checking the theme * registry. * + * @section sec_a Function Arguments * Most commonly, the first argument to this function is the name of the theme * hook. For instance, to theme a taxonomy term, the theme hook name is * 'taxonomy_term'. Modules register theme hooks within a hook_theme() @@ -805,6 +806,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * underscores changed to hyphens, so for the 'taxonomy_term' theme hook, the * default template is 'taxonomy-term.tpl.php'. * + * @section sec_b Implementing Theme Hooks * Themes may also register new theme hooks within a hook_theme() * implementation, but it is more common for themes to override default * implementations provided by modules than to register entirely new theme @@ -817,6 +819,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * rendering engine, it overrides the default implementation of the 'page' theme * hook by containing a 'page.tpl.php' file within its folder structure). * + * @subsection sub_a Template Files * If the implementation is a template file, several functions are called * before the template file is invoked, to modify the $variables array. These * fall into the "preprocessing" phase and the "processing" phase, and are @@ -865,12 +868,12 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * - THEME_process_HOOK(&$variables): Allows the theme to process the * variables specific to the theme hook. * + * @subsection sub_b Template Callbacks * If the implementation is a function, only the theme-hook-specific preprocess * and process functions (the ones ending in _HOOK) are called from the * list above. This is because theme hooks with function implementations * need to be fast, and calling the non-theme-hook-specific preprocess and * process functions for them would incur a noticeable performance penalty. - * * There are two special variables that these preprocess and process functions * can set: 'theme_hook_suggestion' and 'theme_hook_suggestions'. These will be * merged together to form a list of 'suggested' alternate theme hooks to use,