You are here

function system_admin_theme_settings in Drupal 6

Same name and namespace in other branches
  1. 5 modules/system/system.module \system_admin_theme_settings()

Form builder; This function allows selection of the theme to show in administration sections.

See also

system_settings_form()

Related topics

1 string reference to 'system_admin_theme_settings'
system_menu in modules/system/system.module
Implementation of hook_menu().

File

modules/system/system.admin.inc, line 153
Admin page callbacks for the system module.

Code

function system_admin_theme_settings() {
  $themes = system_theme_data();
  uasort($themes, 'system_sort_modules_by_info_name');
  $options[0] = '<' . t('System default') . '>';
  foreach ($themes as $theme) {
    $options[$theme->name] = $theme->info['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'),
  );
  $form['node_admin_theme'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use administration theme for content editing'),
    '#description' => t('Use the administration theme when editing existing posts or creating new ones.'),
    '#default_value' => variable_get('node_admin_theme', '0'),
  );
  $form['#submit'][] = 'system_admin_theme_submit';
  return system_settings_form($form);
}