You are here

function template_preprocess_insert_link in Insert 6

Same name and namespace in other branches
  1. 8.2 insert.module \template_preprocess_insert_link()
  2. 8 insert.module \template_preprocess_insert_link()
  3. 7 includes/insert.inc \template_preprocess_insert_link()

Preprocess variables for the insert-link.tpl.php file.

File

includes/insert.inc, line 59
Insert support for generic files.

Code

function template_preprocess_insert_link(&$vars) {
  $absolute = isset($vars['widget']['insert_absolute']) ? $vars['widget']['insert_absolute'] : NULL;
  $vars['url'] = insert_create_url($vars['item']['filepath'], $absolute);
  $vars['class'] = !empty($vars['widget']['insert_class']) ? $vars['widget']['insert_class'] : '';
  $vars['name'] = $vars['item']['filename'];
}