function content_theme_get_info_theme_name in Content Theme 6
Same name and namespace in other branches
- 7.2 content_theme.module \content_theme_get_info_theme_name()
- 7 content_theme.module \content_theme_get_info_theme_name()
5 calls to content_theme_get_info_theme_name()
- content_theme_admin_content_node in ./
content_theme.admin.inc - Menu callback; configures content node themes.
- content_theme_admin_content_type in ./
content_theme.admin.inc - Menu callback; configures content type themes.
- content_theme_admin_content_wide in ./
content_theme.admin.inc - Menu callback; configures content wide themes.
- content_theme_form_alter in ./
content_theme.module - Implementation of hook_form_alter().
- content_theme_form_node_type_form_alter in ./
content_theme.module - Implementation of hook_form_FORM_ID_alter().
File
- ./
content_theme.module, line 362 - This module allows to use different themes than the site default on content creating, editing, and viewing pages.
Code
function content_theme_get_info_theme_name($mode = 'system_default', $action = NULL, $type = NULL) {
$name = $system_default_theme = content_theme_get_theme_name(variable_get('theme_default', 'garland'));
if ($mode == 'content_wide' || $mode == 'content_type') {
if ($action == 'edit' || $action == 'view') {
$theme = variable_get('content_theme_content_wide_' . $action, '0');
$name = $theme != '0' ? content_theme_get_theme_name($theme) : $system_default_theme;
if ($mode == 'content_type') {
$theme = variable_get('content_theme_content_type_' . $action . '_' . $type, '-content_wide-');
if ($theme != '-content_wide-') {
$name = $theme != '0' ? content_theme_get_theme_name($theme) : $system_default_theme;
}
}
}
else {
$name = t('%none', array(
'%none' => 'none',
));
}
}
return $name;
}