function page_theme_get_themes_options in Page Theme 7
Same name and namespace in other branches
- 7.2 page_theme.module \page_theme_get_themes_options()
2 calls to page_theme_get_themes_options()
- page_theme_admin_add in ./
page_theme.admin.inc - Menu callback; adds a theme.
- page_theme_menu_access_add in ./
page_theme.module
File
- ./
page_theme.module, line 171 - This module allows to use different themes than the site default on specific pages.
Code
function page_theme_get_themes_options() {
static $options = array();
if (!$options) {
$themes = page_theme_get_themes();
$result = db_query('SELECT theme FROM {page_theme}');
foreach ($result as $theme) {
unset($themes[$theme->theme]);
}
$options['0'] = '- ' . t('Select theme') . ' -';
foreach ($themes as $theme) {
$options[$theme['theme']] = page_theme_get_theme_name($theme['theme'], TRUE);
}
natcasesort($options);
}
return $options;
}