You are here

function ds_plugins_submit in Display Suite 6.2

Same name and namespace in other branches
  1. 6 includes/ds.plugins.inc \ds_plugins_submit()

Save the plugin settings.

File

includes/ds.plugins.inc, line 43
Administration functions for DS plugins.

Code

function ds_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($form['#module'] . '_plugin_settings', $plugin_settings);
}