You are here

function theme_print_mail_format_link in Printer, email and PDF versions 5.4

Same name and namespace in other branches
  1. 5.3 print_mail/print_mail.module \theme_print_mail_format_link()
  2. 6 print_mail/print_mail.module \theme_print_mail_format_link()
  3. 7 print_mail/print_mail.module \theme_print_mail_format_link()
  4. 5.x print_mail/print_mail.module \theme_print_mail_format_link()

Format the send by e-mail link

Return value

array of formatted attributes

2 theme calls to theme_print_mail_format_link()
print_mail_insert_link in print_mail/print_mail.module
Auxiliary function to display a formatted send by e-mail link
print_mail_link in print_mail/print_mail.module
Implementation of hook_link().

File

print_mail/print_mail.module, line 380

Code

function theme_print_mail_format_link() {
  $print_mail_link_class = variable_get('print_mail_link_class', PRINT_MAIL_LINK_CLASS_DEFAULT);
  $print_mail_show_link = variable_get('print_mail_show_link', PRINT_MAIL_SHOW_LINK_DEFAULT);
  $print_mail_link_text = filter_xss(variable_get('print_mail_link_text', t('Send to friend')));
  $img = drupal_get_path('module', 'print') . '/icons/mail_icon.gif';
  $title = t('Send this page by e-mail.');
  $class = strip_tags($print_mail_link_class);
  $new_window = FALSE;
  $format = _print_format_link_aux($print_mail_show_link, $print_mail_link_text, $img);
  return array(
    'text' => $format['text'],
    'html' => $format['html'],
    'attributes' => print_fill_attributes($title, $class, $new_window),
  );
}