]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2980: Added an elgg_view_icon function
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 01:43:35 +0000 (01:43 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 01:43:35 +0000 (01:43 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8407 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/views.php

index bed9ee874748b9c039ca7eba6096ab4ed550d651..b1c42680a30f8729678b4a020b6c9b5bc9b05da1 100644 (file)
@@ -1275,6 +1275,19 @@ function elgg_view_list_item($item, $full_view, array $vars = array()) {
        }
 }
 
+/**
+ * View one of the elgg sprite icons
+ * 
+ * Shorthand for <span class="elgg-icon elgg-icon-$name"></span>
+ * 
+ * @param string $type The specific icon to display
+ * 
+ * @returns string The html for displaying an icon
+ */
+function elgg_view_icon($name) {
+       return "<span class=\"elgg-icon elgg-icon-$name\"></span>";
+}
+
 /**
  * Registers a function to handle templates.
  *