function filefield_sources_widget_settings_alter in FileField Sources 6
Implements hook_widget_settings_alter().
File
- ./
filefield_sources.module, line 58 - Extend FileField to allow files from multiple sources.
Code
function filefield_sources_widget_settings_alter(&$settings, $op, $widget) {
// Only support modules that implement hook_insert_widgets().
$widget_type = isset($widget['widget_type']) ? $widget['widget_type'] : $widget['type'];
if (!in_array($widget_type, module_invoke_all('filefield_sources_widgets'))) {
return;
}
if ($op == 'form') {
$settings = array_merge($settings, filefield_sources_form($widget));
}
if ($op == 'save') {
$settings = array_merge($settings, filefield_sources_widget_settings($widget));
}
}