function media_browser_plus_file_delete in Media Browser Plus 7
Same name and namespace in other branches
- 7.2 media_browser_plus.module \media_browser_plus_file_delete()
Deleting all field data attached to the media entity.
@todo: This should actually be done in media module
Parameters
$file:
File
- ./
media_browser_plus.module, line 1875 - Adds fields to the media browser forms for better UX
Code
function media_browser_plus_file_delete($file) {
$media = file_load($file->fid);
module_invoke_all('entity_delete', $media, 'file');
field_attach_delete('file', $media);
}