You are here

function mobile_switch_system_themes_form_submit in Mobile Switch 6

Form submission handler for system_themes_form().

Make sure when using the "Reset to defaults" function on the theme administration list page that the mobile theme be disabled.

See also

mobile_switch_form_alter()

1 string reference to 'mobile_switch_system_themes_form_submit'
mobile_switch_form_alter in ./mobile_switch.module
Implementation of hook_form_alter().

File

./mobile_switch.module, line 191
Simple theme switch for mobile devices, detected by browscap.

Code

function mobile_switch_system_themes_form_submit($form, &$form_state) {
  if ($form_state['clicked_button']['#id'] === 'edit-reset') {
    variable_set('mobile_switch_mobile_theme', 'none');
    drupal_set_message(t('The mobile theme has been disabled.'), 'status');
  }
}