/ Published in: PHP
hook_theme implementation with description
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Implementation of hook_theme() * * Register a module (or theme's) theme implementations. * Modules and themes implementing this return an array of arrays. * @link http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_theme/6 Drupal API Description * @param $existing An array of existing implementations that may be used for override purposes. This is primarily useful for themes that may wish to examine existing implementations to extract data (such as arguments) so that it may properly register its own, higher priority implementations. * @param $type What 'type' is being processed. This is primarily useful so that themes tell if they are the actual theme being called or a parent theme. May be one of: * module: A module is being checked for theme implementations. * base_theme_engine: A theme engine is being checked for a theme which is a parent of the actual theme being used. * theme_engine: A theme engine is being checked for the actual theme being used. * base_theme: A base theme is being checked for theme implementations. * theme: The actual theme in use is being checked. * @param $theme The actual name of theme that is being being checked (mostly only useful for theme engine). * @param $path The directory path of the theme or module, so that it doesn't need to be looked up. * @return array A keyed array of theme hooks. */ function hook_theme($existing, $type, $theme, $path) { ), ); }