version 2.2.9
This commit is contained in:
parent
c0deea6937
commit
5d53cc798b
|
@ -220,7 +220,7 @@ $author_terms = get_the_terms(get_the_id(), 'mep_org');
|
||||||
?>
|
?>
|
||||||
<div class='mep_event_<?php echo $style; ?>_item mix <?php echo $tt[0]->slug; ?> <?php echo $torg[0]->slug; ?>'>
|
<div class='mep_event_<?php echo $style; ?>_item mix <?php echo $tt[0]->slug; ?> <?php echo $torg[0]->slug; ?>'>
|
||||||
<div class="mep_list_thumb">
|
<div class="mep_list_thumb">
|
||||||
<?php the_post_thumbnail('full'); ?>
|
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('full'); ?></a>
|
||||||
<div class="mep-ev-start-date">
|
<div class="mep-ev-start-date">
|
||||||
<div class="mep-day"><?php echo date('d', strtotime($event_meta['mep_event_start_date'][0])); ?></div>
|
<div class="mep-day"><?php echo date('d', strtotime($event_meta['mep_event_start_date'][0])); ?></div>
|
||||||
<div class="mep-month"><?php echo date('M', strtotime($event_meta['mep_event_start_date'][0])); ?></div>
|
<div class="mep-month"><?php echo date('M', strtotime($event_meta['mep_event_start_date'][0])); ?></div>
|
||||||
|
@ -253,7 +253,7 @@ if($style=='list'){
|
||||||
<div class="evl-ico"><i class="fa fa-map-marker"></i> </div>
|
<div class="evl-ico"><i class="fa fa-map-marker"></i> </div>
|
||||||
<div class="evl-cc">
|
<div class="evl-cc">
|
||||||
<h5>Location:</h5>
|
<h5>Location:</h5>
|
||||||
<h6><?php echo $event_meta['mep_city'][0]; ?></h6>
|
<h6><?php mep_get_event_city(get_the_id()); ?></h6>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -0,0 +1,404 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
add_action( 'mep_org_add_form_fields', 'mep_org_tax_location_fileds', 10, 2 );
|
||||||
|
function mep_org_tax_location_fileds($taxonomy) {
|
||||||
|
?>
|
||||||
|
<div class="form-field term-group">
|
||||||
|
<label for="org_location"><?php _e('Location/Venue', 'mage-eventpress'); ?></label>
|
||||||
|
<input type="text" name="org_location" id='org_location' class="postform">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-field term-group">
|
||||||
|
<label for="org_street"><?php _e('Street:', 'mage-eventpress'); ?></label>
|
||||||
|
<input type="text" name="org_street" id='org_street' class="postform">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-field term-group">
|
||||||
|
<label for="org_city"><?php _e('City:', 'mage-eventpress'); ?></label>
|
||||||
|
<input type="text" name="org_city" id='org_city' class="postform">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-field term-group">
|
||||||
|
<label for="org_state"><?php _e('State:', 'mage-eventpress'); ?></label>
|
||||||
|
<input type="text" name="org_state" id='org_state' class="postform">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-field term-group">
|
||||||
|
<label for="org_postcode"><?php _e('Postcode:', 'mage-eventpress'); ?></label>
|
||||||
|
<input type="text" name="org_postcode" id='org_postcode' class="postform">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-field term-group">
|
||||||
|
<label for="org_country"><?php _e('Country:', 'mage-eventpress'); ?></label>
|
||||||
|
<input type="text" name="org_country" id='org_country' class="postform">
|
||||||
|
</div>
|
||||||
|
<div class='sec'>
|
||||||
|
<?php
|
||||||
|
$user_api = mep_get_option( 'google-map-api', 'general_setting_sec', '');
|
||||||
|
if($user_api){
|
||||||
|
?>
|
||||||
|
<input id="pac-input" name='location_name' value='<?php //echo $values['location_name'][0]; ?>'/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="text" class="form-control" style="display: none;" required name="latitude" value="">
|
||||||
|
<input type="text" class="form-control" style="display: none;" required name="longitude" value="">
|
||||||
|
<div id="map"></div>
|
||||||
|
<?php
|
||||||
|
$user_api = mep_get_option( 'google-map-api', 'general_setting_sec', '');
|
||||||
|
if($user_api){
|
||||||
|
//wp_enqueue_script('gmap-libs','https://maps.googleapis.com/maps/api/js?key='.$user_api.'&libraries=places&callback=initMap',array('jquery','gmap-scripts'),1,true);
|
||||||
|
?>
|
||||||
|
<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&libraries=places&callback=initMap&ver=1'></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
function initMap() {
|
||||||
|
var map = new google.maps.Map(document.getElementById('map'), {
|
||||||
|
center: {
|
||||||
|
lat: 37.0902,
|
||||||
|
lng: 95.7129
|
||||||
|
},
|
||||||
|
zoom: 17
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var input = /** @type {!HTMLInputElement} */ (
|
||||||
|
document.getElementById('pac-input'));
|
||||||
|
|
||||||
|
var types = document.getElementById('type-selector');
|
||||||
|
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
|
||||||
|
map.controls[google.maps.ControlPosition.TOP_LEFT].push(types);
|
||||||
|
|
||||||
|
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||||
|
autocomplete.bindTo('bounds', map);
|
||||||
|
|
||||||
|
var infowindow = new google.maps.InfoWindow();
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
map: map,
|
||||||
|
anchorPoint: new google.maps.Point(0, -29),
|
||||||
|
draggable: true,
|
||||||
|
position: {lat: 37.0902, lng: 95.7129}
|
||||||
|
});
|
||||||
|
|
||||||
|
google.maps.event.addListener(marker, 'dragend', function() {
|
||||||
|
document.getElementsByName('latitude')[0].value = marker.getPosition().lat();
|
||||||
|
document.getElementsByName('longitude')[0].value = marker.getPosition().lng();
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
autocomplete.addListener('place_changed', function() {
|
||||||
|
infowindow.close();
|
||||||
|
marker.setVisible(false);
|
||||||
|
var place = autocomplete.getPlace();
|
||||||
|
if (!place.geometry) {
|
||||||
|
window.alert("Autocomplete's returned place contains no geometry");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the place has a geometry, then present it on a map.
|
||||||
|
if (place.geometry.viewport) {
|
||||||
|
map.fitBounds(place.geometry.viewport);
|
||||||
|
} else {
|
||||||
|
map.setCenter(place.geometry.location);
|
||||||
|
map.setZoom(17); // Why 17? Because it looks good.
|
||||||
|
}
|
||||||
|
marker.setIcon( /** @type {google.maps.Icon} */ ({
|
||||||
|
url: 'http://maps.google.com/mapfiles/ms/icons/red.png',
|
||||||
|
size: new google.maps.Size(71, 71),
|
||||||
|
origin: new google.maps.Point(0, 0),
|
||||||
|
anchor: new google.maps.Point(17, 34),
|
||||||
|
scaledSize: new google.maps.Size(35, 35)
|
||||||
|
}));
|
||||||
|
marker.setPosition(place.geometry.location);
|
||||||
|
marker.setVisible(true);
|
||||||
|
|
||||||
|
var address = '';
|
||||||
|
if (place.address_components) {
|
||||||
|
address = [
|
||||||
|
(place.address_components[0] && place.address_components[0].short_name || ''),
|
||||||
|
(place.address_components[1] && place.address_components[1].short_name || ''),
|
||||||
|
(place.address_components[2] && place.address_components[2].short_name || '')
|
||||||
|
].join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
var latitude = place.geometry.location.lat();
|
||||||
|
var longitude = place.geometry.location.lng();
|
||||||
|
|
||||||
|
$("input[name=coordinate]").val(address);
|
||||||
|
$("input[name=latitude]").val(latitude);
|
||||||
|
$("input[name=longitude]").val(longitude);
|
||||||
|
|
||||||
|
//infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address);
|
||||||
|
//infowindow.open(map, marker);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
google.maps.event.addDomListener(window, "load", initMap);
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}else{
|
||||||
|
echo "<span class=mep_status><span class=err>No Google MAP API Key Found. Please enter API KEY <a href=".get_site_url()."/wp-admin/options-general.php?page=mep_event_settings_page>Here</a></span></span>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'created_mep_org', 'save_feature_meta', 10, 2 );
|
||||||
|
|
||||||
|
function save_feature_meta( $term_id, $tt_id ){
|
||||||
|
|
||||||
|
if( isset( $_POST['org_location'] )){
|
||||||
|
$org_location = strip_tags( $_POST['org_location'] );
|
||||||
|
add_term_meta( $term_id, 'org_location', $org_location);
|
||||||
|
}
|
||||||
|
if( isset( $_POST['org_street'] )){
|
||||||
|
$org_street = strip_tags( $_POST['org_street'] );
|
||||||
|
add_term_meta( $term_id, 'org_street', $org_street);
|
||||||
|
}
|
||||||
|
if( isset( $_POST['org_city'] )){
|
||||||
|
$org_city = strip_tags( $_POST['org_city'] );
|
||||||
|
add_term_meta( $term_id, 'org_city', $org_city);
|
||||||
|
}
|
||||||
|
if( isset( $_POST['org_state'] )){
|
||||||
|
$org_state = strip_tags( $_POST['org_state'] );
|
||||||
|
add_term_meta( $term_id, 'org_state', $org_state);
|
||||||
|
}
|
||||||
|
if( isset( $_POST['org_postcode'] )){
|
||||||
|
$org_postcode = strip_tags( $_POST['org_postcode'] );
|
||||||
|
add_term_meta( $term_id, 'org_postcode', $org_postcode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['org_country'] )){
|
||||||
|
$org_country = strip_tags( $_POST['org_country'] );
|
||||||
|
add_term_meta( $term_id, 'org_country', $org_country);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['latitude'] )){
|
||||||
|
$latitude = strip_tags( $_POST['latitude'] );
|
||||||
|
add_term_meta( $term_id, 'latitude', $latitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['longitude'] )){
|
||||||
|
$longitude = strip_tags( $_POST['longitude'] );
|
||||||
|
add_term_meta( $term_id, 'longitude', $longitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
add_action( 'mep_org_edit_form_fields', 'edit_feature_group_field', 10, 2 );
|
||||||
|
|
||||||
|
function edit_feature_group_field( $term, $taxonomy ){
|
||||||
|
?>
|
||||||
|
<tr class="form-field term-group-wrap">
|
||||||
|
<th scope="row"><label for="org_location"><?php _e('Location/Venue', 'mage-eventpress'); ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="org_location" id='org_location' class="postform" value='<?php echo get_term_meta( $term->term_id, 'org_location', true ); ?>'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="form-field term-group-wrap">
|
||||||
|
<th scope="row"><label for="org_street"><?php _e('Street:', 'mage-eventpress'); ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="org_street" id='org_street' class="postform" value='<?php echo get_term_meta( $term->term_id, 'org_street', true ); ?>'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="form-field term-group-wrap">
|
||||||
|
<th scope="row"><label for="org_city"><?php _e('City:', 'mage-eventpress'); ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="org_city" id='org_city' class="postform" value='<?php echo get_term_meta( $term->term_id, 'org_city', true ); ?>'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="form-field term-group-wrap">
|
||||||
|
<th scope="row"><label for="org_state"><?php _e('State:', 'mage-eventpress'); ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="org_state" id='org_state' class="postform" value='<?php echo get_term_meta( $term->term_id, 'org_state', true ); ?>'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="form-field term-group-wrap">
|
||||||
|
<th scope="row"><label for="org_postcode"><?php _e('Postcode:', 'mage-eventpress'); ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="org_postcode" id='org_postcode' class="postform" value='<?php echo get_term_meta( $term->term_id, 'org_postcode', true ); ?>'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="form-field term-group-wrap">
|
||||||
|
<th scope="row"><label for="org_country"><?php _e('Country:', 'mage-eventpress'); ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="org_country" id='org_country' class="postform" value='<?php echo get_term_meta( $term->term_id, 'org_country', true ); ?>'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="form-field term-group-wrap">
|
||||||
|
<th scope="row"><label for="org_country"><?php _e('Map:', 'mage-eventpress'); ?></label></th>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$user_api = mep_get_option( 'google-map-api', 'general_setting_sec', '');
|
||||||
|
if($user_api){
|
||||||
|
?>
|
||||||
|
<div class='sec'>
|
||||||
|
<input id="pac-input" name='location_name' value='<?php //echo $values['location_name'][0]; ?>'/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="text" class="form-control" style="display: none;" required name="latitude" value="<?php echo get_term_meta( $term->term_id, 'latitude', true ); ?>">
|
||||||
|
<input type="text" class="form-control" style="display: none;" required name="longitude" value="<?php echo get_term_meta( $term->term_id, 'longitude', true ); ?>">
|
||||||
|
<div id="map"></div>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if($user_api){
|
||||||
|
?>
|
||||||
|
<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&libraries=places&callback=initMap&ver=1'></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if(get_term_meta( $term->term_id, 'latitude', true )){
|
||||||
|
$lat = get_term_meta( $term->term_id, 'latitude', true );
|
||||||
|
}else{ $lat = '37.0902'; }
|
||||||
|
|
||||||
|
|
||||||
|
if(get_term_meta( $term->term_id, 'longitude', true )){
|
||||||
|
$lon = get_term_meta( $term->term_id, 'longitude', true );
|
||||||
|
}else{ $lon = '95.7129'; }
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
function initMap() {
|
||||||
|
var map = new google.maps.Map(document.getElementById('map'), {
|
||||||
|
center: {
|
||||||
|
lat: <?php echo $lat; ?>,
|
||||||
|
lng: <?php echo $lon; ?>
|
||||||
|
},
|
||||||
|
zoom: 17
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var input = /** @type {!HTMLInputElement} */ (
|
||||||
|
document.getElementById('pac-input'));
|
||||||
|
|
||||||
|
var types = document.getElementById('type-selector');
|
||||||
|
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
|
||||||
|
map.controls[google.maps.ControlPosition.TOP_LEFT].push(types);
|
||||||
|
|
||||||
|
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||||
|
autocomplete.bindTo('bounds', map);
|
||||||
|
|
||||||
|
var infowindow = new google.maps.InfoWindow();
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
map: map,
|
||||||
|
anchorPoint: new google.maps.Point(0, -29),
|
||||||
|
draggable: true,
|
||||||
|
position: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>}
|
||||||
|
});
|
||||||
|
|
||||||
|
google.maps.event.addListener(marker, 'dragend', function() {
|
||||||
|
document.getElementsByName('latitude')[0].value = marker.getPosition().lat();
|
||||||
|
document.getElementsByName('longitude')[0].value = marker.getPosition().lng();
|
||||||
|
})
|
||||||
|
|
||||||
|
autocomplete.addListener('place_changed', function() {
|
||||||
|
infowindow.close();
|
||||||
|
marker.setVisible(false);
|
||||||
|
var place = autocomplete.getPlace();
|
||||||
|
if (!place.geometry) {
|
||||||
|
window.alert("Autocomplete's returned place contains no geometry");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the place has a geometry, then present it on a map.
|
||||||
|
if (place.geometry.viewport) {
|
||||||
|
map.fitBounds(place.geometry.viewport);
|
||||||
|
} else {
|
||||||
|
map.setCenter(place.geometry.location);
|
||||||
|
map.setZoom(17); // Why 17? Because it looks good.
|
||||||
|
}
|
||||||
|
marker.setIcon( /** @type {google.maps.Icon} */ ({
|
||||||
|
url: 'http://maps.google.com/mapfiles/ms/icons/red.png',
|
||||||
|
size: new google.maps.Size(71, 71),
|
||||||
|
origin: new google.maps.Point(0, 0),
|
||||||
|
anchor: new google.maps.Point(17, 34),
|
||||||
|
scaledSize: new google.maps.Size(35, 35)
|
||||||
|
}));
|
||||||
|
marker.setPosition(place.geometry.location);
|
||||||
|
marker.setVisible(true);
|
||||||
|
|
||||||
|
var address = '';
|
||||||
|
if (place.address_components) {
|
||||||
|
address = [
|
||||||
|
(place.address_components[0] && place.address_components[0].short_name || ''),
|
||||||
|
(place.address_components[1] && place.address_components[1].short_name || ''),
|
||||||
|
(place.address_components[2] && place.address_components[2].short_name || '')
|
||||||
|
].join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
var latitude = place.geometry.location.lat();
|
||||||
|
var longitude = place.geometry.location.lng();
|
||||||
|
|
||||||
|
$("input[name=coordinate]").val(address);
|
||||||
|
$("input[name=latitude]").val(latitude);
|
||||||
|
$("input[name=longitude]").val(longitude);
|
||||||
|
|
||||||
|
//infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address);
|
||||||
|
//infowindow.open(map, marker);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
google.maps.event.addDomListener(window, "load", initMap);
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}else{
|
||||||
|
echo "<span class=mep_status><span class=err>No Google MAP API Key Found. Please enter API KEY <a href=".get_site_url()."/wp-admin/options-general.php?page=mep_event_settings_page>Here</a></span></span>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
add_action( 'edited_mep_org', 'update_feature_meta', 10, 2 );
|
||||||
|
|
||||||
|
function update_feature_meta( $term_id, $tt_id ){
|
||||||
|
|
||||||
|
if( isset( $_POST['org_location'] )){
|
||||||
|
$org_location = strip_tags( $_POST['org_location'] );
|
||||||
|
update_term_meta( $term_id, 'org_location', $org_location );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['org_street'] )){
|
||||||
|
$org_street = strip_tags( $_POST['org_street'] );
|
||||||
|
update_term_meta( $term_id, 'org_street', $org_street );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['org_city'] )){
|
||||||
|
$org_city = strip_tags( $_POST['org_city'] );
|
||||||
|
update_term_meta( $term_id, 'org_city', $org_city );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['org_state'] )){
|
||||||
|
$org_state = strip_tags( $_POST['org_state'] );
|
||||||
|
update_term_meta( $term_id, 'org_state', $org_state );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['org_postcode'] )){
|
||||||
|
$org_postcode = strip_tags( $_POST['org_postcode'] );
|
||||||
|
update_term_meta( $term_id, 'org_postcode', $org_postcode );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['org_country'] )){
|
||||||
|
$org_country = strip_tags( $_POST['org_country'] );
|
||||||
|
update_term_meta( $term_id, 'org_country', $org_country );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['latitude'] )){
|
||||||
|
$latitude = strip_tags( $_POST['latitude'] );
|
||||||
|
update_term_meta( $term_id, 'latitude', $latitude );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isset( $_POST['longitude'] )){
|
||||||
|
$longitude = strip_tags( $_POST['longitude'] );
|
||||||
|
update_term_meta( $term_id, 'longitude', $longitude );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -3,15 +3,30 @@ add_action('mep_event_location','mep_ev_location');
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_location(){
|
function mep_ev_location(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
|
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
?>
|
?>
|
||||||
<p><?php echo $event_meta['mep_location_venue'][0]; ?>,</p>
|
<p><?php echo get_term_meta( $org_id, 'org_location', true ); ?>,</p>
|
||||||
<?php if($event_meta['mep_street'][0]){ ?><p><?php echo $event_meta['mep_street'][0]; ?>,</p> <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><p><?php echo get_term_meta( $org_id, 'org_street', true ); ?>,</p> <?php } ?>
|
||||||
<?php if($event_meta['mep_city'][0]){ ?> <p><?php echo $event_meta['mep_city'][0]; ?>,</p> <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_city', true )){ ?> <p><?php echo $event_meta['org_city'][0]; ?>,</p> <?php } ?>
|
||||||
<?php if($event_meta['mep_state'][0]){ ?> <p><?php echo $event_meta['mep_state'][0]; ?>,</p> <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_state', true )){ ?> <p><?php echo $event_meta['org_state'][0]; ?>,</p> <?php } ?>
|
||||||
<?php if($event_meta['mep_postcode'][0]){ ?> <p><?php echo $event_meta['mep_postcode'][0]; ?>,</p> <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <p><?php echo $event_meta['org_postcode'][0]; ?>,</p> <?php } ?>
|
||||||
<?php if($event_meta['mep_country'][0]){ ?> <p><?php echo $event_meta['mep_country'][0]; ?></p> <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_country', true )){ ?> <p><?php echo $event_meta['org_country'][0]; ?></p> <?php }
|
||||||
<?php
|
}else{
|
||||||
|
?>
|
||||||
|
<p><?php echo $event_meta['mep_location_venue'][0]; ?>,</p>
|
||||||
|
<?php if($event_meta['mep_street'][0]){ ?><p><?php echo $event_meta['mep_street'][0]; ?>,</p> <?php } ?>
|
||||||
|
<?php if($event_meta['mep_city'][0]){ ?> <p><?php echo $event_meta['mep_city'][0]; ?>,</p> <?php } ?>
|
||||||
|
<?php if($event_meta['mep_state'][0]){ ?> <p><?php echo $event_meta['mep_state'][0]; ?>,</p> <?php } ?>
|
||||||
|
<?php if($event_meta['mep_postcode'][0]){ ?> <p><?php echo $event_meta['mep_postcode'][0]; ?>,</p> <?php } ?>
|
||||||
|
<?php if($event_meta['mep_country'][0]){ ?> <p><?php echo $event_meta['mep_country'][0]; ?></p> <?php }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,54 +34,95 @@ global $event_meta;
|
||||||
|
|
||||||
add_action('mep_event_location_venue','mep_ev_venue');
|
add_action('mep_event_location_venue','mep_ev_venue');
|
||||||
function mep_ev_venue(){
|
function mep_ev_venue(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo "<span>".get_term_meta( $org_id, 'org_location', true )."</span>";
|
||||||
|
}else{
|
||||||
?>
|
?>
|
||||||
<span><?php echo $event_meta['mep_location_venue'][0]; ?></span>
|
<span><?php echo $event_meta['mep_location_venue'][0]; ?></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('mep_event_location_street','mep_ev_street');
|
add_action('mep_event_location_street','mep_ev_street');
|
||||||
function mep_ev_street(){
|
function mep_ev_street(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo "<span>".get_term_meta( $org_id, 'org_street', true )."</span>";
|
||||||
|
}else{
|
||||||
?>
|
?>
|
||||||
<span><?php echo $event_meta['mep_street'][0]; ?></span>
|
<span><?php echo $event_meta['mep_street'][0]; ?></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('mep_event_location_city','mep_ev_city');
|
add_action('mep_event_location_city','mep_ev_city');
|
||||||
function mep_ev_city(){
|
function mep_ev_city(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo "<span>".get_term_meta( $org_id, 'org_city', true )."</span>";
|
||||||
|
}else{
|
||||||
?>
|
?>
|
||||||
<span><?php echo $event_meta['mep_city'][0]; ?></span>
|
<span><?php echo $event_meta['mep_city'][0]; ?></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('mep_event_location_state','mep_ev_state');
|
add_action('mep_event_location_state','mep_ev_state');
|
||||||
function mep_ev_state(){
|
function mep_ev_state(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo "<span>".get_term_meta( $org_id, 'org_state', true )."</span>";
|
||||||
|
}else{
|
||||||
?>
|
?>
|
||||||
<span><?php echo $event_meta['mep_state'][0]; ?></span>
|
<span><?php echo $event_meta['mep_state'][0]; ?></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('mep_event_location_postcode','mep_ev_postcode');
|
add_action('mep_event_location_postcode','mep_ev_postcode');
|
||||||
function mep_ev_postcode(){
|
function mep_ev_postcode(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo "<span>".get_term_meta( $org_id, 'org_postcode', true )."</span>";
|
||||||
|
}else{
|
||||||
?>
|
?>
|
||||||
<span><?php echo $event_meta['mep_postcode'][0]; ?></span>
|
<span><?php echo $event_meta['mep_postcode'][0]; ?></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('mep_event_location_country','mep_ev_country');
|
add_action('mep_event_location_country','mep_ev_country');
|
||||||
function mep_ev_country(){
|
function mep_ev_country(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo "<span>".get_term_meta( $org_id, 'org_country', true )."</span>";
|
||||||
|
}else{
|
||||||
?>
|
?>
|
||||||
<span><?php echo $event_meta['mep_country'][0]; ?></span>
|
<span><?php echo $event_meta['mep_country'][0]; ?></span>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_map','ggmap');
|
add_action('mep_event_map','ggmap');
|
||||||
function ggmap(){
|
function ggmap(){
|
||||||
global $event_meta,$user_api;
|
global $post,$event_meta,$user_api;
|
||||||
|
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
|
||||||
|
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
$lat = get_term_meta( $org_id, 'latitude', true );
|
||||||
|
$lon = get_term_meta( $org_id, 'longitude', true );
|
||||||
|
}else{
|
||||||
|
$lat = $event_meta['latitude'][0];
|
||||||
|
$lon = $event_meta['longitude'][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($event_meta['mep_sgm'][0]){ if($user_api){?>
|
if($event_meta['mep_sgm'][0]){ if($user_api){?>
|
||||||
<div class="mep-gmap-sec">
|
<div class="mep-gmap-sec">
|
||||||
<div id="map" class='mep_google_map'></div>
|
<div id="map" class='mep_google_map'></div>
|
||||||
|
@ -10,14 +27,14 @@ global $event_meta,$user_api;
|
||||||
var map;
|
var map;
|
||||||
function initMap() {
|
function initMap() {
|
||||||
map = new google.maps.Map(document.getElementById('map'), {
|
map = new google.maps.Map(document.getElementById('map'), {
|
||||||
center: {lat: <?php echo $event_meta['latitude'][0]; ?>, lng: <?php echo $event_meta['longitude'][0]; ?>},
|
center: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>},
|
||||||
zoom: 17
|
zoom: 17
|
||||||
});
|
});
|
||||||
marker = new google.maps.Marker({
|
marker = new google.maps.Marker({
|
||||||
map: map,
|
map: map,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
animation: google.maps.Animation.DROP,
|
animation: google.maps.Animation.DROP,
|
||||||
position: {lat: <?php echo $event_meta['latitude'][0]; ?>, lng: <?php echo $event_meta['longitude'][0]; ?>}
|
position: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>}
|
||||||
});
|
});
|
||||||
marker.addListener('click', toggleBounce);
|
marker.addListener('click', toggleBounce);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ $llft = ($field['option_qty_t'] - (int)$tesq);
|
||||||
$leftt = $leftt+$llft;
|
$leftt = $leftt+$llft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<h5><strong><?php _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $stc; if($mep_available_seat=='on'){ ?> (<strong><?php echo $leftt; ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
|
<h5><strong><?php _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $stc; if($mep_available_seat=='on'){ ?> (<strong><?php echo $leftt; ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -65,12 +65,11 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_venue'); ?></li>
|
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_venue'); ?></li>
|
||||||
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_street'); ?></li>
|
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_street'); ?></li>
|
||||||
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_state'); ?></li>
|
|
||||||
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_city'); ?></li>
|
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_city'); ?></li>
|
||||||
|
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_state'); ?></li>
|
||||||
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_country'); ?></li>
|
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_location_country'); ?></li>
|
||||||
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_date'); ?></li>
|
<li><i class="fa fa-arrow-circle-right"></i> <?php do_action('mep_event_date'); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mep-default-sidrbar-social">
|
<div class="mep-default-sidrbar-social">
|
||||||
<?php do_action('mep_event_social_share'); ?>
|
<?php do_action('mep_event_social_share'); ?>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: Woocommerce Events Manager
|
* Plugin Name: Woocommerce Events Manager
|
||||||
* Plugin URI: http://mage-people.com
|
* Plugin URI: http://mage-people.com
|
||||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||||
* Version: 2.2.8
|
* Version: 2.2.9
|
||||||
* Author: MagePeople Team
|
* Author: MagePeople Team
|
||||||
* Author URI: http://www.mage-people.com/
|
* Author URI: http://www.mage-people.com/
|
||||||
* Text Domain: mage-eventpress
|
* Text Domain: mage-eventpress
|
||||||
|
@ -23,6 +23,7 @@ require_once(dirname(__FILE__) . "/templates/template-prts/templating.php");
|
||||||
require_once(dirname(__FILE__) . "/lib/PHPExcel.php");
|
require_once(dirname(__FILE__) . "/lib/PHPExcel.php");
|
||||||
require_once(dirname(__FILE__) . "/inc/mep_csv_export.php");
|
require_once(dirname(__FILE__) . "/inc/mep_csv_export.php");
|
||||||
require_once(dirname(__FILE__) . "/inc/mep_user_custom_style.php");
|
require_once(dirname(__FILE__) . "/inc/mep_user_custom_style.php");
|
||||||
|
require_once(dirname(__FILE__) . "/inc/mep_tax_meta.php");
|
||||||
|
|
||||||
// Language Load
|
// Language Load
|
||||||
add_action( 'init', 'mep_language_load');
|
add_action( 'init', 'mep_language_load');
|
||||||
|
@ -876,4 +877,20 @@ function mep_get_only_time($datetime){
|
||||||
if($user_set_format==24){
|
if($user_set_format==24){
|
||||||
echo date_i18n('H:i', strtotime($datetime));
|
echo date_i18n('H:i', strtotime($datetime));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function mep_get_event_city($id){
|
||||||
|
$location_sts = get_post_meta($id,'mep_org_address',true);
|
||||||
|
$event_meta = get_post_custom($id);
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo "<span>".get_term_meta( $org_id, 'org_city', true )."</span>";
|
||||||
|
}else{
|
||||||
|
|
||||||
|
echo "<span>".$event_meta['mep_city'][0]."</span>";
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue