You are here

function filefield_paths_token_list in File (Field) Paths 5

Same name and namespace in other branches
  1. 6.2 modules/token.inc \filefield_paths_token_list()
  2. 6 filefield_paths.module \filefield_paths_token_list()

Implementation of hook_token_list().

1 call to filefield_paths_token_list()
theme_filefield_paths_token_help in ./filefield_paths.module

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;
  }
}