function media_browser_plus_file_delete in Media Browser Plus 7.2
Same name and namespace in other branches
- 7 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
object $file: The file object to delete.
File
- ./
media_browser_plus.module, line 1718 - 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);
}