diff options
author | Evan Winslow <evan.b.winslow@gmail.com> | 2010-10-18 22:48:22 +0000 |
---|---|---|
committer | Evan Winslow <evan.b.winslow@gmail.com> | 2010-10-18 22:48:22 +0000 |
commit | e87c1b5d6a208cdf81a7d0d756dc755bec0322da (patch) | |
tree | 5346722e325efae6a8e3a2f2a5293fe7fc75e541 | |
parent | fea75c1f48b4ef798f1687698a22cba82a3713da (diff) | |
download | elgg-e87c1b5d6a208cdf81a7d0d756dc755bec0322da.tar.gz elgg-e87c1b5d6a208cdf81a7d0d756dc755bec0322da.tar.bz2 |
Added support for tags with bodies
-rw-r--r-- | views/default/html/tag.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/views/default/html/tag.php b/views/default/html/tag.php index d2f888d49..8ad6679b4 100644 --- a/views/default/html/tag.php +++ b/views/default/html/tag.php @@ -41,7 +41,17 @@ foreach ($attributes as $attr => $val) { $element[] = "$attr=\"$val\""; } } -$element[] = $js; -$element[] = "/>"; -echo implode(" ", $element);
\ No newline at end of file +if (!empty($js)) { + $element[] = $js; +} + +if (!isset($vars['body'])) { + $element[] = '/'; +} + +echo implode(" ", $element).">"; + +if (isset($vars['body'])) { + echo $vars['body']."</$tag>"; +}
\ No newline at end of file |