]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added title to url output.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 25 May 2010 20:30:20 +0000 (20:30 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 25 May 2010 20:30:20 +0000 (20:30 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6215 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/output/url.php

index c5058f18e6ac1c85c9fcf6efcc47a175eb22c7ac..289fdc5ccd794d80c9c22de9385126cc1c0b2697 100644 (file)
@@ -14,6 +14,7 @@
  * @uses bool $vars['encode_text'] Run $vars['text'] through htmlentities()?
  * @uses string $vars['class'] what to add in class=""
  * @uses string $vars['js'] Javascript to insert in <a> tag
+ * @uses string $vars['title'] Title attribute to <a> tag
  * @uses bool $vars['is_action'] Is this a link to an action?
  *
  */
@@ -60,5 +61,11 @@ if (!empty($url)) {
                $url = elgg_add_action_tokens_to_url($url);
        }
 
-       echo "<a href=\"{$url}\" $target $class $js>$text</a>";
+       if (isset($vars['title'])) {
+               $title = 'title="' . htmlentities($vars['title']) . '"';
+       } else {
+               $title = '';
+       }
+
+       echo "<a href=\"{$url}\" $target $class $js $title>$text</a>";
 }
\ No newline at end of file