www.gusucode.com > Elgg PHP开源SNS系统 V1.12.5源码程序 > elgg-1.12.5/views/default/output/location.php

    <?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);