You are here

function commerce_message_tokens in Commerce Message 7

Implements hook_tokens().

File

./commerce_message.tokens.inc, line 22
Token integration for the Commerce order backoffice module.

Code

function commerce_message_tokens($type, $tokens, array $data = array(), array $options = array()) {
  $replacements = array();
  foreach ($tokens as $name => $original) {
    if ($name == 'site-logo') {
      $replacements[$original] = theme('image', array(
        'path' => theme_get_setting('logo', variable_get('theme_default')),
        'alt' => variable_get('site_name'),
        'title' => variable_get('site_name'),
      ));
    }
  }
  return $replacements;
}