aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/url.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 20:30:20 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 20:30:20 +0000
commite3bc71795b95e9aadeb0d0e3a50a07e535130894 (patch)
tree1e3d2d0dcd238e6dc98fbb7260384a6bd38f5d27 /views/default/output/url.php
parentc2022183edfb8e0120b32c54d1c2d93096810080 (diff)
downloadelgg-e3bc71795b95e9aadeb0d0e3a50a07e535130894.tar.gz
elgg-e3bc71795b95e9aadeb0d0e3a50a07e535130894.tar.bz2
Added title to url output.
git-svn-id: http://code.elgg.org/elgg/trunk@6215 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/output/url.php')
-rw-r--r--views/default/output/url.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/views/default/output/url.php b/views/default/output/url.php
index c5058f18e..289fdc5cc 100644
--- a/views/default/output/url.php
+++ b/views/default/output/url.php
@@ -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