function scald_youtube_extra_options_save_handler in Scald YouTube 7
Handler to store any extra options in the atom Entity.
1 string reference to 'scald_youtube_extra_options_save_handler'
File
- ./
scald_youtube.module, line 255 - Defines a YouTube provider for Scald.
Code
function scald_youtube_extra_options_save_handler(&$form, &$form_state) {
foreach ($form as $key => $data) {
if (strpos($key, 'atom') === 0) {
$index = intval(substr($key, 4));
$form_state['scald']['atoms'][$index]->data['show_related'] = $form_state['values'][$key]['scald_youtube_show_related'];
$form_state['scald']['atoms'][$index]->data['youtube_autoplay'] = $form_state['values'][$key]['scald_youtube_autoplay'];
$form_state['scald']['atoms'][$index]->data['youtube_mute'] = $form_state['values'][$key]['scald_youtube_mute'];
}
}
}