function omega_tools_subtheme_wizard_finish in Omega Tools 7.3
@todo
1 string reference to 'omega_tools_subtheme_wizard_finish'
- omega_tools_subtheme_wizard in includes/
omega_tools.wizard.inc - @todo
File
- includes/
omega_tools.wizard.inc, line 66
Code
function omega_tools_subtheme_wizard_finish(&$form_state) {
$subtheme =& $form_state['subtheme'];
if ($subtheme->automated) {
omega_tools_write_info_file($subtheme->machine_name, $subtheme->info, $subtheme->path);
omega_tools_cache_clear($subtheme->machine_name);
file_unmanaged_delete_recursive($subtheme->destination);
omega_tools_move($subtheme->path, $subtheme->destination);
if ((!$subtheme->status || !$subtheme->default) && variable_get('theme_default') == $subtheme->machine_name) {
$subtheme->default = FALSE;
theme_enable(array(
'bartik',
));
variable_set('theme_default', 'bartik');
drupal_set_message(t('%name is now the default theme.', array(
'%name' => 'Bartik',
)));
}
omega_tools_subtheme_process($subtheme);
}
$form_state['redirect'] = $subtheme->automated ? 'admin/appearance' : 'admin/appearance/omega-tools/edit/' . $subtheme->machine_name . '/finished';
drupal_set_message(t('The configuration options have been saved.'));
}