function content_theme_get_themes in Content Theme 6
Same name and namespace in other branches
- 7.2 content_theme.module \content_theme_get_themes()
- 7 content_theme.module \content_theme_get_themes()
5 calls to content_theme_get_themes()
- content_theme_get_content_node_options in ./
content_theme.module - content_theme_get_content_type_options in ./
content_theme.module - content_theme_get_content_wide_options in ./
content_theme.module - Helper functions.
- content_theme_get_theme_name in ./
content_theme.module - _content_theme_debugger_block_view in content_theme_debugger/
content_theme_debugger.module
File
- ./
content_theme.module, line 325 - This module allows to use different themes than the site default on content creating, editing, and viewing pages.
Code
function content_theme_get_themes($theme = NULL) {
static $themes = array();
if (!$themes) {
foreach (system_theme_data() as $theme_data) {
$compatible_core = isset($theme_data->info['core']) && $theme_data->info['core'] == DRUPAL_CORE_COMPATIBILITY;
$compatible_php = version_compare(phpversion(), $theme_data->info['php'], '>=');
if ($compatible_core && $compatible_php) {
$themes[$theme_data->name] = $theme_data->info['name'];
}
}
asort($themes);
}
return $theme ? $themes[$theme] : $themes;
}