aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 01:43:35 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 01:43:35 +0000
commit366960aff06e202aa9876686bdd5f8ad7a25e71d (patch)
tree9e7f85578aa4a4cb2da1b218f0b311a440fb32d7 /engine/lib/views.php
parentb6fb4be0c17a53a0e33fb3b74f75f4dba056dc7c (diff)
downloadelgg-366960aff06e202aa9876686bdd5f8ad7a25e71d.tar.gz
elgg-366960aff06e202aa9876686bdd5f8ad7a25e71d.tar.bz2
Refs #2980: Added an elgg_view_icon function
git-svn-id: http://code.elgg.org/elgg/trunk@8407 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index bed9ee874..b1c42680a 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1276,6 +1276,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.
*
* Alternative template handlers can be registered to handle