1 installer.pages.inc installer_browser_installation_theme_set($form, &$form_state)

Sets a selected theme as the default site theme.

File

core/modules/installer/installer.pages.inc, line 622
Page callbacks used by the Installer browse pages.

Code

function installer_browser_installation_theme_set($form, &$form_state) {
  $theme = $form_state['triggering_element']['#array_parents'][0];
  // Get current list of themes.
  $themes = list_themes();

  // Check if the specified theme is one recognized by the system.
  if (!empty($themes[$theme])) {
    // Enable the theme if it is currently disabled.
    if (empty($themes[$theme]->status)) {
      theme_enable(array($theme));
    }
    // Set the default theme.
    config_set('system.core', 'theme_default', $theme);
    menu_rebuild();
  }
}