You are here

function print_ui_help in Printer, email and PDF versions 7.2

Implements hook_help().

File

print_ui/print_ui.module, line 127
Printer-friendly pages User Interface module.

Code

function print_ui_help($path, $arg) {
  $links = '';
  if ($path !== 'node/%' && $path !== 'node/%/revisions/%/view') {
    static $output = FALSE;
    if ($output === FALSE) {
      $output = TRUE;
      foreach (module_implements('print_link') as $module) {
        $function = $module . '_print_link';
        if (function_exists($function)) {
          $link = call_user_func_array($function, array());
          $link_pos = variable_get('print_' . $link['format'] . '_link_pos', drupal_json_decode(PRINT_UI_LINK_POS_DEFAULT));
          if (!empty($link_pos['help'])) {
            $links .= print_ui_insert_link($link, array(
              'location' => 'help',
            ));
          }
        }
      }
      if ($links) {
        return "<span class='print-syslink'>{$links}</span>";
      }
    }
  }
  return '';
}