function filefield_paths_token_list in File (Field) Paths 5
Same name and namespace in other branches
- 6.2 modules/token.inc \filefield_paths_token_list()
- 6 filefield_paths.module \filefield_paths_token_list()
Implementation of hook_token_list().
1 call to filefield_paths_token_list()
File
- ./
filefield_paths.module, line 483 - Adds extra functionality to FileFields Path settings.
Code
function filefield_paths_token_list($type = 'all') {
if ($type == 'field' || $type == 'all') {
$tokens = array();
$tokens['file']['filefield-onlyname'] = t("File name without extension");
$tokens['file']['filefield-extension'] = t("File extension");
$tokens['file']['filefield-onlyname-original'] = t("File name without extension - original");
$tokens['file']['filefield-extension-original'] = t("File extension - original");
// Tokens for Image module integration.
if (module_exists('image')) {
$tokens['image']['image-derivative'] = t("Image derivative (thumbnail, preview, etc)");
}
return $tokens;
}
}