aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--images/mail.pngbin0 -> 245 bytes
-rw-r--r--template.php28
2 files changed, 27 insertions, 1 deletions
diff --git a/images/mail.png b/images/mail.png
new file mode 100644
index 0000000..051d804
--- /dev/null
+++ b/images/mail.png
Binary files differ
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;
+}