function splashify_admin_when_form_submit in Splashify 7
Same name and namespace in other branches
- 6 admin/splashify.admin.when.inc \splashify_admin_when_form_submit()
Implements form submit handler.
1 string reference to 'splashify_admin_when_form_submit'
- splashify_admin_when_form in admin/
splashify.admin.when.inc - "When" settings tab.
File
- admin/
splashify.admin.when.inc, line 152 - The admin "When" tab.
Code
function splashify_admin_when_form_submit($form, &$form_state) {
if (isset($form_state['values']['splashify_when_mobile'])) {
if ($form_state['values']['splashify_when_mobile'] != 1) {
// Unset these values, if the mobile option is disabled.
variable_set('splashify_when_mobile_frequency', 'never');
variable_set('splashify_when_mobile_test', 0);
}
}
if (isset($form_state['values']['splashify_when_anonymous'])) {
if ($form_state['values']['splashify_when_anonymous'] == 1) {
$form_state['values']['splashify_when_roles'] = FALSE;
}
}
if ($form_state['values']['splashify_when_roles'] !== 1) {
variable_set('splashify_when_roles_options', 0);
}
}