Add region display to profile card

This commit is contained in:
Hypolite Petovan 2018-10-25 23:36:04 -04:00
parent 90ea11c6d8
commit a22dc105be
1 changed files with 10 additions and 2 deletions

View File

@ -9,8 +9,16 @@
<div class="location">
<?php
$parts = array();
if(!empty($profile['locality'])) $parts[] = $profile['locality'];
if(!empty($profile['country-name'])) $parts[] = $profile['country-name'];
if(!empty($profile['locality'])) {
$parts[] = $profile['locality'];
}
if(!empty($profile['region'])
&& strtolower($profile['locality']) != strtolower($profile['region'])) {
$parts[] = $profile['region'];
}
if(!empty($profile['country-name'])) {
$parts[] = $profile['country-name'];
}
?>
<?php if (count($parts)): ?>