some file modified
This commit is contained in:
parent
61c0c36829
commit
c93f1c0035
|
@ -308,7 +308,7 @@ h3.mep_list_date {font-size: 16px; font-style: italic;font-weight: bold;color: #
|
||||||
.mage_grid_box{margin: 0 0 20px 0;}
|
.mage_grid_box{margin: 0 0 20px 0;}
|
||||||
.mage_grid_box .blank_div{margin: 0 20px 0 0;}
|
.mage_grid_box .blank_div{margin: 0 20px 0 0;}
|
||||||
.mage_grid_box .mep_event_grid_item:last-child,
|
.mage_grid_box .mep_event_grid_item:last-child,
|
||||||
.mage_grid_box .blank_div:last-child{margin: 0;}
|
.mage_grid_box .blank_div:last-child{margin: 0 0 15px 0;}
|
||||||
.mep_event_grid_item .mep_list_event_details,
|
.mep_event_grid_item .mep_list_event_details,
|
||||||
.mep_event_grid_item .mep_list_thumb{width: 100%}
|
.mep_event_grid_item .mep_list_thumb{width: 100%}
|
||||||
.mep_event_grid_item .mep_list_thumb img{height: 160px;}
|
.mep_event_grid_item .mep_list_thumb img{height: 160px;}
|
||||||
|
|
|
@ -1,131 +1,79 @@
|
||||||
<?php
|
<?php
|
||||||
function mep_add_custom_fields_text_to_cart_item( $cart_item_data, $product_id, $variation_id ){
|
function mep_add_custom_fields_text_to_cart_item( $cart_item_data, $product_id, $variation_id ){
|
||||||
|
|
||||||
$product_id = get_post_meta($product_id,'link_mep_event',true) ? get_post_meta($product_id,'link_mep_event',true) : $product_id;
|
$product_id = get_post_meta($product_id,'link_mep_event',true) ? get_post_meta($product_id,'link_mep_event',true) : $product_id;
|
||||||
$recurring = get_post_meta($product_id, 'mep_enable_recurring', true) ? get_post_meta($product_id, 'mep_enable_recurring', true) : 'no';
|
$recurring = get_post_meta($product_id, 'mep_enable_recurring', true) ? get_post_meta($product_id, 'mep_enable_recurring', true) : 'no';
|
||||||
if (get_post_type($product_id) == 'mep_events') {
|
if (get_post_type($product_id) == 'mep_events') {
|
||||||
$tp = get_post_meta($product_id,'_price',true);
|
$tp = get_post_meta($product_id,'_price',true);
|
||||||
|
$new = array();
|
||||||
|
|
||||||
$new = array();
|
$event_cart_location = isset($_POST['mep_event_location_cart']) ? $_POST['mep_event_location_cart'] : array();
|
||||||
|
$event_cart_date = isset($_POST['mep_event_date_cart']) ? $_POST['mep_event_date_cart'] : array();
|
||||||
|
$mep_event_start_date = isset($_POST['mep_event_start_date']) ? $_POST['mep_event_start_date'] : array();
|
||||||
|
$checked = isset($_POST['event_addt_price']) ? $_POST['event_addt_price'] : array();
|
||||||
|
$names = isset($_POST['option_name']) ? $_POST['option_name'] : array();
|
||||||
|
$qty = isset($_POST['option_qty']) ? $_POST['option_qty'] : array();
|
||||||
|
$max_qty = isset($_POST['max_qty']) ? $_POST['max_qty'] : array();
|
||||||
|
$price = isset($_POST['option_price']) ? $_POST['option_price'] : array();
|
||||||
|
$recurring_event_date = $recurring == 'yes' ? isset($_POST['recurring_event_date']) ? $_POST['recurring_event_date'] : array() : array();
|
||||||
|
$count = count( $names );
|
||||||
|
|
||||||
if(isset($_POST['mep_event_location_cart'])){
|
if(isset($_POST['option_name'])){
|
||||||
$event_cart_location = $_POST['mep_event_location_cart'];
|
for ( $i = 0; $i < $count; $i++ ) {
|
||||||
}else{ $event_cart_location = ""; }
|
if($qty[$i] > 0){
|
||||||
|
if ( $names[$i] != '' ) :
|
||||||
if(isset($_POST['mep_event_date_cart'])){
|
$ticket_type_arr[$i]['ticket_name'] = stripslashes( strip_tags( $names[$i] ) );
|
||||||
$event_cart_date = $_POST['mep_event_date_cart'];
|
endif;
|
||||||
}else{ $event_cart_date = ""; }
|
if ( $price[$i] != '' ) :
|
||||||
|
$ticket_type_arr[$i]['ticket_price'] = stripslashes( strip_tags( $price[$i] ) );
|
||||||
if(isset($_POST['mep_event_start_date'])){
|
endif;
|
||||||
$mep_event_start_date = $_POST['mep_event_start_date'];
|
if ( $qty[$i] != '' ) :
|
||||||
}else{ $mep_event_start_date = ""; }
|
$ticket_type_arr[$i]['ticket_qty'] = stripslashes( strip_tags( $qty[$i] ) );
|
||||||
|
endif;
|
||||||
if(isset($_POST['event_addt_price'])){
|
if ( $max_qty[$i] != '' ) :
|
||||||
$checked = $_POST['event_addt_price'];
|
$ticket_type_arr[$i]['max_qty'] = stripslashes( strip_tags( $max_qty[$i] ) );
|
||||||
}else{ $checked=""; }
|
endif;
|
||||||
|
if ( $mep_event_start_date[$i] != '' ) :
|
||||||
if(isset($_POST['option_name'])){
|
$ticket_type_arr[$i]['event_date'] = stripslashes( strip_tags( $mep_event_start_date[$i] ) );
|
||||||
$names = $_POST['option_name'];
|
endif;
|
||||||
}else{ $names=array(); }
|
$opttprice = ($price[$i]*$qty[$i]);
|
||||||
|
$tp = ($tp+$opttprice);
|
||||||
if(isset($_POST['option_qty'])){
|
}
|
||||||
$qty = $_POST['option_qty'];
|
}
|
||||||
}else{ $qty=""; }
|
|
||||||
|
|
||||||
if(isset($_POST['max_qty'])){
|
|
||||||
$max_qty = $_POST['max_qty'];
|
|
||||||
}else{ $max_qty=""; }
|
|
||||||
|
|
||||||
if(isset($_POST['option_price'])){
|
|
||||||
$price = $_POST['option_price'];
|
|
||||||
}else{ $price=""; }
|
|
||||||
|
|
||||||
if($recurring == 'yes'){
|
|
||||||
$recurring_event_date = isset($_POST['recurring_event_date']) ? $_POST['recurring_event_date'] : array();
|
|
||||||
}else{
|
|
||||||
$recurring_event_date = array();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$extra_service_name = isset($_POST['event_extra_service_name']) ? mage_array_strip($_POST['event_extra_service_name']) : array();
|
||||||
|
$extra_service_qty = isset($_POST['event_extra_service_qty'])? mage_array_strip($_POST['event_extra_service_qty']):array();
|
||||||
|
$extra_service_price = isset($_POST['event_extra_service_price'])? mage_array_strip($_POST['event_extra_service_price']):array();
|
||||||
|
|
||||||
|
if($extra_service_name){
|
||||||
|
for ( $i = 0; $i < count($extra_service_name); $i++ ) {
|
||||||
|
if($extra_service_qty[$i] > 0){
|
||||||
|
if ( $extra_service_name[$i] != '' ) :
|
||||||
$count = count( $names );
|
$event_extra[$i]['service_name'] = stripslashes( strip_tags( $extra_service_name[$i] ) );
|
||||||
|
endif;
|
||||||
if(isset($_POST['option_name'])){
|
if ( $extra_service_price[$i] != '' ) :
|
||||||
for ( $i = 0; $i < $count; $i++ ) {
|
$event_extra[$i]['service_price'] = stripslashes( strip_tags( $extra_service_price[$i] ) );
|
||||||
if($qty[$i] > 0){
|
endif;
|
||||||
if ( $names[$i] != '' ) :
|
if ( $extra_service_qty[$i] != '' ) :
|
||||||
$ticket_type_arr[$i]['ticket_name'] = stripslashes( strip_tags( $names[$i] ) );
|
$event_extra[$i]['service_qty'] = stripslashes( strip_tags( $extra_service_qty[$i] ) );
|
||||||
endif;
|
endif;
|
||||||
if ( $price[$i] != '' ) :
|
}
|
||||||
$ticket_type_arr[$i]['ticket_price'] = stripslashes( strip_tags( $price[$i] ) );
|
$extprice = ($extra_service_price[$i]*$extra_service_qty[$i]);
|
||||||
endif;
|
$tp = ($tp+$extprice);
|
||||||
if ( $qty[$i] != '' ) :
|
|
||||||
$ticket_type_arr[$i]['ticket_qty'] = stripslashes( strip_tags( $qty[$i] ) );
|
|
||||||
endif;
|
|
||||||
if ( $max_qty[$i] != '' ) :
|
|
||||||
$ticket_type_arr[$i]['max_qty'] = stripslashes( strip_tags( $max_qty[$i] ) );
|
|
||||||
endif;
|
|
||||||
|
|
||||||
if ( $mep_event_start_date[$i] != '' ) :
|
|
||||||
$ticket_type_arr[$i]['event_date'] = stripslashes( strip_tags( $mep_event_start_date[$i] ) );
|
|
||||||
endif;
|
|
||||||
|
|
||||||
$opttprice = ($price[$i]*$qty[$i]);
|
|
||||||
$tp = ($tp+$opttprice);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$extra_service_name = isset($_POST['event_extra_service_name']) ? mage_array_strip($_POST['event_extra_service_name']) : array();
|
|
||||||
$extra_service_qty = isset($_POST['event_extra_service_qty'])? mage_array_strip($_POST['event_extra_service_qty']):array();
|
|
||||||
$extra_service_price = isset($_POST['event_extra_service_price'])? mage_array_strip($_POST['event_extra_service_price']):array();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($extra_service_name){
|
|
||||||
for ( $i = 0; $i < count($extra_service_name); $i++ ) {
|
|
||||||
if($extra_service_qty[$i] > 0){
|
|
||||||
if ( $extra_service_name[$i] != '' ) :
|
|
||||||
$event_extra[$i]['service_name'] = stripslashes( strip_tags( $extra_service_name[$i] ) );
|
|
||||||
endif;
|
|
||||||
if ( $extra_service_price[$i] != '' ) :
|
|
||||||
$event_extra[$i]['service_price'] = stripslashes( strip_tags( $extra_service_price[$i] ) );
|
|
||||||
endif;
|
|
||||||
if ( $extra_service_qty[$i] != '' ) :
|
|
||||||
$event_extra[$i]['service_qty'] = stripslashes( strip_tags( $extra_service_qty[$i] ) );
|
|
||||||
endif;
|
|
||||||
}
|
|
||||||
|
|
||||||
$extprice = ($extra_service_price[$i]*$extra_service_qty[$i]);
|
|
||||||
$tp = ($tp+$extprice);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(isset($_POST['mep_event_ticket_type'])){
|
|
||||||
$ttp = $_POST['mep_event_ticket_type'];
|
|
||||||
$ttpqt = $_POST['tcp_qty'];
|
|
||||||
$ticket_type = mep_get_order_info($ttp,1);
|
|
||||||
$ticket_type_price = (mep_get_order_info($ttp,0)*$ttpqt);
|
|
||||||
$cart_item_data['event_ticket_type'] = $ticket_type;
|
|
||||||
$cart_item_data['event_ticket_price'] = $ticket_type_price;
|
|
||||||
$cart_item_data['event_ticket_qty'] = $ttpqt;
|
|
||||||
$tp = $tp+$ticket_type_price;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($_POST['mep_event_ticket_type'])){
|
||||||
|
$ttp = $_POST['mep_event_ticket_type'];
|
||||||
|
$ttpqt = $_POST['tcp_qty'];
|
||||||
|
$ticket_type = mep_get_order_info($ttp,1);
|
||||||
|
$ticket_type_price = (mep_get_order_info($ttp,0)*$ttpqt);
|
||||||
|
$cart_item_data['event_ticket_type'] = $ticket_type;
|
||||||
|
$cart_item_data['event_ticket_price'] = $ticket_type_price;
|
||||||
|
$cart_item_data['event_ticket_qty'] = $ttpqt;
|
||||||
|
$tp = $tp+$ticket_type_price;
|
||||||
|
}
|
||||||
|
|
||||||
$form_position = mep_get_option( 'mep_user_form_position', 'general_attendee_sec', 'details_page' );
|
$form_position = mep_get_option( 'mep_user_form_position', 'general_attendee_sec', 'details_page' );
|
||||||
if($form_position=='details_page'){
|
if($form_position=='details_page'){
|
||||||
|
|
|
@ -14,3 +14,4 @@ require_once(dirname(__DIR__) . "/inc/mep_tax_meta.php");
|
||||||
require_once(dirname(__DIR__) . "/inc/mep_addon_list.php");
|
require_once(dirname(__DIR__) . "/inc/mep_addon_list.php");
|
||||||
require_once(dirname(__DIR__) . "/inc/mep_upgrade.php");
|
require_once(dirname(__DIR__) . "/inc/mep_upgrade.php");
|
||||||
require_once(dirname(__DIR__) . "/inc/mep_functions.php");
|
require_once(dirname(__DIR__) . "/inc/mep_functions.php");
|
||||||
|
require_once(dirname(__DIR__) . "/inc/mep_query.php");
|
|
@ -2025,8 +2025,8 @@ function mep_get_all_tax_list($current_tax=null){
|
||||||
$date_format = get_option( 'date_format' );
|
$date_format = get_option( 'date_format' );
|
||||||
$time_format = get_option( 'time_format' );
|
$time_format = get_option( 'time_format' );
|
||||||
$wpdatesettings = $date_format.' '.$time_format;
|
$wpdatesettings = $date_format.' '.$time_format;
|
||||||
$timezone = wp_timezone_string();
|
$timezone = wp_timezone_string();
|
||||||
$timestamp = strtotime( $date . ' '. $timezone);
|
$timestamp = strtotime( $date . ' '. $timezone);
|
||||||
|
|
||||||
if($type == 'date'){
|
if($type == 'date'){
|
||||||
return wp_date( $date_format, $timestamp );
|
return wp_date( $date_format, $timestamp );
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
<?php
|
||||||
|
function mep_event_query($type,$show,$sort='',$cat='',$org='',$evnt_type = 'upcoming'){
|
||||||
|
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||||
|
$now = current_time('Y-m-d H:i:s');
|
||||||
|
$paged = get_query_var("paged") ? get_query_var("paged") : 1;
|
||||||
|
$etype = $evnt_type == 'expired' ? '<' : '>';
|
||||||
|
|
||||||
|
if($type='all'){
|
||||||
|
$args = array(
|
||||||
|
'post_type' => array('mep_events'),
|
||||||
|
'paged' => $paged,
|
||||||
|
'posts_per_page' => $show,
|
||||||
|
'order' => $sort,
|
||||||
|
'orderby' => 'meta_value',
|
||||||
|
'meta_key' => 'event_start_datetime',
|
||||||
|
'meta_query' => array(
|
||||||
|
array(
|
||||||
|
'key' => $event_expire_on,
|
||||||
|
'value' => $now,
|
||||||
|
'compare' => $etype
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
);
|
||||||
|
$loop = new WP_Query($args);
|
||||||
|
}elseif($type == 'cat'){
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'post_type' => array('mep_events'),
|
||||||
|
'paged' => $paged,
|
||||||
|
'posts_per_page' => $show,
|
||||||
|
'order' => $sort,
|
||||||
|
'orderby' => 'meta_value',
|
||||||
|
'meta_key' => 'event_start_datetime',
|
||||||
|
'meta_query' => array(
|
||||||
|
array(
|
||||||
|
'key' => $event_expire_on,
|
||||||
|
'value' => $now,
|
||||||
|
'compare' => $etype
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'tax_query' => array(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'mep_cat',
|
||||||
|
'field' => 'term_id',
|
||||||
|
'terms' => $cat
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$loop = new WP_Query($args);
|
||||||
|
}elseif($type == 'org'){
|
||||||
|
$args = array(
|
||||||
|
'post_type' => array('mep_events'),
|
||||||
|
'posts_per_page' => $show,
|
||||||
|
'paged' => $paged,
|
||||||
|
'order' => $sort,
|
||||||
|
'orderby' => 'meta_value',
|
||||||
|
'meta_key' => 'event_start_datetime',
|
||||||
|
'meta_query' => array(
|
||||||
|
array(
|
||||||
|
'key' => $event_expire_on,
|
||||||
|
'value' => $now,
|
||||||
|
'compare' => $etype
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'tax_query' => array(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'mep_org',
|
||||||
|
'field' => 'term_id',
|
||||||
|
'terms' => $org
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$loop = new WP_Query($args);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $loop;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function mep_event_pagination($total_page){
|
||||||
|
$paged = get_query_var("paged") ? get_query_var("paged") : 1;
|
||||||
|
?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12"><?php
|
||||||
|
$pargs = array(
|
||||||
|
"current" => $paged,
|
||||||
|
"total" => $total_page
|
||||||
|
);
|
||||||
|
echo "<div class='pagination-sec'>" . paginate_links($pargs) . "</div>";
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
|
@ -3,43 +3,23 @@ if (!defined('ABSPATH')) {
|
||||||
die;
|
die;
|
||||||
} // Cannot access pages directly.
|
} // Cannot access pages directly.
|
||||||
|
|
||||||
|
|
||||||
add_shortcode('event-calendar', 'mep_cal_func');
|
add_shortcode('event-calendar', 'mep_cal_func');
|
||||||
|
|
||||||
|
|
||||||
function mep_cal_func($atts, $content = null){
|
function mep_cal_func($atts, $content = null){
|
||||||
ob_start();
|
ob_start();
|
||||||
echo mep_event_calender();
|
echo mep_event_calender();
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function mep_event_calender(){
|
function mep_event_calender(){
|
||||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
?>
|
||||||
?>
|
|
||||||
<div class="event-calendar"></div>
|
<div class="event-calendar"></div>
|
||||||
<script>
|
<script>
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
const myEvents = [
|
const myEvents = [
|
||||||
<?php
|
<?php
|
||||||
$now = current_time('Y-m-d H:i:s');
|
$loop = mep_event_query('all',-1);
|
||||||
$args_search_qqq = array(
|
$i = 1;
|
||||||
'post_type' => array('mep_events'),
|
$count = $loop->post_count - 1;
|
||||||
'posts_per_page' => -1,
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '>'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
$loop = new WP_Query($args_search_qqq);
|
|
||||||
$i = 1;
|
|
||||||
$count = $loop->post_count - 1;
|
|
||||||
|
|
||||||
while ($loop->have_posts()) {
|
while ($loop->have_posts()) {
|
||||||
$loop->the_post();
|
$loop->the_post();
|
||||||
$event_meta = get_post_custom(get_the_id());
|
$event_meta = get_post_custom(get_the_id());
|
||||||
|
@ -97,7 +77,6 @@ function mep_event_list($atts, $content = null){
|
||||||
"pagination" => "no",
|
"pagination" => "no",
|
||||||
'sort' => 'ASC'
|
'sort' => 'ASC'
|
||||||
);
|
);
|
||||||
|
|
||||||
$params = shortcode_atts($defaults, $atts);
|
$params = shortcode_atts($defaults, $atts);
|
||||||
$cat = $params['cat'];
|
$cat = $params['cat'];
|
||||||
$org = $params['org'];
|
$org = $params['org'];
|
||||||
|
@ -114,142 +93,35 @@ function mep_event_list($atts, $content = null){
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
<div class='mep_event_list'>
|
<div class='mep_event_list'>
|
||||||
|
<?php if ($cat_f == 'yes') {
|
||||||
|
/**
|
||||||
<?php if ($cat_f == 'yes') { ?>
|
* This is the hook where category filter lists are fired from inc/template-parts/event_list_tax_name_list.php File
|
||||||
<div class="mep-events-cats-list">
|
*/
|
||||||
<?php
|
do_action('mep_event_list_cat_names');
|
||||||
$terms = get_terms(array(
|
}
|
||||||
'taxonomy' => 'mep_cat'
|
if ($org_f == 'yes') {
|
||||||
));
|
/**
|
||||||
?>
|
* This is the hook where Organization filter lists are fired from inc/template-parts/event_list_tax_name_list.php File
|
||||||
<div class="mep-event-cat-controls">
|
*/
|
||||||
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php
|
do_action('mep_event_list_org_names');
|
||||||
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 }
|
|
||||||
if ($org_f == 'yes') { ?>
|
|
||||||
<div class="mep-events-cats-list">
|
|
||||||
<?php
|
|
||||||
$terms = get_terms(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'mep_org'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
<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
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="mep_event_list_sec">
|
<div class="mep_event_list_sec">
|
||||||
<?php
|
<?php
|
||||||
$now = current_time('Y-m-d H:i:s');
|
/**
|
||||||
$show_price = mep_get_option('mep_event_price_show', 'general_setting_sec', 'yes');
|
* The Main Query function mep_event_query is locet in inc/mep_query.php File
|
||||||
$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;
|
|
||||||
|
|
||||||
|
|
||||||
if ($cat > 0) {
|
if ($cat > 0) {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('cat',$show,$sort,$cat,0,'upcoming');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'paged' => $paged,
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '>'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tax_query' => array(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'mep_cat',
|
|
||||||
'field' => 'term_id',
|
|
||||||
'terms' => $cat
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
} elseif ($org > 0) {
|
} elseif ($org > 0) {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('org',$show,$sort,0,$org,'upcoming');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'paged' => $paged,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '>'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tax_query' => array(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'mep_org',
|
|
||||||
'field' => 'term_id',
|
|
||||||
'terms' => $org
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('all',$show,$sort,0,0,'upcoming');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'paged' => $paged,
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '>'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$loop = new WP_Query($args_search_qqq);
|
|
||||||
$total_post=$loop->post_count;
|
$total_post=$loop->post_count;
|
||||||
echo '<div class="mage_grid_box">';
|
echo '<div class="mage_grid_box">';
|
||||||
while ($loop->have_posts()) {
|
while ($loop->have_posts()) {
|
||||||
|
$loop->the_post();
|
||||||
$loop->the_post();
|
|
||||||
$event_meta = get_post_custom(get_the_id());
|
|
||||||
$author_terms = get_the_terms(get_the_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(get_the_id(), 'mep_cat');
|
|
||||||
$torg = get_the_terms(get_the_id(), 'mep_org');
|
|
||||||
|
|
||||||
$org_class = mep_get_term_as_class(get_the_id(), 'mep_org');
|
|
||||||
$cat_class = mep_get_term_as_class(get_the_id(), 'mep_cat');
|
|
||||||
|
|
||||||
$event_multidate = array_key_exists('mep_event_more_date', $event_meta) ? maybe_unserialize($event_meta['mep_event_more_date'][0]) : array();
|
|
||||||
|
|
||||||
$available_seat = mep_get_total_available_seat(get_the_id(), $event_meta);
|
|
||||||
|
|
||||||
if ($style == 'grid') {
|
if ($style == 'grid') {
|
||||||
if ($column == 2) {
|
if ($column == 2) {
|
||||||
$columnNumber = 'two_column';
|
$columnNumber = 'two_column';
|
||||||
|
@ -263,125 +135,19 @@ function mep_event_list($atts, $content = null){
|
||||||
} else {
|
} else {
|
||||||
$columnNumber = 'one_column';
|
$columnNumber = 'one_column';
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
?>
|
* This is the hook where Event Loop List fired from inc/template-parts/event_loop_list.php File
|
||||||
|
*/
|
||||||
<div class='<?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php if ($tt) {
|
do_action('mep_event_list_shortcode',get_the_id(),$columnNumber,$style);
|
||||||
echo $org_class;
|
|
||||||
} ?> <?php if ($torg) {
|
|
||||||
echo $cat_class;
|
|
||||||
} ?>'>
|
|
||||||
<div class="mep_list_thumb">
|
|
||||||
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('full'); ?></a>
|
|
||||||
<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>
|
|
||||||
<?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>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="mep_list_event_details">
|
|
||||||
<a href="<?php the_permalink(); ?>">
|
|
||||||
<div class="mep-list-header">
|
|
||||||
<h2 class='mep_list_title'><?php the_title(); ?></h2>
|
|
||||||
<?php if ($available_seat == 0) {
|
|
||||||
do_action('mep_show_waitlist_label');
|
|
||||||
} ?>
|
|
||||||
<h3 class='mep_list_date'> <?php if ($show_price == 'yes') {
|
|
||||||
echo $show_price_label . " " . mep_event_list_price(get_the_id());
|
|
||||||
} ?></h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($style == 'list') {
|
|
||||||
?>
|
|
||||||
<div class="mep-event-excerpt">
|
|
||||||
<?php the_excerpt(); ?>
|
|
||||||
</div>
|
|
||||||
<?php }
|
|
||||||
|
|
||||||
|
|
||||||
// List Settings Values::::::::::::::::::::::::
|
|
||||||
$hide_org_list = mep_get_option('mep_event_hide_organizer_list', 'general_setting_sec', 'no');
|
|
||||||
$hide_location_list = mep_get_option('mep_event_hide_location_list', 'general_setting_sec', 'no');
|
|
||||||
$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');
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="mep-list-footer">
|
|
||||||
<ul>
|
|
||||||
<?php if ($hide_org_list == 'no') { ?>
|
|
||||||
<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) {
|
|
||||||
echo $author_terms[0]->name;
|
|
||||||
} ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<?php }
|
|
||||||
if ($hide_location_list == 'no') { ?>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<div class="evl-ico"><i class="fa fa-location-arrow"></i></div>
|
|
||||||
<div class="evl-cc">
|
|
||||||
<h5>
|
|
||||||
<?php echo mep_get_option('mep_location_text', 'label_setting_sec') ? mep_get_option('mep_location_text', 'label_setting_sec') : _e('Location:', 'mage-eventpress'); ?>
|
|
||||||
|
|
||||||
</h5>
|
|
||||||
<h6><?php mep_get_event_city(get_the_id()); ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<?php }
|
|
||||||
if ($hide_time_list == 'no') { ?>
|
|
||||||
<li>
|
|
||||||
<div class="evl-ico"><i class="fa fa-calendar"></i></div>
|
|
||||||
<div class="evl-cc">
|
|
||||||
<h5>
|
|
||||||
<?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 mep_get_only_time($event_meta['event_start_time'][0]);
|
|
||||||
if ($hide_only_end_time_list == 'no') { ?> - <?php mep_get_only_time($event_meta['event_end_time'][0]);
|
|
||||||
} ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <p>--><?php //echo count($args_search_qqq);?><!--</p>-->
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
//}
|
|
||||||
if ($pagination == 'yes') {
|
if ($pagination == 'yes') {
|
||||||
?>
|
/**
|
||||||
|
* The Pagination function mep_event_pagination is locet in inc/mep_query.php File
|
||||||
<div class="row">
|
*/
|
||||||
<div class="col-md-12"><?php
|
mep_event_pagination($loop->max_num_pages);
|
||||||
$pargs = array(
|
} ?>
|
||||||
"current" => $paged,
|
|
||||||
"total" => $loop->max_num_pages
|
|
||||||
);
|
|
||||||
echo "<div class='pagination-sec'>" . paginate_links($pargs) . "</div>";
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
@ -396,6 +162,10 @@ function mep_event_list($atts, $content = null){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add_shortcode('expire-event-list', 'mep_expire_event_list');
|
add_shortcode('expire-event-list', 'mep_expire_event_list');
|
||||||
function mep_expire_event_list($atts, $content = null)
|
function mep_expire_event_list($atts, $content = null)
|
||||||
{
|
{
|
||||||
|
@ -423,204 +193,60 @@ function mep_expire_event_list($atts, $content = null)
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
<div class='mep_event_list'>
|
<div class='mep_event_list'>
|
||||||
<?php if ($cat_f == 'yes') { ?>
|
<?php if ($cat_f == 'yes') {
|
||||||
<div class="mep-events-cats-list">
|
/**
|
||||||
<?php
|
* This is the hook where category filter lists are fired from inc/template-parts/event_list_tax_name_list.php File
|
||||||
$terms = get_terms(array(
|
*/
|
||||||
'taxonomy' => 'mep_cat'
|
do_action('mep_event_list_cat_names');
|
||||||
));
|
}
|
||||||
?>
|
if ($org_f == 'yes') {
|
||||||
<div class="mep-event-cat-controls">
|
/**
|
||||||
<button type="button" class="mep-cat-control" data-filter="all">All</button><?php
|
* This is the hook where Organization filter lists are fired from inc/template-parts/event_list_tax_name_list.php File
|
||||||
foreach ($terms as $_terms) {
|
*/
|
||||||
?>
|
do_action('mep_event_list_org_names');
|
||||||
<button type="button" class="mep-cat-control" data-filter=".<?php echo $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
|
} ?>
|
||||||
}
|
<div class="mep_event_list_sec">
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php }
|
|
||||||
if ($org_f == 'yes') { ?>
|
|
||||||
<div class="mep-events-cats-list">
|
|
||||||
<?php
|
|
||||||
$terms = get_terms(array(
|
|
||||||
'taxonomy' => 'mep_org'
|
|
||||||
));
|
|
||||||
?>
|
|
||||||
<div class="mep-event-cat-controls">
|
|
||||||
<button type="button" class="mep-cat-control" data-filter="all">All</button><?php
|
|
||||||
foreach ($terms as $_terms) {
|
|
||||||
?>
|
|
||||||
<button type="button" class="mep-cat-control" data-filter=".<?php echo $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="mep_event_list_sec">
|
|
||||||
<?php
|
<?php
|
||||||
$now = current_time('Y-m-d H:i:s');
|
/**
|
||||||
$paged = get_query_var("paged") ? get_query_var("paged") : 1;
|
* The Main Query function mep_event_query is locet in inc/mep_query.php File
|
||||||
|
*/
|
||||||
if ($cat > 0) {
|
if ($cat > 0) {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('cat',$show,$sort,$cat,0,'expired');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'paged' => $paged,
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '<'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tax_query' => array(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'mep_cat',
|
|
||||||
'field' => 'term_id',
|
|
||||||
'terms' => $cat
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
} elseif ($org > 0) {
|
} elseif ($org > 0) {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('org',$show,$sort,0,$org,'expired');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'paged' => $paged,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '<'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tax_query' => array(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'mep_org',
|
|
||||||
'field' => 'term_id',
|
|
||||||
'terms' => $org
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('all',$show,$sort,0,0,'expired');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'paged' => $paged,
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '<'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
$total_post=$loop->post_count;
|
||||||
$loop = new WP_Query($args_search_qqq);
|
echo '<div class="mage_grid_box">';
|
||||||
while ($loop->have_posts()) {
|
while ($loop->have_posts()) {
|
||||||
$loop->the_post();
|
$loop->the_post();
|
||||||
$event_meta = get_post_custom(get_the_id());
|
if ($style == 'grid') {
|
||||||
$author_terms = get_the_terms(get_the_id(), 'mep_org');
|
if ($column == 2) {
|
||||||
$time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
|
$columnNumber = 'two_column';
|
||||||
$newformat = date_i18n('Y-m-d H:i:s', $time);
|
} elseif ($column == 3) {
|
||||||
|
$columnNumber = 'three_column';
|
||||||
|
} elseif ($column == 4) {
|
||||||
//if(time() > strtotime($newformat)){
|
$columnNumber = 'four_column';
|
||||||
$tt = get_the_terms(get_the_id(), 'mep_cat');
|
} else {
|
||||||
$torg = get_the_terms(get_the_id(), 'mep_org');
|
$columnNumber = 'two_column';
|
||||||
// print_r($tt);
|
}
|
||||||
|
} else {
|
||||||
|
$columnNumber = 'one_column';
|
||||||
?>
|
}
|
||||||
<div class='mep_event_list_item mix <?php echo $tt[0]->slug; ?> <?php echo $torg[0]->slug; ?>'>
|
/**
|
||||||
<div class="mep_list_thumb">
|
* This is the hook where Event Loop List fired from inc/template-parts/event_loop_list.php File
|
||||||
<?php the_post_thumbnail('full'); ?>
|
*/
|
||||||
<div class="mep-ev-start-date">
|
do_action('mep_event_list_shortcode',get_the_id(),$columnNumber,$style);
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<div class="mep_list_event_details"><a href="<?php the_permalink(); ?>">
|
|
||||||
<div class="mep-list-header">
|
|
||||||
<h2 class='mep_list_title'><?php the_title(); ?></h2>
|
|
||||||
<h3 class='mep_list_date'> Price Start from: <?php echo mep_event_list_price(get_the_id()); ?></h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($style == 'list') {
|
|
||||||
?>
|
|
||||||
<div class="mep-event-excerpt">
|
|
||||||
<?php the_excerpt(); ?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="mep-list-footer">
|
|
||||||
<ul>
|
|
||||||
<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 echo $author_terms[0]->name; ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="evl-ico"><i class="fa fa-location-arrow"></i></div>
|
|
||||||
<div class="evl-cc">
|
|
||||||
<h5>
|
|
||||||
<?php echo mep_get_option('mep_location_text', 'label_setting_sec') ? mep_get_option('mep_location_text', 'label_setting_sec') : _e('Location:', 'mage-eventpress'); ?>
|
|
||||||
|
|
||||||
</h5>
|
|
||||||
<h6><?php echo $event_meta['mep_city'][0]; ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="evl-ico"><i class="fa fa-calendar"></i></div>
|
|
||||||
<div class="evl-cc">
|
|
||||||
<h5>
|
|
||||||
<?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 mep_get_only_time($event_meta['event_start_time'][0]); ?> - <?php mep_get_only_time($event_meta['event_end_time'][0]); ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
|
echo '</div>';
|
||||||
if ($pagination == 'yes') {
|
if ($pagination == 'yes') {
|
||||||
?>
|
/**
|
||||||
<div class="row">
|
* The Pagination function mep_event_pagination is locet in inc/mep_query.php File
|
||||||
<div class="col-md-12"><?php
|
*/
|
||||||
$pargs = array(
|
mep_event_pagination($loop->max_num_pages);
|
||||||
"current" => $paged,
|
} ?>
|
||||||
"total" => $loop->max_num_pages
|
|
||||||
);
|
|
||||||
echo "<div class='pagination-sec'>" . paginate_links($pargs) . "</div>";
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
@ -663,196 +289,82 @@ function mep_event_onepage_list($atts, $content = null)
|
||||||
do_action('woocommerce_before_single_product');
|
do_action('woocommerce_before_single_product');
|
||||||
?>
|
?>
|
||||||
<div class='mep_event_list'>
|
<div class='mep_event_list'>
|
||||||
<?php if ($cat_f == 'yes') { ?>
|
<?php if ($cat_f == 'yes') {
|
||||||
<div class="mep-events-cats-list">
|
/**
|
||||||
<?php
|
* This is the hook where category filter lists are fired from inc/template-parts/event_list_tax_name_list.php File
|
||||||
$terms = get_terms(array(
|
*/
|
||||||
'taxonomy' => 'mep_cat'
|
do_action('mep_event_list_cat_names');
|
||||||
));
|
}
|
||||||
?>
|
if ($org_f == 'yes') {
|
||||||
<div class="mep-event-cat-controls">
|
/**
|
||||||
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php
|
* This is the hook where Organization filter lists are fired from inc/template-parts/event_list_tax_name_list.php File
|
||||||
foreach ($terms as $_terms) {
|
*/
|
||||||
?>
|
do_action('mep_event_list_org_names');
|
||||||
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
|
} ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php }
|
|
||||||
if ($org_f == 'yes') { ?>
|
|
||||||
<div class="mep-events-cats-list">
|
|
||||||
<?php
|
|
||||||
$terms = get_terms(array(
|
|
||||||
'taxonomy' => 'mep_org'
|
|
||||||
));
|
|
||||||
?>
|
|
||||||
<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
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="mep_event_list_sec">
|
<div class="mep_event_list_sec">
|
||||||
<?php
|
<?php
|
||||||
$now = current_time('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 = 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:');
|
$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;
|
$paged = get_query_var("paged") ? get_query_var("paged") : 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Main Query function mep_event_query is locet in inc/mep_query.php File
|
||||||
|
*/
|
||||||
if ($cat > 0) {
|
if ($cat > 0) {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('cat',$show,$sort,$cat,0,'upcoming');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'paged' => $paged,
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '>'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tax_query' => array(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'mep_cat',
|
|
||||||
'field' => 'term_id',
|
|
||||||
'terms' => $cat
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
} elseif ($org > 0) {
|
} elseif ($org > 0) {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('org',$show,$sort,0,$org,'upcoming');
|
||||||
'post_type' => array('mep_events'),
|
|
||||||
'posts_per_page' => $show,
|
|
||||||
'paged' => $paged,
|
|
||||||
'order' => $sort,
|
|
||||||
'orderby' => 'meta_value',
|
|
||||||
'meta_key' => 'event_start_datetime',
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => $event_expire_on,
|
|
||||||
'value' => $now,
|
|
||||||
'compare' => '>'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tax_query' => array(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'mep_org',
|
|
||||||
'field' => 'term_id',
|
|
||||||
'terms' => $org
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
$args_search_qqq = array(
|
$loop = mep_event_query('all',$show,$sort,0,0,'upcoming');
|
||||||
'post_type' => array('mep_events'),
|
}
|
||||||
'paged' => $paged,
|
?>
|
||||||
'posts_per_page' => $show,
|
<div class="mep_event_list_sec">
|
||||||
'order' => $sort,
|
<?php
|
||||||
'orderby' => 'meta_value',
|
/**
|
||||||
'meta_key' => 'event_start_datetime',
|
* The Main Query function mep_event_query is locet in inc/mep_query.php File
|
||||||
'meta_query' => array(
|
*/
|
||||||
array(
|
if ($cat > 0) {
|
||||||
'key' => $event_expire_on,
|
$loop = mep_event_query('cat',$show,$sort,$cat,0,'upcoming');
|
||||||
'value' => $now,
|
} elseif ($org > 0) {
|
||||||
'compare' => '>'
|
$loop = mep_event_query('org',$show,$sort,0,$org,'upcoming');
|
||||||
)
|
} else {
|
||||||
)
|
$loop = mep_event_query('all',$show,$sort,0,0,'upcoming');
|
||||||
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$loop = new WP_Query($args_search_qqq);
|
|
||||||
while ($loop->have_posts()) {
|
|
||||||
$loop->the_post();
|
$loop->the_post();
|
||||||
$event_meta = get_post_custom(get_the_id());
|
$event_meta = get_post_custom(get_the_id());
|
||||||
$author_terms = get_the_terms(get_the_id(), 'mep_org');
|
$author_terms = get_the_terms(get_the_id(), 'mep_org');
|
||||||
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
|
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
|
||||||
$time = strtotime($start_datetime);
|
$time = strtotime($start_datetime);
|
||||||
$newformat = date_i18n('Y-m-d H:i:s', $time);
|
$newformat = date_i18n('Y-m-d H:i:s', $time);
|
||||||
|
|
||||||
$tt = get_the_terms(get_the_id(), 'mep_cat');
|
$tt = get_the_terms(get_the_id(), 'mep_cat');
|
||||||
$torg = get_the_terms(get_the_id(), 'mep_org');
|
$torg = get_the_terms(get_the_id(), 'mep_org');
|
||||||
|
|
||||||
|
|
||||||
$org_class = mep_get_term_as_class(get_the_id(), 'mep_org');
|
$org_class = mep_get_term_as_class(get_the_id(), 'mep_org');
|
||||||
$cat_class = mep_get_term_as_class(get_the_id(), 'mep_cat');
|
$cat_class = mep_get_term_as_class(get_the_id(), 'mep_cat');
|
||||||
|
|
||||||
|
|
||||||
$available_seat = mep_get_total_available_seat(get_the_id(), $event_meta);
|
$available_seat = mep_get_total_available_seat(get_the_id(), $event_meta);
|
||||||
?>
|
echo '<div class="mage_grid_box">';
|
||||||
<div class='mep_event_<?php echo $style; ?>_item mix <?php if ($tt) {
|
while ($loop->have_posts()) {
|
||||||
echo 'mage-' . $org_class;
|
$loop->the_post();
|
||||||
} ?> <?php if ($torg) {
|
if ($style == 'grid') {
|
||||||
echo 'mage-' . $cat_class;
|
if ($column == 2) {
|
||||||
} ?>'>
|
$columnNumber = 'two_column';
|
||||||
<div class="mep_list_thumb">
|
} elseif ($column == 3) {
|
||||||
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('full'); ?></a>
|
$columnNumber = 'three_column';
|
||||||
<div class="mep-ev-start-date">
|
} elseif ($column == 4) {
|
||||||
<div class="mep-day"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0],'day'); ?></div>
|
$columnNumber = 'four_column';
|
||||||
<div class="mep-month"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0],'month'); ?></div>
|
} else {
|
||||||
</div>
|
$columnNumber = 'two_column';
|
||||||
</div>
|
}
|
||||||
<div class="mep_list_event_details"><a href="<?php the_permalink(); ?>">
|
} else {
|
||||||
<div class="mep-list-header">
|
$columnNumber = 'one_column';
|
||||||
<h2 class='mep_list_title'><?php the_title(); ?></h2>
|
}
|
||||||
<?php if ($available_seat == 0) {
|
/**
|
||||||
do_action('mep_show_waitlist_label');
|
* This is the hook where Event Loop List fired from inc/template-parts/event_loop_list.php File
|
||||||
} ?>
|
*/
|
||||||
<h3 class='mep_list_date'> <?php if ($show_price == 'yes') {
|
do_action('mep_event_list_shortcode',get_the_id(),$columnNumber,$style);
|
||||||
echo $show_price_label . " " . mep_event_list_price(get_the_id());
|
|
||||||
} ?></h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mep-list-footer">
|
|
||||||
<ul>
|
|
||||||
<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) {
|
|
||||||
echo $author_terms[0]->name;
|
|
||||||
} ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="evl-ico"><i class="fa fa-location-arrow"></i></div>
|
|
||||||
<div class="evl-cc">
|
|
||||||
<h5>
|
|
||||||
<?php echo mep_get_option('mep_location_text', 'label_setting_sec') ? mep_get_option('mep_location_text', 'label_setting_sec') : _e('Location:', 'mage-eventpress'); ?>
|
|
||||||
|
|
||||||
</h5>
|
|
||||||
<h6><?php mep_get_event_city(get_the_id()); ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="evl-ico"><i class="fa fa-calendar"></i></div>
|
|
||||||
<div class="evl-cc">
|
|
||||||
<h5>
|
|
||||||
<?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 mep_get_only_time($event_meta['event_start_time'][0]); ?> - <?php mep_get_only_time($event_meta['event_end_time'][0]); ?></h6>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$currency_pos = get_option('woocommerce_currency_pos');
|
$currency_pos = get_option('woocommerce_currency_pos');
|
||||||
|
|
||||||
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
||||||
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
||||||
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
||||||
|
@ -866,30 +378,17 @@ function mep_event_onepage_list($atts, $content = null)
|
||||||
echo '<div class=event-cart-section-list>';
|
echo '<div class=event-cart-section-list>';
|
||||||
do_action('mep_add_to_cart_list');
|
do_action('mep_add_to_cart_list');
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
get_event_list_js(get_the_id(), $event_meta, $currency_pos);
|
get_event_list_js(get_the_id(), $event_meta, $currency_pos);
|
||||||
}
|
}
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
//}
|
echo '</div>';
|
||||||
if ($pagination == 'yes') {
|
if ($pagination == 'yes') {
|
||||||
?>
|
/**
|
||||||
|
* The Pagination function mep_event_pagination is locet in inc/mep_query.php File
|
||||||
<div class="row">
|
*/
|
||||||
<div class="col-md-12"><?php
|
mep_event_pagination($loop->max_num_pages);
|
||||||
$pargs = array(
|
} ?>
|
||||||
"current" => $paged,
|
</div>
|
||||||
"total" => $loop->max_num_pages
|
|
||||||
);
|
|
||||||
echo "<div class='pagination-sec'>" . paginate_links($pargs) . "</div>";
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php }
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,16 @@ add_action('mep_event_add_calender','mep_ev_calender');
|
||||||
function mep_ev_calender(){
|
function mep_ev_calender(){
|
||||||
?>
|
?>
|
||||||
<div class="calender-url">
|
<div class="calender-url">
|
||||||
<?php mep_add_to_google_calender_link(get_the_id()); ?>
|
<?php
|
||||||
|
/**
|
||||||
|
* Action Hook mep_before_add_calendar_button & mep_after_add_calendar_button
|
||||||
|
*/
|
||||||
|
do_action('mep_before_add_calendar_button');
|
||||||
|
mep_add_to_google_calender_link(get_the_id());
|
||||||
|
do_action('mep_after_add_calendar_button');
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,216 +4,135 @@ add_action('mep_add_to_cart','mep_get_event_reg_btn');
|
||||||
// Get Event Registration Button
|
// Get Event Registration Button
|
||||||
function mep_get_event_reg_btn(){
|
function mep_get_event_reg_btn(){
|
||||||
global $post,$event_meta;
|
global $post,$event_meta;
|
||||||
$post_id = $post->ID;
|
|
||||||
$event_meta = get_post_custom($post_id);
|
$post_id = $post->ID;
|
||||||
|
$event_meta = get_post_custom($post_id);
|
||||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||||
$event_expire_date = $event_meta[$event_expire_on][0];
|
$event_expire_date = $event_meta[$event_expire_on][0];
|
||||||
$event_sqi = $event_meta['mep_sqi'][0];
|
$event_sqi = $event_meta['mep_sqi'][0];
|
||||||
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
||||||
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
||||||
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
||||||
$mep_reg_address = strip_tags($event_meta['mep_reg_address'][0]);
|
$mep_reg_address = strip_tags($event_meta['mep_reg_address'][0]);
|
||||||
$mep_reg_designation = strip_tags($event_meta['mep_reg_designation'][0]);
|
$mep_reg_designation = strip_tags($event_meta['mep_reg_designation'][0]);
|
||||||
$mep_reg_website = strip_tags($event_meta['mep_reg_website'][0]);
|
$mep_reg_website = strip_tags($event_meta['mep_reg_website'][0]);
|
||||||
$mep_reg_veg = strip_tags($event_meta['mep_reg_veg'][0]);
|
$mep_reg_veg = strip_tags($event_meta['mep_reg_veg'][0]);
|
||||||
$mep_reg_company = strip_tags($event_meta['mep_reg_company'][0]);
|
$mep_reg_company = strip_tags($event_meta['mep_reg_company'][0]);
|
||||||
$mep_reg_gender = strip_tags($event_meta['mep_reg_gender'][0]);
|
$mep_reg_gender = strip_tags($event_meta['mep_reg_gender'][0]);
|
||||||
$mep_reg_tshirtsize = strip_tags($event_meta['mep_reg_tshirtsize'][0]);
|
$mep_reg_tshirtsize = strip_tags($event_meta['mep_reg_tshirtsize'][0]);
|
||||||
$event_ecternal_link = '';
|
$simple_rsv = array_key_exists('mep_rsv_seat', $event_meta) ? $event_meta['mep_rsv_seat'][0] : 0;
|
||||||
$book_count = get_post_meta($post_id,'total_booking', true);
|
$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);
|
||||||
|
$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_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() );
|
||||||
|
$current = current_time('Y-m-d H:i:s');
|
||||||
|
$time = strtotime($event_expire_date);
|
||||||
|
$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($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
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(array_key_exists('mep_rsv_seat', $event_meta)){
|
$md = end($event_more_dates);
|
||||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
$more_date = $md['event_more_start_date'].' '.$md['event_more_start_time'];
|
||||||
}else{
|
$newformat = empty($event_more_dates) ? $newformat : date('Y-m-d H:i:s',strtotime($more_date));
|
||||||
$simple_rsv = '';
|
|
||||||
}
|
|
||||||
if($simple_rsv){
|
|
||||||
$simple_rsv = $simple_rsv;
|
|
||||||
}else{
|
|
||||||
$simple_rsv = 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);
|
|
||||||
$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);
|
|
||||||
|
|
||||||
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
$default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
|
||||||
$total_resv = mep_event_total_seat(get_the_id(),'resv');
|
date_default_timezone_set($default_timezone_val);
|
||||||
$total_sold = mep_ticket_sold(get_the_id());
|
|
||||||
$total_left = $total_seat - ($total_sold + $total_resv);
|
|
||||||
|
|
||||||
if(array_key_exists('mep_reg_status', $event_meta)){
|
$datetime1 = new DateTime($newformat);
|
||||||
$reg_status = $event_meta['mep_reg_status'][0];
|
$datetime2 = new DateTime($current);
|
||||||
}else{
|
$interval = date_diff($datetime2, $datetime1);
|
||||||
$reg_status = '';
|
$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() );
|
||||||
|
$days = $interval->d;
|
||||||
|
$hours = $interval->h;
|
||||||
|
$minutes = $interval->i;
|
||||||
|
$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);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* First Checking If the registration status enable or disable
|
||||||
|
*/
|
||||||
if($reg_status!='off'){
|
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 The event expired then it fire below Hook, The event expire texts arein the inc/template-parts/event_labels.php file
|
||||||
|
*/
|
||||||
|
do_action('mep_event_expire_text');
|
||||||
|
|
||||||
if (is_array($mep_event_ticket_type) || is_object($mep_event_ticket_type)){
|
/**
|
||||||
foreach ($mep_event_ticket_type as $field ) {
|
* If the event is not expired then Its checking the available seat status
|
||||||
$qm = $field['option_name_t'];
|
*/
|
||||||
}
|
}elseif($seat_left<=0){
|
||||||
}else{$qm='';}
|
/**
|
||||||
|
* 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
|
||||||
$seat_left = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
|
*/
|
||||||
|
do_action('mep_event_no_seat_text');
|
||||||
|
do_action('mep_after_no_seat_notice');
|
||||||
|
}else{
|
||||||
$current = current_time('Y-m-d H:i:s');
|
/**
|
||||||
$time = strtotime($event_expire_date);
|
* If everything is fine then its go on ....
|
||||||
$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);
|
|
||||||
|
|
||||||
$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));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
|
|
||||||
date_default_timezone_set($default_timezone_val);
|
|
||||||
|
|
||||||
$datetime1 = new DateTime($newformat);
|
|
||||||
$datetime2 = new DateTime($current);
|
|
||||||
$interval = date_diff($datetime2, $datetime1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
|
|
||||||
?>
|
|
||||||
<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'); ?>
|
|
||||||
</span>
|
|
||||||
<?php
|
|
||||||
} elseif($seat_left<=0){
|
|
||||||
?>
|
|
||||||
<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'); ?>
|
|
||||||
</span>
|
|
||||||
<?php
|
|
||||||
do_action('mep_after_no_seat_notice');
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
|
||||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
|
||||||
}else{
|
|
||||||
$simple_rsv = '';
|
|
||||||
}
|
|
||||||
if($simple_rsv){
|
|
||||||
$simple_rsv = $simple_rsv;
|
|
||||||
}else{
|
|
||||||
$simple_rsv = 0;
|
|
||||||
}
|
|
||||||
$total_book = ($total_book + $simple_rsv);
|
|
||||||
|
|
||||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
|
||||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
|
||||||
}else{
|
|
||||||
$mep_available_seat = 'on';
|
|
||||||
}
|
|
||||||
|
|
||||||
$leftt = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
|
|
||||||
$days = $interval->d;
|
|
||||||
$hours = $interval->h;
|
|
||||||
$minutes = $interval->i;
|
|
||||||
if($days>0){ $dd = $days." days "; }else{ $dd=""; }
|
|
||||||
if($hours>0){ $hh = $hours." hours "; }else{ $hh=""; }
|
|
||||||
if($minutes>0){ $mm = $minutes." minutes "; }else{ $mm=""; }
|
|
||||||
|
|
||||||
|
|
||||||
$qty_typec = $event_meta['qty_box_type'][0];
|
|
||||||
|
|
||||||
?>
|
|
||||||
<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'); ?>
|
|
||||||
|
|
||||||
</h4>
|
|
||||||
<form action="" method='post' id="mage_event_submit">
|
|
||||||
<?php
|
|
||||||
do_action('mep_event_ticket_type_extra_service');
|
|
||||||
|
|
||||||
if($leftt>0){
|
|
||||||
?>
|
?>
|
||||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
<!-- Register Now Title -->
|
||||||
<table>
|
<h4 class="mep-cart-table-title">
|
||||||
<tr>
|
<?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'); ?>
|
||||||
<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');
|
</h4>
|
||||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
<!--The event add to cart main form start here-->
|
||||||
if($mep_event_ticket_type){ ?>
|
<form action="" method='post' id="mage_event_submit">
|
||||||
<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">
|
<?php
|
||||||
<span id="ttyttl"></span>
|
/**
|
||||||
<?php
|
* 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
|
||||||
}else{
|
*/
|
||||||
if($event_sqi==1){
|
do_action('mep_event_ticket_type_extra_service');
|
||||||
$qmx = $leftt;
|
?>
|
||||||
if($qty_typec=='dropdown'){ ?>
|
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
||||||
<select name="quantity" id="quantity_5a7abbd1bff73" class='input-text qty text extra-qty-box'>
|
|
||||||
<?php for ($i = 1; $i <= $qmx; $i++) { ?>
|
<!--The Add to cart button table start Here-->
|
||||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
<table class='table table-bordered mep_event_add_cart_table'>
|
||||||
<?php } ?>
|
<tr>
|
||||||
</select>
|
<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');
|
||||||
<?php }else{ ?>
|
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="number">
|
<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 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_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>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!--The Add to cart button table start Here-->
|
||||||
|
</form>
|
||||||
|
<!--The event add to cart main form end here-->
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}else{
|
} // End Of checking Registration status
|
||||||
echo 1;
|
|
||||||
?>
|
|
||||||
<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">
|
|
||||||
<?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 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_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
|
||||||
<!-- <p class="mep_no_tickt_notice" id="mep_btn_notice">-->
|
|
||||||
<!-- --><?php //echo mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') ? mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') : _e('No Ticket Selected!','mage-eventpress'); ?>
|
|
||||||
<!-- </p>-->
|
|
||||||
<?php
|
|
||||||
$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);
|
|
||||||
?>
|
|
||||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; //echo esc_attr($post_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>
|
|
||||||
<?php
|
|
||||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
|
||||||
if(!$mep_event_ticket_type){
|
|
||||||
if($qm){$qm=$qm;}else{$qm='';}
|
|
||||||
?><?php do_action('mep_single_page_reg'); ?><?php }
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</form><?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -225,298 +144,133 @@ add_action('mep_add_to_cart_list','mep_get_event_reg_btn_list');
|
||||||
// Get Event Registration Button
|
// Get Event Registration Button
|
||||||
function mep_get_event_reg_btn_list(){
|
function mep_get_event_reg_btn_list(){
|
||||||
global $post,$event_meta;
|
global $post,$event_meta;
|
||||||
$post_id = $post->ID;
|
|
||||||
$event_meta = get_post_custom($post_id);
|
|
||||||
$event_expire_date = $event_meta[mep_get_option( 'mep_event_expire_on_datetime', 'general_setting_sec', 'event_start_date' )][0];
|
|
||||||
$event_sqi = $event_meta['mep_sqi'][0];
|
|
||||||
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
|
||||||
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
|
||||||
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
|
||||||
$mep_reg_address = strip_tags($event_meta['mep_reg_address'][0]);
|
|
||||||
$mep_reg_designation = strip_tags($event_meta['mep_reg_designation'][0]);
|
|
||||||
$mep_reg_website = strip_tags($event_meta['mep_reg_website'][0]);
|
|
||||||
$mep_reg_veg = strip_tags($event_meta['mep_reg_veg'][0]);
|
|
||||||
$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]);
|
|
||||||
$event_ecternal_link = '';
|
|
||||||
$book_count = get_post_meta($post_id,'total_booking', true);
|
|
||||||
|
|
||||||
if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
$post_id = $post->ID;
|
||||||
|
$event_meta = get_post_custom($post_id);
|
||||||
|
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||||
|
$event_expire_date = $event_meta[$event_expire_on][0];
|
||||||
|
$event_sqi = $event_meta['mep_sqi'][0];
|
||||||
|
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
||||||
|
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
||||||
|
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
||||||
|
$mep_reg_address = strip_tags($event_meta['mep_reg_address'][0]);
|
||||||
|
$mep_reg_designation = strip_tags($event_meta['mep_reg_designation'][0]);
|
||||||
|
$mep_reg_website = strip_tags($event_meta['mep_reg_website'][0]);
|
||||||
|
$mep_reg_veg = strip_tags($event_meta['mep_reg_veg'][0]);
|
||||||
|
$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);
|
||||||
|
$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_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() );
|
||||||
|
$current = current_time('Y-m-d H:i:s');
|
||||||
|
$time = strtotime($event_expire_date);
|
||||||
|
$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(array_key_exists('mep_rsv_seat', $event_meta)){
|
if($recurring == 'yes'){
|
||||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
$event_more_dates = get_post_meta($post_id,'mep_event_more_date',true) ? get_post_meta($post_id,'mep_event_more_date',true) : array();
|
||||||
}else{
|
$md = end($event_more_dates);
|
||||||
$simple_rsv = '';
|
$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));
|
||||||
if($simple_rsv){
|
|
||||||
$simple_rsv = $simple_rsv;
|
|
||||||
}else{
|
|
||||||
$simple_rsv = 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);
|
|
||||||
$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);
|
|
||||||
|
|
||||||
$stc = 0;
|
$default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
|
||||||
$leftt = 0;
|
date_default_timezone_set($default_timezone_val);
|
||||||
if (is_array($mep_event_ticket_type) || is_object($mep_event_ticket_type)){
|
|
||||||
foreach ($mep_event_ticket_type as $field ) {
|
$datetime1 = new DateTime($newformat);
|
||||||
$qm = $field['option_name_t'];
|
$datetime2 = new DateTime($current);
|
||||||
$opt_qty = isset($field['option_qty_t']) ? $field['option_qty_t'] : 0;
|
$interval = date_diff($datetime2, $datetime1);
|
||||||
// $opt_rst_qty = $field['option_rsv_t'] ? $field['option_rsv_t'] : 0;
|
$mep_available_seat = array_key_exists('mep_available_seat', $event_meta) ? $event_meta['mep_available_seat'][0] : 'on';
|
||||||
$tesqn = $post_id.str_replace(' ', '', $qm);
|
|
||||||
$tesq = get_post_meta($post_id,"mep_xtra_$tesqn",true);
|
$leftt = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
|
||||||
$stc = $stc+$opt_qty;
|
$days = $interval->d;
|
||||||
$llft = ($opt_qty - (int)$tesq);
|
$hours = $interval->h;
|
||||||
$leftt = $leftt+$llft;
|
$minutes = $interval->i;
|
||||||
}
|
$dd = $days > 0 ? $days." days " : '';
|
||||||
}else{$qm='';}
|
$hh = $hours>0 ? $hours." hours " : '';
|
||||||
if($mep_event_ticket_type){
|
$mm = $minutes>0 ? $minutes." minutes " : '';
|
||||||
$seat_left = $leftt;
|
$qty_typec = $event_meta['qty_box_type'][0];
|
||||||
}else{
|
$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);
|
||||||
$seat_left = $seat_left;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$current = current_time('Y-m-d H:i:s');
|
/**
|
||||||
$time = strtotime($event_expire_date);
|
* First Checking If the registration status enable or disable
|
||||||
$newformat = date('Y-m-d H:i:s',$time);
|
*/
|
||||||
|
|
||||||
date_default_timezone_set(get_option('timezone_string'));
|
|
||||||
|
|
||||||
$datetime1 = new DateTime($newformat);
|
|
||||||
$datetime2 = new DateTime($current);
|
|
||||||
|
|
||||||
$interval = date_diff($datetime2, $datetime1);
|
|
||||||
|
|
||||||
// $days = $interval->days;
|
|
||||||
// $hours = $interval->h;
|
|
||||||
// $minutes = $interval->i;
|
|
||||||
// if($days>0){ $dd = $days." days "; }else{ $dd=""; }
|
|
||||||
// if($hours>0){ $hh = $hours." hours "; }else{ $hh=""; }
|
|
||||||
// if($minutes>0){ $mm = $minutes." minutes "; }else{ $mm=""; }
|
|
||||||
// echo "<span class='active'>$dd $hh $mm</span>";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(time() > strtotime($newformat)){
|
|
||||||
?>
|
|
||||||
<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('Event Expired','mage-eventpress'); ?>
|
|
||||||
</span>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
elseif($seat_left<=0){
|
|
||||||
?>
|
|
||||||
<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 Available','mage-eventpress'); ?>
|
|
||||||
</span>
|
|
||||||
<?php
|
|
||||||
do_action('mep_after_no_seat_notice');
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
|
|
||||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
|
||||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
|
||||||
}else{
|
|
||||||
$simple_rsv = '';
|
|
||||||
}
|
|
||||||
if($simple_rsv){
|
|
||||||
$simple_rsv = $simple_rsv;
|
|
||||||
}else{
|
|
||||||
$simple_rsv = 0;
|
|
||||||
}
|
|
||||||
$total_book = ($total_book + $simple_rsv);
|
|
||||||
|
|
||||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
|
||||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
|
||||||
}else{
|
|
||||||
$mep_available_seat = 'on';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($mep_event_ticket_type){
|
|
||||||
|
|
||||||
$stc = 0;
|
|
||||||
$leftt = 0;
|
|
||||||
$res = 0;
|
|
||||||
|
|
||||||
foreach ( $mep_event_ticket_type as $field ) {
|
|
||||||
$qm = $field['option_name_t'];
|
|
||||||
$opt_qty = isset($field['option_qty_t']) ? $field['option_qty_t'] : 0;
|
|
||||||
$opt_rst_qty = isset($field['option_rsv_t']) ? $field['option_rsv_t'] : 0;
|
|
||||||
$tesqn = $post->ID.str_replace(' ', '', $qm);
|
|
||||||
$tesq = get_post_meta($post->ID,"mep_xtra_$tesqn",true);
|
|
||||||
$stc = $stc+$opt_qty;
|
|
||||||
$res = $res + (int)$opt_rst_qty;
|
|
||||||
$res = (int)$res;
|
|
||||||
$llft = ($opt_qty - (int)$tesq);
|
|
||||||
$leftt = ($leftt+$llft);
|
|
||||||
}
|
|
||||||
$leftt = $leftt-$res;
|
|
||||||
}else{
|
|
||||||
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
|
||||||
}
|
|
||||||
|
|
||||||
$days = $interval->d;
|
|
||||||
$hours = $interval->h;
|
|
||||||
$minutes = $interval->i;
|
|
||||||
if($days>0){ $dd = $days." days "; }else{ $dd=""; }
|
|
||||||
if($hours>0){ $hh = $hours." hours "; }else{ $hh=""; }
|
|
||||||
if($minutes>0){ $mm = $minutes." minutes "; }else{ $mm=""; }
|
|
||||||
|
|
||||||
|
|
||||||
$qty_typec = $event_meta['qty_box_type'][0];
|
|
||||||
if(array_key_exists('mep_reg_status', $event_meta)){
|
|
||||||
$reg_status = $event_meta['mep_reg_status'][0];
|
|
||||||
}else{
|
|
||||||
$reg_status = '';
|
|
||||||
}
|
|
||||||
if($reg_status!='off'){
|
if($reg_status!='off'){
|
||||||
?>
|
/**
|
||||||
<!-- <h4 class="mep-cart-table-title">
|
* Then Checking If the event date already gone or not
|
||||||
<?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> -->
|
if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
|
||||||
<form action="" method='post'>
|
/**
|
||||||
<?php
|
* If The event expired then it fire below Hook, The event expire texts arein the inc/template-parts/event_labels.php file
|
||||||
|
*/
|
||||||
|
do_action('mep_event_expire_text');
|
||||||
|
|
||||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
/**
|
||||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
* If the event is not expired then Its checking the available seat status
|
||||||
}else{
|
*/
|
||||||
$simple_rsv = '';
|
}elseif($seat_left<=0){
|
||||||
}
|
/**
|
||||||
if($simple_rsv){
|
* 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
|
||||||
$simple_rsv = $simple_rsv;
|
*/
|
||||||
}else{
|
do_action('mep_event_no_seat_text');
|
||||||
$simple_rsv = 0;
|
do_action('mep_after_no_seat_notice');
|
||||||
}
|
}else{
|
||||||
$total_book = ($total_book + $simple_rsv);
|
/**
|
||||||
|
* If everything is fine then its go on ....
|
||||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
*/
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
|
||||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
|
||||||
}else{
|
|
||||||
$mep_available_seat = 'on';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($mep_event_ticket_type){
|
|
||||||
|
|
||||||
$stc = 0;
|
|
||||||
$leftt = 0;
|
|
||||||
$res = 0;
|
|
||||||
|
|
||||||
|
|
||||||
foreach ( $mep_event_ticket_type as $field ) {
|
|
||||||
$qm = $field['option_name_t'];
|
|
||||||
$opt_qty = isset($field['option_qty_t']) ? $field['option_qty_t'] : 0;
|
|
||||||
$opt_rst_qty = isset($field['option_rsv_t']) ? $field['option_rsv_t'] : 0;
|
|
||||||
$tesqn = $post->ID.str_replace(' ', '', $qm);
|
|
||||||
|
|
||||||
$tesq = get_post_meta($post->ID,"mep_xtra_$tesqn",true);
|
|
||||||
|
|
||||||
$stc = $stc+$opt_qty;
|
|
||||||
|
|
||||||
$res = $res + (int)$opt_rst_qty;
|
|
||||||
|
|
||||||
$res = (int)$res;
|
|
||||||
|
|
||||||
|
|
||||||
$llft = ($opt_qty - (int)$tesq);
|
|
||||||
$leftt = ($leftt+$llft);
|
|
||||||
}
|
|
||||||
$leftt = $leftt-$res;
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if($leftt>0){
|
|
||||||
|
|
||||||
do_action('mep_event_ticket_types_list');
|
|
||||||
do_action('mep_event_extra_service_list');
|
|
||||||
|
|
||||||
}else{
|
|
||||||
?>
|
|
||||||
<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 Available','mage-eventpress'); ?>
|
|
||||||
</span>
|
|
||||||
<?php
|
|
||||||
do_action('mep_after_no_seat_notice');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($leftt>0){
|
|
||||||
?>
|
?>
|
||||||
<input type='hidden' id='rowtotal_<?php echo get_the_id(); ?>' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
<!-- Register Now Title -->
|
||||||
<table>
|
<h4 class="mep-cart-table-title">
|
||||||
<tr>
|
<?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'); ?>
|
||||||
<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');
|
</h4>
|
||||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
<!--The event add to cart main form start here-->
|
||||||
if($mep_event_ticket_type){ ?>
|
<form action="" method='post' id="mage_event_submit">
|
||||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box_<?php echo get_the_id(); ?>" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
<?php
|
||||||
<span id="ttyttl_<?php echo get_the_id(); ?>"></span>
|
/**
|
||||||
<?php
|
* 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
|
||||||
}else{
|
*/
|
||||||
if($event_sqi==1){
|
do_action('mep_event_ticket_types_list');
|
||||||
$qmx = ($event_meta['mep_total_seat'][0]- $total_book);
|
do_action('mep_event_extra_service_list');
|
||||||
if($qty_typec=='dropdown'){ ?>
|
?>
|
||||||
<select name="quantity" id="quantity_5a7abbd1bff73" class='input-text qty text extra-qty-box_<?php echo get_the_id(); ?>'>
|
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
||||||
<?php for ($i = 1; $i <= $qmx; $i++) { ?>
|
|
||||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
<!--The Add to cart button table start Here-->
|
||||||
<?php } ?>
|
<table class='table table-bordered mep_event_add_cart_table'>
|
||||||
</select>
|
<tr>
|
||||||
<?php }else{ ?>
|
<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');
|
||||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box_<?php echo get_the_id(); ?>" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="number">
|
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 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_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>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!--The Add to cart button table start Here-->
|
||||||
|
</form>
|
||||||
|
<!--The event add to cart main form end here-->
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}else{
|
} // End Of checking Registration status
|
||||||
echo 1;
|
|
||||||
?>
|
|
||||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box_<?php echo get_the_id(); ?>" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
|
||||||
<?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 id="usertotal_<?php echo get_the_id(); ?>"></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_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
|
||||||
<p class="mep_no_tickt_notice" id="mep_btn_notice_<?php echo get_the_id(); ?>">
|
|
||||||
<?php echo mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') ? mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') : _e('No Ticket Selected!','mage-eventpress'); ?>
|
|
||||||
</p>
|
|
||||||
<button type="submit" name="add-to-cart" value="<?php echo esc_attr($post_id); ?>" class="single_add_to_cart_button button alt btn-mep-event-cart_<?php echo get_the_id(); ?>">
|
|
||||||
<?php _e(mep_get_label($post_id,'mep_cart_btn_text','Register This Event'),'mage-eventpress'); ?>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
|
||||||
if(!$mep_event_ticket_type){
|
|
||||||
if($qm){$qm=$qm;}else{$qm='';}
|
|
||||||
?><?php do_action('mep_single_page_reg'); ?><?php } } ?>
|
|
||||||
</form><?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_date', 'mep_ev_datetime');
|
add_action('mep_event_date', 'mep_ev_datetime');
|
||||||
function mep_ev_datetime()
|
// This Function Will be depricate soon, Please don't use this any where
|
||||||
{
|
function mep_ev_datetime(){
|
||||||
global $event_meta;
|
global $event_meta;
|
||||||
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
|
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
|
||||||
$start_date = $event_meta['event_start_date'][0];
|
$start_date = $event_meta['event_start_date'][0];
|
||||||
$start_time = $event_meta['event_start_time'][0];
|
$start_time = $event_meta['event_start_time'][0];
|
||||||
$end_datetime = $event_meta['event_end_date'][0] . ' ' . $event_meta['event_end_time'][0];
|
$end_datetime = $event_meta['event_end_date'][0] . ' ' . $event_meta['event_end_time'][0];
|
||||||
$end_date = $event_meta['event_end_date'][0];
|
$end_date = $event_meta['event_end_date'][0];
|
||||||
$end_time = $event_meta['event_end_time'][0];
|
$end_time = $event_meta['event_end_time'][0];
|
||||||
|
$more_date = array_key_exists('mep_event_more_date', $event_meta) ? unserialize($event_meta['mep_event_more_date'][0]) : array();
|
||||||
if (array_key_exists('mep_event_more_date', $event_meta)) {
|
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||||
$more_date = unserialize($event_meta['mep_event_more_date'][0]);
|
|
||||||
} else {
|
|
||||||
$more_date = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
|
||||||
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
||||||
$cn = 1;
|
$cn = 1;
|
||||||
|
|
||||||
if ($recurring == 'yes') {
|
if ($recurring == 'yes') {
|
||||||
|
|
||||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)) {
|
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) {
|
<p><?php echo get_mep_datetime($start_datetime, 'date-text') . ' ' . get_mep_datetime($start_datetime, 'time'); ?> - <?php if ($start_date != $end_date) {
|
||||||
|
@ -67,7 +60,6 @@ function mep_ev_datetime()
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<p><?php echo get_mep_datetime($start_datetime, 'date-text') . ' ' . get_mep_datetime($start_datetime, 'time'); ?> - <?php if ($start_date != $end_date) {
|
<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') . ' - ';
|
echo get_mep_datetime($end_datetime, 'date-text') . ' - ';
|
||||||
|
@ -75,48 +67,36 @@ function mep_ev_datetime()
|
||||||
echo get_mep_datetime($end_datetime, 'time'); ?></p>
|
echo get_mep_datetime($end_datetime, 'time'); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('mep_event_date_default_theme', 'mep_date_in_default_theme');
|
|
||||||
|
|
||||||
|
add_action('mep_event_date_default_theme', 'mep_date_in_default_theme');
|
||||||
function mep_date_in_default_theme(){
|
function mep_date_in_default_theme(){
|
||||||
global $event_meta;
|
global $event_meta;
|
||||||
|
|
||||||
$start_datetime = $event_meta['event_start_datetime'][0];
|
$start_datetime = $event_meta['event_start_datetime'][0];
|
||||||
$start_date = $event_meta['event_start_date'][0];
|
$start_date = $event_meta['event_start_date'][0];
|
||||||
$start_time = $event_meta['event_start_time'][0];
|
$start_time = $event_meta['event_start_time'][0];
|
||||||
|
$end_datetime = $event_meta['event_end_datetime'][0];
|
||||||
$end_datetime = $event_meta['event_end_datetime'][0];
|
$end_date = $event_meta['event_end_date'][0];
|
||||||
|
$end_time = $event_meta['event_end_time'][0];
|
||||||
$end_date = $event_meta['event_end_date'][0];
|
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||||
$end_time = $event_meta['event_end_time'][0];
|
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
||||||
|
$cn = 1;
|
||||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
$more_date = array_key_exists('mep_event_more_date', $event_meta) ? unserialize($event_meta['mep_event_more_date'][0]) : array();
|
||||||
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
|
||||||
$cn = 1;
|
|
||||||
|
|
||||||
if (array_key_exists('mep_event_more_date', $event_meta)) {
|
|
||||||
$more_date = unserialize($event_meta['mep_event_more_date'][0]);
|
|
||||||
} else {
|
|
||||||
$more_date = array();
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<h3><i class="fa fa-calendar"></i> <?php _e('Event Schedule Details', 'mage-eventpress'); ?></h3>
|
<h3><i class="fa fa-calendar"></i> <?php _e('Event Schedule Details', 'mage-eventpress'); ?></h3>
|
||||||
<?php
|
<?php
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
|
|
||||||
if ($recurring == 'yes') {
|
if ($recurring == 'yes') {
|
||||||
|
|
||||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)) {
|
if (strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)) {
|
||||||
?>
|
?>
|
||||||
<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) {
|
<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') . ' - ';
|
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
|
<?php
|
||||||
}
|
}
|
||||||
foreach ($more_date as $_more_date) {
|
foreach ($more_date as $_more_date) {
|
||||||
|
|
|
@ -1,37 +1,34 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_details','mep_ev_details');
|
add_action('mep_event_details','mep_ev_details');
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_details(){
|
function mep_ev_details(){
|
||||||
global $post, $event_meta;
|
global $post, $event_meta;
|
||||||
// the_content();
|
$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() );
|
||||||
|
do_action('mep_after_event_details');
|
||||||
|
}
|
||||||
|
|
||||||
$content_event = get_post($post->ID);
|
|
||||||
$content = $content_event->post_content;
|
|
||||||
$content = apply_filters('the_content', $content);
|
|
||||||
$content = str_replace(']]>', ']]>', $content);
|
|
||||||
echo $content;
|
|
||||||
|
|
||||||
$mep_event_day = get_post_meta($post->ID, 'mep_event_day', true);
|
|
||||||
|
|
||||||
if ( $mep_event_day ){
|
|
||||||
echo '<div class="mep-day-details-section">';
|
|
||||||
?>
|
|
||||||
<h4><?php _e('Event Days','mage-eventpress'); ?></h4>
|
|
||||||
<?php
|
|
||||||
foreach ( $mep_event_day as $field ) {
|
|
||||||
|
|
||||||
|
add_action('mep_after_event_details','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 ){
|
||||||
|
echo '<div class="mep-day-details-section">';
|
||||||
?>
|
?>
|
||||||
<div class="mep-day-title">
|
<h4><?php _e('Event Days','mage-eventpress'); ?></h4>
|
||||||
<?php echo $field['mep_day_title']; ?>
|
<?php
|
||||||
</div>
|
foreach ( $mep_event_day as $field ) {
|
||||||
<div class="mep-day-details">
|
?>
|
||||||
<p><?php echo $field['mep_day_content']; ?></p>
|
<div class="mep-day-title"><?php echo $field['mep_day_title']; ?></div>
|
||||||
</div>
|
<div class="mep-day-details">
|
||||||
<?php
|
<p><?php echo $field['mep_day_content']; ?></p>
|
||||||
|
</div>
|
||||||
}
|
<?php
|
||||||
echo '</div>';
|
}
|
||||||
}
|
echo '</div>';
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,15 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
add_action('mep_event_extra_service', 'mep_ev_extra_serv');
|
add_action('mep_event_extra_service', 'mep_ev_extra_serv');
|
||||||
|
function mep_ev_extra_serv(){
|
||||||
function mep_ev_extra_serv()
|
|
||||||
{
|
|
||||||
global $post, $product;
|
global $post, $product;
|
||||||
$pid = $post->ID;
|
$pid = $post->ID;
|
||||||
$count = 1;
|
$count = 1;
|
||||||
|
$mep_events_extra_prices = get_post_meta($post->ID, 'mep_events_extra_prices', true) ? get_post_meta($post->ID, 'mep_events_extra_prices', true) : array();
|
||||||
$mep_events_extra_prices = get_post_meta($post->ID, 'mep_events_extra_prices', true);
|
ob_start();
|
||||||
if ($mep_events_extra_prices) {
|
if (sizeof($mep_events_extra_prices) > 0) {
|
||||||
echo "<h3 class='ex-sec-title'>" . mep_get_label($pid, 'mep_event_extra_service_text', 'Extra Service:') . "</h3>";
|
echo "<h3 class='ex-sec-title'>" . mep_get_label($pid, 'mep_event_extra_service_text', 'Extra Service:') . "</h3>";
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
|
@ -29,18 +27,14 @@ function mep_ev_extra_serv()
|
||||||
<tr>
|
<tr>
|
||||||
<td align="Left"><?php echo $field['option_name']; ?>
|
<td align="Left"><?php echo $field['option_name']; ?>
|
||||||
<div class="xtra-item-left"><?php echo $ext_left; ?>
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="mage_text_center">
|
<td class="mage_text_center">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($ext_left > 0) {
|
if ($ext_left > 0) {
|
||||||
if ($qty_type == 'dropdown') { ?>
|
if ($qty_type == 'dropdown') { ?>
|
||||||
<select name="event_extra_service_qty[]" id="eventpxtp_<?php //echo $count;
|
<select name="event_extra_service_qty[]" id="eventpxtp_<?php //echo $count;
|
||||||
?>" class='extra-qty-box'>
|
?>" class='extra-qty-box'>
|
||||||
<?php for ($i = 0; $i <= $ext_left; $i++) { ?>
|
<?php for ($i = 0; $i <= $ext_left; $i++) { ?>
|
||||||
<option value="<?php echo $i; ?>"><?php echo $i; ?> <?php echo $field['option_name']; ?></option>
|
<option value="<?php echo $i; ?>"><?php echo $i; ?> <?php echo $field['option_name']; ?></option>
|
||||||
|
@ -52,8 +46,7 @@ function mep_ev_extra_serv()
|
||||||
<input id="eventpx" <?php //if($ext_left<=0){ echo "disabled"; }
|
<input id="eventpx" <?php //if($ext_left<=0){ echo "disabled"; }
|
||||||
?> size="4" inputmode="numeric" type="text" class='extra-qty-box' name='event_extra_service_qty[]' data-price='<?php echo $field['option_price']; ?>' value='0' min="0" max="<?php echo $ext_left; ?>">
|
?> size="4" inputmode="numeric" type="text" class='extra-qty-box' name='event_extra_service_qty[]' data-price='<?php echo $field['option_price']; ?>' value='0' min="0" max="<?php echo $ext_left; ?>">
|
||||||
<span class="fa fa-plus qty_inc"></span>
|
<span class="fa fa-plus qty_inc"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php }
|
<?php }
|
||||||
} else {
|
} else {
|
||||||
echo mep_get_option('mep_not_available_text', 'label_setting_sec') ? mep_get_option('mep_not_available_text', 'label_setting_sec') : _e('Not Available', 'mage-eventpress');
|
echo mep_get_option('mep_not_available_text', 'label_setting_sec') ? mep_get_option('mep_not_available_text', 'label_setting_sec') : _e('Not Available', 'mage-eventpress');
|
||||||
|
@ -70,10 +63,11 @@ function mep_ev_extra_serv()
|
||||||
<?php
|
<?php
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_extra_service_list', $content,$pid,$event_meta);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
add_action('mep_event_expire_text','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'); ?>
|
||||||
|
</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(){
|
||||||
|
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'); ?>
|
||||||
|
</span>
|
||||||
|
<?php
|
||||||
|
echo ob_get_clean();
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
add_action('mep_event_list_cat_names','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(
|
||||||
|
'taxonomy' => 'mep_cat'
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
<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
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</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(){
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div class="mep-events-cats-list">
|
||||||
|
<?php
|
||||||
|
$terms = get_terms(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'mep_org'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<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
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_organization_name_filter_list', $content);
|
||||||
|
}
|
|
@ -3,35 +3,33 @@ add_action('mep_event_location','mep_ev_location');
|
||||||
add_action('mep_event_location_ticket','mep_ev_location_ticket');
|
add_action('mep_event_location_ticket','mep_ev_location_ticket');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_location_cart($event_id,$event_meta){
|
function mep_ev_location_cart($event_id,$event_meta){
|
||||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
$location_sts = get_post_meta($event_id,'mep_org_address',true) ? get_post_meta($event_id,'mep_org_address',true) : '';
|
||||||
|
ob_start();
|
||||||
if($location_sts){
|
if($location_sts){
|
||||||
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
$org_id = $org_arr[0]->term_id;
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
echo get_term_meta( $org_id, 'org_location', true ); ?>,<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><?php echo get_term_meta( $org_id, 'org_street', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_state', true )){ echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <?php echo get_term_meta( $org_id, 'org_postcode', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_country', true )){ ?> <?php echo get_term_meta( $org_id, 'org_country', true ); ?> <?php }
|
||||||
echo get_term_meta( $org_id, 'org_location', true ); ?>,<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><?php echo get_term_meta( $org_id, 'org_street', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_state', true )){ echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <?php echo get_term_meta( $org_id, 'org_postcode', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_country', true )){ ?> <?php echo get_term_meta( $org_id, 'org_country', true ); ?> <?php }
|
}else{
|
||||||
}else{
|
echo $event_meta['mep_location_venue'][0]; ?>, <?php if($event_meta['mep_street'][0]){ ?><?php echo $event_meta['mep_street'][0]; ?>, <?php } if($event_meta['mep_city'][0]){ ?> <?php echo $event_meta['mep_city'][0]; ?>, <?php } if($event_meta['mep_state'][0]){ ?> <?php echo $event_meta['mep_state'][0]; ?>, <?php } if($event_meta['mep_postcode'][0]){ ?> <?php echo $event_meta['mep_postcode'][0]; ?>, <?php } if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
||||||
?>
|
|
||||||
<?php echo $event_meta['mep_location_venue'][0]; ?>, <?php if($event_meta['mep_street'][0]){ ?><?php echo $event_meta['mep_street'][0]; ?>, <?php } if($event_meta['mep_city'][0]){ ?> <?php echo $event_meta['mep_city'][0]; ?>, <?php } if($event_meta['mep_state'][0]){ ?> <?php echo $event_meta['mep_state'][0]; ?>, <?php } if($event_meta['mep_postcode'][0]){ ?> <?php echo $event_meta['mep_postcode'][0]; ?>, <?php } if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_location_in_cart', $content,$event_id,$event_meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_location_ticket($event_id,$event_meta){
|
function mep_ev_location_ticket($event_id,$event_meta){
|
||||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
$location_sts = get_post_meta($event_id,'mep_org_address',true) ? get_post_meta($event_id,'mep_org_address',true) : '';
|
||||||
|
ob_start();
|
||||||
if($location_sts){
|
if($location_sts){
|
||||||
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||||
$org_id = $org_arr[0]->term_id;
|
$org_id = $org_arr[0]->term_id;
|
||||||
?>
|
?>
|
||||||
<?php echo get_term_meta( $org_id, 'org_location', true ); ?>,
|
<?php echo get_term_meta( $org_id, 'org_location', true ); ?>,
|
||||||
<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><?php echo get_term_meta( $org_id, 'org_street', true ); ?>, <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><?php echo get_term_meta( $org_id, 'org_street', true ); ?>, <?php } ?>
|
||||||
<?php if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } ?>
|
||||||
<?php if(get_term_meta( $org_id, 'org_state', true )){ ?> <?php echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } ?>
|
<?php if(get_term_meta( $org_id, 'org_state', true )){ ?> <?php echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } ?>
|
||||||
|
@ -47,14 +45,15 @@ $org_id = $org_arr[0]->term_id;
|
||||||
<?php if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
<?php if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_location_in_ticket', $content,$event_id,$event_meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_location(){
|
function mep_ev_location(){
|
||||||
global $post,$event_meta;
|
global $post,$event_meta;
|
||||||
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true) ? get_post_meta($post->ID,'mep_org_address',true) : '';
|
||||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
ob_start();
|
||||||
if($location_sts){
|
if($location_sts){
|
||||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
$org_id = $org_arr[0]->term_id;
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
@ -75,7 +74,8 @@ $org_id = $org_arr[0]->term_id;
|
||||||
<?php if($event_meta['mep_country'][0]){ ?> <p><?php echo $event_meta['mep_country'][0]; ?></p> <?php }
|
<?php if($event_meta['mep_country'][0]){ ?> <p><?php echo $event_meta['mep_country'][0]; ?></p> <?php }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_location_content', $content,$post->ID,$event_meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
add_action('mep_event_list_shortcode','mep_display_event_loop_list',10,3);
|
||||||
|
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');
|
||||||
|
$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');
|
||||||
|
$torg = get_the_terms($event_id, 'mep_org');
|
||||||
|
$org_class = mep_get_term_as_class($event_id, 'mep_org');
|
||||||
|
$cat_class = mep_get_term_as_class($event_id, 'mep_cat');
|
||||||
|
$event_multidate = array_key_exists('mep_event_more_date', $event_meta) ? maybe_unserialize($event_meta['mep_event_more_date'][0]) : array();
|
||||||
|
$available_seat = mep_get_total_available_seat($event_id, $event_meta);
|
||||||
|
$hide_org_list = mep_get_option('mep_event_hide_organizer_list', 'general_setting_sec', 'no');
|
||||||
|
$hide_location_list = mep_get_option('mep_event_hide_location_list', 'general_setting_sec', 'no');
|
||||||
|
$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');
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class='<?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php if ($tt) { echo $org_class; } ?> <?php if ($torg) { echo $cat_class; } ?>'>
|
||||||
|
<div class="mep_list_thumb">
|
||||||
|
<a href="<?php echo get_the_permalink($event_id); ?>"><?php echo get_the_post_thumbnail($event_id,'full'); ?></a>
|
||||||
|
<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>
|
||||||
|
<?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>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<div class="mep_list_event_details">
|
||||||
|
<a href="<?php the_permalink(); ?>">
|
||||||
|
<div class="mep-list-header">
|
||||||
|
<h2 class='mep_list_title'><?php the_title(); ?></h2>
|
||||||
|
<?php if ($available_seat == 0) {
|
||||||
|
do_action('mep_show_waitlist_label');
|
||||||
|
} ?>
|
||||||
|
<h3 class='mep_list_date'> <?php if ($show_price == 'yes') {
|
||||||
|
echo $show_price_label . " " . mep_event_list_price($event_id);
|
||||||
|
} ?></h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($style == 'list') {
|
||||||
|
?>
|
||||||
|
<div class="mep-event-excerpt">
|
||||||
|
<?php the_excerpt(); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="mep-list-footer">
|
||||||
|
<ul>
|
||||||
|
<?php if ($hide_org_list == 'no') { ?>
|
||||||
|
<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) {
|
||||||
|
echo $author_terms[0]->name;
|
||||||
|
} ?></h6>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php }
|
||||||
|
if ($hide_location_list == 'no') { ?>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<div class="evl-ico"><i class="fa fa-location-arrow"></i></div>
|
||||||
|
<div class="evl-cc">
|
||||||
|
<h5>
|
||||||
|
<?php echo mep_get_option('mep_location_text', 'label_setting_sec') ? mep_get_option('mep_location_text', 'label_setting_sec') : _e('Location:', 'mage-eventpress'); ?>
|
||||||
|
|
||||||
|
</h5>
|
||||||
|
<h6><?php mep_get_event_city($event_id); ?></h6>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php }
|
||||||
|
if ($hide_time_list == 'no') { ?>
|
||||||
|
<li>
|
||||||
|
<div class="evl-ico"><i class="fa fa-calendar"></i></div>
|
||||||
|
<div class="evl-cc">
|
||||||
|
<h5>
|
||||||
|
<?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 mep_get_only_time($event_meta['event_start_time'][0]);
|
||||||
|
if ($hide_only_end_time_list == 'no') { ?> - <?php mep_get_only_time($event_meta['event_end_time'][0]);
|
||||||
|
} ?></h6>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_loop_list_shortcode', $content, $event_id);
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_faq', 'mep_faq_part');
|
add_action('mep_event_faq', 'mep_faq_part');
|
||||||
function mep_faq_part()
|
function mep_faq_part(){
|
||||||
{
|
|
||||||
global $post;
|
global $post;
|
||||||
$mep_event_faq = get_post_meta($post->ID, 'mep_event_faq', true);
|
ob_start();
|
||||||
|
$mep_event_faq = get_post_meta($post->ID, 'mep_event_faq', true) ? get_post_meta($post->ID, 'mep_event_faq', true) : '';
|
||||||
if ($mep_event_faq) {
|
if ($mep_event_faq) {
|
||||||
?>
|
?>
|
||||||
<div class="mep-event-faq-part">
|
<div class="mep-event-faq-part">
|
||||||
|
@ -21,4 +21,7 @@ function mep_faq_part()
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_faq_list', $content,$post->ID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_map','ggmap');
|
add_action('mep_event_map','mep_event_google_map');
|
||||||
function ggmap(){
|
function mep_event_google_map(){
|
||||||
global $post,$event_meta,$user_api;
|
global $post,$event_meta,$user_api;
|
||||||
$map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'iframe');
|
$map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'iframe');
|
||||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
$location_sts = get_post_meta($post->ID,'mep_org_address',true) ? get_post_meta($post->ID,'mep_org_address',true) : '';
|
||||||
|
ob_start();
|
||||||
|
do_action('mep_event_before_google_map');
|
||||||
if($location_sts){
|
if($location_sts){
|
||||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||||
$org_id = $org_arr[0]->term_id;
|
$org_id = $org_arr[0]->term_id;
|
||||||
|
@ -62,4 +62,11 @@ if($map_type=='iframe'){
|
||||||
</script>
|
</script>
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap"
|
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap"
|
||||||
async defer></script>
|
async defer></script>
|
||||||
<?php } } } }?>
|
<?php } } }
|
||||||
|
|
||||||
|
do_action('mep_event_after_google_map');
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_google_map', $content,$post->ID);
|
||||||
|
|
||||||
|
|
||||||
|
}?>
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_organizer','mep_ev_org');
|
add_action('mep_event_organizer','mep_ev_org');
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_org(){
|
function mep_ev_org(){
|
||||||
global $author_terms;
|
global $post,$author_terms;
|
||||||
|
ob_start();
|
||||||
if($author_terms){ ?><p> <?php echo mep_get_option('mep_by_text', 'label_setting_sec') ? mep_get_option('mep_by_text', 'label_setting_sec') : _e('By:','mage-eventpress'); ?> <a href="<?php echo get_term_link( $author_terms[0]->term_id, 'mep_org' ); ?>"><?php echo $author_terms[0]->name; ?></a></p><?php }
|
if($author_terms){ ?><p> <?php echo mep_get_option('mep_by_text', 'label_setting_sec') ? mep_get_option('mep_by_text', 'label_setting_sec') : _e('By:','mage-eventpress'); ?> <a href="<?php echo get_term_link( $author_terms[0]->term_id, 'mep_org' ); ?>"><?php echo $author_terms[0]->name; ?></a></p><?php }
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_single_org_name', $content,$post->ID);
|
||||||
}
|
}
|
|
@ -1,16 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_price','mep_ev_price');
|
add_action('mep_event_price','mep_ev_price');
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_price(){
|
function mep_ev_price(){
|
||||||
global $event_meta;
|
global $post,$event_meta;
|
||||||
if($event_meta['_price'][0]>0){
|
ob_start();
|
||||||
if($event_meta['mep_price_label'][0]){
|
if($event_meta['_price'][0]>0){
|
||||||
?>
|
if($event_meta['mep_price_label'][0]){ ?>
|
||||||
<h3><?php echo $event_meta['mep_price_label'][0]; ?>: </h3>
|
<h3><?php echo $event_meta['mep_price_label'][0]; ?>: </h3>
|
||||||
<?php }
|
<?php }
|
||||||
echo wc_price($event_meta['_price'][0]);
|
echo wc_price($event_meta['_price'][0]);
|
||||||
|
}
|
||||||
?>
|
$content = ob_get_clean();
|
||||||
<?php } else{ echo ''; }
|
echo apply_filters('mage_event_single_price', $content,$post->ID);
|
||||||
}
|
}
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_social_share', 'mep_ev_social_share');
|
add_action('mep_event_social_share', 'mep_ev_social_share');
|
||||||
|
function mep_ev_social_share(){
|
||||||
|
global $post;
|
||||||
function mep_ev_social_share()
|
ob_start();
|
||||||
{
|
|
||||||
global $post;
|
|
||||||
$post_id = $post->ID;
|
$post_id = $post->ID;
|
||||||
?>
|
?>
|
||||||
<div class="mep-event-meta">
|
<div class="mep-event-meta">
|
||||||
<?php _e(mep_get_label($post_id, 'mep_share_text', 'Share This Event:'), 'mage-eventpress'); ?><?php mep_social_share(); ?>
|
<?php _e(mep_get_label($post_id, 'mep_share_text', 'Share This Event:'), 'mage-eventpress'); ?><?php mep_social_share(); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_single_social_share', $content,$post->ID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,3 +15,6 @@ require_once(dirname(__FILE__) . "/event_ticket_type_extra_service.php");
|
||||||
require_once(dirname(__FILE__) . "/event_ticket_type.php");
|
require_once(dirname(__FILE__) . "/event_ticket_type.php");
|
||||||
require_once(dirname(__FILE__) . "/event_extra_service.php");
|
require_once(dirname(__FILE__) . "/event_extra_service.php");
|
||||||
require_once(dirname(__FILE__) . "/faq.php");
|
require_once(dirname(__FILE__) . "/faq.php");
|
||||||
|
require_once(dirname(__FILE__) . "/event_labels.php");
|
||||||
|
require_once(dirname(__FILE__) . "/event_list_tax_name_list.php");
|
||||||
|
require_once(dirname(__FILE__) . "/event_loop_list.php");
|
|
@ -1,11 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
add_action('mep_event_thumbnail','mep_thumbnail');
|
add_action('mep_event_thumbnail','mep_thumbnail');
|
||||||
|
|
||||||
function mep_thumbnail(){
|
function mep_thumbnail(){
|
||||||
|
global $post;
|
||||||
|
ob_start();
|
||||||
?>
|
?>
|
||||||
<div class="mep-event-thumbnail">
|
<div class="mep-event-thumbnail">
|
||||||
<?php the_post_thumbnail('full'); ?>
|
<?php the_post_thumbnail('full'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_single_thumbnail', $content,$post->ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
add_action('mep_event_title','mep_ev_title');
|
add_action('mep_event_title','mep_ev_title');
|
||||||
function mep_ev_title(){
|
function mep_ev_title(){
|
||||||
|
global $post;
|
||||||
|
ob_start();
|
||||||
?>
|
?>
|
||||||
<h2><?php the_title(); ?></h2>
|
<h2><?php the_title(); ?></h2>
|
||||||
<?php
|
<?php
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_single_title', $content,$post->ID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,22 +2,24 @@
|
||||||
add_action('mep_event_seat','mep_ev_seat');
|
add_action('mep_event_seat','mep_ev_seat');
|
||||||
function mep_ev_seat(){
|
function mep_ev_seat(){
|
||||||
global $post,$event_meta;
|
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';
|
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||||
if($recurring == 'no'){
|
ob_start();
|
||||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
if($recurring == 'no'){
|
||||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
|
||||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
$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();
|
||||||
}else{
|
$mep_available_seat = array_key_exists('mep_available_seat', $event_meta) ? $event_meta['mep_available_seat'][0] : 'on';
|
||||||
$mep_available_seat = 'on';
|
|
||||||
}
|
if(is_array($mep_event_ticket_type) && sizeof($mep_event_ticket_type) > 0){
|
||||||
if($mep_event_ticket_type){
|
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
||||||
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
$total_resv = mep_event_total_seat(get_the_id(),'resv');
|
||||||
$total_resv = mep_event_total_seat(get_the_id(),'resv');
|
$total_sold = mep_ticket_sold(get_the_id());
|
||||||
$total_sold = mep_ticket_sold(get_the_id());
|
$total_left = $total_seat - ($total_sold + $total_resv);
|
||||||
$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>
|
||||||
<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
|
||||||
<?php
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
$content = ob_get_clean();
|
||||||
|
echo apply_filters('mage_event_single_title', $content,$post->ID);
|
||||||
}
|
}
|
Loading…
Reference in New Issue