panopoly_theme.module in Panopoly Theme 7
File
panopoly_theme.module
View source
<?php
include_once 'panopoly_theme.features.inc';
function panopoly_theme_init() {
global $theme;
drupal_add_library('system', 'ui.widget');
drupal_add_library('system', 'ui.tabs');
drupal_add_library('system', 'ui.accordion');
}
function panopoly_theme_ctools_plugin_directory($module, $plugin) {
return 'plugins/' . $plugin;
}
function panopoly_theme_theme_registry_alter(&$theme_registry) {
$mod_path = drupal_get_path('module', 'panopoly_theme') . '/templates';
$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);
}
function panopoly_theme_entity_info_alter(&$entity_info) {
$entity_info['node']['view modes']['featured'] = array(
'label' => t('Featured'),
'custom settings' => TRUE,
);
$entity_info['user']['view modes']['featured'] = array(
'label' => t('Featured'),
'custom settings' => TRUE,
);
$entity_info['taxonomy_term']['view modes']['featured'] = array(
'label' => t('Featured'),
'custom settings' => TRUE,
);
}