version 3.2.6 released
This commit is contained in:
parent
07b4abc7e3
commit
3f2589d3a8
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action( 'admin_menu', 'mep_addon_list_menu',10,99);
|
||||
function mep_addon_list_menu() {
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* The Admin Enqueue Scripts & Style Files are Hooked up below for WooOCmmerce Event Manager Plugin
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This File is a very important file, Because Its gettings Data from user selection on event details page, and prepare the data send to cart item and lastly save into order table after checkout
|
||||
*/
|
||||
|
@ -31,6 +35,11 @@ function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $
|
|||
$user = $form_position == 'details_page' ? mep_save_attendee_info_into_cart($product_id) : array();
|
||||
$validate = mep_cart_ticket_type('validation_data', $total_price,$product_id);
|
||||
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($ticket_type_arr);
|
||||
// // print_r($qty);
|
||||
// die();
|
||||
/**
|
||||
* Now Store the datas into Cart Session
|
||||
*/
|
||||
|
@ -160,30 +169,30 @@ function mep_checkout_validation($posted)
|
|||
foreach ($items as $item => $values) {
|
||||
$event_id = array_key_exists('event_id', $values) ? $values['event_id'] : 0; // $values['event_id'];
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
$total_seat = mep_event_total_seat($event_id, 'total');
|
||||
$total_resv = mep_event_total_seat($event_id, 'resv');
|
||||
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
|
||||
$total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($event_id, 'total'), $event_id);
|
||||
$total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($event_id, 'resv'), $event_id);
|
||||
$total_sold = mep_ticket_sold($event_id);
|
||||
$total_left = $total_seat - ($total_sold + $total_resv);
|
||||
|
||||
if($recurring == 'no'){
|
||||
$event_validate_info = $values['event_validate_info'] ? $values['event_validate_info'] : array();
|
||||
|
||||
$ee = 0;
|
||||
|
||||
if (is_array($event_validate_info) && sizeof($event_validate_info) > 0) {
|
||||
foreach ($event_validate_info as $inf) {
|
||||
$ee = $ee + $inf['validation_ticket_qty'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($ee > $total_left) {
|
||||
$event = get_the_title($event_id);
|
||||
wc_add_notice(__("Sorry, Seats are not available in <b>$event</b>, Available Seats <b>$total_left</b> but you selected <b>$ee</b>", 'mage-eventpress'), 'error');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The Final function for cart handleing, If everything is fine after user hit the place order button then the below function will send the order data into the next hook for order processing and save to order meta data.
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,8 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This is the Main Query Function For Query the Event List, Just Pass the Required values It will return the Query As Object.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This will be used for Taxonomy Meta Box with the Brand New Mage Freamwork
|
||||
*/
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_org_add_form_fields', 'mep_org_tax_location_fileds', 10, 2);
|
||||
function mep_org_tax_location_fileds($taxonomy)
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('wp_head', 'mep_user_custom_styles', 10, 999);
|
||||
function mep_user_custom_styles()
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<?php
|
||||
add_action('mep_event_add_calender','mep_ev_calender');
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
function mep_ev_calender($event_id){
|
||||
add_action('mep_event_add_calender', 'mep_ev_calender');
|
||||
if (!function_exists('mep_ev_calender')) {
|
||||
function mep_ev_calender($event_id)
|
||||
{
|
||||
?>
|
||||
<div class="calender-url">
|
||||
<div class="calender-url">
|
||||
<?php
|
||||
/**
|
||||
* Action Hook mep_before_add_calendar_button & mep_after_add_calendar_button
|
||||
|
@ -12,8 +17,7 @@ function mep_ev_calender($event_id){
|
|||
mep_add_to_google_calender_link($event_id);
|
||||
do_action('mep_after_add_calendar_button');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
<?php
|
||||
add_action('mep_add_to_cart','mep_get_event_reg_btn');
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn($event_id=''){
|
||||
global $post,$event_meta;
|
||||
add_action('mep_add_to_cart', 'mep_get_event_reg_btn');
|
||||
if (!function_exists('mep_get_event_reg_btn')) {
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn($event_id = '')
|
||||
{
|
||||
global $post, $event_meta;
|
||||
$total_book = 0;
|
||||
$post_id = $event_id ? $event_id : get_the_id();
|
||||
$event_meta = get_post_custom($post_id);
|
||||
$event_expire_on_old = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||
$event_expire_on_old = mep_get_option('mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||
$event_expire_on = $event_expire_on_old == 'event_end_datetime' ? 'event_expire_datetime' : $event_expire_on_old;
|
||||
$event_expire_date = $event_meta[$event_expire_on][0];
|
||||
$event_sqi = $event_meta['mep_sqi'][0];
|
||||
|
@ -21,31 +26,28 @@ function mep_get_event_reg_btn($event_id=''){
|
|||
$mep_reg_company = strip_tags($event_meta['mep_reg_company'][0]);
|
||||
$mep_reg_gender = strip_tags($event_meta['mep_reg_gender'][0]);
|
||||
$mep_reg_tshirtsize = strip_tags($event_meta['mep_reg_tshirtsize'][0]);
|
||||
// $simple_rsv = array_key_exists('mep_rsv_seat', $event_meta) ? $event_meta['mep_rsv_seat'][0] : 0;
|
||||
// $total_book = ($total_book + $simple_rsv);
|
||||
// $seat_left = ((int)$event_meta['mep_total_seat'][0]- (int)$total_book);
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
$newformat = date('Y-m-d H:i:s', $time);
|
||||
$datetime1 = new DateTime();
|
||||
$datetime2 = new DateTime($newformat);
|
||||
$interval = $datetime1->diff($datetime2);
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true) ? get_post_meta($post_id, 'mep_event_ticket_type', true) : array();
|
||||
$total_seat = mep_event_total_seat($post_id,'total');
|
||||
$total_resv = mep_event_total_seat($post_id,'resv');
|
||||
$total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($post_id, 'total'), $post_id);
|
||||
$total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($post_id, 'resv'), $post_id);
|
||||
$total_sold = mep_ticket_sold($post_id);
|
||||
$total_left = $total_seat - ($total_sold + $total_resv);
|
||||
$reg_status = array_key_exists('mep_reg_status', $event_meta) ? $event_meta['mep_reg_status'][0] : '';
|
||||
$seat_left = apply_filters( 'mep_event_total_seat_count', $total_left, $post_id );
|
||||
$seat_left = apply_filters('mep_event_total_seat_count', $total_left, $post_id);
|
||||
$current = current_time('Y-m-d H:i:s');
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
$newformat = date('Y-m-d H:i:s', $time);
|
||||
$recurring = get_post_meta($post_id, 'mep_enable_recurring', true) ? get_post_meta($post_id, 'mep_enable_recurring', true) : 'no';
|
||||
|
||||
if($recurring == 'yes'){
|
||||
$event_more_dates = get_post_meta($post_id,'mep_event_more_date',true) ? get_post_meta($post_id,'mep_event_more_date',true) : array();
|
||||
if ($recurring == 'yes') {
|
||||
$event_more_dates = get_post_meta($post_id, 'mep_event_more_date', true) ? get_post_meta($post_id, 'mep_event_more_date', true) : array();
|
||||
$md = end($event_more_dates);
|
||||
$more_date = $md['event_more_start_date'].' '.$md['event_more_start_time'];
|
||||
$newformat = empty($event_more_dates) ? $newformat : date('Y-m-d H:i:s',strtotime($more_date));
|
||||
$more_date = $md['event_more_start_date'] . ' ' . $md['event_more_start_time'];
|
||||
$newformat = empty($event_more_dates) ? $newformat : date('Y-m-d H:i:s', strtotime($more_date));
|
||||
}
|
||||
|
||||
// $default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
|
||||
|
@ -56,25 +58,25 @@ function mep_get_event_reg_btn($event_id=''){
|
|||
$interval = date_diff($datetime2, $datetime1);
|
||||
$mep_available_seat = array_key_exists('mep_available_seat', $event_meta) ? $event_meta['mep_available_seat'][0] : 'on';
|
||||
|
||||
$leftt = apply_filters( 'mep_event_total_seat_count', $total_left, $post_id );
|
||||
$leftt = apply_filters('mep_event_total_seat_count', $total_left, $post_id);
|
||||
$days = $interval->d;
|
||||
$hours = $interval->h;
|
||||
$minutes = $interval->i;
|
||||
$dd = $days > 0 ? $days." days " : '';
|
||||
$hh = $hours>0 ? $hours." hours " : '';
|
||||
$mm = $minutes>0 ? $minutes." minutes " : '';
|
||||
$dd = $days > 0 ? $days . " days " : '';
|
||||
$hh = $hours > 0 ? $hours . " hours " : '';
|
||||
$mm = $minutes > 0 ? $minutes . " minutes " : '';
|
||||
$qty_typec = $event_meta['qty_box_type'][0];
|
||||
$cart_product_id = get_post_meta($post_id,'link_wc_product',true) ? esc_attr(get_post_meta($post_id,'link_wc_product',true)) : esc_attr($post_id);
|
||||
$cart_product_id = get_post_meta($post_id, 'link_wc_product', true) ? esc_attr(get_post_meta($post_id, 'link_wc_product', true)) : esc_attr($post_id);
|
||||
|
||||
|
||||
/**
|
||||
* First Checking If the registration status enable or disable
|
||||
*/
|
||||
if($reg_status!='off'){
|
||||
/**
|
||||
* First Checking If the registration status enable or disable
|
||||
*/
|
||||
if ($reg_status != 'off') {
|
||||
/**
|
||||
* Then Checking If the event date already gone or not
|
||||
*/
|
||||
if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
|
||||
if (strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)) {
|
||||
/**
|
||||
* If The event expired then it fire below Hook, The event expire texts arein the inc/template-parts/event_labels.php file
|
||||
*/
|
||||
|
@ -83,20 +85,20 @@ if($reg_status!='off'){
|
|||
/**
|
||||
* If the event is not expired then Its checking the available seat status
|
||||
*/
|
||||
}elseif($seat_left<=0){
|
||||
} elseif ($seat_left <= 0) {
|
||||
/**
|
||||
* If All the seats are booked then it fire the below hooks, The event no seat texts are in the inc/template-parts/event_labels.php file
|
||||
*/
|
||||
do_action('mep_event_no_seat_text');
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}else{
|
||||
} else {
|
||||
/**
|
||||
* If everything is fine then its go on ....
|
||||
*/
|
||||
?>
|
||||
<!-- Register Now Title -->
|
||||
<h4 class="mep-cart-table-title">
|
||||
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : _e('Register Now:','mage-eventpress'); ?>
|
||||
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : _e('Register Now:', 'mage-eventpress'); ?>
|
||||
</h4>
|
||||
<!--The event add to cart main form start here-->
|
||||
<form action="" method='post' id="mage_event_submit">
|
||||
|
@ -104,51 +106,52 @@ if($reg_status!='off'){
|
|||
/**
|
||||
* Here is a magic hook which fire just before of the Add to Cart Button, And the Ticket type & Extra service list are hooked up into this, You can find them into inc/template-parts/event_ticket_type_extra_service.php
|
||||
*/
|
||||
do_action('mep_event_ticket_type_extra_service',$post_id);
|
||||
do_action('mep_event_ticket_type_extra_service', $post_id);
|
||||
?>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id, "_price", true); ?>" />
|
||||
|
||||
<!--The Add to cart button table start Here-->
|
||||
<table class='table table-bordered mep_event_add_cart_table'>
|
||||
<tr>
|
||||
<td align="left" class='total-col'><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec') ? mep_get_option('mep_quantity_text', 'label_setting_sec') : _e('Quantity:','mage-eventpress');
|
||||
if($mep_event_ticket_type){ ?>
|
||||
<td align="left" class='total-col'><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec') ? mep_get_option('mep_quantity_text', 'label_setting_sec') : _e('Quantity:', 'mage-eventpress');
|
||||
if ($mep_event_ticket_type) { ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo $leftt; ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<span id="ttyttl"></span>
|
||||
<?php } ?>
|
||||
<span class='the-total'> <?php echo mep_get_option('mep_total_text', 'label_setting_sec') ? mep_get_option('mep_total_text', 'label_setting_sec') : _e('Total','mage-eventpress'); ?>
|
||||
<span class='the-total'> <?php echo mep_get_option('mep_total_text', 'label_setting_sec') ? mep_get_option('mep_total_text', 'label_setting_sec') : _e('Total', 'mage-eventpress'); ?>
|
||||
<span id="usertotal"></span>
|
||||
</span>
|
||||
</td>
|
||||
<td align="right">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id,$event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id, $event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id,'mep_cart_btn_text','Register This Event'),'mage-eventpress'); ?> </button>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id, 'mep_cart_btn_text', 'Register This Event'), 'mage-eventpress'); ?> </button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--The Add to cart button table start Here-->
|
||||
</form>
|
||||
<!--The event add to cart main form end here-->
|
||||
<?php
|
||||
}
|
||||
} // End Of checking Registration status
|
||||
<!--The event add to cart main form end here-->
|
||||
<?php
|
||||
}
|
||||
} // End Of checking Registration status
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
add_action('mep_add_to_cart_list', 'mep_get_event_reg_btn_list');
|
||||
|
||||
add_action('mep_add_to_cart_list','mep_get_event_reg_btn_list');
|
||||
|
||||
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn_list(){
|
||||
global $post,$event_meta;
|
||||
if (!function_exists('mep_get_event_reg_btn_list')) {
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn_list()
|
||||
{
|
||||
global $post, $event_meta;
|
||||
$total_book = 0;
|
||||
$post_id = $post->ID;
|
||||
$event_meta = get_post_custom($post_id);
|
||||
$event_expire_on_old = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||
$event_expire_on_old = mep_get_option('mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||
$event_expire_on = $event_expire_on_old == 'event_end_datetime' ? 'event_expire_datetime' : $event_expire_on_old;
|
||||
$event_expire_date = $event_meta[$event_expire_on][0];
|
||||
$event_sqi = $event_meta['mep_sqi'][0];
|
||||
|
@ -166,27 +169,27 @@ function mep_get_event_reg_btn_list(){
|
|||
// $total_book = ($total_book + $simple_rsv);
|
||||
// $seat_left = ((int)$event_meta['mep_total_seat'][0]- (int)$total_book);
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
$newformat = date('Y-m-d H:i:s', $time);
|
||||
$datetime1 = new DateTime();
|
||||
$datetime2 = new DateTime($newformat);
|
||||
$interval = $datetime1->diff($datetime2);
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true) ? get_post_meta($post_id, 'mep_event_ticket_type', true) : array();
|
||||
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
||||
$total_resv = mep_event_total_seat(get_the_id(),'resv');
|
||||
$total_seat = mep_event_total_seat(get_the_id(), 'total');
|
||||
$total_resv = mep_event_total_seat(get_the_id(), 'resv');
|
||||
$total_sold = mep_ticket_sold(get_the_id());
|
||||
$total_left = $total_seat - ($total_sold + $total_resv);
|
||||
$reg_status = array_key_exists('mep_reg_status', $event_meta) ? $event_meta['mep_reg_status'][0] : '';
|
||||
$seat_left = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
|
||||
$seat_left = apply_filters('mep_event_total_seat_count', $total_left, get_the_id());
|
||||
$current = current_time('Y-m-d H:i:s');
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
$newformat = date('Y-m-d H:i:s', $time);
|
||||
$recurring = get_post_meta($post_id, 'mep_enable_recurring', true) ? get_post_meta($post_id, 'mep_enable_recurring', true) : 'no';
|
||||
|
||||
if($recurring == 'yes'){
|
||||
$event_more_dates = get_post_meta($post_id,'mep_event_more_date',true) ? get_post_meta($post_id,'mep_event_more_date',true) : array();
|
||||
if ($recurring == 'yes') {
|
||||
$event_more_dates = get_post_meta($post_id, 'mep_event_more_date', true) ? get_post_meta($post_id, 'mep_event_more_date', true) : array();
|
||||
$md = end($event_more_dates);
|
||||
$more_date = $md['event_more_start_date'].' '.$md['event_more_start_time'];
|
||||
$newformat = empty($event_more_dates) ? $newformat : date('Y-m-d H:i:s',strtotime($more_date));
|
||||
$more_date = $md['event_more_start_date'] . ' ' . $md['event_more_start_time'];
|
||||
$newformat = empty($event_more_dates) ? $newformat : date('Y-m-d H:i:s', strtotime($more_date));
|
||||
}
|
||||
|
||||
// $default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
|
||||
|
@ -197,25 +200,25 @@ function mep_get_event_reg_btn_list(){
|
|||
$interval = date_diff($datetime2, $datetime1);
|
||||
$mep_available_seat = array_key_exists('mep_available_seat', $event_meta) ? $event_meta['mep_available_seat'][0] : 'on';
|
||||
|
||||
$leftt = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
|
||||
$leftt = apply_filters('mep_event_total_seat_count', $total_left, get_the_id());
|
||||
$days = $interval->d;
|
||||
$hours = $interval->h;
|
||||
$minutes = $interval->i;
|
||||
$dd = $days > 0 ? $days." days " : '';
|
||||
$hh = $hours>0 ? $hours." hours " : '';
|
||||
$mm = $minutes>0 ? $minutes." minutes " : '';
|
||||
$dd = $days > 0 ? $days . " days " : '';
|
||||
$hh = $hours > 0 ? $hours . " hours " : '';
|
||||
$mm = $minutes > 0 ? $minutes . " minutes " : '';
|
||||
$qty_typec = $event_meta['qty_box_type'][0];
|
||||
$cart_product_id = get_post_meta($post_id,'link_wc_product',true) ? esc_attr(get_post_meta($post_id,'link_wc_product',true)) : esc_attr($post_id);
|
||||
$cart_product_id = get_post_meta($post_id, 'link_wc_product', true) ? esc_attr(get_post_meta($post_id, 'link_wc_product', true)) : esc_attr($post_id);
|
||||
|
||||
|
||||
/**
|
||||
* First Checking If the registration status enable or disable
|
||||
*/
|
||||
if($reg_status!='off'){
|
||||
/**
|
||||
* First Checking If the registration status enable or disable
|
||||
*/
|
||||
if ($reg_status != 'off') {
|
||||
/**
|
||||
* Then Checking If the event date already gone or not
|
||||
*/
|
||||
if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
|
||||
if (strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)) {
|
||||
/**
|
||||
* If The event expired then it fire below Hook, The event expire texts arein the inc/template-parts/event_labels.php file
|
||||
*/
|
||||
|
@ -224,20 +227,20 @@ if($reg_status!='off'){
|
|||
/**
|
||||
* If the event is not expired then Its checking the available seat status
|
||||
*/
|
||||
}elseif($seat_left<=0){
|
||||
} elseif ($seat_left <= 0) {
|
||||
/**
|
||||
* If All the seats are booked then it fire the below hooks, The event no seat texts are in the inc/template-parts/event_labels.php file
|
||||
*/
|
||||
do_action('mep_event_no_seat_text');
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}else{
|
||||
} else {
|
||||
/**
|
||||
* If everything is fine then its go on ....
|
||||
*/
|
||||
?>
|
||||
?>
|
||||
<!-- Register Now Title -->
|
||||
<h4 class="mep-cart-table-title">
|
||||
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : _e('Register Now:','mage-eventpress'); ?>
|
||||
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : _e('Register Now:', 'mage-eventpress'); ?>
|
||||
</h4>
|
||||
<!--The event add to cart main form start here-->
|
||||
<form action="" method='post' id="mage_event_submit">
|
||||
|
@ -248,31 +251,32 @@ if($reg_status!='off'){
|
|||
do_action('mep_event_ticket_types_list');
|
||||
do_action('mep_event_extra_service_list');
|
||||
?>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id, "_price", true); ?>" />
|
||||
|
||||
<!--The Add to cart button table start Here-->
|
||||
<table class='table table-bordered mep_event_add_cart_table'>
|
||||
<tr>
|
||||
<td align="left" class='total-col'><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec') ? mep_get_option('mep_quantity_text', 'label_setting_sec') : _e('Quantity:','mage-eventpress');
|
||||
if($mep_event_ticket_type){ ?>
|
||||
<td align="left" class='total-col'><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec') ? mep_get_option('mep_quantity_text', 'label_setting_sec') : _e('Quantity:', 'mage-eventpress');
|
||||
if ($mep_event_ticket_type) { ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo $leftt; ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<span id="ttyttl"></span>
|
||||
<?php } ?>
|
||||
<span class='the-total'> <?php echo mep_get_option('mep_total_text', 'label_setting_sec') ? mep_get_option('mep_total_text', 'label_setting_sec') : _e('Total','mage-eventpress'); ?>
|
||||
<span class='the-total'> <?php echo mep_get_option('mep_total_text', 'label_setting_sec') ? mep_get_option('mep_total_text', 'label_setting_sec') : _e('Total', 'mage-eventpress'); ?>
|
||||
<span id="usertotal"></span>
|
||||
</span>
|
||||
</td>
|
||||
<td align="right">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id,$event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id, $event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id,'mep_cart_btn_text','Register This Event'),'mage-eventpress'); ?> </button>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id, 'mep_cart_btn_text', 'Register This Event'), 'mage-eventpress'); ?> </button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--The Add to cart button table start Here-->
|
||||
</form>
|
||||
<!--The event add to cart main form end here-->
|
||||
<!--The event add to cart main form end here-->
|
||||
<?php
|
||||
}
|
||||
} // End Of checking Registration status
|
||||
}
|
||||
} // End Of checking Registration status
|
||||
}
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_date', 'mep_ev_datetime');
|
||||
// This Function Will be depricate soon, Please don't use this any where
|
||||
function mep_ev_datetime(){
|
||||
if (!function_exists('mep_ev_datetime')) {
|
||||
// This Function Will be depricate soon, Please don't use this any where
|
||||
function mep_ev_datetime()
|
||||
{
|
||||
global $event_meta;
|
||||
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
|
@ -16,7 +22,7 @@ function mep_ev_datetime(){
|
|||
|
||||
if ($recurring == 'yes') {
|
||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)) {
|
||||
?>
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_datetime, 'date-text') . ' ' . get_mep_datetime($start_datetime, 'time'); ?> - <?php if ($start_date != $end_date) {
|
||||
echo get_mep_datetime($end_datetime, 'date-text') . ' - ';
|
||||
}
|
||||
|
@ -58,7 +64,6 @@ function mep_ev_datetime(){
|
|||
echo get_mep_datetime($_more_date['event_more_end_time'], 'time'); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
} else {
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_datetime, 'date-text') . ' ' . get_mep_datetime($start_datetime, 'time'); ?> - <?php if ($start_date != $end_date) {
|
||||
|
@ -67,12 +72,13 @@ function mep_ev_datetime(){
|
|||
echo get_mep_datetime($end_datetime, 'time'); ?></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('mep_event_date_default_theme', 'mep_date_in_default_theme');
|
||||
function mep_date_in_default_theme($event_id){
|
||||
if (!function_exists('mep_date_in_default_theme')) {
|
||||
function mep_date_in_default_theme($event_id)
|
||||
{
|
||||
$event_meta = get_post_custom($event_id);
|
||||
$start_datetime = $event_meta['event_start_datetime'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
|
@ -85,9 +91,13 @@ function mep_date_in_default_theme($event_id){
|
|||
$cn = 1;
|
||||
$more_date = array_key_exists('mep_event_more_date', $event_meta) ? unserialize($event_meta['mep_event_more_date'][0]) : array();
|
||||
?>
|
||||
<h3><i class="fa fa-calendar"></i> <?php echo mep_get_option('mep_event_schedule_text', 'label_setting_sec',__('Event Schedule Details','mage-eventpress')); ?></h3>
|
||||
<h3><i class="fa fa-calendar"></i> <?php echo mep_get_option('mep_event_schedule_text', 'label_setting_sec', __('Event Schedule Details', 'mage-eventpress')); ?></h3>
|
||||
<?php
|
||||
if(sizeof($more_date) > 2){ echo '<ul id="mep_event_date_sch">'; }else{ echo '<ul>'; }
|
||||
if (sizeof($more_date) > 2) {
|
||||
echo '<ul id="mep_event_date_sch">';
|
||||
} else {
|
||||
echo '<ul>';
|
||||
}
|
||||
|
||||
if ($recurring == 'yes') {
|
||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)) {
|
||||
|
@ -120,10 +130,10 @@ function mep_date_in_default_theme($event_id){
|
|||
if (is_array($more_date) && sizeof($more_date) > 0) {
|
||||
?>
|
||||
<li><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($start_datetime, 'date-text'); ?><br>
|
||||
<i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime, 'time'); ?> <?php if($start_date != $end_date) {
|
||||
echo ' - '.get_mep_datetime($end_datetime, 'date-text');
|
||||
<i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime, 'time'); ?> <?php if ($start_date != $end_date) {
|
||||
echo ' - ' . get_mep_datetime($end_datetime, 'date-text');
|
||||
}
|
||||
echo ' - '.get_mep_datetime($end_datetime, 'time'); ?></li>
|
||||
echo ' - ' . get_mep_datetime($end_datetime, 'time'); ?></li>
|
||||
<?php
|
||||
|
||||
|
||||
|
@ -135,7 +145,6 @@ function mep_date_in_default_theme($event_id){
|
|||
echo get_mep_datetime($_more_date['event_more_end_date'] . ' ' . $_more_date['event_more_end_time'], 'time'); ?></li>
|
||||
<?php
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
?>
|
||||
|
@ -147,18 +156,19 @@ function mep_date_in_default_theme($event_id){
|
|||
}
|
||||
}
|
||||
echo '</ul>';
|
||||
if(sizeof($more_date) > 2){
|
||||
if (sizeof($more_date) > 2) {
|
||||
?>
|
||||
<p id="mep_single_view_all_date" class="mep-tem3-title-sec mep_single_date_btn"><?php _e('View All Date','mage-eventpress'); ?></p>
|
||||
<p id="mep_single_hide_all_date" class="mep-tem3-title-sec mep_single_date_btn"><?php _e('Hide All Date','mage-eventpress'); ?></p>
|
||||
<p id="mep_single_view_all_date" class="mep-tem3-title-sec mep_single_date_btn"><?php _e('View All Date', 'mage-eventpress'); ?></p>
|
||||
<p id="mep_single_hide_all_date" class="mep-tem3-title-sec mep_single_date_btn"><?php _e('Hide All Date', 'mage-eventpress'); ?></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_date_only', 'mep_ev_date');
|
||||
function mep_ev_date()
|
||||
{
|
||||
if (!function_exists('mep_ev_date')) {
|
||||
function mep_ev_date()
|
||||
{
|
||||
global $event_meta;
|
||||
$start_datetime = $event_meta['event_start_datetime'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
|
@ -200,12 +210,13 @@ function mep_ev_date()
|
|||
<p><?php echo get_mep_datetime($start_datetime, 'date-text'); ?></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_time_only', 'mep_ev_time');
|
||||
function mep_ev_time()
|
||||
{
|
||||
if (!function_exists('mep_ev_time')) {
|
||||
function mep_ev_time()
|
||||
{
|
||||
global $event_meta;
|
||||
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
|
@ -243,16 +254,23 @@ function mep_ev_time()
|
|||
} else {
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_datetime, 'time'); ?></p>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mep_ev_time_ticket($event_meta){
|
||||
if (!function_exists('mep_ev_time_ticket')) {
|
||||
function mep_ev_time_ticket($event_meta)
|
||||
{
|
||||
$start_datetime = $event_meta['event_start_datetime'][0];
|
||||
echo get_mep_datetime($start_datetime, 'time');
|
||||
}
|
||||
}
|
||||
|
||||
function mep_ev_date_ticket($event_meta){
|
||||
if (!function_exists('mep_ev_date_ticket')) {
|
||||
function mep_ev_date_ticket($event_meta)
|
||||
{
|
||||
$start_datetime = $event_meta['event_start_datetime'][0];
|
||||
echo get_mep_datetime($start_datetime, 'date-text');
|
||||
}
|
||||
}
|
|
@ -1,27 +1,35 @@
|
|||
<?php
|
||||
add_action('mep_event_details','mep_ev_details');
|
||||
function mep_ev_details(){
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_details', 'mep_ev_details');
|
||||
if (!function_exists('mep_ev_details')) {
|
||||
function mep_ev_details()
|
||||
{
|
||||
global $post, $event_meta;
|
||||
$content_event = get_post($post->ID);
|
||||
$content = $content_event->post_content;
|
||||
$content = apply_filters('the_content', $content);
|
||||
$content = str_replace(']]>', ']]>', $content);
|
||||
echo apply_filters( 'mep_event_details_content', $content, get_the_id() );
|
||||
echo apply_filters('mep_event_details_content', $content, get_the_id());
|
||||
do_action('mep_after_event_details');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('mep_after_event_details','mep_display_event_daywise_details');
|
||||
function mep_display_event_daywise_details(){
|
||||
add_action('mep_after_event_details', 'mep_display_event_daywise_details');
|
||||
if (!function_exists('mep_display_event_daywise_details')) {
|
||||
function mep_display_event_daywise_details()
|
||||
{
|
||||
global $post, $event_meta;
|
||||
$mep_event_day = get_post_meta($post->ID, 'mep_event_day', true) ? get_post_meta($post->ID, 'mep_event_day', true) : array();
|
||||
if ( sizeof($mep_event_day) > 0 ){
|
||||
if (sizeof($mep_event_day) > 0) {
|
||||
echo '<div class="mep-day-details-section">';
|
||||
?>
|
||||
<h4><?php _e('Event Days','mage-eventpress'); ?></h4>
|
||||
<h4><?php _e('Event Days', 'mage-eventpress'); ?></h4>
|
||||
<?php
|
||||
foreach ( $mep_event_day as $field ) {
|
||||
foreach ($mep_event_day as $field) {
|
||||
?>
|
||||
<div class="mep-day-title"><?php echo $field['mep_day_title']; ?></div>
|
||||
<div class="mep-day-details">
|
||||
|
@ -31,4 +39,5 @@ function mep_display_event_daywise_details(){
|
|||
}
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,12 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_extra_service', 'mep_ev_extra_serv');
|
||||
function mep_ev_extra_serv($post_id){
|
||||
if (!function_exists('mep_ev_extra_serv')) {
|
||||
function mep_ev_extra_serv($post_id)
|
||||
{
|
||||
global $post, $product;
|
||||
$post_id = $post_id;
|
||||
$count = 1;
|
||||
|
@ -9,25 +14,25 @@ function mep_ev_extra_serv($post_id){
|
|||
ob_start();
|
||||
if (sizeof($mep_events_extra_prices) > 0) {
|
||||
echo "<h3 class='ex-sec-title'>" . mep_get_label($post_id, 'mep_event_extra_service_text', 'Extra Service:') . "</h3>";
|
||||
?>
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left"><?php echo mep_get_option('mep_name_text', 'label_setting_sec',__('Name:','mage-eventpress')); ?></td>
|
||||
<td class="mage_text_center"><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec',__('Quantity:','mage-eventpress')); ?></td>
|
||||
<td class="mage_text_center"><?php echo mep_get_option('mep_price_text', 'label_setting_sec',__('Price:','mage-eventpress')); ?></td>
|
||||
<td align="left"><?php echo mep_get_option('mep_name_text', 'label_setting_sec', __('Name:', 'mage-eventpress')); ?></td>
|
||||
<td class="mage_text_center"><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec', __('Quantity:', 'mage-eventpress')); ?></td>
|
||||
<td class="mage_text_center"><?php echo mep_get_option('mep_price_text', 'label_setting_sec', __('Price:', 'mage-eventpress')); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($mep_events_extra_prices as $field) {
|
||||
$event_date = get_post_meta($post_id, 'event_start_date', true).' '.get_post_meta($post_id, 'event_start_time', true);
|
||||
$total_extra_service = (int)$field['option_qty'];
|
||||
$event_date = get_post_meta($post_id, 'event_start_date', true) . ' ' . get_post_meta($post_id, 'event_start_time', true);
|
||||
$total_extra_service = (int) $field['option_qty'];
|
||||
$qty_type = $field['option_qty_type'];
|
||||
$total_sold = (int) mep_extra_service_sold($post_id,$field['option_name'],$event_date);
|
||||
$total_sold = (int) mep_extra_service_sold($post_id, $field['option_name'], $event_date);
|
||||
$ext_left = ($total_extra_service - $total_sold);
|
||||
?>
|
||||
<tr>
|
||||
<td align="Left"><?php echo $field['option_name']; ?>
|
||||
<div class="xtra-item-left"><?php echo $ext_left; ?>
|
||||
<?php echo mep_get_option('mep_left_text', 'label_setting_sec') ? mep_get_option('mep_left_text', 'label_setting_sec') : _e('Left:','mage-eventpress'); ?>
|
||||
<?php echo mep_get_option('mep_left_text', 'label_setting_sec') ? mep_get_option('mep_left_text', 'label_setting_sec') : _e('Left:', 'mage-eventpress'); ?>
|
||||
</div>
|
||||
<input type="hidden" name='mep_event_start_date_es[]' value='<?php echo $event_date; ?>'>
|
||||
</td>
|
||||
|
@ -66,9 +71,10 @@ function mep_ev_extra_serv($post_id){
|
|||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
$content = ob_get_clean();
|
||||
$event_meta = get_post_custom($post_id);
|
||||
echo apply_filters('mage_event_extra_service_list', $content,$post_id,$event_meta);
|
||||
echo apply_filters('mage_event_extra_service_list', $content, $post_id, $event_meta);
|
||||
}
|
||||
}
|
|
@ -1,24 +1,32 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_expire_text','mep_event_display_expire_text');
|
||||
function mep_event_display_expire_text(){
|
||||
add_action('mep_event_expire_text', 'mep_event_display_expire_text');
|
||||
if (!function_exists('mep_event_display_expire_text')) {
|
||||
function mep_event_display_expire_text()
|
||||
{
|
||||
ob_start();
|
||||
?>
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
<?php echo mep_get_option('mep_event_expired_text', 'label_setting_sec') ? mep_get_option('mep_event_expired_text', 'label_setting_sec') : _e('Sorry, Event Expired','mage-eventpress'); ?>
|
||||
<?php echo mep_get_option('mep_event_expired_text', 'label_setting_sec') ? mep_get_option('mep_event_expired_text', 'label_setting_sec') : _e('Sorry, Event Expired', 'mage-eventpress'); ?>
|
||||
</span>
|
||||
<?php
|
||||
echo ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_no_seat_text','mep_event_display_no_seat_text');
|
||||
function mep_event_display_no_seat_text(){
|
||||
add_action('mep_event_no_seat_text', 'mep_event_display_no_seat_text');
|
||||
if (!function_exists('mep_event_display_no_seat_text')) {
|
||||
function mep_event_display_no_seat_text()
|
||||
{
|
||||
ob_start();
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
<?php 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 Availables','mage-eventpress'); ?>
|
||||
<?php 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 Availables', 'mage-eventpress'); ?>
|
||||
</span>
|
||||
<?php
|
||||
<?php
|
||||
echo ob_get_clean();
|
||||
}
|
||||
}
|
|
@ -1,8 +1,14 @@
|
|||
<?php
|
||||
add_action('mep_event_list_cat_names','mep_display_event_cat_name_in_list');
|
||||
function mep_display_event_cat_name_in_list(){
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_list_cat_names', 'mep_display_event_cat_name_in_list');
|
||||
if (!function_exists('mep_display_event_cat_name_in_list')) {
|
||||
function mep_display_event_cat_name_in_list()
|
||||
{
|
||||
ob_start();
|
||||
?>
|
||||
?>
|
||||
<div class="mep-events-cats-list">
|
||||
<?php
|
||||
$terms = get_terms(array(
|
||||
|
@ -10,21 +16,21 @@ function mep_display_event_cat_name_in_list(){
|
|||
));
|
||||
?>
|
||||
<div class="mep-event-cat-controls">
|
||||
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php
|
||||
foreach ($terms as $_terms) {
|
||||
?>
|
||||
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
|
||||
}
|
||||
?>
|
||||
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button>
|
||||
<?php foreach ($terms as $_terms) { ?>
|
||||
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_category_name_filter_list', $content);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('mep_event_list_org_names','mep_display_event_org_name_in_list');
|
||||
function mep_display_event_org_name_in_list(){
|
||||
add_action('mep_event_list_org_names', 'mep_display_event_org_name_in_list');
|
||||
if (!function_exists('mep_display_event_org_name_in_list')) {
|
||||
function mep_display_event_org_name_in_list()
|
||||
{
|
||||
ob_start();
|
||||
?>
|
||||
<div class="mep-events-cats-list">
|
||||
|
@ -36,15 +42,12 @@ function mep_display_event_org_name_in_list(){
|
|||
);
|
||||
?>
|
||||
<div class="mep-event-cat-controls">
|
||||
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php
|
||||
foreach ($terms as $_terms) {
|
||||
?>
|
||||
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
|
||||
}
|
||||
?>
|
||||
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php foreach ($terms as $_terms) { ?>
|
||||
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_organization_name_filter_list', $content);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,12 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_location','mep_ev_location');
|
||||
add_action('mep_event_location_ticket','mep_ev_location_ticket');
|
||||
|
||||
|
||||
if (!function_exists('mep_ev_location_cart')) {
|
||||
function mep_ev_location_cart($event_id,$event_meta){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true) ? get_post_meta($event_id,'mep_org_address',true) : '';
|
||||
ob_start();
|
||||
|
@ -29,10 +33,10 @@ if($location_sts){
|
|||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_location_in_cart', $content,$event_id,$event_meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!function_exists('mep_ev_location_ticket')) {
|
||||
function mep_ev_location_ticket($event_id,$event_meta){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true) ? get_post_meta($event_id,'mep_org_address',true) : '';
|
||||
ob_start();
|
||||
|
@ -63,8 +67,9 @@ $org_id = $org_arr[0]->term_id;
|
|||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_location_in_ticket', $content,$event_id,$event_meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('mep_ev_location')) {
|
||||
function mep_ev_location(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true) ? get_post_meta($post->ID,'mep_org_address',true) : '';
|
||||
|
@ -97,29 +102,35 @@ $org_id = $org_arr[0]->term_id;
|
|||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_location_content', $content,$post->ID,$event_meta);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('mep_event_location_venue','mep_ev_venue');
|
||||
function mep_ev_venue(){
|
||||
if (!function_exists('mep_ev_venue')) {
|
||||
function mep_ev_venue($event_id=''){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($event_id){
|
||||
$event = $event_id;
|
||||
}else{
|
||||
$event = $post->ID;
|
||||
}
|
||||
$location_sts = get_post_meta($event,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_arr = get_the_terms( $event, '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 get_post_meta($event,'mep_location_venue',true); ?></span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Event Location Get Functions
|
||||
*/
|
||||
|
||||
if (!function_exists('mep_get_event_location')) {
|
||||
function mep_get_event_location($event_id){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
|
@ -130,7 +141,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
|
|||
return get_post_meta($event_id,'mep_location_venue',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('mep_get_event_location_street')) {
|
||||
function mep_get_event_location_street($event_id){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
|
@ -141,8 +154,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
|
|||
return get_post_meta($event_id,'mep_street',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('mep_get_event_location_city')) {
|
||||
function mep_get_event_location_city($event_id){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
|
@ -153,8 +167,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
|
|||
return get_post_meta($event_id,'mep_city',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('mep_get_event_location_state')) {
|
||||
function mep_get_event_location_state($event_id){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
|
@ -165,8 +180,13 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
|
|||
return get_post_meta($event_id,'mep_state',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mep_get_location_name_for_list($event_id){
|
||||
|
||||
}
|
||||
|
||||
if (!function_exists('mep_get_event_location_postcode')) {
|
||||
function mep_get_event_location_postcode($event_id){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
|
@ -177,8 +197,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
|
|||
return get_post_meta($event_id,'mep_postcode',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('mep_get_event_location_country')) {
|
||||
function mep_get_event_location_country($event_id){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
|
@ -189,7 +210,7 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
|
|||
return get_post_meta($event_id,'mep_country',true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -197,6 +218,7 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
|
|||
|
||||
|
||||
add_action('mep_event_location_street','mep_ev_street');
|
||||
if (!function_exists('mep_ev_street')) {
|
||||
function mep_ev_street(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
|
@ -210,9 +232,11 @@ $org_id = $org_arr[0]->term_id;
|
|||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_location_city','mep_ev_city');
|
||||
if (!function_exists('mep_ev_city')) {
|
||||
function mep_ev_city(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
|
@ -226,9 +250,12 @@ $org_id = $org_arr[0]->term_id;
|
|||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('mep_event_location_state','mep_ev_state');
|
||||
if (!function_exists('mep_ev_state')) {
|
||||
function mep_ev_state(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
|
@ -242,9 +269,12 @@ $org_id = $org_arr[0]->term_id;
|
|||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('mep_event_location_postcode','mep_ev_postcode');
|
||||
if (!function_exists('mep_ev_postcode')) {
|
||||
function mep_ev_postcode(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
|
@ -258,9 +288,11 @@ $org_id = $org_arr[0]->term_id;
|
|||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_location_country','mep_ev_country');
|
||||
if (!function_exists('mep_ev_country')) {
|
||||
function mep_ev_country(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
|
@ -274,8 +306,10 @@ $org_id = $org_arr[0]->term_id;
|
|||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_action('mep_event_address_list_sidebar','mep_event_address_list_sidebar_html');
|
||||
if (!function_exists('mep_event_address_list_sidebar_html')) {
|
||||
function mep_event_address_list_sidebar_html($event_id){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
$org_arr = get_the_terms( $event_id, 'mep_org' ) ? get_the_terms( $event_id, 'mep_org' ) : '';
|
||||
|
@ -304,3 +338,4 @@ function mep_event_address_list_sidebar_html($event_id){
|
|||
<?php
|
||||
echo ob_get_clean();
|
||||
}
|
||||
}
|
|
@ -1,12 +1,18 @@
|
|||
<?php
|
||||
add_action('mep_event_list_shortcode','mep_display_event_loop_list',10,3);
|
||||
function mep_display_event_loop_list($event_id,$columnNumber,$style){
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_list_shortcode', 'mep_display_event_loop_list', 10, 3);
|
||||
if (!function_exists('mep_display_event_loop_list')) {
|
||||
function mep_display_event_loop_list($event_id, $columnNumber, $style)
|
||||
{
|
||||
$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:');
|
||||
$event_meta = get_post_custom($event_id);
|
||||
$author_terms = get_the_terms($event_id, 'mep_org');
|
||||
$author_terms = get_the_terms($event_id, 'mep_org') ? get_the_terms($event_id, 'mep_org') : [];
|
||||
$time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
|
||||
$newformat = date_i18n('Y-m-d H:i:s', $time);
|
||||
$tt = get_the_terms($event_id, 'mep_cat');
|
||||
|
@ -20,27 +26,27 @@ function mep_display_event_loop_list($event_id,$columnNumber,$style){
|
|||
$hide_time_list = mep_get_option('mep_event_hide_time_list', 'general_setting_sec', 'no');
|
||||
$hide_only_end_time_list = mep_get_option('mep_event_hide_end_time_list', 'general_setting_sec', 'no');
|
||||
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
|
||||
$event_type = get_post_meta(get_the_id(),'mep_event_type',true) ? get_post_meta(get_the_id(),'mep_event_type',true) : 'offline';
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<div class='mep-event-list-loop <?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php if ($tt) { echo $org_class; } ?> <?php if ($torg) { echo $cat_class; } ?>'>
|
||||
<?php do_action('mep_event_list_loop_header',$event_id); ?>
|
||||
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
|
||||
ob_start();
|
||||
?>
|
||||
<div class='mep-event-list-loop <?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php if ($tt) { echo $org_class; } ?> <?php if ($torg) { echo $cat_class; } ?>'>
|
||||
<?php do_action('mep_event_list_loop_header', $event_id); ?>
|
||||
<div class="mep_list_thumb">
|
||||
<a href="<?php echo get_the_permalink($event_id); ?>"><?php echo get_the_post_thumbnail($event_id,'full'); ?></a>
|
||||
<?php if(sizeof($event_multidate) == 0){ ?>
|
||||
<a href="<?php echo get_the_permalink($event_id); ?>"><?php echo get_the_post_thumbnail($event_id, 'full'); ?></a>
|
||||
<?php if (sizeof($event_multidate) == 0) { ?>
|
||||
<div class="mep-ev-start-date">
|
||||
<div class="mep-day"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0],'day'); ?></div>
|
||||
<div class="mep-month"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0],'month'); ?></div>
|
||||
<div class="mep-day"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'day'); ?></div>
|
||||
<div class="mep-month"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'month'); ?></div>
|
||||
</div>
|
||||
<?php } if(is_array($event_multidate) && sizeof($event_multidate) >0){ ?>
|
||||
<?php }
|
||||
if (is_array($event_multidate) && sizeof($event_multidate) > 0) { ?>
|
||||
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
|
||||
<span><?php _e('Multi Date Event','mage-eventpress'); ?></span>
|
||||
<span><?php _e('Multi Date Event', 'mage-eventpress'); ?></span>
|
||||
</div>
|
||||
<?php } if($event_type == 'online'){ ?>
|
||||
<?php }
|
||||
if ($event_type == 'online') { ?>
|
||||
<div class='mep-eventtype-ribbon mep-tem3-title-sec'>
|
||||
<span><?php echo mep_get_option('mep_event_virtual_label', 'label_setting_sec') ? mep_get_option('mep_event_virtual_label', 'label_setting_sec') : _e('Virtual Event','mage-eventpress'); ?></span>
|
||||
<span><?php echo mep_get_option('mep_event_virtual_label', 'label_setting_sec') ? mep_get_option('mep_event_virtual_label', 'label_setting_sec') : _e('Virtual Event', 'mage-eventpress'); ?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
@ -51,11 +57,12 @@ ob_start();
|
|||
<?php if ($available_seat == 0) {
|
||||
do_action('mep_show_waitlist_label');
|
||||
} ?>
|
||||
<h3 class='mep_list_date'> <?php if ($show_price == 'yes') {
|
||||
<h3 class='mep_list_date'>
|
||||
<?php if ($show_price == 'yes') {
|
||||
echo $show_price_label . " " . mep_event_list_price($event_id);
|
||||
} ?></h3>
|
||||
} ?>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($style == 'list') {
|
||||
?>
|
||||
|
@ -66,20 +73,23 @@ ob_start();
|
|||
|
||||
<div class="mep-list-footer">
|
||||
<ul>
|
||||
<?php if ($hide_org_list == 'no') { ?>
|
||||
<?php
|
||||
if ($hide_org_list == 'no') {
|
||||
if(sizeof($author_terms) > 0) {
|
||||
?>
|
||||
<li>
|
||||
<div class="evl-ico"><i class="fa fa-university"></i></div>
|
||||
<div class="evl-cc">
|
||||
<h5>
|
||||
<?php echo mep_get_option('mep_organized_by_text', 'label_setting_sec') ? mep_get_option('mep_organized_by_text', 'label_setting_sec') : _e('Organized By:', 'mage-eventpress'); ?>
|
||||
</h5>
|
||||
<h6><?php if ($author_terms) {
|
||||
<h6><?php
|
||||
echo $author_terms[0]->name;
|
||||
} ?></h6>
|
||||
?></h6>
|
||||
</div>
|
||||
</li>
|
||||
<?php }
|
||||
if($event_type != 'online'){
|
||||
<?php } }
|
||||
if ($event_type != 'online') {
|
||||
if ($hide_location_list == 'no') { ?>
|
||||
|
||||
<li>
|
||||
|
@ -92,31 +102,36 @@ ob_start();
|
|||
<h6><?php mep_get_event_city($event_id); ?></h6>
|
||||
</div>
|
||||
</li>
|
||||
<?php } }
|
||||
if ($hide_time_list == 'no') { ?>
|
||||
<?php }
|
||||
}
|
||||
if ($hide_time_list == 'no') {
|
||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($event_meta['event_start_datetime'][0])) {
|
||||
?>
|
||||
<li>
|
||||
<div class="evl-ico"><i class="fa fa-calendar"></i></div>
|
||||
<div class="evl-cc">
|
||||
<h5>
|
||||
<?php if(sizeof($event_multidate) > 0){ echo get_mep_datetime($event_meta['event_start_datetime'][0],'date-text'); } ?>
|
||||
<?php if (sizeof($event_multidate) > 0) {
|
||||
|
||||
echo get_mep_datetime($event_meta['event_start_datetime'][0], 'date-text');
|
||||
}
|
||||
?>
|
||||
<?php echo mep_get_option('mep_time_text', 'label_setting_sec') ? mep_get_option('mep_time_text', 'label_setting_sec') : _e('Time:', 'mage-eventpress'); ?>
|
||||
</h5>
|
||||
<h6><?php echo get_mep_datetime($event_meta['event_start_datetime'][0],'time');
|
||||
if ($hide_only_end_time_list == 'no') { ?> - <?php echo get_mep_datetime($event_meta['event_end_datetime'][0],'time');
|
||||
} ?></h6>
|
||||
<h6><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'time');
|
||||
if ($hide_only_end_time_list == 'no') { ?> - <?php echo get_mep_datetime($event_meta['event_end_datetime'][0], 'time'); } ?></h6>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } } ?>
|
||||
</ul>
|
||||
</a>
|
||||
<?php do_action('mep_event_list_loop_footer',$event_id); ?>
|
||||
<?php do_action('mep_event_list_loop_footer', $event_id); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php do_action('mep_event_list_loop_end',$event_id); ?>
|
||||
<?php do_action('mep_event_list_loop_end', $event_id); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_loop_list_shortcode', $content, $event_id,$style);
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_loop_list_shortcode', $content, $event_id, $style);
|
||||
}
|
||||
}
|
|
@ -1,10 +1,13 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This is the templates of the event minimal list shortcode
|
||||
*/
|
||||
|
||||
|
||||
add_filter('mage_event_loop_list_shortcode','mep_event_loop_minimal_style',10,3);
|
||||
if (!function_exists('mep_event_loop_minimal_style')) {
|
||||
function mep_event_loop_minimal_style($content, $event_id,$style){
|
||||
if($style == 'minimal'){
|
||||
|
||||
|
@ -67,3 +70,4 @@ $content = ob_get_clean();
|
|||
return $content;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,14 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This is the templates of the event native list shortcode
|
||||
*/
|
||||
|
||||
add_filter('mage_event_loop_list_shortcode','mep_event_loop_native_style',10,3);
|
||||
if (!function_exists('mep_event_loop_native_style')) {
|
||||
function mep_event_loop_native_style($content, $event_id,$style){
|
||||
if($style == 'native'){
|
||||
|
||||
|
@ -63,3 +68,4 @@ $content = ob_get_clean();
|
|||
return $content;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,14 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This is the templates of the event timeline view shortcode
|
||||
*/
|
||||
|
||||
add_filter('mage_event_loop_list_shortcode','mep_event_loop_timeline_style',10,3);
|
||||
if (!function_exists('mep_event_loop_timeline_style')) {
|
||||
function mep_event_loop_timeline_style($content, $event_id,$style){
|
||||
if($style == 'timeline'){
|
||||
|
||||
|
@ -63,9 +68,10 @@ $content = ob_get_clean();
|
|||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_action('mep_event_shortcode_js_script','mep_shortcode_timeline_js_script');
|
||||
if (!function_exists('mep_shortcode_timeline_js_script')) {
|
||||
function mep_shortcode_timeline_js_script($params){
|
||||
$cat = $params['cat'];
|
||||
$org = $params['org'];
|
||||
|
@ -96,3 +102,4 @@ function mep_shortcode_timeline_js_script($params){
|
|||
}
|
||||
echo ob_get_clean();
|
||||
}
|
||||
}
|
|
@ -1,9 +1,14 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This is the templates of the event timeline view shortcode
|
||||
*/
|
||||
|
||||
add_filter('mage_event_loop_list_shortcode','mep_event_loop_title_style',10,3);
|
||||
if (!function_exists('mep_event_loop_title_style')) {
|
||||
function mep_event_loop_title_style($content, $event_id,$style){
|
||||
if($style == 'title'){
|
||||
|
||||
|
@ -38,3 +43,4 @@ $content = ob_get_clean();
|
|||
return $content;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This Function will hooked up with the speaker action hook mep_event_speakers_list to display the Event Speaker List
|
||||
*/
|
||||
|
||||
add_action('mep_event_speakers_list','mep_display_speaker_list');
|
||||
if (!function_exists('mep_display_speaker_list')) {
|
||||
function mep_display_speaker_list($event_id){
|
||||
$speakers_id = get_post_meta($event_id,'mep_event_speakers_list',true) ? maybe_unserialize(get_post_meta($event_id,'mep_event_speakers_list',true)) : array();
|
||||
$speaker_icon = get_post_meta($event_id,'mep_event_speaker_icon',true) ? get_post_meta($event_id,'mep_event_speaker_icon',true) : 'fa fa-microphone';
|
||||
|
@ -26,3 +30,4 @@
|
|||
echo '</ul>';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,53 +1,60 @@
|
|||
<?php
|
||||
add_action('mep_event_ticket_types','mep_ev_ticket_type');
|
||||
function mep_ev_ticket_type($post_id){
|
||||
global $post, $product,$event_meta;
|
||||
$count=1;
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_ticket_types', 'mep_ev_ticket_type');
|
||||
if (!function_exists('mep_ev_ticket_type')) {
|
||||
function mep_ev_ticket_type($post_id)
|
||||
{
|
||||
global $post, $product, $event_meta;
|
||||
$count = 1;
|
||||
ob_start();
|
||||
$mep_available_seat = array_key_exists('mep_available_seat', $event_meta) ? $event_meta['mep_available_seat'][0] : 'on';
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true) ? get_post_meta($post_id, 'mep_event_ticket_type', true) : array();
|
||||
|
||||
if($mep_event_ticket_type){
|
||||
?>
|
||||
<?php echo "<h3 class='ex-sec-title'>".mep_get_label($post_id,'mep_event_ticket_type_text','Ticket Type:')."</h3>"; ?>
|
||||
if ($mep_event_ticket_type) {
|
||||
?>
|
||||
<?php echo "<h3 class='ex-sec-title'>" . mep_get_label($post_id, 'mep_event_ticket_type_text', 'Ticket Type:') . "</h3>"; ?>
|
||||
<table>
|
||||
<?php do_action('mep_event_ticket_type_loop_list',$post_id); ?>
|
||||
<?php do_action('mep_event_ticket_type_loop_list', $post_id); ?>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_ticket_type_list', $content,$post_id,$event_meta);
|
||||
echo apply_filters('mage_event_ticket_type_list', $content, $post_id, $event_meta);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function ($) {
|
||||
$('.qty_dec').on('click', function () {
|
||||
jQuery(document).ready(function($) {
|
||||
$('.qty_dec').on('click', function() {
|
||||
let target = $(this).siblings('input');
|
||||
let value = parseInt(target.val()) - 1;
|
||||
qtyPlace(target, value);
|
||||
});
|
||||
$('.qty_inc').on('click', function () {
|
||||
$('.qty_inc').on('click', function() {
|
||||
let target = $(this).siblings('input');
|
||||
let value = parseInt(target.val()) + 1;
|
||||
qtyPlace(target, value);
|
||||
});
|
||||
$('.mage_input_group input').on('keyup', function () {
|
||||
$('.mage_input_group input').on('keyup', function() {
|
||||
let target = $(this);
|
||||
let value = parseInt(target.val());
|
||||
if(target.val().length>0){
|
||||
if (target.val().length > 0) {
|
||||
qtyPlace(target, value);
|
||||
}
|
||||
|
||||
});
|
||||
$('#mage_event_submit').on('submit', function () {
|
||||
if(mageErrorQty()){
|
||||
$('#mage_event_submit').on('submit', function() {
|
||||
if (mageErrorQty()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("select[name='option_qty[]']").on('blur', function () {
|
||||
$("select[name='option_qty[]']").on('blur', function() {
|
||||
mageErrorQty();
|
||||
});
|
||||
|
||||
function qtyPlace(target, value) {
|
||||
let minSeat = parseInt(target.attr('min'));
|
||||
let maxSeat = parseInt(target.attr('max'));
|
||||
|
@ -61,13 +68,14 @@ function mep_ev_ticket_type($post_id){
|
|||
mageErrorQty();
|
||||
|
||||
}
|
||||
function mageErrorQty(){
|
||||
|
||||
function mageErrorQty() {
|
||||
let total_ticket = 0;
|
||||
let target=$("[name='option_qty[]']");
|
||||
target.each(function (index) {
|
||||
let target = $("[name='option_qty[]']");
|
||||
target.each(function(index) {
|
||||
total_ticket = total_ticket + parseInt($(this).val());
|
||||
});
|
||||
if(total_ticket>0){
|
||||
if (total_ticket > 0) {
|
||||
target.removeClass('mage_error');
|
||||
return true;
|
||||
}
|
||||
|
@ -77,5 +85,6 @@ function mep_ev_ticket_type($post_id){
|
|||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
<?php
|
||||
function mep_output_add_to_cart_custom_fields($post_id)
|
||||
{
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10);
|
||||
|
||||
if (!function_exists('mep_output_add_to_cart_custom_fields')) {
|
||||
function mep_output_add_to_cart_custom_fields($post_id)
|
||||
{
|
||||
global $post, $event_meta, $total_book;
|
||||
|
||||
$total_seat = mep_event_total_seat($post_id, 'total');
|
||||
|
@ -9,8 +16,8 @@ function mep_output_add_to_cart_custom_fields($post_id)
|
|||
$total_left = $total_seat - ($total_sold + $total_resv);
|
||||
$total_left = apply_filters('mep_event_total_seat_count', $total_left, $post_id);
|
||||
if ($total_left > 0) {
|
||||
do_action('mep_event_ticket_types',$post_id);
|
||||
do_action('mep_event_extra_service',$post_id);
|
||||
do_action('mep_event_ticket_types', $post_id);
|
||||
do_action('mep_event_extra_service', $post_id);
|
||||
} else {
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
|
@ -19,5 +26,5 @@ function mep_output_add_to_cart_custom_fields($post_id)
|
|||
<?php
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action('mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10);
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_ticket_type_loop_list', 'mep_event_ticket_type_loop_list_html');
|
||||
function mep_event_ticket_type_loop_list_html($post_id)
|
||||
{
|
||||
if (!function_exists('mep_event_ticket_type_loop_list_html')) {
|
||||
function mep_event_ticket_type_loop_list_html($post_id)
|
||||
{
|
||||
$mep_available_seat = get_post_meta($post_id, 'mep_available_seat', true) ? get_post_meta($post_id, 'mep_available_seat', true) : 'on';
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true) ? get_post_meta($post_id, 'mep_event_ticket_type', true) : array();
|
||||
ob_start();
|
||||
|
@ -93,4 +98,5 @@ function mep_event_ticket_type_loop_list_html($post_id)
|
|||
<?php
|
||||
$loop_list = ob_get_clean();
|
||||
echo apply_filters('mep_event_ticket_type_loop', $loop_list, $post_id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_faq', 'mep_faq_part');
|
||||
function mep_faq_part($event_id){
|
||||
if (!function_exists('mep_faq_part')) {
|
||||
function mep_faq_part($event_id)
|
||||
{
|
||||
ob_start();
|
||||
$mep_event_faq = get_post_meta($event_id, 'mep_event_faq', true) ? get_post_meta($event_id, 'mep_event_faq', true) : '';
|
||||
if ($mep_event_faq) {
|
||||
?>
|
||||
?>
|
||||
<div class="mep-event-faq-part">
|
||||
<h3 class="ex-sec-title"><?php _e('Event F.A.Q', 'mage-eventpress'); ?></h3>
|
||||
<div id='mep-event-accordion' class="">
|
||||
|
@ -18,8 +24,9 @@ function mep_faq_part($event_id){
|
|||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_faq_list', $content,$event_id);
|
||||
echo apply_filters('mage_event_faq_list', $content, $event_id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,52 +1,66 @@
|
|||
<?php
|
||||
add_action('mep_event_map','mep_event_google_map');
|
||||
function mep_event_google_map($event_id){
|
||||
global $post,$event_meta,$user_api;
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
$map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'iframe');
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true) ? get_post_meta($event_id,'mep_org_address',true) : '';
|
||||
ob_start();
|
||||
do_action('mep_event_before_google_map');
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||
add_action('mep_event_map', 'mep_event_google_map');
|
||||
if (!function_exists('mep_event_google_map')) {
|
||||
function mep_event_google_map($event_id)
|
||||
{
|
||||
global $post, $event_meta, $user_api;
|
||||
|
||||
$map_type = mep_get_option('mep_google_map_type', 'general_setting_sec', 'iframe');
|
||||
$location_sts = get_post_meta($event_id, 'mep_org_address', true) ? get_post_meta($event_id, 'mep_org_address', true) : '';
|
||||
ob_start();
|
||||
do_action('mep_event_before_google_map');
|
||||
if ($location_sts) {
|
||||
$org_arr = get_the_terms($event_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 = 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 ($event_meta['mep_sgm'][0]) {
|
||||
|
||||
if($map_type=='iframe'){
|
||||
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($event_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{
|
||||
<div class="mep-gmap-sec">
|
||||
<iframe id="gmap_canvas" src="https://maps.google.com/maps?q=<?php echo mep_get_event_locaion_item($event_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($user_api){
|
||||
if ($user_api) {
|
||||
?>
|
||||
<div class="mep-gmap-sec">
|
||||
<div id="map" class='mep_google_map'></div>
|
||||
</div>
|
||||
<script>
|
||||
var map;
|
||||
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>},
|
||||
center: {
|
||||
lat: <?php echo $lat; ?>,
|
||||
lng: <?php echo $lon; ?>
|
||||
},
|
||||
zoom: 17
|
||||
});
|
||||
marker = new google.maps.Marker({
|
||||
map: map,
|
||||
draggable: false,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>}
|
||||
position: {
|
||||
lat: <?php echo $lat; ?>,
|
||||
lng: <?php echo $lon; ?>
|
||||
}
|
||||
});
|
||||
marker.addListener('click', toggleBounce);
|
||||
}
|
||||
|
||||
function toggleBounce() {
|
||||
if (marker.getAnimation() !== null) {
|
||||
marker.setAnimation(null);
|
||||
|
@ -55,10 +69,12 @@ if($map_type=='iframe'){
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap"
|
||||
async defer></script>
|
||||
<?php } } }
|
||||
do_action('mep_event_after_google_map');
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap" async defer></script>
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
do_action('mep_event_after_google_map');
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_google_map', $content,$event_id);
|
||||
}?>
|
||||
echo apply_filters('mage_event_google_map', $content, $event_id);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_organizer','mep_ev_org');
|
||||
if (!function_exists('mep_ev_org')) {
|
||||
function mep_ev_org(){
|
||||
global $post,$author_terms;
|
||||
ob_start();
|
||||
|
@ -7,3 +12,4 @@ function mep_ev_org(){
|
|||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_single_org_name', $content,$post->ID);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_price','mep_ev_price');
|
||||
if (!function_exists('mep_ev_price')) {
|
||||
function mep_ev_price(){
|
||||
global $post,$event_meta;
|
||||
ob_start();
|
||||
|
@ -12,3 +17,4 @@ global $post,$event_meta;
|
|||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_single_price', $content,$post->ID);
|
||||
}
|
||||
}
|
|
@ -1,21 +1,22 @@
|
|||
<?php
|
||||
// mep_shortcode_add_cart_section
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_shortcode_add_cart_section','mep_shortcode_add_cart_section_html');
|
||||
function mep_shortcode_add_cart_section_html($event){
|
||||
add_action('mep_shortcode_add_cart_section', 'mep_shortcode_add_cart_section_html');
|
||||
if (!function_exists('mep_shortcode_add_cart_section_html')) {
|
||||
function mep_shortcode_add_cart_section_html($event)
|
||||
{
|
||||
?>
|
||||
<div class='mep-events-shortcode-cart-section'>
|
||||
<div class='mep-events-shortcode-cart-section'>
|
||||
<div class='mep-events-wrapper'>
|
||||
<div class='mep-default-feature-cart-sec'>
|
||||
<?php mep_get_event_reg_btn($event); ?>
|
||||
<?php mep_single_page_js_script($event); //do_action('mep_add_to_cart_shortcode_js',$event); ?>
|
||||
<?php mep_single_page_js_script($event); //do_action('mep_add_to_cart_shortcode_js',$event);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,9 +1,16 @@
|
|||
<?php
|
||||
add_action('mep_event_speakers_list_shortcode_template','mep_shortcode_speaker_list_html');
|
||||
function mep_shortcode_speaker_list_html($event_id){
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_speakers_list_shortcode_template', 'mep_shortcode_speaker_list_html');
|
||||
if (!function_exists('mep_shortcode_speaker_list_html')) {
|
||||
function mep_shortcode_speaker_list_html($event_id)
|
||||
{
|
||||
?>
|
||||
<div class="mep-default-sidebar-speaker-list">
|
||||
<?php echo mep_display_speaker_list($event_id); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -1,14 +1,21 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_social_share', 'mep_ev_social_share');
|
||||
function mep_ev_social_share(){
|
||||
global $post;
|
||||
if (!function_exists('mep_ev_social_share')) {
|
||||
function mep_ev_social_share()
|
||||
{
|
||||
global $post;
|
||||
ob_start();
|
||||
$post_id = $post->ID;
|
||||
?>
|
||||
?>
|
||||
<div class="mep-event-meta">
|
||||
<?php _e(mep_get_label($post_id, 'mep_share_text', 'Share This Event:'), 'mage-eventpress'); ?><?php mep_social_share(); ?>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_single_social_share', $content,$post->ID);
|
||||
echo apply_filters('mage_event_single_social_share', $content, $post->ID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
require_once(dirname(__FILE__) . "/thumbnail.php");
|
||||
require_once(dirname(__FILE__) . "/title.php");
|
||||
require_once(dirname(__FILE__) . "/organizer.php");
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
<?php
|
||||
add_action('mep_event_thumbnail','mep_thumbnail');
|
||||
function mep_thumbnail(){
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_thumbnail', 'mep_thumbnail');
|
||||
if (!function_exists('mep_thumbnail')) {
|
||||
function mep_thumbnail()
|
||||
{
|
||||
global $post;
|
||||
ob_start();
|
||||
?>
|
||||
?>
|
||||
<div class="mep-event-thumbnail">
|
||||
<?php the_post_thumbnail('full'); ?>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_single_thumbnail', $content,$post->ID);
|
||||
echo apply_filters('mage_event_single_thumbnail', $content, $post->ID);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_title','mep_ev_title');
|
||||
if (!function_exists('mep_ev_title')) {
|
||||
function mep_ev_title(){
|
||||
global $post;
|
||||
ob_start();
|
||||
|
@ -9,3 +14,4 @@ function mep_ev_title(){
|
|||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_single_title', $content,$post->ID);
|
||||
}
|
||||
}
|
|
@ -1,25 +1,33 @@
|
|||
<?php
|
||||
add_action('mep_event_seat','mep_ev_seat');
|
||||
function mep_ev_seat(){
|
||||
global $post,$event_meta;
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_seat', 'mep_ev_seat');
|
||||
if (!function_exists('mep_ev_seat')) {
|
||||
function mep_ev_seat()
|
||||
{
|
||||
global $post, $event_meta;
|
||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||
ob_start();
|
||||
if($recurring == 'no'){
|
||||
if ($recurring == 'no') {
|
||||
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true) ? get_post_meta($post->ID, 'mep_event_ticket_type', true) : array();
|
||||
$mep_available_seat = array_key_exists('mep_available_seat', $event_meta) ? $event_meta['mep_available_seat'][0] : 'on';
|
||||
|
||||
if(is_array($mep_event_ticket_type) && sizeof($mep_event_ticket_type) > 0){
|
||||
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
||||
$total_resv = mep_event_total_seat(get_the_id(),'resv');
|
||||
if (is_array($mep_event_ticket_type) && sizeof($mep_event_ticket_type) > 0) {
|
||||
$total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat(get_the_id(), 'total'), get_the_id());
|
||||
$total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat(get_the_id(), 'resv'), get_the_id());
|
||||
$total_sold = mep_ticket_sold(get_the_id());
|
||||
$total_left = $total_seat - ($total_sold + $total_resv);
|
||||
?>
|
||||
<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 $total_seat; if($mep_available_seat=='on'){ ?> (<strong><?php echo max($total_left,0); ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
|
||||
<?php
|
||||
?>
|
||||
<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 $total_seat;
|
||||
if ($mep_available_seat == 'on') { ?> (<strong><?php echo max($total_left, 0); ?></strong> <?php _e('Left', 'mage-eventpress'); ?>)<?php } ?></h5>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_single_title', $content,$post->ID);
|
||||
echo apply_filters('mage_event_single_title', $content, $post->ID);
|
||||
}
|
||||
}
|
10
readme.txt
10
readme.txt
|
@ -547,3 +547,13 @@ New Feature: You can hide Event Date & location from the cart section display
|
|||
New Filter & Action hooks added
|
||||
|
||||
08 May 2020*
|
||||
|
||||
|
||||
= 3.2.6 =
|
||||
* Update Release:
|
||||
Code Optimized & Improved
|
||||
Fix Event Date issue in Event List For Multidate
|
||||
Event Location modified in event list
|
||||
WooCommerce Hidden Product issue fixed
|
||||
New Filter hooked added in Total Seat value
|
||||
24 May 2020*
|
|
@ -1,28 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* Plugin Name: Woocommerce Events Manager
|
||||
* Plugin URI: http://mage-people.com
|
||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||
* Version: 3.2.5
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
* Domain Path: /languages/
|
||||
*/
|
||||
* Plugin Name: Woocommerce Events Manager
|
||||
* Plugin URI: http://mage-people.com
|
||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||
* Version: 3.2.6
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
* Domain Path: /languages/
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
|
||||
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
||||
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
||||
if (is_plugin_active('woocommerce/woocommerce.php')) {
|
||||
require_once(dirname(__FILE__) . "/inc/mep_file_include.php");
|
||||
|
||||
}else{
|
||||
function mep_admin_notice_wc_not_active() {
|
||||
} else {
|
||||
function mep_admin_notice_wc_not_active()
|
||||
{
|
||||
$class = 'notice notice-error';
|
||||
printf(
|
||||
'<div class="error" style="background:red; color:#fff;"><p>%s</p></div>',
|
||||
__('You Must Install WooCommerce Plugin before activating WooCommerce Event Manager, Becuase It is dependent on Woocommerce Plugin')
|
||||
);
|
||||
}
|
||||
add_action( 'admin_notices', 'mep_admin_notice_wc_not_active' );
|
||||
}
|
||||
add_action('admin_notices', 'mep_admin_notice_wc_not_active');
|
||||
}
|
Loading…
Reference in New Issue