function media_gallery_field_attach_form in Media Gallery 7
Same name and namespace in other branches
- 7.2 media_gallery.module \media_gallery_field_attach_form()
Implements hook_field_attach_form().
File
- ./
media_gallery.module, line 1119
Code
function media_gallery_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
// Remove the ability for a user to select a license for externally hosted
// media.
if ($entity_type == 'file') {
$scheme = file_uri_scheme($entity->uri);
// @todo Implement a more generic determination for when it makes sense for
// a user to select a license and when it doesn't.
if ($scheme == 'youtube') {
$form['field_license']['#access'] = FALSE;
}
}
}