version 3.2.6 released

This commit is contained in:
magepeopleteam 2020-05-24 08:17:41 +00:00
parent 07b4abc7e3
commit 3f2589d3a8
38 changed files with 1681 additions and 1402 deletions

View File

@ -1,4 +1,7 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action( 'admin_menu', 'mep_addon_list_menu',10,99);
function mep_addon_list_menu() {

View File

@ -1,4 +1,7 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* The Admin Enqueue Scripts & Style Files are Hooked up below for WooOCmmerce Event Manager Plugin

View File

@ -1,4 +1,8 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This File is a very important file, Because Its gettings Data from user selection on event details page, and prepare the data send to cart item and lastly save into order table after checkout
*/
@ -31,6 +35,11 @@ function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $
$user = $form_position == 'details_page' ? mep_save_attendee_info_into_cart($product_id) : array();
$validate = mep_cart_ticket_type('validation_data', $total_price,$product_id);
// echo '<pre>';
// print_r($ticket_type_arr);
// // print_r($qty);
// die();
/**
* Now Store the datas into Cart Session
*/
@ -160,21 +169,19 @@ function mep_checkout_validation($posted)
foreach ($items as $item => $values) {
$event_id = array_key_exists('event_id', $values) ? $values['event_id'] : 0; // $values['event_id'];
if (get_post_type($event_id) == 'mep_events') {
$total_seat = mep_event_total_seat($event_id, 'total');
$total_resv = mep_event_total_seat($event_id, 'resv');
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($event_id, 'total'), $event_id);
$total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($event_id, 'resv'), $event_id);
$total_sold = mep_ticket_sold($event_id);
$total_left = $total_seat - ($total_sold + $total_resv);
if($recurring == 'no'){
$event_validate_info = $values['event_validate_info'] ? $values['event_validate_info'] : array();
$ee = 0;
if (is_array($event_validate_info) && sizeof($event_validate_info) > 0) {
foreach ($event_validate_info as $inf) {
$ee = $ee + $inf['validation_ticket_qty'];
}
}
if ($ee > $total_left) {
$event = get_the_title($event_id);
wc_add_notice(__("Sorry, Seats are not available in <b>$event</b>, Available Seats <b>$total_left</b> but you selected <b>$ee</b>", 'mage-eventpress'), 'error');
@ -182,6 +189,8 @@ function mep_checkout_validation($posted)
}
}
}
}
/**

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,8 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This is the Main Query Function For Query the Event List, Just Pass the Required values It will return the Query As Object.
*/

View File

@ -1,4 +1,8 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This will be used for Taxonomy Meta Box with the Brand New Mage Freamwork
*/

View File

@ -1,4 +1,7 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_org_add_form_fields', 'mep_org_tax_location_fileds', 10, 2);
function mep_org_tax_location_fileds($taxonomy)

View File

@ -1,4 +1,7 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('wp_head', 'mep_user_custom_styles', 10, 999);
function mep_user_custom_styles()

View File

@ -1,7 +1,12 @@
<?php
add_action('mep_event_add_calender','mep_ev_calender');
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
function mep_ev_calender($event_id){
add_action('mep_event_add_calender', 'mep_ev_calender');
if (!function_exists('mep_ev_calender')) {
function mep_ev_calender($event_id)
{
?>
<div class="calender-url">
<?php
@ -14,6 +19,5 @@ function mep_ev_calender($event_id){
?>
</div>
<?php
}
}

View File

@ -1,8 +1,13 @@
<?php
add_action('mep_add_to_cart','mep_get_event_reg_btn');
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_add_to_cart', 'mep_get_event_reg_btn');
if (!function_exists('mep_get_event_reg_btn')) {
// Get Event Registration Button
function mep_get_event_reg_btn($event_id=''){
function mep_get_event_reg_btn($event_id = '')
{
global $post, $event_meta;
$total_book = 0;
$post_id = $event_id ? $event_id : get_the_id();
@ -21,17 +26,14 @@ function mep_get_event_reg_btn($event_id=''){
$mep_reg_company = strip_tags($event_meta['mep_reg_company'][0]);
$mep_reg_gender = strip_tags($event_meta['mep_reg_gender'][0]);
$mep_reg_tshirtsize = strip_tags($event_meta['mep_reg_tshirtsize'][0]);
// $simple_rsv = array_key_exists('mep_rsv_seat', $event_meta) ? $event_meta['mep_rsv_seat'][0] : 0;
// $total_book = ($total_book + $simple_rsv);
// $seat_left = ((int)$event_meta['mep_total_seat'][0]- (int)$total_book);
$time = strtotime($event_expire_date);
$newformat = date('Y-m-d H:i:s', $time);
$datetime1 = new DateTime();
$datetime2 = new DateTime($newformat);
$interval = $datetime1->diff($datetime2);
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true) ? get_post_meta($post_id, 'mep_event_ticket_type', true) : array();
$total_seat = mep_event_total_seat($post_id,'total');
$total_resv = mep_event_total_seat($post_id,'resv');
$total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($post_id, 'total'), $post_id);
$total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($post_id, 'resv'), $post_id);
$total_sold = mep_ticket_sold($post_id);
$total_left = $total_seat - ($total_sold + $total_resv);
$reg_status = array_key_exists('mep_reg_status', $event_meta) ? $event_meta['mep_reg_status'][0] : '';
@ -134,16 +136,17 @@ if($reg_status!='off'){
}
} // End Of checking Registration status
}
}
add_action('mep_add_to_cart_list', 'mep_get_event_reg_btn_list');
if (!function_exists('mep_get_event_reg_btn_list')) {
// Get Event Registration Button
function mep_get_event_reg_btn_list(){
function mep_get_event_reg_btn_list()
{
global $post, $event_meta;
$total_book = 0;
$post_id = $post->ID;
@ -276,3 +279,4 @@ if($reg_status!='off'){
}
} // End Of checking Registration status
}
}

