You are here

function print_help in Printer, email and PDF versions 5.x

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

Implementation of hook_help().

File

./print.module, line 358
Displays Printer-friendly versions of Drupal pages.

Code

function print_help($path, $arg) {
  switch ($path) {
    case 'admin/help#print':

      // Return a line-break version of the module README
      return filter_filter('process', 1, NULL, file_get_contents(drupal_get_path('module', 'print') . '/README.txt'));
  }
  $print_html_link_pos = variable_get('print_html_link_pos', array(
    PRINT_HTML_LINK_POS_DEFAULT => PRINT_HTML_LINK_POS_DEFAULT,
  ));
  if ($path !== 'node/%' && !(empty($print_html_link_pos['link']) && empty($print_html_link_pos['corner']))) {
    static $output = FALSE;
    if ($output === FALSE) {
      $output = TRUE;
      $link = print_insert_link();
      if ($link) {
        return "<span class='print-syslink'>{$link}</span>";
      }
    }
  }
}