You are here

function styleswitcher_switch in Style Switcher 6.2

Same name and namespace in other branches
  1. 7.2 styleswitcher.module \styleswitcher_switch()

Page callback: Switches style when JS is disabled.

Parameters

array $style: New active style. The structure of an array is the same as returned from styleswitcher_style_load().

See also

styleswitcher_style_load()

styleswitcher_menu()

1 string reference to 'styleswitcher_switch'
styleswitcher_menu in ./styleswitcher.module
Implements hook_menu().

File

./styleswitcher.module, line 285
Module's hooks implementations and helper functions.

Code

function styleswitcher_switch(array $style) {
  if ($style['status']) {
    styleswitcher_save_user_preference($style['theme'], $style['name']);
  }
  drupal_goto();
}