You are here

function template_preprocess_insert_icon_link in Insert 7

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

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

File

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

Code

function template_preprocess_insert_icon_link(&$vars) {
  $vars = _insert_default_vars($vars);
  $vars['name'] = $vars['file']->filename;
  $vars['type'] = $vars['file']->filemime . '; length=' . $vars['file']->filesize;
  $vars['icon'] = theme('file_icon', array(
    'file' => $vars['file'],
  ));
}