version 2.4.1 released
This commit is contained in:
parent
b65fdcaa3a
commit
7077977252
|
@ -1435,6 +1435,7 @@ h4.mep-cart-table-title {
|
||||||
margin: -26px 0 0;
|
margin: -26px 0 0;
|
||||||
padding: 0 0 0 25px;
|
padding: 0 0 0 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive CSS
|
/* Responsive CSS
|
||||||
=====================================================================*/
|
=====================================================================*/
|
||||||
@media only screen and (min-width: 768px) and (max-width: 990px) {
|
@media only screen and (min-width: 768px) and (max-width: 990px) {
|
||||||
|
|
|
@ -68,10 +68,26 @@ class MAGE_Events_Setting_Controls {
|
||||||
$settings_fields = array(
|
$settings_fields = array(
|
||||||
'general_setting_sec' => array(
|
'general_setting_sec' => array(
|
||||||
|
|
||||||
|
array(
|
||||||
|
'name' => 'mep_google_map_type',
|
||||||
|
'label' => __( 'Google Map Type?', 'mage-eventpress' ),
|
||||||
|
'desc' => __( 'Please select the map type you want to show in fronntend, Note it: Iframe Not always show the accurate location where API enable map has drag & drop feature so you can drag the point to accurate location.', 'mage-eventpress' ),
|
||||||
|
'type' => 'select',
|
||||||
|
'default' => 'yes',
|
||||||
|
'options' => array(
|
||||||
|
'' => 'Please Select a Map Type',
|
||||||
|
'api' => 'API',
|
||||||
|
'iframe' => 'Iframe'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'name' => 'google-map-api',
|
'name' => 'google-map-api',
|
||||||
'label' => __( 'Google Map API Key', 'mage-eventpress' ),
|
'label' => __( 'Google Map API Key', 'mage-eventpress' ),
|
||||||
'desc' => __( 'Enter Your Google Map API key. <a href=https://developers.google.com/maps/documentation/javascript/get-api-key target=_blank>Get KEY</a>', 'mage-eventpress' ),
|
'desc' => __( 'Enter Your Google Map API key. <a href=https://developers.google.com/maps/documentation/javascript/get-api-key target=_blank>Get KEY</a>. Note: You must enter billing address and information into google map api account to work perfectly the google map in website.', 'mage-eventpress' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => ''
|
'default' => ''
|
||||||
),
|
),
|
||||||
|
|
|
@ -63,14 +63,14 @@ function mep_event_available_seat_cb($post){
|
||||||
add_action('save_post','mep_reg_status_meta_save');
|
add_action('save_post','mep_reg_status_meta_save');
|
||||||
function mep_reg_status_meta_save($post_id){
|
function mep_reg_status_meta_save($post_id){
|
||||||
|
|
||||||
if($_POST['mep_reg_status']){
|
if(isset($_POST['mep_reg_status'])){
|
||||||
$mep_reg_status = strip_tags($_POST['mep_reg_status']);
|
$mep_reg_status = strip_tags($_POST['mep_reg_status']);
|
||||||
}else{
|
}else{
|
||||||
$mep_reg_status = 'off';
|
$mep_reg_status = 'off';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($_POST['mep_available_seat']){
|
if(isset($_POST['mep_available_seat'])){
|
||||||
$mep_available_seat = strip_tags($_POST['mep_available_seat']);
|
$mep_available_seat = strip_tags($_POST['mep_available_seat']);
|
||||||
}else{
|
}else{
|
||||||
$mep_available_seat = 'off';
|
$mep_available_seat = 'off';
|
||||||
|
@ -87,15 +87,15 @@ $update_seat = update_post_meta( $post_id, 'mep_reg_status', $mep_reg_sta
|
||||||
|
|
||||||
|
|
||||||
function mep_event_venue_meta_box_cb($post){
|
function mep_event_venue_meta_box_cb($post){
|
||||||
$values = get_post_custom( $post->ID );
|
$values = get_post_custom( $post->ID );
|
||||||
$user_api = mep_get_option( 'google-map-api', 'general_setting_sec', '');
|
$user_api = mep_get_option( 'google-map-api', 'general_setting_sec', '');
|
||||||
|
$map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'iframe');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_9890"> <?php _e('Show Address from Organizer?:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_9890"> <?php _e('Show Address from Organizer?:','mage-eventpress'); ?> </label>
|
||||||
<span><input style='text-align: left;width: auto;' id='mep_ev_9890' type="checkbox" name='mep_org_address' value='1' <?php if(array_key_exists('mep_org_address', $values)){ $mep_org_address = $values['mep_org_address'][0]; if($mep_org_address==1){ echo 'checked'; } } ?> > Yes</span>
|
<span><input style='text-align: left;width: auto;' id='mep_ev_9890' type="checkbox" name='mep_org_address' value='1' <?php if(array_key_exists('mep_org_address', $values)){ $mep_org_address = $values['mep_org_address'][0]; if($mep_org_address==1){ echo 'checked'; } } ?> > Yes (If Yes, Organizer Address will show from organizer area.)</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ $user_api = mep_get_option( 'google-map-api', 'general_setting_sec', '');
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_2"> <?php _e('Location/Venue:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_2"> <?php _e('Location/Venue:','mage-eventpress'); ?> </label>
|
||||||
<span><input id='mep_ev_2' type="text" name='mep_location_venue' value='<?php if(array_key_exists('mep_location_venue', $values)){ echo $values['mep_location_venue'][0]; } ?>'> </span>
|
<span><input id='mep_ev_2' type="text" name='mep_location_venue' value='<?php echo mep_get_event_locaion_item($post->ID,'mep_location_venue'); //if(array_key_exists('mep_location_venue', $values)){ echo $values['mep_location_venue'][0]; } ?>'> </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,44 +113,102 @@ $user_api = mep_get_option( 'google-map-api', 'general_setting_sec', '');
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_3"> <?php _e('Street:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_3"> <?php _e('Street:','mage-eventpress'); ?> </label>
|
||||||
<span><input id='mep_ev_3' type="text" name='mep_street' value='<?php if(array_key_exists('mep_street', $values)){ echo $values['mep_street'][0]; } ?>'> </span>
|
<span><input id='mep_ev_3' type="text" name='mep_street' value='<?php echo mep_get_event_locaion_item($post->ID,'mep_street'); //if(array_key_exists('mep_street', $values)){ echo $values['mep_street'][0]; } ?>'> </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_4"> <?php _e('City:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_4"> <?php _e('City:','mage-eventpress'); ?> </label>
|
||||||
<span><input id='mep_ev_4' type="text" name='mep_city' value='<?php if(array_key_exists('mep_city', $values)){ echo $values['mep_city'][0]; } ?>'> </span>
|
<span><input id='mep_ev_4' type="text" name='mep_city' value='<?php echo mep_get_event_locaion_item($post->ID,'mep_city'); //if(array_key_exists('mep_city', $values)){ echo $values['mep_city'][0]; } ?>'> </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_5"> <?php _e('State:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_5"> <?php _e('State:','mage-eventpress'); ?> </label>
|
||||||
<span><input id='mep_ev_5' type="text" name='mep_state' value='<?php if(array_key_exists('mep_state', $values)){ echo $values['mep_state'][0]; } ?>'> </span>
|
<span><input id='mep_ev_5' type="text" name='mep_state' value='<?php echo mep_get_event_locaion_item($post->ID,'mep_state'); //if(array_key_exists('mep_state', $values)){ echo $values['mep_state'][0]; } ?>'> </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_6"> <?php _e('Postcode:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_6"> <?php _e('Postcode:','mage-eventpress'); ?> </label>
|
||||||
<span><input id='mep_ev_6' type="text" name='mep_postcode' value='<?php if(array_key_exists('mep_postcode', $values)){ echo $values['mep_postcode'][0]; } ?>'> </span>
|
<span><input id='mep_ev_6' type="text" name='mep_postcode' value='<?php echo mep_get_event_locaion_item($post->ID,'mep_postcode'); //if(array_key_exists('mep_postcode', $values)){ echo $values['mep_postcode'][0]; } ?>'> </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_7"> <?php _e('Country:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_7"> <?php _e('Country:','mage-eventpress'); ?> </label>
|
||||||
<span><input id='mep_ev_7' type="text" name='mep_country' value='<?php if(array_key_exists('mep_country', $values)){ echo $values['mep_country'][0]; } ?>'> </span>
|
<span><input id='mep_ev_7' type="text" name='mep_country' value='<?php echo mep_get_event_locaion_item($post->ID,'mep_country'); //if(array_key_exists('mep_country', $values)){ echo $values['mep_country'][0]; } ?>'> </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
if($user_api){
|
|
||||||
?>
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<label for="mep_ev_989"> <?php _e('Show Google Map:','mage-eventpress'); ?> </label>
|
<label for="mep_ev_989"> <?php _e('Show Google Map:','mage-eventpress'); ?> </label>
|
||||||
<span><input style='text-align: left;width: auto;' id='mep_ev_989' type="checkbox" name='mep_sgm' value='1' <?php if(array_key_exists('mep_sgm', $values)){ $mep_sgm = $values['mep_sgm'][0]; if($mep_sgm==1){ echo 'checked'; } } ?> > Yes</span>
|
<span><input style='text-align: left;width: auto;' id='mep_ev_989' type="checkbox" name='mep_sgm' value='1' <?php if(array_key_exists('mep_sgm', $values)){ $mep_sgm = $values['mep_sgm'][0]; if($mep_sgm==1){ echo 'checked'; } } ?> > Yes</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <a id="check_gmap" type="submit" style="display: block;background: #3496f3;text-align: center;color: #fff;font-size: 19px;padding: 15px 20px;margin: 20px auto;width: 200px;cursor: pointer;">Show Google Map</a> -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
jQuery("#mep_ev_9890").click(function(){
|
||||||
|
|
||||||
|
if(jQuery(this).is(':checked')){
|
||||||
|
|
||||||
|
jQuery('#mep_ev_2').val('<?php echo mep_event_org_location_item($post->ID,'org_location'); ?>');
|
||||||
|
jQuery('#mep_ev_3').val('<?php echo mep_event_org_location_item($post->ID,'org_street'); ?>');
|
||||||
|
jQuery('#mep_ev_4').val('<?php echo mep_event_org_location_item($post->ID,'org_city'); ?>');
|
||||||
|
jQuery('#mep_ev_5').val('<?php echo mep_event_org_location_item($post->ID,'org_state'); ?>');
|
||||||
|
jQuery('#mep_ev_6').val('<?php echo mep_event_org_location_item($post->ID,'org_postcode'); ?>');
|
||||||
|
jQuery('#mep_ev_7').val('<?php echo mep_event_org_location_item($post->ID,'org_country'); ?>');
|
||||||
|
var location = jQuery('#mep_ev_2').val();
|
||||||
|
jQuery('#show_gmap').html('<iframe id="gmap_canvas" src="https://maps.google.com/maps?q='+location+'&t=&z=19&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>')
|
||||||
|
}else{
|
||||||
|
|
||||||
|
jQuery('#mep_ev_2').val('<?php echo mep_event_location_item($post->ID,'mep_location_venue'); ?>');
|
||||||
|
jQuery('#mep_ev_3').val('<?php echo mep_event_location_item($post->ID,'mep_street'); ?>');
|
||||||
|
jQuery('#mep_ev_4').val('<?php echo mep_event_location_item($post->ID,'mep_city'); ?>');
|
||||||
|
jQuery('#mep_ev_5').val('<?php echo mep_event_location_item($post->ID,'mep_state'); ?>');
|
||||||
|
jQuery('#mep_ev_6').val('<?php echo mep_event_location_item($post->ID,'mep_postcode'); ?>');
|
||||||
|
jQuery('#mep_ev_7').val('<?php echo mep_event_location_item($post->ID,'mep_country'); ?>');
|
||||||
|
var location = jQuery('#mep_ev_2').val();
|
||||||
|
jQuery('#show_gmap').html('<iframe id="gmap_canvas" src="https://maps.google.com/maps?q='+location+'&t=&z=19&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jQuery('#mep_ev_2').keypress(function(){
|
||||||
|
// alert('Yes Dudue');
|
||||||
|
var location = jQuery(this).val();
|
||||||
|
// var location = jQuery('#mep_ev_2').val();
|
||||||
|
if(location==''){
|
||||||
|
// alert('Please Enter Location First');
|
||||||
|
}else{
|
||||||
|
jQuery('#show_gmap').html('<iframe id="gmap_canvas" src="https://maps.google.com/maps?q='+location+'&t=&z=19&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
if($map_type=='iframe'){
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
iframe#gmap_canvas {
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="show_gmap">
|
||||||
|
<iframe id="gmap_canvas" src="https://maps.google.com/maps?q=<?php echo mep_get_event_locaion_item($post->ID,'mep_location_venue'); ?>&t=&z=19&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } if($map_type=='api'){
|
||||||
|
if($user_api){
|
||||||
|
?>
|
||||||
|
|
||||||
<div class='sec'>
|
<div class='sec'>
|
||||||
<input id="pac-input" name='location_name' value='<?php //echo $values['location_name'][0]; ?>'/>
|
<input id="pac-input" name='location_name' value='<?php //echo $values['location_name'][0]; ?>'/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -160,7 +218,6 @@ if($user_api){
|
||||||
<input type="hidden" class="form-control" required name="longitude" value="<?php if(array_key_exists('longitude', $values)){ echo $values['longitude'][0]; } ?>">
|
<input type="hidden" class="form-control" required name="longitude" value="<?php if(array_key_exists('longitude', $values)){ echo $values['longitude'][0]; } ?>">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -170,12 +227,12 @@ if($user_api){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists('latitude', $values)){
|
if(array_key_exists('latitude', $values) && !empty($values['latitude'][0])){
|
||||||
$lat = $values['latitude'][0];
|
$lat = $values['latitude'][0];
|
||||||
}else{ $lat = '37.0902'; }
|
}else{ $lat = '37.0902'; }
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists('longitude', $values)){
|
if(array_key_exists('longitude', $values) && !empty($values['longitude'][0])){
|
||||||
$lon = $values['longitude'][0];
|
$lon = $values['longitude'][0];
|
||||||
}else{ $lon = '95.7129'; }
|
}else{ $lon = '95.7129'; }
|
||||||
|
|
||||||
|
@ -269,7 +326,7 @@ google.maps.event.addDomListener(window, "load", initMap);
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function mep_event_price_meta_box_cb($post){
|
function mep_event_price_meta_box_cb($post){
|
||||||
|
@ -1023,7 +1080,8 @@ if($post){
|
||||||
$mdate = array();
|
$mdate = array();
|
||||||
// $options = hhs_get_sample_options();
|
// $options = hhs_get_sample_options();
|
||||||
|
|
||||||
$more_date = $_POST['event_more_date'];
|
if(isset($_POST['event_more_date'])){$more_date = $_POST['event_more_date'];}else{$more_date=array();}
|
||||||
|
|
||||||
$mcount = count( $more_date );
|
$mcount = count( $more_date );
|
||||||
for ( $m = 0; $m < $mcount; $m++ ) {
|
for ( $m = 0; $m < $mcount; $m++ ) {
|
||||||
if ( $more_date[$m] != '' ) :
|
if ( $more_date[$m] != '' ) :
|
||||||
|
|
|
@ -214,7 +214,7 @@ $author_terms = get_the_terms(get_the_id(), 'mep_org');
|
||||||
$torg = get_the_terms( get_the_id(), 'mep_org');
|
$torg = get_the_terms( get_the_id(), 'mep_org');
|
||||||
$available_seat = mep_get_total_available_seat(get_the_id(), $event_meta);
|
$available_seat = mep_get_total_available_seat(get_the_id(), $event_meta);
|
||||||
?>
|
?>
|
||||||
<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 if($tt){ echo $tt[0]->slug; } ?> <?php if($torg){ echo $torg[0]->slug; } ?>'>
|
||||||
<div class="mep_list_thumb">
|
<div class="mep_list_thumb">
|
||||||
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('full'); ?></a>
|
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('full'); ?></a>
|
||||||
<div class="mep-ev-start-date">
|
<div class="mep-ev-start-date">
|
||||||
|
|
12
readme.txt
12
readme.txt
|
@ -3,8 +3,8 @@ Contributors: magepeopleteam
|
||||||
Tags: event, woocomerce events manager, events manager, Wordpress Events plugin, Events plugin, wp events
|
Tags: event, woocomerce events manager, events manager, Wordpress Events plugin, Events plugin, wp events
|
||||||
Requires at least: 4.5
|
Requires at least: 4.5
|
||||||
Stable tag: trunk
|
Stable tag: trunk
|
||||||
Version: 2.3.4
|
Version: 2.1.3
|
||||||
Tested up to: 5.1
|
Tested up to: 4.9
|
||||||
WC requires at least: 3.0
|
WC requires at least: 3.0
|
||||||
WC tested up to: 3.5.0
|
WC tested up to: 3.5.0
|
||||||
Requires PHP: 5.6
|
Requires PHP: 5.6
|
||||||
|
@ -280,10 +280,4 @@ You can display the event list on any page by using the ShortCode. Just use this
|
||||||
*= 2.3.2 =
|
*= 2.3.2 =
|
||||||
*Update Release:
|
*Update Release:
|
||||||
==> France Language Pack Ready.
|
==> France Language Pack Ready.
|
||||||
05 Feb 2019*
|
05 Feb 2019*
|
||||||
|
|
||||||
|
|
||||||
*= 2.4.0 =
|
|
||||||
*Update Release:
|
|
||||||
==> Bug Fixed.
|
|
||||||
06 Mar 2019*
|
|
|
@ -2,7 +2,7 @@
|
||||||
add_action('mep_event_map','ggmap');
|
add_action('mep_event_map','ggmap');
|
||||||
function ggmap(){
|
function ggmap(){
|
||||||
global $post,$event_meta,$user_api;
|
global $post,$event_meta,$user_api;
|
||||||
|
$map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'iframe');
|
||||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,21 @@ if($location_sts){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($event_meta['mep_sgm'][0]){ if($user_api){?>
|
|
||||||
|
|
||||||
|
if($map_type=='iframe'){
|
||||||
|
?>
|
||||||
|
<div class="mep-gmap-sec">
|
||||||
|
<iframe id="gmap_canvas" src="https://maps.google.com/maps?q=<?php echo mep_get_event_locaion_item($post->ID,'mep_location_venue'); ?>&t=&z=19&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" style='width: 100%;min-height: 250px;'></iframe>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,4 +62,4 @@ if($location_sts){
|
||||||
</script>
|
</script>
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap"
|
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap"
|
||||||
async defer></script>
|
async defer></script>
|
||||||
<?php } } }?>
|
<?php } } } }?>
|
|
@ -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.4.0
|
* Version: 2.4.1
|
||||||
* 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
|
||||||
|
@ -875,13 +875,13 @@ function mep_get_only_time($datetime){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function mep_get_event_city($id){
|
function mep_get_event_city($id){
|
||||||
$location_sts = get_post_meta($id,'mep_org_address',true);
|
$location_sts = get_post_meta($id,'mep_org_address',true);
|
||||||
$event_meta = get_post_custom($id);
|
$event_meta = get_post_custom($id);
|
||||||
if($location_sts){
|
if($location_sts){
|
||||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
$org_arr = get_the_terms( $id, 'mep_org' );
|
||||||
$org_id = $org_arr[0]->term_id;
|
$org_id = $org_arr[0]->term_id;
|
||||||
echo "<span>".get_term_meta( $org_id, 'org_city', true )."</span>";
|
echo "<span>".get_term_meta( $org_id, 'org_city', true )."</span>";
|
||||||
}else{
|
}else{
|
||||||
|
@ -923,4 +923,112 @@ $leftt = ($leftt+$llft);
|
||||||
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
||||||
}
|
}
|
||||||
return $leftt;
|
return $leftt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function mep_event_location_item($event_id,$item_name){
|
||||||
|
return get_post_meta($event_id,$item_name,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function mep_event_org_location_item($event_id,$item_name){
|
||||||
|
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||||
|
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
if($org_arr){
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, $item_name, true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function mep_get_event_locaion_item($event_id,$item_name){
|
||||||
|
if($event_id){
|
||||||
|
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||||
|
|
||||||
|
|
||||||
|
if($item_name=='mep_location_venue'){
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, 'org_location', true );
|
||||||
|
}else{
|
||||||
|
return get_post_meta($event_id,'mep_location_venue',true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($item_name=='mep_location_venue'){
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, 'org_location', true );
|
||||||
|
}else{
|
||||||
|
return get_post_meta($event_id,'mep_location_venue',true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($item_name=='mep_street'){
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, 'org_street', true );
|
||||||
|
}else{
|
||||||
|
return get_post_meta($event_id,'mep_street',true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($item_name=='mep_city'){
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, 'org_city', true );
|
||||||
|
}else{
|
||||||
|
return get_post_meta($event_id,'mep_city',true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($item_name=='mep_state'){
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, 'org_state', true );
|
||||||
|
}else{
|
||||||
|
return get_post_meta($event_id,'mep_state',true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($item_name=='mep_postcode'){
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, 'org_postcode', true );
|
||||||
|
}else{
|
||||||
|
return get_post_meta($event_id,'mep_postcode',true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($item_name=='mep_country'){
|
||||||
|
if($location_sts){
|
||||||
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
return get_term_meta( $org_id, 'org_country', true );
|
||||||
|
}else{
|
||||||
|
return get_post_meta($event_id,'mep_country',true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue