aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-08 15:04:31 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-08 15:04:31 +0000
commit02d4828a86ae00355ebe750d7d121d2dfd29e57e (patch)
treef015929dc6aef6bdc57bc2ee100fc9dbe2dc48b1 /engine/lib/entities.php
parentfedfac5799b93b0609f4a9fab4623f95b3c906ae (diff)
downloadelgg-02d4828a86ae00355ebe750d7d121d2dfd29e57e.tar.gz
elgg-02d4828a86ae00355ebe750d7d121d2dfd29e57e.tar.bz2
Simple hook to allow for default user and entity icons.
git-svn-id: https://code.elgg.org/elgg/trunk@2225 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 74f3cdfc1..3adf4b8ee 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1871,8 +1871,13 @@
$url = trigger_plugin_hook('entity:icon:url', $entity->getType(), array('entity' => $entity, 'viewtype' => $viewtype, 'size' => $size), $url);
// Fail, so use default
- if (!$url)
- $url = $CONFIG->url . "_graphics/icons/default/$size.png";
+ if (!$url) {
+
+ $test = elgg_view("icon/entity/default/{$size}",array('entity' => $entity));
+ if (!empty($test)) return $test;
+
+ $url = $CONFIG->url . "_graphics/icons/default/$size.png";
+ }
return $url;
}