function beautytips_manager_admin_submit in BeautyTips 6.2
Submission callback for beautytips manager admin form.
1 string reference to 'beautytips_manager_admin_submit'
- beautytips_manager_admin in ./
beautytips_manager.module - Form for configuring custom beautytips.
File
- ./
beautytips_manager.module, line 276
Code
function beautytips_manager_admin_submit($form, &$form_state) {
$tip = $form_state['values']['tip'];
switch ($tip['content_type']) {
case 'attribute':
//$tip['content'] = check_plain($tip['content']);
break;
case 'text':
//$tip['content'] = check_markup($tip['content']);
break;
case 'ajax':
//$tip['content'] = check_plain($tip['content']);
break;
case 'js':
// Do nothing
break;
}
$positions = array();
foreach ($tip['positions'] as $position => $order) {
if ($order !== '') {
while (isset($positions[$order])) {
$order++;
}
$positions[$order] = $position;
}
}
ksort($positions);
$tip['positions'] = count($positions) ? implode(',', $positions) : '';
beautytips_manager_save_custom_tip($tip);
cache_clear_all('beautytips:beautytips-ui-custom-tips', 'cache');
$form_state['redirect'] = 'admin/settings/beautytips/manager';
}