You are here

img_assist.token.inc in Image Assist 5.3

Same filename and directory in other branches
  1. 5.2 includes/img_assist.token.inc
  2. 6.2 includes/img_assist.token.inc

File

includes/img_assist.token.inc
View source
<?php

/**
 * Implementation of hook_token_values().
 */
function img_assist_token_values($type, $object = NULL, $options = array()) {
  $values = array();
  switch ($type) {
    case 'node':
      $node = $object;
      $values['teaser'] = img_assist_sanitize($node->teaser);
      $values['body'] = img_assist_sanitize($node->body);
      break;
  }
  return $values;
}

/**
 * Implementation of hook_token_list().
 */
function img_assist_token_list($type = 'all') {
  if ($type == 'node' || $type == 'all') {
    $tokens['node']['teaser'] = t('Node teaser text (plain text)');
    $tokens['node']['body'] = t('Node body text (plain text)');
    return $tokens;
  }
}

Functions

Namesort descending Description
img_assist_token_list Implementation of hook_token_list().
img_assist_token_values Implementation of hook_token_values().