function content_theme_get_theme_name in Content Theme 6
Same name and namespace in other branches
- 7.2 content_theme.module \content_theme_get_theme_name()
- 7 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 347 - 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]) ? $themes[$theme] : t('%none', array(
'%none' => 'none',
));
}