oc-content/themes/veronika/functions.php
// LOCATION FORMATER - USED ON SEARCH LIST
LOCATION FORMATER - USED ON SEARCH LIST
LOCATION FORMATER - USED ON SEARCH LIST
function veronika_location_format($country = null, $region = null, $city = null) { 
  if($country <> '') {
    if(strlen($country) == 2) {
      $country_full = Country::newInstance()->findByCode($country);
    } else {
      $country_full = Country::newInstance()->findByName($country);
    }
    if($region <> '') {
      if($city <> '') {
        return $city . ' ' . __('in', 'veronika') . ' ' . $region . ($country_full['s_name'] <> '' ? ' (' . $country_full['s_name'] . ')' : '');
      } else {
        return $region . ' (' . $country_full['s_name'] . ')';
      }
    } else { 
      if($city <> '') {
        return $city . ' ' . __('in', 'veronika') . ' ' . $country_full['s_name'];
      } else {
        return $country_full['s_name'];
      }
    }
  } else {
    if($region <> '') {
      if($city <> '') {
        return $city . ' ' . __('in', 'veronika') . ' ' . $region;
      } else {
        return $region;
      }
    } else { 
      if($city <> '') {
        return $city;
      } else {
        return __('Location not entered', 'veronika');
      }
    }
  }
}
function veronika_location_format ( $ country = null , $ region = null , $ city = null ) { if ( $ country <> '' ) { if ( strlen ( $ country ) == 2 ) { $ country_full = Country :: newInstance ( ) -> findByCode ( $ country ) ; } else { $ country_full = Country :: newInstance ( ) -> findByName ( $ country ) ; } if ( $ region <> '' ) { if ( $ city <> '' ) { return $ city . ' ' . __ ( 'in' , 'veronika' ) . ' ' . $ region . ( $ country_full [ 's_name' ] <> '' ? ' (' . $ country_full [ 's_name' ] . ')' : '' ) ; } else { return $ region . ' (' . $ country_full [ 's_name' ] . ')' ; } } else { if ( $ city <> '' ) { return $ city . ' ' . __ ( 'in' , 'veronika' ) . ' ' . $ country_full [ 's_name' ] ; } else { return $ country_full [ 's_name' ] ; } } } else { if ( $ region <> '' ) { if ( $ city <> '' ) { return $ city . ' ' . __ ( 'in' , 'veronika' ) . ' ' . $ region ; } else { return $ region ; } } else { if ( $ city <> '' ) { return $ city ; } else { return __ ( 'Location not entered' , 'veronika' ) ; } } } }
LOCATION FORMATER - USED ON SEARCH LIST
LOCATION FORMATER - USED ON SEARCH LIST