function answers_theme_registry_alter in Answers 7.3
Same name and namespace in other branches
- 6.2 answers.module \answers_theme_registry_alter()
- 7.4 answers.module \answers_theme_registry_alter()
Implements hook_theme_registry_alter().
File
- ./
answers.module, line 160
Code
function answers_theme_registry_alter(&$theme_registry) {
// Approach due to:
// http://www.metachunk.com/blog/adding-module-path-drupal-7-theme-registry
$path = drupal_get_path('module', 'answers');
$theme_registry_copy = $theme_registry;
_theme_process_registry($theme_registry_copy, 'phptemplate', 'theme_engine', 'pow', $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'], $path);
}
}