aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/views.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 553c327a0..e2cf6b5c3 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1278,12 +1278,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 string $name The specific icon to display
+ * @param bool $float Whether to float the icon
*
* @return string The html for displaying an icon
*/
-function elgg_view_icon($name) {
- return "<span class=\"elgg-icon elgg-icon-$name\"></span>";
+function elgg_view_icon($name, $float = false) {
+ if ($float) {
+ $float = 'float';
+ }
+ return "<span class=\"elgg-icon elgg-icon-$name $float\"></span>";
}
/**