View File

@ -1,7 +1,13 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_date', 'mep_ev_datetime');
if (!function_exists('mep_ev_datetime')) {
// This Function Will be depricate soon, Please don't use this any where
function mep_ev_datetime(){
function mep_ev_datetime()
{
global $event_meta;
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
$start_date = $event_meta['event_start_date'][0];
@ -58,7 +64,6 @@ function mep_ev_datetime(){
echo get_mep_datetime($_more_date['event_more_end_time'], 'time'); ?></p>
<?php
}
} else {
?>
<p><?php echo get_mep_datetime($start_datetime, 'date-text') . ' ' . get_mep_datetime($start_datetime, 'time'); ?> - <?php if ($start_date != $end_date) {
@ -68,11 +73,12 @@ function mep_ev_datetime(){
<?php
}
}
}
add_action('mep_event_date_default_theme', 'mep_date_in_default_theme');
function mep_date_in_default_theme($event_id){
if (!function_exists('mep_date_in_default_theme')) {
function mep_date_in_default_theme($event_id)
{
$event_meta = get_post_custom($event_id);
$start_datetime = $event_meta['event_start_datetime'][0];
$start_date = $event_meta['event_start_date'][0];
@ -87,7 +93,11 @@ function mep_date_in_default_theme($event_id){
?>
<h3><i class="fa fa-calendar"></i> <?php echo mep_get_option('mep_event_schedule_text', 'label_setting_sec', __('Event Schedule Details', 'mage-eventpress')); ?></h3>
<?php
if(sizeof($more_date) > 2){ echo '<ul id="mep_event_date_sch">'; }else{ echo '<ul>'; }
if (sizeof($more_date) > 2) {
echo '<ul id="mep_event_date_sch">';
} else {
echo '<ul>';
}
if ($recurring == 'yes') {
if (strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)) {
@ -135,7 +145,6 @@ function mep_date_in_default_theme($event_id){
echo get_mep_datetime($_more_date['event_more_end_date'] . ' ' . $_more_date['event_more_end_time'], 'time'); ?></li>
<?php
}
} else {
?>
@ -154,9 +163,10 @@ function mep_date_in_default_theme($event_id){
<?php
}
}
}
add_action('mep_event_date_only', 'mep_ev_date');
if (!function_exists('mep_ev_date')) {
function mep_ev_date()
{
global $event_meta;
@ -201,9 +211,10 @@ function mep_ev_date()
<?php
}
}
}
add_action('mep_event_time_only', 'mep_ev_time');
if (!function_exists('mep_ev_time')) {
function mep_ev_time()
{
global $event_meta;
@ -246,13 +257,20 @@ function mep_ev_time()
<?php
}
}
}
function mep_ev_time_ticket($event_meta){
if (!function_exists('mep_ev_time_ticket')) {
function mep_ev_time_ticket($event_meta)
{
$start_datetime = $event_meta['event_start_datetime'][0];
echo get_mep_datetime($start_datetime, 'time');
}
}
function mep_ev_date_ticket($event_meta){
if (!function_exists('mep_ev_date_ticket')) {
function mep_ev_date_ticket($event_meta)
{
$start_datetime = $event_meta['event_start_datetime'][0];
echo get_mep_datetime($start_datetime, 'date-text');
}
}

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_details', 'mep_ev_details');
function mep_ev_details(){
if (!function_exists('mep_ev_details')) {
function mep_ev_details()
{
global $post, $event_meta;
$content_event = get_post($post->ID);
$content = $content_event->post_content;
@ -9,11 +15,13 @@ function mep_ev_details(){
echo apply_filters('mep_event_details_content', $content, get_the_id());
do_action('mep_after_event_details');
}
}
add_action('mep_after_event_details', 'mep_display_event_daywise_details');
function mep_display_event_daywise_details(){
if (!function_exists('mep_display_event_daywise_details')) {
function mep_display_event_daywise_details()
{
global $post, $event_meta;
$mep_event_day = get_post_meta($post->ID, 'mep_event_day', true) ? get_post_meta($post->ID, 'mep_event_day', true) : array();
if (sizeof($mep_event_day) > 0) {
@ -32,3 +40,4 @@ function mep_display_event_daywise_details(){
echo '</div>';
}
}
}

View File

@ -1,7 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_extra_service', 'mep_ev_extra_serv');
function mep_ev_extra_serv($post_id){
if (!function_exists('mep_ev_extra_serv')) {
function mep_ev_extra_serv($post_id)
{
global $post, $product;
$post_id = $post_id;
$count = 1;
@ -72,3 +77,4 @@ function mep_ev_extra_serv($post_id){
$event_meta = get_post_custom($post_id);
echo apply_filters('mage_event_extra_service_list', $content, $post_id, $event_meta);
}
}

View File

@ -1,7 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_expire_text', 'mep_event_display_expire_text');
function mep_event_display_expire_text(){
if (!function_exists('mep_event_display_expire_text')) {
function mep_event_display_expire_text()
{
ob_start();
?>
<span class=event-expire-btn>
@ -10,10 +15,12 @@ function mep_event_display_expire_text(){
<?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(){
if (!function_exists('mep_event_display_no_seat_text')) {
function mep_event_display_no_seat_text()
{
ob_start();
?>
<span class=event-expire-btn>
@ -22,3 +29,4 @@ function mep_event_display_no_seat_text(){
<?php
echo ob_get_clean();
}
}

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_list_cat_names', 'mep_display_event_cat_name_in_list');
function mep_display_event_cat_name_in_list(){
if (!function_exists('mep_display_event_cat_name_in_list')) {
function mep_display_event_cat_name_in_list()
{
ob_start();
?>
<div class="mep-events-cats-list">
@ -10,21 +16,21 @@ function mep_display_event_cat_name_in_list(){
));
?>
<div class="mep-event-cat-controls">
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php
foreach ($terms as $_terms) {
?>
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
}
?>
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button>
<?php foreach ($terms as $_terms) { ?>
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button>
<?php } ?>
</div>
</div>
<?php
$content = ob_get_clean();
echo apply_filters('mage_event_category_name_filter_list', $content);
}
}
add_action('mep_event_list_org_names', 'mep_display_event_org_name_in_list');
function mep_display_event_org_name_in_list(){
if (!function_exists('mep_display_event_org_name_in_list')) {
function mep_display_event_org_name_in_list()
{
ob_start();
?>
<div class="mep-events-cats-list">
@ -36,15 +42,12 @@ function mep_display_event_org_name_in_list(){
);
?>
<div class="mep-event-cat-controls">
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php
foreach ($terms as $_terms) {
?>
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
}
?>
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All', 'mage-eventpress'); ?></button><?php foreach ($terms as $_terms) { ?>
<button type="button" class="mep-cat-control" data-filter=".<?php echo 'mage-' . $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php } ?>
</div>
</div>
<?php
$content = ob_get_clean();
echo apply_filters('mage_event_organization_name_filter_list', $content);
}
}

View File

@ -1,8 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_location','mep_ev_location');
add_action('mep_event_location_ticket','mep_ev_location_ticket');
if (!function_exists('mep_ev_location_cart')) {
function mep_ev_location_cart($event_id,$event_meta){
$location_sts = get_post_meta($event_id,'mep_org_address',true) ? get_post_meta($event_id,'mep_org_address',true) : '';
ob_start();
@ -29,10 +33,10 @@ if($location_sts){
$content = ob_get_clean();
echo apply_filters('mage_event_location_in_cart', $content,$event_id,$event_meta);
}
}
if (!function_exists('mep_ev_location_ticket')) {
function mep_ev_location_ticket($event_id,$event_meta){
$location_sts = get_post_meta($event_id,'mep_org_address',true) ? get_post_meta($event_id,'mep_org_address',true) : '';
ob_start();
@ -63,8 +67,9 @@ $org_id = $org_arr[0]->term_id;
$content = ob_get_clean();
echo apply_filters('mage_event_location_in_ticket', $content,$event_id,$event_meta);
}
}
if (!function_exists('mep_ev_location')) {
function mep_ev_location(){
global $post,$event_meta;
$location_sts = get_post_meta($post->ID,'mep_org_address',true) ? get_post_meta($post->ID,'mep_org_address',true) : '';
@ -97,29 +102,35 @@ $org_id = $org_arr[0]->term_id;
$content = ob_get_clean();
echo apply_filters('mage_event_location_content', $content,$post->ID,$event_meta);
}
}
add_action('mep_event_location_venue','mep_ev_venue');
function mep_ev_venue(){
if (!function_exists('mep_ev_venue')) {
function mep_ev_venue($event_id=''){
global $post,$event_meta;
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
if($event_id){
$event = $event_id;
}else{
$event = $post->ID;
}
$location_sts = get_post_meta($event,'mep_org_address',true);
if($location_sts){
$org_arr = get_the_terms( $post->ID, 'mep_org' );
$org_arr = get_the_terms( $event, 'mep_org' );
$org_id = $org_arr[0]->term_id;
echo "<span>".get_term_meta( $org_id, 'org_location', true )."</span>";
}else{
?>
<span><?php echo $event_meta['mep_location_venue'][0]; ?></span>
<span><?php echo get_post_meta($event,'mep_location_venue',true); ?></span>
<?php
}
}
}
/**
* Event Location Get Functions
*/
if (!function_exists('mep_get_event_location')) {
function mep_get_event_location($event_id){
$location_sts = get_post_meta($event_id,'mep_org_address',true);
if($location_sts){
@ -130,7 +141,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
return get_post_meta($event_id,'mep_location_venue',true);
}
}
}
if (!function_exists('mep_get_event_location_street')) {
function mep_get_event_location_street($event_id){
$location_sts = get_post_meta($event_id,'mep_org_address',true);
if($location_sts){
@ -141,8 +154,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
return get_post_meta($event_id,'mep_street',true);
}
}
}
if (!function_exists('mep_get_event_location_city')) {
function mep_get_event_location_city($event_id){
$location_sts = get_post_meta($event_id,'mep_org_address',true);
if($location_sts){
@ -153,8 +167,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
return get_post_meta($event_id,'mep_city',true);
}
}
}
if (!function_exists('mep_get_event_location_state')) {
function mep_get_event_location_state($event_id){
$location_sts = get_post_meta($event_id,'mep_org_address',true);
if($location_sts){
@ -165,8 +180,13 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
return get_post_meta($event_id,'mep_state',true);
}
}
}
function mep_get_location_name_for_list($event_id){
}
if (!function_exists('mep_get_event_location_postcode')) {
function mep_get_event_location_postcode($event_id){
$location_sts = get_post_meta($event_id,'mep_org_address',true);
if($location_sts){
@ -177,8 +197,9 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
return get_post_meta($event_id,'mep_postcode',true);
}
}
}
if (!function_exists('mep_get_event_location_country')) {
function mep_get_event_location_country($event_id){
$location_sts = get_post_meta($event_id,'mep_org_address',true);
if($location_sts){
@ -189,7 +210,7 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
return get_post_meta($event_id,'mep_country',true);
}
}
}
@ -197,6 +218,7 @@ $location_sts = get_post_meta($event_id,'mep_org_address',true);
add_action('mep_event_location_street','mep_ev_street');
if (!function_exists('mep_ev_street')) {
function mep_ev_street(){
global $post,$event_meta;
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
@ -210,9 +232,11 @@ $org_id = $org_arr[0]->term_id;
<?php
}
}
}
add_action('mep_event_location_city','mep_ev_city');
if (!function_exists('mep_ev_city')) {
function mep_ev_city(){
global $post,$event_meta;
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
@ -226,9 +250,12 @@ $org_id = $org_arr[0]->term_id;
<?php
}
}
}
add_action('mep_event_location_state','mep_ev_state');
if (!function_exists('mep_ev_state')) {
function mep_ev_state(){
global $post,$event_meta;
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
@ -242,9 +269,12 @@ $org_id = $org_arr[0]->term_id;
<?php
}
}
}
add_action('mep_event_location_postcode','mep_ev_postcode');
if (!function_exists('mep_ev_postcode')) {
function mep_ev_postcode(){
global $post,$event_meta;
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
@ -258,9 +288,11 @@ $org_id = $org_arr[0]->term_id;
<?php
}
}
}
add_action('mep_event_location_country','mep_ev_country');
if (!function_exists('mep_ev_country')) {
function mep_ev_country(){
global $post,$event_meta;
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
@ -274,8 +306,10 @@ $org_id = $org_arr[0]->term_id;
<?php
}
}
}
add_action('mep_event_address_list_sidebar','mep_event_address_list_sidebar_html');
if (!function_exists('mep_event_address_list_sidebar_html')) {
function mep_event_address_list_sidebar_html($event_id){
$location_sts = get_post_meta($event_id,'mep_org_address',true);
$org_arr = get_the_terms( $event_id, 'mep_org' ) ? get_the_terms( $event_id, 'mep_org' ) : '';
@ -304,3 +338,4 @@ function mep_event_address_list_sidebar_html($event_id){
<?php
echo ob_get_clean();
}
}

View File

@ -1,12 +1,18 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_list_shortcode', 'mep_display_event_loop_list', 10, 3);
function mep_display_event_loop_list($event_id,$columnNumber,$style){
if (!function_exists('mep_display_event_loop_list')) {
function mep_display_event_loop_list($event_id, $columnNumber, $style)
{
$now = current_time('Y-m-d H:i:s');
$show_price = mep_get_option('mep_event_price_show', 'general_setting_sec', 'yes');
$show_price_label = mep_get_option('event-price-label', 'general_setting_sec', 'Price Starts from:');
$event_meta = get_post_custom($event_id);
$author_terms = get_the_terms($event_id, 'mep_org');
$author_terms = get_the_terms($event_id, 'mep_org') ? get_the_terms($event_id, 'mep_org') : [];
$time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
$newformat = date_i18n('Y-m-d H:i:s', $time);
$tt = get_the_terms($event_id, 'mep_cat');
@ -21,10 +27,8 @@ function mep_display_event_loop_list($event_id,$columnNumber,$style){
$hide_only_end_time_list = mep_get_option('mep_event_hide_end_time_list', 'general_setting_sec', 'no');
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
ob_start();
?>
<div class='mep-event-list-loop <?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php if ($tt) { echo $org_class; } ?> <?php if ($torg) { echo $cat_class; } ?>'>
<?php do_action('mep_event_list_loop_header', $event_id); ?>
<div class="mep_list_thumb">
@ -34,11 +38,13 @@ ob_start();
<div class="mep-day"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'day'); ?></div>
<div class="mep-month"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'month'); ?></div>
</div>
<?php } if(is_array($event_multidate) && sizeof($event_multidate) >0){ ?>
<?php }
if (is_array($event_multidate) && sizeof($event_multidate) > 0) { ?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php _e('Multi Date Event', 'mage-eventpress'); ?></span>
</div>
<?php } if($event_type == 'online'){ ?>
<?php }
if ($event_type == 'online') { ?>
<div class='mep-eventtype-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_virtual_label', 'label_setting_sec') ? mep_get_option('mep_event_virtual_label', 'label_setting_sec') : _e('Virtual Event', 'mage-eventpress'); ?></span>
</div>
@ -51,11 +57,12 @@ ob_start();
<?php if ($available_seat == 0) {
do_action('mep_show_waitlist_label');
} ?>
<h3 class='mep_list_date'> <?php if ($show_price == 'yes') {
<h3 class='mep_list_date'>
<?php if ($show_price == 'yes') {
echo $show_price_label . " " . mep_event_list_price($event_id);
} ?></h3>
} ?>
</h3>
</div>
<?php
if ($style == 'list') {
?>
@ -66,19 +73,22 @@ ob_start();
<div class="mep-list-footer">
<ul>
<?php if ($hide_org_list == 'no') { ?>
<?php
if ($hide_org_list == 'no') {
if(sizeof($author_terms) > 0) {
?>
<li>
<div class="evl-ico"><i class="fa fa-university"></i></div>
<div class="evl-cc">
<h5>
<?php echo mep_get_option('mep_organized_by_text', 'label_setting_sec') ? mep_get_option('mep_organized_by_text', 'label_setting_sec') : _e('Organized By:', 'mage-eventpress'); ?>
</h5>
<h6><?php if ($author_terms) {
<h6><?php
echo $author_terms[0]->name;
} ?></h6>
?></h6>
</div>
</li>
<?php }
<?php } }
if ($event_type != 'online') {
if ($hide_location_list == 'no') { ?>
@ -92,31 +102,36 @@ ob_start();
<h6><?php mep_get_event_city($event_id); ?></h6>
</div>
</li>
<?php } }
if ($hide_time_list == 'no') { ?>
<?php }
}
if ($hide_time_list == 'no') {
if (strtotime(current_time('Y-m-d H:i')) < strtotime($event_meta['event_start_datetime'][0])) {
?>
<li>
<div class="evl-ico"><i class="fa fa-calendar"></i></div>
<div class="evl-cc">
<h5>
<?php if(sizeof($event_multidate) > 0){ echo get_mep_datetime($event_meta['event_start_datetime'][0],'date-text'); } ?>
<?php if (sizeof($event_multidate) > 0) {
echo get_mep_datetime($event_meta['event_start_datetime'][0], 'date-text');
}
?>
<?php echo mep_get_option('mep_time_text', 'label_setting_sec') ? mep_get_option('mep_time_text', 'label_setting_sec') : _e('Time:', 'mage-eventpress'); ?>
</h5>
<h6><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'time');
if ($hide_only_end_time_list == 'no') { ?> - <?php echo get_mep_datetime($event_meta['event_end_datetime'][0],'time');
} ?></h6>
if ($hide_only_end_time_list == 'no') { ?> - <?php echo get_mep_datetime($event_meta['event_end_datetime'][0], 'time'); } ?></h6>
</div>
</li>
<?php } ?>
<?php } } ?>
</ul>
</a>
<?php do_action('mep_event_list_loop_footer', $event_id); ?>
</div>
</div>
<?php do_action('mep_event_list_loop_end', $event_id); ?>
</div>
<?php
$content = ob_get_clean();
echo apply_filters('mage_event_loop_list_shortcode', $content, $event_id, $style);
}
}

View File

@ -1,10 +1,13 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This is the templates of the event minimal list shortcode
*/
add_filter('mage_event_loop_list_shortcode','mep_event_loop_minimal_style',10,3);
if (!function_exists('mep_event_loop_minimal_style')) {
function mep_event_loop_minimal_style($content, $event_id,$style){
if($style == 'minimal'){
@ -67,3 +70,4 @@ $content = ob_get_clean();
return $content;
}
}
}

View File

@ -1,9 +1,14 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This is the templates of the event native list shortcode
*/
add_filter('mage_event_loop_list_shortcode','mep_event_loop_native_style',10,3);
if (!function_exists('mep_event_loop_native_style')) {
function mep_event_loop_native_style($content, $event_id,$style){
if($style == 'native'){
@ -63,3 +68,4 @@ $content = ob_get_clean();
return $content;
}
}
}

View File

@ -1,9 +1,14 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This is the templates of the event timeline view shortcode
*/
add_filter('mage_event_loop_list_shortcode','mep_event_loop_timeline_style',10,3);
if (!function_exists('mep_event_loop_timeline_style')) {
function mep_event_loop_timeline_style($content, $event_id,$style){
if($style == 'timeline'){
@ -63,9 +68,10 @@ $content = ob_get_clean();
return $content;
}
}
}
add_action('mep_event_shortcode_js_script','mep_shortcode_timeline_js_script');
if (!function_exists('mep_shortcode_timeline_js_script')) {
function mep_shortcode_timeline_js_script($params){
$cat = $params['cat'];
$org = $params['org'];
@ -96,3 +102,4 @@ function mep_shortcode_timeline_js_script($params){
}
echo ob_get_clean();
}
}

View File

@ -1,9 +1,14 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This is the templates of the event timeline view shortcode
*/
add_filter('mage_event_loop_list_shortcode','mep_event_loop_title_style',10,3);
if (!function_exists('mep_event_loop_title_style')) {
function mep_event_loop_title_style($content, $event_id,$style){
if($style == 'title'){
@ -38,3 +43,4 @@ $content = ob_get_clean();
return $content;
}
}
}

View File

@ -1,10 +1,14 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
/**
* This Function will hooked up with the speaker action hook mep_event_speakers_list to display the Event Speaker List
*/
add_action('mep_event_speakers_list','mep_display_speaker_list');
if (!function_exists('mep_display_speaker_list')) {
function mep_display_speaker_list($event_id){
$speakers_id = get_post_meta($event_id,'mep_event_speakers_list',true) ? maybe_unserialize(get_post_meta($event_id,'mep_event_speakers_list',true)) : array();
$speaker_icon = get_post_meta($event_id,'mep_event_speaker_icon',true) ? get_post_meta($event_id,'mep_event_speaker_icon',true) : 'fa fa-microphone';
@ -26,3 +30,4 @@
echo '</ul>';
}
}
}

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_ticket_types', 'mep_ev_ticket_type');
function mep_ev_ticket_type($post_id){
if (!function_exists('mep_ev_ticket_type')) {
function mep_ev_ticket_type($post_id)
{
global $post, $product, $event_meta;
$count = 1;
ob_start();
@ -48,6 +54,7 @@ function mep_ev_ticket_type($post_id){
$("select[name='option_qty[]']").on('blur', function() {
mageErrorQty();
});
function qtyPlace(target, value) {
let minSeat = parseInt(target.attr('min'));
let maxSeat = parseInt(target.attr('max'));
@ -61,6 +68,7 @@ function mep_ev_ticket_type($post_id){
mageErrorQty();
}
function mageErrorQty() {
let total_ticket = 0;
let target = $("[name='option_qty[]']");
@ -79,3 +87,4 @@ function mep_ev_ticket_type($post_id){
</script>
<?php
}
}

View File

@ -1,4 +1,11 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10);
if (!function_exists('mep_output_add_to_cart_custom_fields')) {
function mep_output_add_to_cart_custom_fields($post_id)
{
global $post, $event_meta, $total_book;
@ -20,4 +27,4 @@ function mep_output_add_to_cart_custom_fields($post_id)
do_action('mep_after_no_seat_notice');
}
}
add_action('mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10);
}

View File

@ -1,5 +1,10 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_ticket_type_loop_list', 'mep_event_ticket_type_loop_list_html');
if (!function_exists('mep_event_ticket_type_loop_list_html')) {
function mep_event_ticket_type_loop_list_html($post_id)
{
$mep_available_seat = get_post_meta($post_id, 'mep_available_seat', true) ? get_post_meta($post_id, 'mep_available_seat', true) : 'on';
@ -94,3 +99,4 @@ function mep_event_ticket_type_loop_list_html($post_id)
$loop_list = ob_get_clean();
echo apply_filters('mep_event_ticket_type_loop', $loop_list, $post_id);
}
}

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_faq', 'mep_faq_part');
function mep_faq_part($event_id){
if (!function_exists('mep_faq_part')) {
function mep_faq_part($event_id)
{
ob_start();
$mep_event_faq = get_post_meta($event_id, 'mep_event_faq', true) ? get_post_meta($event_id, 'mep_event_faq', true) : '';
if ($mep_event_faq) {
@ -23,3 +29,4 @@ function mep_faq_part($event_id){
$content = ob_get_clean();
echo apply_filters('mage_event_faq_list', $content, $event_id);
}
}

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_map', 'mep_event_google_map');
function mep_event_google_map($event_id){
if (!function_exists('mep_event_google_map')) {
function mep_event_google_map($event_id)
{
global $post, $event_meta, $user_api;
$map_type = mep_get_option('mep_google_map_type', 'general_setting_sec', 'iframe');
@ -34,19 +40,27 @@ if($map_type=='iframe'){
</div>
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>},
center: {
lat: <?php echo $lat; ?>,
lng: <?php echo $lon; ?>
},
zoom: 17
});
marker = new google.maps.Marker({
map: map,
draggable: false,
animation: google.maps.Animation.DROP,
position: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>}
position: {
lat: <?php echo $lat; ?>,
lng: <?php echo $lon; ?>
}
});
marker.addListener('click', toggleBounce);
}
function toggleBounce() {
if (marker.getAnimation() !== null) {
marker.setAnimation(null);
@ -55,10 +69,12 @@ if($map_type=='iframe'){
}
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap"
async defer></script>
<?php } } }
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap" async defer></script>
<?php }
}
}
do_action('mep_event_after_google_map');
$content = ob_get_clean();
echo apply_filters('mage_event_google_map', $content, $event_id);
}?>
}
}

View File

@ -1,5 +1,10 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_organizer','mep_ev_org');
if (!function_exists('mep_ev_org')) {
function mep_ev_org(){
global $post,$author_terms;
ob_start();
@ -7,3 +12,4 @@ function mep_ev_org(){
$content = ob_get_clean();
echo apply_filters('mage_event_single_org_name', $content,$post->ID);
}
}

View File

@ -1,5 +1,10 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_price','mep_ev_price');
if (!function_exists('mep_ev_price')) {
function mep_ev_price(){
global $post,$event_meta;
ob_start();
@ -12,3 +17,4 @@ global $post,$event_meta;
$content = ob_get_clean();
echo apply_filters('mage_event_single_price', $content,$post->ID);
}
}

View File

@ -1,21 +1,22 @@
<?php
// mep_shortcode_add_cart_section
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_shortcode_add_cart_section', 'mep_shortcode_add_cart_section_html');
function mep_shortcode_add_cart_section_html($event){
if (!function_exists('mep_shortcode_add_cart_section_html')) {
function mep_shortcode_add_cart_section_html($event)
{
?>
<div class='mep-events-shortcode-cart-section'>
<div class='mep-events-wrapper'>
<div class='mep-default-feature-cart-sec'>
<?php mep_get_event_reg_btn($event); ?>
<?php mep_single_page_js_script($event); //do_action('mep_add_to_cart_shortcode_js',$event); ?>
<?php mep_single_page_js_script($event); //do_action('mep_add_to_cart_shortcode_js',$event);
?>
</div>
</div>
</div>
<?php
}
}

View File

@ -1,9 +1,16 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_speakers_list_shortcode_template', 'mep_shortcode_speaker_list_html');
function mep_shortcode_speaker_list_html($event_id){
if (!function_exists('mep_shortcode_speaker_list_html')) {
function mep_shortcode_speaker_list_html($event_id)
{
?>
<div class="mep-default-sidebar-speaker-list">
<?php echo mep_display_speaker_list($event_id); ?>
</div>
<?php
}
}

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_social_share', 'mep_ev_social_share');
function mep_ev_social_share(){
if (!function_exists('mep_ev_social_share')) {
function mep_ev_social_share()
{
global $post;
ob_start();
$post_id = $post->ID;
@ -12,3 +18,4 @@ global $post;
$content = ob_get_clean();
echo apply_filters('mage_event_single_social_share', $content, $post->ID);
}
}

View File

@ -1,4 +1,8 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
require_once(dirname(__FILE__) . "/thumbnail.php");
require_once(dirname(__FILE__) . "/title.php");
require_once(dirname(__FILE__) . "/organizer.php");

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_thumbnail', 'mep_thumbnail');
function mep_thumbnail(){
if (!function_exists('mep_thumbnail')) {
function mep_thumbnail()
{
global $post;
ob_start();
?>
@ -11,3 +17,4 @@ function mep_thumbnail(){
$content = ob_get_clean();
echo apply_filters('mage_event_single_thumbnail', $content, $post->ID);
}
}

View File

@ -1,5 +1,10 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_title','mep_ev_title');
if (!function_exists('mep_ev_title')) {
function mep_ev_title(){
global $post;
ob_start();
@ -9,3 +14,4 @@ function mep_ev_title(){
$content = ob_get_clean();
echo apply_filters('mage_event_single_title', $content,$post->ID);
}
}

View File

@ -1,6 +1,12 @@
<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('mep_event_seat', 'mep_ev_seat');
function mep_ev_seat(){
if (!function_exists('mep_ev_seat')) {
function mep_ev_seat()
{
global $post, $event_meta;
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
ob_start();
@ -10,12 +16,13 @@ global $post,$event_meta;
$mep_available_seat = array_key_exists('mep_available_seat', $event_meta) ? $event_meta['mep_available_seat'][0] : 'on';
if (is_array($mep_event_ticket_type) && sizeof($mep_event_ticket_type) > 0) {
$total_seat = mep_event_total_seat(get_the_id(),'total');
$total_resv = mep_event_total_seat(get_the_id(),'resv');
$total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat(get_the_id(), 'total'), get_the_id());
$total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat(get_the_id(), 'resv'), get_the_id());
$total_sold = mep_ticket_sold(get_the_id());
$total_left = $total_seat - ($total_sold + $total_resv);
?>
<h5><strong><?php echo mep_get_option('mep_total_seat_text', 'label_setting_sec') ? mep_get_option('mep_total_seat_text', 'label_setting_sec') : _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $total_seat; if($mep_available_seat=='on'){ ?> (<strong><?php echo max($total_left,0); ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
<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
}
}
@ -23,3 +30,4 @@ global $post,$event_meta;
$content = ob_get_clean();
echo apply_filters('mage_event_single_title', $content, $post->ID);
}
}

View File

@ -547,3 +547,13 @@ New Feature: You can hide Event Date & location from the cart section display
New Filter & Action hooks added
08 May 2020*
= 3.2.6 =
* Update Release:
Code Optimized & Improved
Fix Event Date issue in Event List For Multidate
Event Location modified in event list
WooCommerce Hidden Product issue fixed
New Filter hooked added in Total Seat value
24 May 2020*

View File

@ -3,21 +3,23 @@
* Plugin Name: Woocommerce Events Manager
* Plugin URI: http://mage-people.com
* Description: A Complete Event Solution for WordPress by MagePeople..
* Version: 3.2.5
* Version: 3.2.6
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress
* Domain Path: /languages/
*/
if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
if (is_plugin_active('woocommerce/woocommerce.php')) {
require_once(dirname(__FILE__) . "/inc/mep_file_include.php");
} else {
function mep_admin_notice_wc_not_active() {
function mep_admin_notice_wc_not_active()
{
$class = 'notice notice-error';
printf(
'<div class="error" style="background:red; color:#fff;"><p>%s</p></div>',