You are here

function nd_plugins_submit in Node displays 6

Save the plugin settings.

File

includes/nd.plugins.inc, line 37
Administration functions for ND plugins.

Code

function nd_plugins_submit($form, &$form_state) {
  $plugin_settings = array();
  foreach ($form['#plugins'] as $key => $plugin) {
    if ($form_state['values']['plugin_' . $plugin['key']] == '1') {
      $plugin_settings[$plugin['key']] = $plugin;
      $plugin_settings[$plugin['key']]['status'] = '1';
    }
  }
  variable_set('nd_plugin_settings', $plugin_settings);
}