function _touch_icons_precomp_radio_validate in Touch Icons 6
Validate precomp touch icon display setting.
Helper for integration with themesettings_ui_extras.module
Ensures that theme settings variables are stored in a core-compatible format, in case themesettings_ui_extras.module is disabled later.
1 string reference to '_touch_icons_precomp_radio_validate'
- _touch_icons_themesettings_radio in ./
touch_icons.module - Helper function for touch icons theme settings form elements.
File
- ./
touch_icons.module, line 295 - Adds a fieldset to theme settings form which allows site administrators to specify Apple Touch icons for Drupal websites. The Touch icon settings behave in a similar manner to the Site Logo and Favicon settings provided by Drupal core.
Code
function _touch_icons_precomp_radio_validate($element, &$form_state) {
switch ($form_state['values']['touch_icon_precomp_display']) {
case 'none':
$form_state['values']['toggle_touch_icon_precomp'] = 0;
// best to set a default value, in case module disabled later...
$form_state['values']['default_touch_icon_precomp'] = 1;
break;
case 'default':
$form_state['values']['toggle_touch_icon_precomp'] = 1;
$form_state['values']['default_touch_icon_precomp'] = 1;
break;
case 'custom':
$form_state['values']['toggle_touch_icon_precomp'] = 1;
$form_state['values']['default_touch_icon_precomp'] = 0;
break;
}
// no need to store this
unset($form_state['values']['touch_icon_precomp_display']);
}