blob: 043b1d78e502cb95fddedadaba3d6250cad91c3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
$linkstr = '';
if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) {
$categories = $vars['entity']->universal_categories;
if (!empty($categories)) {
if (!is_array($categories)) {
$categories = array($categories);
}
foreach($categories as $category) {
$link = elgg_get_site_url() . 'pg/categories/list/?category=' . urlencode($category);
if (!empty($linkstr)) {
$linkstr .= ', ';
}
$linkstr .= '<a href="'.$link.'">' . $category . '</a>';
}
}
}
echo $linkstr;
|