You are here

function print_help in Printer, email and PDF versions 6

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. 7.2 print.module \print_help()
  5. 7 print.module \print_help()
  6. 5.x print.module \print_help()

Implementation of hook_help().

File

./print.module, line 413
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', unserialize(PRINT_HTML_LINK_POS_DEFAULT));
  if ($path !== 'node/%' && !empty($print_html_link_pos['help'])) {
    static $output = FALSE;
    if ($output === FALSE) {
      $output = TRUE;
      $link = print_insert_link();
      if ($link) {
        return "<span class='print-syslink'>{$link}</span>";
      }
    }
  }
}