You are here

function theme_print_format_link in Printer, email and PDF versions 6

Same name and namespace in other branches
  1. 5.4 print.module \theme_print_format_link()
  2. 5.3 print.module \theme_print_format_link()
  3. 7 print.module \theme_print_format_link()
  4. 5.x print.module \theme_print_format_link()

Format the Printer-friendly link

Return value

array of formatted attributes

3 theme calls to theme_print_format_link()
print_insert_link in ./print.module
Auxiliary function to display a formatted Printer-friendly link
print_link in ./print.module
Implementation of hook_link().
print_link_alter in ./print.module
Implementation of hook_link_alter().

File

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

Code

function theme_print_format_link() {
  $print_html_link_class = variable_get('print_html_link_class', PRINT_HTML_LINK_CLASS_DEFAULT);
  $print_html_new_window = variable_get('print_html_new_window', PRINT_HTML_NEW_WINDOW_DEFAULT);
  $print_html_show_link = variable_get('print_html_show_link', PRINT_HTML_SHOW_LINK_DEFAULT);
  $print_html_link_text = filter_xss(variable_get('print_html_link_text', t('Printer-friendly version')));
  $img = drupal_get_path('module', 'print') . '/icons/print_icon.gif';
  $title = t('Display a printer-friendly version of this page.');
  $class = strip_tags($print_html_link_class);
  $new_window = $print_html_new_window;
  $format = _print_format_link_aux($print_html_show_link, $print_html_link_text, $img);
  return array(
    'text' => $format['text'],
    'html' => $format['html'],
    'attributes' => print_fill_attributes($title, $class, $new_window),
  );
}