system_admin_theme_settings
modules/system/system.module, строка 425
- Версии
- 5 – 6
system_admin_theme_settings()
This function allows selection of the theme to show in administration sections.
Код
<?php
function system_admin_theme_settings() {
$themes = system_theme_data();
ksort($themes);
$options[0] = t('System default');
foreach ($themes as $theme) {
$options[$theme->name] = $theme->name;
}
$form['admin_theme'] = array(
'#type' => 'select',
'#options' => $options,
'#title' => t('Administration theme'),
'#description' => t('Choose which theme the administration pages should display in. If you choose "System default" the administration pages will use the same theme as the rest of the site.'),
'#default_value' => variable_get('admin_theme', '0'),
);
// In order to give it our own submit, we have to give it the default submit
// too because the presence of a #submit will prevent the default #submit
// from being used. Also we want ours first.
$form['#submit']['system_admin_theme_submit'] = array();
$form['#submit']['system_settings_form_submit'] = array();
return system_settings_form($form);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии