You are here

function scald_player_settings_form_submit in Scald: Media Management made easy 7

Player settings form submission.

File

includes/scald.admin.inc, line 718

Code

function scald_player_settings_form_submit($form, &$form_state) {
  $op = $form_state['triggering_element']['#op'];
  if ($op == 'update') {
    $scald = $form['#scald'];
    $config = scald_context_config_load($scald['context']);
    foreach ($scald['player_settings'] as $key => $value) {
      $config->player[$scald['type']->type]['settings'][$key] = $form_state['values'][$key];
    }
    scald_context_config_save($config);
    cache_clear_all('*', 'cache_scald', TRUE);
    drupal_set_message(t('Your player settings has been updated.'));
  }
}