function imagefield_tokens_filefield_paths_process_file in ImageField Tokens 5
Same name and namespace in other branches
- 6 imagefield_tokens.module \imagefield_tokens_filefield_paths_process_file()
Implementation of hook_filefield_paths_process_file().
File
- ./
imagefield_tokens.module, line 41
Code
function imagefield_tokens_filefield_paths_process_file($new, &$file, $settings, $node, $update) {
if ($file['widget'] == 'image') {
$orig = array(
'alt' => $file['field']['alt'],
'title' => $file['field']['title'],
);
$file['field']['alt'] = filefield_paths_process_string($file['field']['alt'], 'node', $node);
$file['field']['alt'] = filefield_paths_process_string($file['field']['alt'], 'field', array(
0 => $file['field'],
));
$file['field']['title'] = filefield_paths_process_string($file['field']['title'], 'node', $node);
$file['field']['title'] = filefield_paths_process_string($file['field']['title'], 'field', array(
0 => $file['field'],
));
}
}