function _menu_block_settings_submit in Menu Block 5
Implments submit handler for menu_block_settings form.
1 call to _menu_block_settings_submit()
File
- ./
menu_block.admin.inc, line 34
Code
function _menu_block_settings_submit($form_id, $form_values) {
$enabled_blocks = $form_values['menu_block_enabled_blocks'];
// Optionally add a new unconfigured block.
if ($enabled_blocks['-1']) {
$key = count($enabled_blocks);
// Auto-increment.
$enabled_blocks[$key] = $key;
}
unset($enabled_blocks['-1']);
// Save the enabled blocks.
variable_set('menu_block_enabled_blocks', $enabled_blocks);
drupal_set_message(t('The configuration options have been saved.'));
}