diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-11-08 19:09:53 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-11-08 19:09:53 -0200 |
commit | 14d4276edc0c51bdc17e6a42d8b3f546cbd58814 (patch) | |
tree | fd49cad48663884c392b4a100009c77277f2cc67 /template.php | |
parent | 4ac9d27a8c1d138557820a5916690183f6d0a0df (diff) | |
download | muambeiro-14d4276edc0c51bdc17e6a42d8b3f546cbd58814.tar.gz muambeiro-14d4276edc0c51bdc17e6a42d8b3f546cbd58814.tar.bz2 |
Mail icon
Diffstat (limited to 'template.php')
-rw-r--r-- | template.php | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/template.php b/template.php index 1353aa9..615b9b8 100644 --- a/template.php +++ b/template.php @@ -223,7 +223,6 @@ function muambeiro_field($variables) { return $output; } - /** * Implements hook_theme(). */ @@ -287,3 +286,30 @@ function muambeiro_ns() { } return $output; } + +/** + * Overrides theme_link(). + */ +function muambeiro_link($variables) { + if ($variables['path'] == 'messages') { + $path = drupal_get_path('theme', 'muambeiro'); + $mail = theme('image', + array( + 'path' => $path .'/images/mail.png', + 'alt' => t('Item unavailable'), + 'title' => t('Item unavailable'), + ) + ); + + $link = '<a href="' . check_plain(url($variables['path'], $variables['options'])); + $link .= '"' . drupal_attributes($variables['options']['attributes']) . '>'; + $link .= $mail; + $link .= ($variables['options']['html'] ? $variables['text'] : check_plain($variables['text'])); + $link .= '</a>'; + } + else { + return theme_link($variables); + } + + return $link; +} |