function content_theme_get_theme_name in Content Theme 7
Same name and namespace in other branches
- 6 content_theme.module \content_theme_get_theme_name()
- 7.2 content_theme.module \content_theme_get_theme_name()
3 calls to content_theme_get_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_get_info_theme_name in ./
content_theme.module
File
- ./
content_theme.module, line 405 - This module allows to use different themes than the site default on content creating, editing, and viewing pages.
Code
function content_theme_get_theme_name($theme) {
static $themes = array();
if (!$themes) {
$themes['0'] = t('%system_default_theme', array(
'%system_default_theme' => 'System default theme',
));
$themes['-content_wide-'] = t('%content_wide_theme', array(
'%content_wide_theme' => 'Content wide theme',
));
$themes['-content_type-'] = t('%content_type_theme', array(
'%content_type_theme' => 'Content type theme',
));
$themes += content_theme_get_themes();
}
return isset($themes[$theme]) ? $theme == '0' || $theme == '-content_wide-' || $theme == '-content_type-' || content_theme_get_theme_status($theme) ? $themes[$theme] : t('!theme (disabled)', array(
'!theme' => $themes[$theme],
)) : t('!theme (not available)', array(
'!theme' => $theme,
));
}