You are here

function gallery_assist_token_values in Gallery Assist 6

Implementation of hook_token_values().

File

./gallery_assist.module, line 5476
Drupal content type with gallery functionality.

Code

function gallery_assist_token_values($type, $object = NULL, $options = array()) {
  if ($type == 'node' && variable_get("gallery_assist_{$object->type}", 0)) {
    $tokens['ga-pid'] = $object->gallitems['pid'];
    $tokens['ga-ptitle'] = TRUE;
    $tokens['ga-palt'] = $object->gallitems[$node->gallitems['pid']]['palt'];
    $tokens['ga-pdescription'] = $object->gallitems[$node->gallitems['pid']]['pdescription'];
    $tokens['ga-copyright'] = $object->gallitems[$node->gallitems['pid']]['copyright'];
    $tokens['ga-gref'] = $object->gref;
    $tokens['ga-ref'] = $object->ref;
    return $tokens;
  }
}