function sweaver_plugin_config_plugins_submit in Sweaver 7
Same name and namespace in other branches
- 6 sweaver.admin.inc \sweaver_plugin_config_plugins_submit()
Plugins form submit callback.
File
- ./
sweaver.admin.inc, line 82 - Administrative functions for sweaver plugins.
Code
function sweaver_plugin_config_plugins_submit(&$form, &$form_state) {
// Reset cookies.
setcookie('sweaver_active_tab', 'sweaver_plugin_editor');
$plugins_order = array();
foreach ($form['#plugins'] as $plugin_name => $weight) {
variable_set('sweaver_plugin_status_' . $plugin_name, $form_state['values'][$plugin_name]['status']);
$plugins_order[$plugin_name] = $form_state['values'][$plugin_name]['weight'];
}
variable_set('sweaver_plugins_weight', $plugins_order);
drupal_flush_all_caches();
variable_set('menu_rebuild_needed', TRUE);
drupal_set_message(t('The configuration options have been saved.'));
$form_state['redirect'] = 'admin/config/user-interface/sweaver/plugins';
}