function update
This commit is contained in:
parent
803596c2ad
commit
298ea0c557
|
@ -1610,18 +1610,38 @@ if (!function_exists('mep_get_only_time')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('mep_get_event_city')) {
|
if (!function_exists('mep_get_event_city')) {
|
||||||
function mep_get_event_city($id){
|
function mep_get_event_city($event_id){
|
||||||
$location_sts = get_post_meta($id,'mep_org_address',true);
|
$location_sts = get_post_meta($event_id, 'mep_org_address', true) ? get_post_meta($event_id, 'mep_org_address', true) : '';
|
||||||
$event_meta = get_post_custom($id);
|
ob_start();
|
||||||
if($location_sts){
|
if ($location_sts) {
|
||||||
$org_arr = get_the_terms( $id, 'mep_org' );
|
$org_arr = get_the_terms($event_id, 'mep_org');
|
||||||
if(is_array($org_arr) && sizeof($org_arr) > 0 ){
|
|
||||||
$org_id = $org_arr[0]->term_id;
|
$org_id = $org_arr[0]->term_id;
|
||||||
echo "<span>".mep_ev_venue($id).' '.get_term_meta( $org_id, 'org_city', true )."</span>";
|
$location = get_term_meta($org_id, 'org_location', true) ? get_term_meta($org_id, 'org_location', true) : '';
|
||||||
}
|
$street = get_term_meta($org_id, 'org_street', true) ? get_term_meta($org_id, 'org_street', true) : '';
|
||||||
}else{
|
$city = get_term_meta($org_id, 'org_city', true) ? get_term_meta($org_id, 'org_city', true) : '';
|
||||||
echo "<span>".mep_ev_venue($id).' '.$event_meta['mep_city'][0]."</span>";
|
$state = get_term_meta($org_id, 'org_state', true) ? get_term_meta($org_id, 'org_state', true) : '';
|
||||||
|
$zip = get_term_meta($org_id, 'org_postcode', true) ? get_term_meta($org_id, 'org_postcode', true) : '';
|
||||||
|
$country = get_term_meta($org_id, 'org_country', true) ? get_term_meta($org_id, 'org_country', true) : '';
|
||||||
|
} else {
|
||||||
|
$location = get_post_meta($event_id, 'mep_location_venue', true) ? get_post_meta($event_id, 'mep_location_venue', true) : '';
|
||||||
|
$street = get_post_meta($event_id, 'mep_street', true) ? get_post_meta($event_id, 'mep_street', true) : '';
|
||||||
|
$city = get_post_meta($event_id, 'mep_city', true) ? get_post_meta($event_id, 'mep_city', true) : '';
|
||||||
|
$state = get_post_meta($event_id, 'mep_state', true) ? get_post_meta($event_id, 'mep_state', true) : '';
|
||||||
|
$zip = get_post_meta($event_id, 'mep_postcode', true) ? get_post_meta($event_id, 'mep_postcode', true) : '';
|
||||||
|
$country = get_post_meta($event_id, 'mep_country', true) ? get_post_meta($event_id, 'mep_country', true) : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$location_arr = [$location, $city];
|
||||||
|
$content = implode(', ', array_filter($location_arr));
|
||||||
|
$address_arr = array(
|
||||||
|
'location' => $location,
|
||||||
|
'street' => $street,
|
||||||
|
'state' => $state,
|
||||||
|
'zip' => $zip,
|
||||||
|
'city' => $city,
|
||||||
|
'country' => $country
|
||||||
|
);
|
||||||
|
echo apply_filters('mage_event_location_in_list_view', $content, $event_id, $address_arr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue