You are here

function template_preprocess_attachment_links in Attachment Links 7

Same name and namespace in other branches
  1. 6 attachment_links.module \template_preprocess_attachment_links()

Process variables for attachment-links.tpl.php.

File

./attachment_links.module, line 331

Code

function template_preprocess_attachment_links(&$vars) {
  $node = $vars['node'];
  $options = array(
    'absolute' => TRUE,
  );
  $vars['items'] = array(
    t('Preferred version: !link', array(
      '!link' => l(url("node/{$node->nid}/attachment", $options), "node/{$node->nid}/attachment"),
    )),
    t('Newest version: !link', array(
      '!link' => l(url("node/{$node->nid}/attachment/newest", $options), "node/{$node->nid}/attachment/newest"),
    )),
  );
}