You are here

function print_epub_insert_link in Printer, email and PDF versions 7.2

Auxiliary function to display a formatted EPUB version 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

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

Related topics

File

print_epub/print_epub.module, line 153
Displays Printer-friendly versions of Drupal pages.

Code

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