aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/location.php
blob: e1009f17d4c0832645e465f903b5038db2f6ac5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/**
 * Display a location
 *
 * @uses $vars['entity'] The ElggEntity that has a location
 * @uses $vars['value']  The location string if the entity is not passed
 */

if (isset($vars['entity'])) {
	$vars['value'] = $vars['entity']->location;
	unset($vars['entity']);
}

// Fixes #4566 we used to allow arrays of strings for location
if (is_array($vars['value'])) {
	$vars['value'] = implode(', ', $vars['value']);
}

echo elgg_view('output/tag', $vars);