You are here

function print_mail_insert_link in Printer, email and PDF versions 7.2

Same name and namespace in other branches
  1. 5.4 print_mail/print_mail.module \print_mail_insert_link()
  2. 5.3 print_mail/print_mail.module \print_mail_insert_link()
  3. 6 print_mail/print_mail.module \print_mail_insert_link()
  4. 7 print_mail/print_mail.module \print_mail_insert_link()
  5. 5.x print_mail/print_mail.module \print_mail_insert_link()

Auxiliary function to display a formatted send by email link.

Function made available so that developers may call this function from their defined pages/blocks.

Parameters

string $path: path to be used in the link. If not specified, the current URL is used.

object $node: node object, to be used in checking node access. If the path argument is not provided, the path used will be node/nid.

string $location: Where in the page where the link is being inserted ('link', 'corner', 'block', 'help').

Return value

string string with the HTML link to the printer-friendly page

Related topics

File

print_mail/print_mail.module, line 311
Displays Printer-friendly versions of Drupal pages.

Code

function print_mail_insert_link($path = NULL, $node = NULL, $location = '') {
  if (function_exists('print_ui_insert_link')) {
    return print_ui_insert_link(print_mail_print_link(), array(
      'path' => $path,
      'node' => $node,
      'location' => $location,
    ));
  }
  else {
    return FALSE;
  }
}