diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-10-03 19:02:49 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-10-03 19:02:49 -0700 |
commit | c1ae08ad43ef1eafbd92fc9526c2fdecbe5c5977 (patch) | |
tree | b458316db9f39b2b0f820952d2a05ffd1ad145a0 /mod/file/views/default/icon/object | |
parent | e1283016e48e2f785442ee8a0d18cd09376d241c (diff) | |
parent | 9d5c00c78c0666a31485d870a1e657d4557b23c4 (diff) | |
download | elgg-c1ae08ad43ef1eafbd92fc9526c2fdecbe5c5977.tar.gz elgg-c1ae08ad43ef1eafbd92fc9526c2fdecbe5c5977.tar.bz2 |
Merge pull request #70 from cash/embed-menu
Fixes #3852, #3854, #3855 Refs #3567 Embed plugin rewrite
Diffstat (limited to 'mod/file/views/default/icon/object')
-rw-r--r-- | mod/file/views/default/icon/object/file.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mod/file/views/default/icon/object/file.php b/mod/file/views/default/icon/object/file.php index 6357d418f..7feba7af3 100644 --- a/mod/file/views/default/icon/object/file.php +++ b/mod/file/views/default/icon/object/file.php @@ -2,9 +2,10 @@ /** * File icon view * - * @uses $vars['entity'] The entity the icon represents - uses getIconURL() method - * @uses $vars['size'] topbar, tiny, small, medium (default), large, master - * @uses $vars['href'] Optional override for link + * @uses $vars['entity'] The entity the icon represents - uses getIconURL() method + * @uses $vars['size'] topbar, tiny, small, medium (default), large, master + * @uses $vars['href'] Optional override for link + * @uses $vars['link_class'] Optional CSS class added to img */ $entity = $vars['entity']; @@ -32,10 +33,14 @@ $img_src = elgg_format_url($img_src); $img = "<img $class src=\"$img_src\" alt=\"$title\" />"; if ($url) { - echo elgg_view('output/url', array( + $params = array( 'href' => $url, 'text' => $img, - )); + ); + if (isset($vars['link_class'])) { + $params['class'] = $vars['link_class']; + } + echo elgg_view('output/url', $params); } else { echo $img; } |