function skinr_ui_admin_skins_submit in Skinr 6.2
Same name and namespace in other branches
- 8.2 skinr_ui/skinr_ui.admin.inc \skinr_ui_admin_skins_submit()
- 7.2 skinr_ui.admin.inc \skinr_ui_admin_skins_submit()
Process skinr_ui_admin_skins form submissions.
Execute the chosen 'Update option' on the selected nodes.
1 string reference to 'skinr_ui_admin_skins_submit'
- skinr_ui_admin_skins in ./
skinr_ui.admin.inc - Form builder: Builds the skinr administration overview.
File
- ./
skinr_ui.admin.inc, line 135 - Admin page callbacks for the skinr module.
Code
function skinr_ui_admin_skins_submit($form, &$form_state) {
$operations = module_invoke_all('skinr_operations');
$operation = $operations[$form_state['values']['operation']];
// Filter out unchecked nodes
$skinr_settings = array_filter($form_state['values']['skinr_settings']);
if ($function = $operation['callback']) {
// Add in callback arguments if present.
if (isset($operation['callback arguments'])) {
$args = array_merge(array(
$nodes,
), $operation['callback arguments']);
}
else {
$args = array(
$skinr_settings,
);
}
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;
}
}