function radioactivity_arbitrary_source_admin_source_submit in Radioactivity 5
File
- plugins/
radioactivity_arbitrary_source.module, line 192
Code
function radioactivity_arbitrary_source_admin_source_submit($form_id, $form) {
$identifier = $form['identifier'];
$source = $form['source_hidden'];
$target = $form['target_hidden'];
drupal_set_message(t('Saved arbitrary source %s for target %t', array(
'%s' => $identifier,
'%t' => $target,
)));
$sources = _radioactivity_get_arbitrary_sources();
$title = $form['title'];
if (!$title) {
$title = $identifier;
}
if ($source) {
unset($sources[$target][$source]);
}
$sources[$target][$identifier] = array(
'title_placeholder' => $title,
);
variable_set('radioactivity_arbitrary_sources', $sources);
drupal_goto('admin/settings/radioactivity/arbitrary_sources');
}