version 2.6.7
This commit is contained in:
parent
8cd03fae32
commit
94011b99c2
|
@ -140,7 +140,18 @@ class MAGE_Events_Setting_Controls {
|
|||
'yes' => 'Enable',
|
||||
'no' => 'Disable'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'mep_event_expire_on_datetime',
|
||||
'label' => __( 'When will event expire', 'mage-eventpress' ),
|
||||
'desc' => __( 'Please select when event will expire, On event start time or event endtime', 'mage-eventpress' ),
|
||||
'type' => 'select',
|
||||
'default' => 'mep_event_start_date',
|
||||
'options' => array(
|
||||
'mep_event_start_date' => 'Event Start Time',
|
||||
'mep_event_end_date' => 'Event End Time'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'email_setting_sec' => array(
|
||||
|
|
|
@ -4,15 +4,13 @@ if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
|
|||
add_shortcode( 'event-calendar', 'mep_event_calender' );
|
||||
function mep_event_calender($atts, $content=null){
|
||||
?>
|
||||
|
||||
|
||||
<div class="event-calendar"></div>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready( function() {
|
||||
const myEvents = [
|
||||
<?php
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$now = current_time('Y-m-d H:i:s');
|
||||
$args_search_qqq = array (
|
||||
'post_type' => array( 'mep_events' ),
|
||||
'posts_per_page' => -1,
|
||||
|
@ -88,6 +86,7 @@ function mep_event_list($atts, $content=null){
|
|||
$show = $params['show'];
|
||||
$pagination = $params['pagination'];
|
||||
$sort = $params['sort'];
|
||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetime', 'general_setting_sec', 'mep_event_start_date');
|
||||
ob_start();
|
||||
?>
|
||||
<div class='mep_event_list'>
|
||||
|
@ -129,7 +128,7 @@ foreach ($terms as $_terms) {
|
|||
|
||||
<div class="mep_event_list_sec">
|
||||
<?php
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$now = current_time('Y-m-d H:i:s');
|
||||
$show_price = mep_get_option( 'mep_event_price_show', 'general_setting_sec', 'yes');
|
||||
$show_price_label = mep_get_option( 'event-price-label', 'general_setting_sec', 'Price Starts from:');
|
||||
$paged = get_query_var("paged")?get_query_var("paged"):1;
|
||||
|
@ -143,7 +142,7 @@ if($cat>0){
|
|||
'meta_key' => 'mep_event_start_date',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => 'mep_event_start_date',
|
||||
'key' => $event_expire_on,
|
||||
'value' => $now,
|
||||
'compare' => '>'
|
||||
)
|
||||
|
@ -168,7 +167,7 @@ elseif($org>0){
|
|||
'meta_key' => 'mep_event_start_date',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => 'mep_event_start_date',
|
||||
'key' => $event_expire_on,
|
||||
'value' => $now,
|
||||
'compare' => '>'
|
||||
)
|
||||
|
@ -193,7 +192,7 @@ elseif($org>0){
|
|||
'meta_key' => 'mep_event_start_date',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => 'mep_event_start_date',
|
||||
'key' => $event_expire_on,
|
||||
'value' => $now,
|
||||
'compare' => '>'
|
||||
)
|
||||
|
@ -340,6 +339,7 @@ function mep_expire_event_list($atts, $content=null){
|
|||
$show = $params['show'];
|
||||
$pagination = $params['pagination'];
|
||||
$sort = $params['sort'];
|
||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetime', 'general_setting_sec', 'mep_event_start_date');
|
||||
ob_start();
|
||||
?>
|
||||
<div class='mep_event_list'>
|
||||
|
@ -384,7 +384,7 @@ foreach ($terms as $_terms) {
|
|||
|
||||
|
||||
<?php
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$now = current_time('Y-m-d H:i:s');
|
||||
$paged = get_query_var("paged")?get_query_var("paged"):1;
|
||||
if($cat>0){
|
||||
$args_search_qqq = array (
|
||||
|
@ -396,7 +396,7 @@ if($cat>0){
|
|||
'meta_key' => 'mep_event_start_date',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => 'mep_event_start_date',
|
||||
'key' => $event_expire_on,
|
||||
'value' => $now,
|
||||
'compare' => '<'
|
||||
)
|
||||
|
@ -421,7 +421,7 @@ elseif($org>0){
|
|||
'meta_key' => 'mep_event_start_date',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => 'mep_event_start_date',
|
||||
'key' => $event_expire_on,
|
||||
'value' => $now,
|
||||
'compare' => '<'
|
||||
)
|
||||
|
@ -446,7 +446,7 @@ elseif($org>0){
|
|||
'meta_key' => 'mep_event_start_date',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => 'mep_event_start_date',
|
||||
'key' => $event_expire_on,
|
||||
'value' => $now,
|
||||
'compare' => '<'
|
||||
)
|
||||
|
|
11
readme.txt
11
readme.txt
|
@ -361,4 +361,13 @@ A. you can create support ticket here with problem details with possible screens
|
|||
==> Added new strings into Translation setting page
|
||||
==> Fixed event details page not showing in some theme issue
|
||||
==> Mixitup Filter for multiple sub category issue fixed
|
||||
1 July 2019*
|
||||
1 July 2019*
|
||||
|
||||
|
||||
*= 2.6.6 =
|
||||
* Update Release:
|
||||
==> Timezone issue fixed
|
||||
==> Added Event expire date change settings
|
||||
==> Negative value display issue fixed.
|
||||
|
||||
3 July 2019*
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
add_action('mep_event_add_calender','mep_ev_calender');
|
||||
|
||||
|
||||
function mep_ev_calender(){
|
||||
?>
|
||||
<div class="calender-url">
|
||||
|
|
|
@ -4,19 +4,17 @@ add_action('mep_event_date','mep_ev_datetime');
|
|||
|
||||
function mep_ev_datetime(){
|
||||
global $event_meta;
|
||||
if(array_key_exists('mep_event_more_date', $event_meta)){
|
||||
$more_date = unserialize($event_meta['mep_event_more_date'][0]);
|
||||
}else{
|
||||
$more_date = '';
|
||||
}
|
||||
|
||||
if(array_key_exists('mep_event_more_date', $event_meta)){
|
||||
$more_date = unserialize($event_meta['mep_event_more_date'][0]);
|
||||
}else{
|
||||
$more_date = '';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<p><?php mep_get_full_time_and_date($event_meta['mep_event_start_date'][0]); if($more_date){ foreach ($more_date as $md) {
|
||||
echo " - "; mep_get_full_time_and_date($md['event_more_date']);
|
||||
} } else{ echo " - "; } ?> <?php if($more_date){ echo " - "; } mep_get_full_time_and_date($event_meta['mep_event_end_date'][0]); ?></p>
|
||||
<?php
|
||||
?>
|
||||
<p><?php mep_get_full_time_and_date($event_meta['mep_event_start_date'][0]); if($more_date){ foreach ($more_date as $md) {
|
||||
echo " - "; mep_get_full_time_and_date($md['event_more_date']);
|
||||
} } else{ echo " - "; } ?> <?php if($more_date){ echo " - "; } mep_get_full_time_and_date($event_meta['mep_event_end_date'][0]); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ $qty_t_type = $field['option_qty_t_type'];
|
|||
?>
|
||||
<tr>
|
||||
<td align="Left"><?php echo $field['option_name_t']; ?>
|
||||
<?php if($mep_available_seat=='on'){ ?><div class="xtra-item-left"><?php echo $llft; ?> <?php _e('Left','mage-eventpress'); ?></div> <?php } ?>
|
||||
<?php if($mep_available_seat=='on'){ ?><div class="xtra-item-left"><?php echo max($llft,0); ?> <?php _e('Left','mage-eventpress'); ?></div> <?php } ?>
|
||||
</td>
|
||||
<td class="ticket-qty">
|
||||
<span class="tkt-qty">
|
||||
|
@ -49,8 +49,8 @@ if($qty_t_type=='dropdown'){ ?>
|
|||
<?php } ?>
|
||||
</select>
|
||||
<?php }else{ ?>
|
||||
<input id="eventpxtp_<?php echo $count; ?>" <?php //if($ext_left<=0){ echo "disabled"; } ?> size="4" pattern="[0-9]*" inputmode="numeric" type="number" class='extra-qty-box etp' name='option_qty[]' data-price='<?php echo $field['option_price_t']; ?>' value='0' min="0" max="<?php echo $llft; ?>">
|
||||
<?php } }else{ echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : _e('No Seat Available','mage-eventpress'); } ?>
|
||||
<input id="eventpxtp_<?php echo $count; ?>" <?php //if($ext_left<=0){ echo "disabled"; } ?> size="4" pattern="[0-9]*" inputmode="numeric" type="number" class='extra-qty-box etp' name='option_qty[]' data-price='<?php echo $field['option_price_t']; ?>' value='0' min="0" max="<?php echo max($llft,0); ?>">
|
||||
<?php } }else{ _e('No Seat Available','mage-eventpress'); } ?>
|
||||
</td>
|
||||
<td class="ticket-price"><span class="tkt-pric">
|
||||
|
||||
|
|
|
@ -42,12 +42,12 @@ $leftt = ($leftt+$llft);
|
|||
}
|
||||
$leftt = $leftt-$res;
|
||||
?>
|
||||
<h5><strong><?php echo mep_get_option('mep_total_seat_text', 'label_setting_sec') ? mep_get_option('mep_total_seat_text', 'label_setting_sec') : _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 echo mep_get_option('mep_total_seat_text', 'label_setting_sec') ? mep_get_option('mep_total_seat_text', 'label_setting_sec') : _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $stc; if($mep_available_seat=='on'){ ?> (<strong><?php echo max($leftt,0); ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
|
||||
<?php
|
||||
|
||||
}else{
|
||||
if($event_meta['mep_total_seat'][0]){ ?>
|
||||
<h5><strong><?php echo mep_get_option('mep_total_seat_text', 'label_setting_sec') ? mep_get_option('mep_total_seat_text', 'label_setting_sec') : _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $event_meta['mep_total_seat'][0]; if($mep_available_seat=='on'){ ?> (<strong><?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?></strong> <?php _e('Left','mage-eventpress'); ?>) <?php } ?></h5>
|
||||
<h5><strong><?php echo mep_get_option('mep_total_seat_text', 'label_setting_sec') ? mep_get_option('mep_total_seat_text', 'label_setting_sec') : _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $event_meta['mep_total_seat'][0]; if($mep_available_seat=='on'){ ?> (<strong><?php echo max(($event_meta['mep_total_seat'][0]- $total_book),0); ?></strong> <?php _e('Left','mage-eventpress'); ?>) <?php } ?></h5>
|
||||
<?php }
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: Woocommerce Events Manager
|
||||
* Plugin URI: http://mage-people.com
|
||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||
* Version: 2.6.6
|
||||
* Version: 2.6.7
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
|
@ -45,6 +45,7 @@ function mep_flash_permalink_once() {
|
|||
}
|
||||
add_action( 'admin_init', 'mep_flash_permalink_once' );
|
||||
|
||||
|
||||
// Class for Linking with Woocommerce with Event Pricing
|
||||
add_action('plugins_loaded', 'mep_load_wc_class');
|
||||
function mep_load_wc_class() {
|
||||
|
@ -108,12 +109,12 @@ function mep_load_wc_class() {
|
|||
|
||||
function mep_get_order_info($info,$id){
|
||||
if($info){
|
||||
$stock_msg = $info;
|
||||
$koba = explode("_", $stock_msg);
|
||||
return $koba[$id];
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
$stock_msg = $info;
|
||||
$koba = explode("_", $stock_msg);
|
||||
return $koba[$id];
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,7 +123,9 @@ add_filter( 'woocommerce_data_stores', 'mep_woocommerce_data_stores' );
|
|||
function mep_woocommerce_data_stores ( $stores ) {
|
||||
$stores['product'] = 'MEP_Product_Data_Store_CPT';
|
||||
return $stores;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -486,10 +489,12 @@ function mep_attendee_filter_query($query) {
|
|||
add_action( 'manage_mep_events_posts_custom_column' , 'mep_custom_event_column', 10, 2 );
|
||||
function mep_custom_event_column( $column, $post_id ) {
|
||||
switch ( $column ) {
|
||||
case 'mep_status' :
|
||||
$values = get_post_custom( $post_id );
|
||||
echo mep_get_event_status($values['mep_event_start_date'][0]);
|
||||
break;
|
||||
|
||||
case 'mep_status' :
|
||||
$values = get_post_custom( $post_id );
|
||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetime', 'general_setting_sec', 'mep_event_start_date');
|
||||
echo mep_get_event_status($values[$event_expire_on][0]);
|
||||
break;
|
||||
|
||||
case 'mep_atten' :
|
||||
echo '<a class="button button-primary button-large" href="'.get_site_url().'/wp-admin/edit.php?post_type=mep_events_attendees&meta_value='.$post_id.'">Attendees List</a>';
|
||||
|
@ -501,12 +506,17 @@ echo mep_get_event_status($values['mep_event_start_date'][0]);
|
|||
// Getting event exprie date & time
|
||||
function mep_get_event_status($startdatetime){
|
||||
|
||||
$current = current_time('Y-m-d H:i:s');
|
||||
$time = strtotime($startdatetime);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
$datetime1 = new DateTime();
|
||||
$datetime2 = new DateTime($newformat);
|
||||
$interval = $datetime1->diff($datetime2);
|
||||
// print_r($newformat);
|
||||
|
||||
date_default_timezone_set(get_option('timezone_string'));
|
||||
|
||||
$datetime1 = new DateTime($newformat);
|
||||
$datetime2 = new DateTime($current);
|
||||
|
||||
$interval = date_diff($datetime2, $datetime1);
|
||||
|
||||
if(time() > strtotime($newformat)){
|
||||
return "<span class=err>Expired</span>";
|
||||
}
|
||||
|
@ -1422,12 +1432,16 @@ function mep_mep_events_column( $column, $post_id ) {
|
|||
|
||||
function mep_get_term_as_class($post_id,$taxonomy){
|
||||
$tt = get_the_terms($post_id,$taxonomy);
|
||||
if($tt){
|
||||
$t_class = array();
|
||||
foreach($tt as $tclass){
|
||||
$t_class[] = $tclass->slug;
|
||||
}
|
||||
$main_class = implode(' ',$t_class);
|
||||
return $main_class;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue