function skinr_ui_admin_skins_submit in Skinr 8.2
Same name and namespace in other branches
- 6.2 skinr_ui.admin.inc \skinr_ui_admin_skins_submit()
- 7.2 skinr_ui.admin.inc \skinr_ui_admin_skins_submit()
Form submission handler for skinr_ui_list().
Execute the chosen 'Update option' on the selected skinr settings.
File
- skinr_ui/
skinr_ui.admin.inc, line 347 - Admin page callbacks for the Skinr UI module.
Code
function skinr_ui_admin_skins_submit($form, &$form_state) {
$operations = module_invoke_all('skinr_ui_operations');
$operation = $operations[$form_state['values']['operation']];
// Filter out unchecked nodes
$skins = array_filter($form_state['values']['skins']);
if ($function = $operation['callback']) {
// Add in callback arguments if present.
if (isset($operation['callback arguments'])) {
$args = array_merge(array(
$skins,
), $operation['callback arguments']);
}
else {
$args = array(
$skins,
);
}
call_user_func_array($function, $args);
cache_clear_all();
}
else {
// We need to rebuild the form to go to a second step. For example, to
// show the confirmation form for the deletion of nodes.
$form_state['rebuild'] = TRUE;
}
}