function answers_theme_registry_alter in Answers 7.4
Same name and namespace in other branches
- 6.2 answers.module \answers_theme_registry_alter()
- 7.3 answers.module \answers_theme_registry_alter()
Implements hook_theme_registry_alter().
See: http://www.metachunk.com/blog/adding-module-path-drupal-7-theme-registry.
File
- ./
answers.module, line 486 - The Answers module.
Code
function answers_theme_registry_alter(&$theme_registry) {
$mod_path = drupal_get_path('module', 'answers');
// Munge on a copy.
$theme_registry_copy = $theme_registry;
_theme_process_registry($theme_registry_copy, 'phptemplate', 'theme_engine', 'pow', $mod_path);
$theme_registry += array_diff_key($theme_registry_copy, $theme_registry);
$hooks = array(
'node',
);
foreach ($hooks as $h) {
_answers_insert_after_first_element($theme_registry[$h]['theme paths'], $mod_path);
}
}