function _filefield_sources_enabled in FileField Sources 7
Same name and namespace in other branches
- 8 filefield_sources.module \_filefield_sources_enabled()
Helper to return enabled sources for a field
This provides backward compatibility for 'upload' type.
See also
2 calls to _filefield_sources_enabled()
- filefield_sources_field_process in ./
filefield_sources.module - A #process callback to extend the filefield_widget element type.
- filefield_sources_form in ./
filefield_sources.module - Configuration form for editing FileField Sources settings for a widget.
File
- ./
filefield_sources.module, line 747 - Extend FileField to allow files from multiple sources.
Code
function _filefield_sources_enabled($settings) {
if (!isset($settings['filefield_sources']['upload'])) {
$settings['filefield_sources']['upload'] = 'upload';
}
$enabled = array_keys(array_filter($settings['filefield_sources']));
return drupal_map_assoc($enabled);
}