function imagefield_filefield_paths_cleanup in File (Field) Paths 6
Implements hook_filefield_paths_cleanup().
File
- modules/
imagefield.inc, line 22 - Provides ImageField module specific functions for FileField Paths.
Code
function imagefield_filefield_paths_cleanup(&$ffp, $paths, $name) {
// Check for ImageFields.
$imagefield = FALSE;
foreach ($ffp['#files'] as $file) {
if ($file['name'] == $name) {
if (isset($file['widget']) && $file['widget'] == 'imagefield') {
$imagefield = TRUE;
}
break;
}
}
// Cleanup ImageFields temporary thumbnail paths.
if ($imagefield) {
array_unshift($paths, 'imagefield_thumbs');
filefield_paths_cleanup_temp($paths);
}
}