function amazon_media_theme_registry_alter in Amazon Product Advertisement API 6
Same name and namespace in other branches
- 7.2 amazon_media/amazon_media.module \amazon_media_theme_registry_alter()
- 7 amazon_media/amazon_media.module \amazon_media_theme_registry_alter()
File
- amazon_media/
amazon_media.module, line 30
Code
function amazon_media_theme_registry_alter(&$theme_registry) {
if (!empty($theme_registry['amazon_item'])) {
// We'll try our best to avoid stepping on theme template files.
// God, how I hate template inheritance.
if (count($theme_registry['amazon_item']['theme paths']) > 1) {
$theme = array_pop($theme_registry['amazon_item']['theme paths']);
}
$theme_registry['amazon_item']['theme paths'][] = drupal_get_path('module', 'amazon_media');
if (isset($theme)) {
$theme_registry['amazon_item']['theme paths'][] = $theme;
}
}
}