You are here

function print_link in Printer, email and PDF versions 5

Same name and namespace in other branches
  1. 5.4 print.module \print_link()
  2. 5.2 print.module \print_link()
  3. 5.3 print.module \print_link()
  4. 6 print.module \print_link()
  5. 5.x print.module \print_link()

Implementation of hook_link().

File

./print.module, line 57
Display printer friendly versions of nodes (except books)

Code

function print_link($type, $node = 0, $main = 0) {
  $links = array();
  if ($node->type == 'book' && function_exists('book_link')) {
    return;
  }
  $print_settings = variable_get('print_settings', print_settings_default());
  if ($type == 'node' && $print_settings['show_link'] && $main == 0) {
    $links['print'] = theme('print_link', $node);
  }
  return $links;
}