aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-09-15 21:21:14 -0400
committercash <cash.costello@gmail.com>2011-09-15 21:21:14 -0400
commit6fab3ed243d3e2688916dcb65141e37bef1cc4c3 (patch)
tree22b0c950262551adebe109fd9245d521f3057e08 /engine/lib/views.php
parentd3d5ef824e3dafaf7165ba88712c74a4140c171c (diff)
downloadelgg-6fab3ed243d3e2688916dcb65141e37bef1cc4c3.tar.gz
elgg-6fab3ed243d3e2688916dcb65141e37bef1cc4c3.tar.bz2
Fixes #3178 updated elgg_view_icon() to take an optional class
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 0646851f0..2f1661e83 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1308,15 +1308,16 @@ function elgg_view_list_item($item, array $vars = array()) {
* Shorthand for <span class="elgg-icon elgg-icon-$name"></span>
*
* @param string $name The specific icon to display
- * @param bool $float Whether to float the icon
+ * @param string $class Additional class: float, float-alt, or custom class
*
* @return string The html for displaying an icon
*/
-function elgg_view_icon($name, $float = false) {
- if ($float) {
- $float = 'float';
+function elgg_view_icon($name, $class = '') {
+ // @todo deprecate boolean in Elgg 1.9
+ if (is_bool($class) && $class === true) {
+ $class = 'float';
}
- return "<span class=\"elgg-icon elgg-icon-$name $float\"></span>";
+ return "<span class=\"elgg-icon elgg-icon-$name $class\"></span>";
}
/**