function update with the search feature

This commit is contained in:
magepeopleteam 2021-10-06 07:05:09 +00:00
parent 608de5e4ee
commit e38805683c
16 changed files with 4891 additions and 4399 deletions

182
css/filter_pagination.css Normal file
View File

@ -0,0 +1,182 @@
div.list_with_filter_section {margin: 0 0 20px 0;}
div.list_with_filter_section div.all_filter_item{display: none;}
div.item_bg_image {
background-size: cover;
background-position: center center;
height: 100%;
-webkit-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
div.item_bg_image:hover {
transform: scale(1.1);
-webkit-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
/****************************************/
div.search_result_empty {
display: none;font-weight: 500;
font-size: 22px;
color: #6B003E;
}
div.search_sort_code {position: relative; width: 100%;}
div.search_sort_code .filter_input_area .formControl {border: none;border-radius: 0;height: 100%;}
div.search_sort_code span.fa {margin: 0 7px 0 0;font-size: 12px;}
div.filter_input_area {position: relative;width: 100%;height: 50%;margin: 0 auto;border: 4px solid #DDD;}
div.filter_input_area:first-child {border-bottom-width: 2px;}
div.filter_input_area:last-child {border-top-width: 2px;}
div.filter_input_area > * {border-right: 4px solid #DDD;}
div.filter_input_area > *:last-child {border-right: none;}
/****************************************/
div.spinner_loading {position: absolute;z-index: 1111;left: 0;right: 0;top: 0;bottom: 0;background-color: #FFFD;}
div.spinner_loading > div {height: 100%;}
div.icon_loader {
display: flex !important;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
font-size: 40px;
z-index: 11111;
position: relative;
}
div.icon_loader_xs {
display: flex !important;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
font-size: 20px;
z-index: 11111;
position: relative
}
.pagination_area .ellipse_left,
.pagination_area .ellipse_right {
min-width: 50px;background-color: #FFF;
}
.pagination_area .ellipse_left > div,
.pagination_area .ellipse_right > div {
width: 100%;height: 100%;
display: -webkit-flex;display: flex;
-webkit-justify-content: center;justify-content: center;
-webkit-align-items: center;align-items: center;
}
.pagination_area [class*="Button"] {
padding: 0 15px;
font-size: 18px;
cursor: pointer;
min-width: 150px;
height: auto;
min-height: 40px;
-webkit-appearance: button;
overflow: visible;
display: -webkit-flex;display: flex;
-webkit-justify-content: center;justify-content: center;
-webkit-align-items: center;align-items: center;
border-radius: 5px;
font-weight: 500;
}
.pagination_area [class*="Button"]:hover{opacity: 0.8;}
.pagination_area button.pagination_load_more {border:none;}
.pagination_area button[class*="defaultButton_xs"] {
min-width: 50px;
padding: 0;
}
.pagination_area button[class*="defaultButton_xs"]:first-child {border: none;}
.pagination_area button[class*="defaultButton_xs"]:last-child {border-radius: 0 5px 5px 0;}
.pagination_area button[class*="defaultButton_xs"].active_pagination {
color: #000;
background-color: #DDD;
}
.pagination_area .ellipse_left {display: none;}
.pagination_area button[disabled] {cursor: not-allowed;opacity: 0.8;background-color: #DDD;}
/****************************************/
.list_with_filter_section div.buttonGroup [class*="Button"] {
border: none;
border-left: 2px solid #DDD;
border-radius: 0;
}
.list_with_filter_section div.buttonGroup {
position: relative;
border: 0;
border-radius: 5px;
}
div.buttonGroup [class*="Button"]:first-child {
-webkit-border-radius: 5px 0 0 5px;
border-radius: 5px 0 0 5px;
border-left: none;
}
.list_with_filter_section .flexEqual {display: -webkit-flex;display: flex;}
div.buttonGroup > *,
.list_with_filter_section .flexEqual > * {
-webkit-flex: 1;-ms-flex: 1;flex: 1;
}
.list_with_filter_section .circleIcon_xs {
width: 25px;height: 25px;min-width: 25px;
background-color: #FF5959;
color: #FFF;
display: -webkit-flex;display: flex;
-webkit-justify-content: center;justify-content: center;
-webkit-align-items: center;align-items: center;
}
.list_with_filter_section .sort_code_search_box {
display: -webkit-flex;
display: flex;
border: 1px solid #DDD;
-webkit-flex-direction: column;
flex-direction: column;
padding: 5px;
}
.list_with_filter_section .sort_code_search_box label {display: block; margin: 0;}
.list_with_filter_section [class*="defaultButton"] { color: #FFF;}
.list_with_filter_section [class*="defaultButton_xs"] {min-width: auto;padding: 7px;font-size: 16px;}
.list_with_filter_section .search_sort_code_area {margin: 15px 0;}
.list_with_filter_section .formControl {
display: -webkit-flex;display: flex;
-webkit-align-items: center;align-items: center;
-webkit-flex-wrap: nowrap;flex-wrap: nowrap;
width: 100%;
font-size: 14px;
min-width: auto;max-width: inherit;
padding: 7px;
margin: 0;
color: #555;
line-height: 1.25;
background: rgba(255, 255, 255, .99);
border-radius: 2px;
box-shadow: 0 4px 8px rgba(0, 0, 0, .1) inset;
border: 1px solid #CCC !important;
height: 40px !important;
}
.list_with_filter_section .formControl:-webkit-autofill,
.list_with_filter_section .formControl:-webkit-autofill:hover,
.list_with_filter_section .formControl:-webkit-autofill:focus,
.list_with_filter_section .formControl:-webkit-autofill:active {
-webkit-transition: color 9999s ease-out, background-color 9999s ease-out;
transition: color 9999s ease-out, background-color 9999s ease-out;
-webkit-transition-delay: 9999s;
transition-delay: 9999s;
}
.list_with_filter_section .alignCenter {
display: -webkit-flex;display: flex;
-webkit-align-items: center;align-items: center;
-webkit-flex-wrap: nowrap;flex-wrap: nowrap;
}
.list_with_filter_section .allCenter {
display: -webkit-flex !important;
display: flex !important;
-webkit-justify-content: flex-start;
justify-content: flex-start;
-webkit-align-items: center;
align-items: center;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
.list_with_filter_section label{position: relative;}
.list_with_filter_section span.filter_date_icon{position: absolute;top: 0;right: 0; padding: 7px 5px; bottom: 0; margin: 5px; color: #ddd;cursor:pointer;}

View File

@ -171,6 +171,28 @@ span.mep_warning {
.mep_google_map {
height: 300px;
}
.button.button-default.woocommerce.button.alt.button.alt.btn-mep-event-cart {
background: #ff5959;
border: 1px solid #ff5959;
line-height: 0;
font-weight: 500;
height: auto;
min-width: auto;
outline: 0;
padding: 20px 30px;
color: #fff6f6;
margin: 10px auto;
display: block;
text-align: center;
font-size: 16px;
cursor: pointer;
}
ul#mep_event_date_sch li span {
display: inline;
font-size: 13px;
}
span.mep-more-date i {margin: 0;}
/******table*******/
.mep-events-wrapper table {width: 100%;table-layout: fixed;margin: 0 0 15px 0;}
.mep-events-wrapper table td {text-align:left;border-bottom: 1px dotted #f0f0f0;padding: 10px;vertical-align: middle;font-size: 16px;font-weight: 500;}
@ -479,8 +501,10 @@ div.mep_event_native_list {
.mep_event_native_list .mep_list_thumb {
width: 90px;
}
.mep_event_native_list .mep_list_thumb .mep_bg_thumb{height: 45px;}
.mep_list_thumb a{
height: 100%;
}
.mep_event_native_list .mep-list-header::before {
border-left: 2px solid;
}
@ -835,8 +859,6 @@ div.column_style{
}
div.column_style .mep_list_thumb img{height:160px;}
ul.mp_event_more_date_list,
.mp_event_hide_event_time{display:none;}
ul.mp_event_more_date_list{
position: absolute;
@ -856,19 +878,12 @@ ul.mp_event_more_date_list li{
display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items: flex-start;align-items: flex-start;
border-bottom:1px solid #0009;
}
ul.mp_event_more_date_list li span{
ul.mp_event_more_date_list li span,
span.mep-more-date,
span.mep-more-time{
display:-webkit-flex;display:flex;-webkit-align-items: center;align-items: center;
margin:5px 0;padding:0;
}
span.mep_date_scdl_start_datetime, span.mep_date_scdl_end_datetime {
font-weight: normal;
font-size: 13px;
}
span.mep_date_scdl_separator {
font-weight: bold;
font-size: 16px;
}
ul.mp_event_more_date_list li span i,
span.mep-more-date i,
span.mep-more-time i{margin:0 7px 0 0;padding:0;}
@ -1071,7 +1086,7 @@ CSS by Ariful
padding-top: 10px;
padding-bottom: 10px;
font-weight: 600;
display: grid;
display: grid !important;
}
.mep-multidate-ribbon span{
width: 90px;
@ -1140,6 +1155,7 @@ h3.mep_list_date{
transition-property: color;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
min-width: 150px;
}
.mep_more_date_btn:before {
content: "";
@ -1173,6 +1189,8 @@ h3.mep_list_date{
.mep_list_thumb{
overflow: hidden;
}
.mep_bg_thumb{
background-size: cover;
background-position: center center;
@ -1942,11 +1960,11 @@ Vanilla theme css by ariful
width:100%
}
.vanilla_theme .mep-default-feature-content{
margin-top: 20px;
margin-bottom: 20px;
margin-top: 20px;
margin-bottom: 20px;
}
.vanilla_theme .mep-default-sidrbar-map h3, .vanilla_theme .mep-default-sidrbar-events-schedule h3,.vanilla_theme h4.mep-cart-table-title {
margin: 00px 0 20px 0;
margin: 00px 0 20px 0;
font-size: 14px;
font-weight: 500;
text-transform: uppercase;
@ -1966,15 +1984,12 @@ font-size: 14px;
padding: 5px;
}
.vanilla_theme h3.ex-sec-title{
font-size: 14px;
font-size: 14px;
background: #fbd03b;
color: #17113A;
font-weight:500;
text-transform: uppercase;
}
ul#mep_event_date_sch li span {
display: inline-block;
}
.vanilla_theme table td,
.vanilla_theme table td.total-col{
font-size: 14px;
@ -2020,7 +2035,7 @@ background-color: #fbfbfb;
font-weight: 500;
color: #000000;
text-transform: uppercase;
font-size: 14px;
font-size: 14px;
}
.vanilla_theme .mep-default-sidrbar-meta .fa-list-alt{
font-size:14px;
@ -2041,7 +2056,7 @@ background-color: #fbfbfb;
.vanilla_theme .mep-share-btn-title{
display: inline-block;
margin-right: 15px;
font-weight: 500;
font-weight: 500;
}
.vanilla_theme .mep-default-sidrbar-social .mep-event-meta {
text-align: left;
@ -2057,7 +2072,7 @@ background-color: #fbfbfb;
border-bottom: 1px solid #f5f5f5;
}
.vanilla_theme ul.mep-social-share a{
font-size: 14px;
font-size: 14px;
width: 30px;
height: 30px;
border-radius: 0;

View File

@ -73,6 +73,7 @@ function mep_event_enqueue_scripts()
wp_enqueue_script('jquery-ui-accordion');
wp_enqueue_style('mep-jquery-ui-style', plugin_dir_url(__DIR__) . 'css/jquery-ui.css', array());
wp_enqueue_style('mep-event-style', plugin_dir_url(__DIR__) . 'css/style.css', array());
wp_enqueue_style('filter_pagination', plugin_dir_url(__DIR__) . 'css/filter_pagination.css', array());
wp_enqueue_style('mep-event-timeline-min-style', plugin_dir_url(__DIR__) . 'css/timeline.min.css', array('mep-event-style'));
wp_enqueue_style('font-awesome-css-cdn', "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css", null, 1);
wp_enqueue_style('font-awesome-css-cdn-5.2.0', "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.2.0/css/all.min.css", null, 1);
@ -81,7 +82,9 @@ function mep_event_enqueue_scripts()
wp_enqueue_script('mep-calendar-scripts', plugin_dir_url(__DIR__) . 'js/calendar.min.js', array('jquery', 'mep-moment-js'), 1, false);
wp_enqueue_script('mep-mixitup-min-js', plugin_dir_url(__DIR__) . 'js/mixitup.min.js', array(), 1, true);
wp_enqueue_script('mep-countdown-js', plugin_dir_url(__DIR__) . 'js/countdown.jquery.min.js', array(), 1, true);
//wp_enqueue_script('mep-lazysizes', plugin_dir_url(__DIR__) . 'js/lazysizes.min.js', array(), 1, true);
wp_enqueue_script('filter_pagination', plugin_dir_url(__DIR__) . 'js/filter_pagination.js', array(), time(), true);
wp_enqueue_script('mp_event_custom_script', plugin_dir_url(__DIR__) . 'js/mp_event_custom_script.js', array(), 1.1, true);

View File

@ -316,7 +316,7 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
if($recurring == 'everyday' && $time_status == 'no'){
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
foreach ($ticket_type_arr as $_event_recurring_date) {
$item->add_meta_data($date_text, get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'));
$item->add_meta_data($date_text, get_mep_datetime($_event_recurring_date['event_date'].' '.$start_time, 'date-time-text'));
}
}
}elseif ($recurring == 'yes') {
@ -354,6 +354,10 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
}
}
if (is_array($event_extra_service) && sizeof($event_extra_service) > 0) {
foreach ($event_extra_service as $extra_service) {
$service_type_name = $extra_service['service_name'] . " - " . wc_price(mep_get_price_including_tax($eid,$extra_service['service_price'])) . ' x ' . $extra_service['service_qty'] . ' = ';

File diff suppressed because it is too large Load Diff

View File

@ -94,6 +94,7 @@ function mep_event_list($atts, $content = null)
"org-filter" => "no",
"show" => "-1",
"pagination" => "no",
"pagination-style" => "load_more",
"city" => "",
"country" => "",
"carousal-nav" => "no",
@ -101,7 +102,13 @@ function mep_event_list($atts, $content = null)
"carousal-id" => "102448",
"timeline-mode" => "vertical",
'sort' => 'ASC',
'status' => 'upcoming'
'status' => 'upcoming',
'search-filter' => '',
'title-filter' => 'yes',
'category-filter' => 'yes',
'organizer-filter' => 'yes',
'city-filter' => 'yes',
'date-filter' => 'yes'
);
$params = shortcode_atts($defaults, $atts);
$cat = $params['cat'];
@ -119,6 +126,10 @@ function mep_event_list($atts, $content = null)
$country = $params['country'];
$cid = $params['carousal-id'];
$status = $params['status'];
$filter = $params['search-filter'];
$show = ($filter == 'yes' || $pagination == 'yes' && $style != 'timeline') ? -1 : $show;
$main_div = $pagination == 'carousal' ? '<div class="mage_grid_box owl-theme owl-carousel" id="mep-carousel' . $cid . '">' : '<div class="mage_grid_box">';
$time_line_div_start = $style == 'timeline' ? '<div class="timeline"><div class="timeline__wrap"><div class="timeline__items">' : '';
@ -129,8 +140,12 @@ function mep_event_list($atts, $content = null)
$event_expire_on = mep_get_option('mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
$unq_id = 'abr'.uniqid();
ob_start();
/**
* The Main Query function mep_event_query is locet in inc/mep_query.php File
*/
$loop = mep_event_query($show, $sort, $cat, $org, $city, $country, $status);
?>
<div class='mep_event_list'>
<div class='list_with_filter_section mep_event_list'>
<?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
@ -142,15 +157,15 @@ function mep_event_list($atts, $content = null)
* This is the hook where Organization filter lists are fired from inc/template-parts/event_list_tax_name_list.php File
*/
do_action('mep_event_list_org_names',$org,$unq_id);
} ?>
}
if ($filter == 'yes' && $style != 'timeline') {
do_action('mpwem_list_with_filter_section', $loop, $params);
}
?>
<div class="mep_event_list_sec" id='mep_event_list_<?php echo $unq_id; ?>'>
<div class="all_filter_item mep_event_list_sec" id='mep_event_list_<?php echo $unq_id; ?>'>
<?php
/**
* The Main Query function mep_event_query is locet in inc/mep_query.php File
*/
$loop = mep_event_query($show, $sort, $cat, $org, $city, $country, $status);
$total_post = $loop->post_count;
$total_item = $loop->post_count;
echo $main_div;
echo $time_line_div_start;
while ($loop->have_posts()) {
@ -170,22 +185,16 @@ function mep_event_list($atts, $content = null)
/**
* This is the hook where Event Loop List fired from inc/template-parts/event_loop_list.php File
*/
do_action('mep_event_list_shortcode', get_the_id(), $columnNumber, $style,$width,$unq_id);
}
wp_reset_postdata();
echo $time_line_div_end;
if ($pagination == 'yes') {
/**
* The Pagination function mep_event_pagination is locet in inc/mep_query.php File
*/
mep_event_pagination($loop->max_num_pages);
} ?>
?>
</div>
</div>
<?php
do_action('mpwem_pagination',$params,$total_item);
?>
</div>
<script>
jQuery(document).ready(function() {
@ -543,168 +552,3 @@ function mep_event_onepage_list($atts, $content = null)
$content = ob_get_clean();
return $content;
}
add_shortcode('event-list-search', 'mep_event_list_search');
function mep_event_list_search($attribute, $content = null){
$defaults = array(
'result-style' => '',
'event-style' => 'list',
'category-filter' => 'yes',
'organizer-filter' => 'yes',
'city-filter' => 'yes',
'date-filter' => 'yes',
);
$parameter = shortcode_atts($defaults, $attribute);
$search_result_style = $parameter['result-style'];
$search_result_class = ($search_result_style == 'popup') ? 'search_result_dropdown' : '';
$category_filter = $parameter['category-filter'] == 'yes' || '';
$organizer_filter = $parameter['organizer-filter'] == 'yes' || '';
$city_filter = $parameter['city-filter'] == 'yes' || '';
$date_filter = $parameter['date-filter'] == 'yes' || '';
ob_start();
$args = array(
'post_type' => 'mep_events',
'posts_per_page' => -1
);
$loop = new WP_Query($args);
?>
<div class="demo_search_short_code">
<div class="search_sort_code_area">
<div class="search_sort_code <?php echo $search_result_class; ?>">
<div class="sort_code_search_box defaultLayout_xs">
<div class="flexEqual mp_event_search_box">
<?php
$category_lists = MPWEM_Helper::get_all_taxonomy('mep_cat');
if ($category_filter && $category_lists && sizeof($category_lists) > 0) {
?>
<label>
<select class="formControl" name="search_with_category">
<option selected value=""><?php _e('Select Category', 'mage-eventpress'); ?></option>
<?php
foreach ($category_lists as $category) {
?>
<option value="<?php echo $category; ?>"><?php echo $category; ?></option>
<?php
}
?>
</select>
</label>
<?php } ?>
<?php
$organizer_lists = MPWEM_Helper::get_all_taxonomy('mep_org');
if ($organizer_filter && $organizer_lists && sizeof($organizer_lists) > 0) {
?>
<label>
<select class="formControl" name="search_with_organizer">
<option selected value=""><?php _e('Select Organizer', 'mage-eventpress'); ?></option>
<?php
foreach ($organizer_lists as $organizer) {
?>
<option value="<?php echo $organizer; ?>"><?php echo $organizer; ?></option>
<?php
}
?>
</select>
</label>
<?php } ?>
<?php
$city_lists = MPWEM_Helper::get_all_city();
if ($city_filter && $city_lists && sizeof($city_lists) > 0) {
?>
<label>
<select class="formControl" name="search_with_city">
<option selected value=""><?php _e('Select City', 'mage-eventpress'); ?></option>
<?php
foreach ($city_lists as $city) {
?>
<option value="<?php echo $city; ?>"><?php echo $city; ?></option>
<?php
}
?>
</select>
</label>
<?php } ?>
<?php if ($date_filter) { ?>
<label>
<input type="date" class="formControl search_with_start_date" value='' placeholder="<?php _e('Start date', 'mage-eventpress'); ?>"/>
</label>
<label>
<input type="date" class="formControl search_with_end_date" value='' placeholder="<?php _e('End date', 'mage-eventpress'); ?>"/>
</label>
<?php } ?>
</div>
<div class="mp_event_search_box">
<label>
<input name="mp_event_title" placeholder="<?php _e('Type Event Name here ....', 'mage-eventpress'); ?>" class="formControl mp_event_search"/>
</label>
</div>
</div>
<div class="all_event_list <?php echo MPWEM_Helper::search_short_code_style_class($parameter['event-style']); ?>">
<?php
foreach ($loop->posts as $post) {
$event_id = $post->ID;
$event_meta = get_post_custom($event_id);
$time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
$date = date_i18n('Y-m-d H:i:s', $time);
//$date = MPWEM_Date::event_date($event_id);
if ($date) {
$taxonomy_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
?>
<div
class="event_item"
data-event-id="<?php echo $event_id; ?>"
data-event-title="<?php echo get_the_title($event_id); ?>"
data-date-time="<?php echo get_mep_datetime($date, 'date'); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
>
<div class="event_item_img">
<?php mep_get_list_thumbnail($event_id); ?>
</div>
<div class="event_item_details">
<a href="<?php echo get_the_permalink($event_id); ?>">
<h6><?php echo get_the_title($event_id); ?></h6>
</a>
<div class="alignCenter mt_xs">
<span class="fa fa-calendar circleIcon_xs"></span>
<span><?php echo get_mep_datetime($date, 'date-time'); ?></span>
</div>
<div class="alignCenter mt_xs">
<span class="fa fa-location-arrow circleIcon_xs"></span>
<span><?php echo MPWEM_Helper::get_event_location($event_id); ?></span>
</div>
<a class="defaultButton_xs deails_view" href="<?php echo get_the_permalink($event_id); ?>" target="_blank">
<span><?php _e('Details View', 'mage-eventpress'); ?></span>
</a>
</div>
<?php
$day = get_mep_datetime($date, 'day');
$month = get_mep_datetime($date, 'month-name');
?>
<div class="item_date">
<h4><?php echo apply_filters('mep_event_list_only_day_number', $day, $event_id); ?></h4>
<hr/>
<h4><?php echo apply_filters('mep_event_list_only_month_name', $month, $event_id); ?></h4>
</div>
</div>
<?php
}
}
wp_reset_postdata();
?>
</div>
<div class="search_result_empty"><?php _e('No Match Event Found!', 'mage-eventpress') ?></div>
</div>
</div>
</div>
<?php
return ob_get_clean();
}

View File

@ -19,6 +19,8 @@ function mep_user_custom_styles()
?>
<style>
.pagination_area button[class*="defaultButton_xs"],
.list_with_filter_section [class*="defaultButton"],
div.item_hover_effect a{
background-color:<?php echo $base_color; ?>;
}
@ -77,7 +79,7 @@ function mep_user_custom_styles()
}
/*Cart Button Style*/
.mep-default-feature-cart-sec button.single_add_to_cart_button.button.alt.btn-mep-event-cart, .mep-event-theme-1 .btn-mep-event-cart, .mep-template-2-hamza .btn-mep-event-cart, .mep-tem3-mid-sec .btn-mep-event-cart {
.mep-default-feature-cart-sec button.single_add_to_cart_button.button.alt.btn-mep-event-cart, .mep-event-theme-1 .btn-mep-event-cart, .mep-template-2-hamza .btn-mep-event-cart, .mep-tem3-mid-sec .btn-mep-event-cart, .button.button-default.woocommerce.button.alt.button.alt.btn-mep-event-cart {
background: <?php echo $cart_btn_bg_color; ?>;
color: <?php echo $cart_btn_txt_color; ?> !important;
border-color: <?php echo $cart_btn_bg_color; ?>;

View File

@ -159,11 +159,11 @@ if (!function_exists('mep_get_event_reg_btn')) {
<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'); ?>">
<?php if($not_in_the_cart){ ?>
<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 echo $cart_btn_label; ?></button>
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="button-default woocommerce button alt button alt btn-mep-event-cart"><?php echo $cart_btn_label; ?></button>
<?php }else{
?>
<button onclick="location.href='<?php echo wc_get_cart_url(); ?>';" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e('Already Added into Cart! View Cart', 'mage-eventpress'); ?> </button>
?>
<!-- <button onclick="location.href='<?php echo wc_get_cart_url(); ?>';" class="button-default woocommerce button alt button alt btn-mep-event-cart"><?php _e('Already Added into Cart! View Cart', 'mage-eventpress'); ?> </button> -->
<a href="<?php echo wc_get_cart_url(); ?>" class="button-default woocommerce button alt button alt btn-mep-event-cart"><?php _e('Already Added into Cart! View Cart', 'mage-eventpress'); ?> </a>
<?php
} ?>
<?php do_action('mep_after_add_cart_btn',$post_id); ?>
@ -331,9 +331,9 @@ if (!function_exists('mep_get_event_reg_btn_list')) {
<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'); ?>">
<?php if($not_in_the_cart){ ?>
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id, 'mep_cart_btn_text', 'Register This Event'), 'mage-eventpress'); ?></button>
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="button-default woocommerce button alt button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id, 'mep_cart_btn_text', 'Register This Event'), 'mage-eventpress'); ?></button>
<?php }else{ ?>
<a href="<?php echo wc_get_cart_url(); ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e('Already Added into Cart!', 'mage-eventpress'); ?> </a>
<a href="<?php echo wc_get_cart_url(); ?>" class="button-default woocommerce button alt button alt btn-mep-event-cart"><?php _e('Already Added into Cart!', 'mage-eventpress'); ?> </a>
<?php } ?>
</td>
</tr>

333
js/filter_pagination.js Normal file
View File

@ -0,0 +1,333 @@
function mpwem_add_loader(target) {
target.css('position', 'relative');
target.append('<div class="spinner_loading"><div class="icon_loader"><span class="fas fa-spinner fa-pulse"></span></div></div>');
}
function mpwem_add_loader_xs(target) {
target.css('position', 'relative');
target.append('<div class="spinner_loading"><div class="icon_loader_xs"><span class="fas fa-spinner fa-pulse"></span></div></div>');
}
function mpwem_remove_loader(target) {
target.children('.spinner_loading').remove();
}
function mpwem_page_scroll_to(target) {
jQuery('html, body').animate({
scrollTop: target.offset().top -= 100
}, 1000);
}
(function ($) {
"use strict";
let bg_image_load = false;
load_pagination_initial_item();
$(".filter_datepicker").datepicker({ dateFormat: "mm/dd/yy" });
$(document).ready(function () {
$(window).on('load', function () {
load_bg_img();
bg_image_load = true;
});
if (!bg_image_load) {
$(document).scroll(function () {
load_bg_img();
bg_image_load = true;
});
}
});
let filter_input_list = {
title_filter: 'data-title',
filter_with_city: 'data-city-name',
filter_with_category: 'data-category',
filter_with_organizer: 'data-organizer'
};
for (let name in filter_input_list) {
$(document).on('change keyup', '[name="' + name + '"] ', function (e) {
e.preventDefault();
load_filter($(this));
});
}
$(document).on('change', '.search_with_start_date , .search_with_end_date', function () {
load_filter($(this));
});
function load_filter(target) {
let parent = target.closest('.list_with_filter_section');
let result = 0;
if (check_search_value_exit(parent)) {
let date_check = date_filter_check(parent);
parent.find('.all_filter_item .filter_item').each(function () {
let active = 1;
for (let name in filter_input_list) {
if (single_text_check(parent, name) && active > 0) {
active = single_text_search(parent, $(this), name);
}
}
if (date_check && active > 0) {
active = date_search(parent, $(this));
}
if (active > 1) {
result++;
$(this).addClass('search_on').removeClass('search_of');
} else {
$(this).addClass('search_of').removeClass('search_on');
}
}).promise().done(function () {
if (result > 0) {
parent.find('.all_filter_item').slideDown('fast');
parent.find('.search_result_empty').slideUp('fast');
} else {
parent.find('.all_filter_item').slideUp('fast');
parent.find('.search_result_empty').slideDown('fast');
}
}).promise().done(function () {
load_pagination(parent, 0);
});
} else {
parent.find('.all_filter_item').slideDown('fast');
parent.find('.all_filter_item .filter_item').each(function () {
$(this).removeClass('search_of').removeClass('search_on');
}).promise().done(function () {
load_pagination(parent, 0);
});
parent.find('.search_result_empty').slideUp('fast');
}
}
function date_convert_to_str(date) {
date = new Date(date).getTime();
if (date && date !== 'NaN') {
return date;
} else {
return 0;
}
}
function single_text_check(parent, inputName) {
let inputText = parent.find('[name="' + inputName + '"]').val();
return (inputText && inputText.length > 0) ? 1 : false;
}
function single_text_search(parent, item, inputName) {
let target = parent.find('[name="' + inputName + '"]');
let inputText = target.val();
let currentValue = item.attr(filter_input_list[inputName]);
return (currentValue && currentValue.match(new RegExp(inputText, "i"))) ? 2 : 0;
}
function date_filter_check(parent) {
let start_date = date_convert_to_str(parent.find('.search_with_start_date').val());
let end_date = date_convert_to_str(parent.find('.search_with_end_date').val());
return (start_date > 0 && end_date > 0) ? 1 : false;
}
function date_search(parent, target) {
let start_date = date_convert_to_str(parent.find('.search_with_start_date').val());
let end_date = date_convert_to_str(parent.find('.search_with_end_date').val());
let date = date_convert_to_str(target.attr('data-date'));
return (date > start_date && end_date > date) ? 2 : 0;
}
function check_search_value_exit(parent) {
let date_result = date_filter_check(parent);
let active = 0;
for (let name in filter_input_list) {
if (single_text_check(parent, name)) {
active = 1;
}
}
return (date_result || active > 0) ? 1 : false;
}
function load_bg_img() {
$('.filter_item:visible').each(function () {
let target = $(this);
if (target.find('[data-bg-image]').css('background-image') === 'none') {
target.find('[data-bg-image]').css('background-image', 'url("' + target.find('[data-bg-image]').data('bg-image') + '")').promise().done(function () {
mpwem_remove_loader($(this));
});
}
});
return true;
}
//************Pagination*************//
$(document).on('click', '.pagination_area [data-pagination]', function (e) {
e.preventDefault();
let pagination_page = $(this).data('pagination');
let parent = $(this).closest('.list_with_filter_section');
parent.find('[data-pagination]').removeClass('active_pagination');
$(this).addClass('active_pagination').promise().done(function () {
load_pagination(parent, pagination_page);
}).promise().done(function () {
load_bg_img();
});
});
$(document).on('click', '.pagination_area .page_prev', function (e) {
e.preventDefault();
let parent = $(this).closest('.pagination_area');
let page_no = parseInt(parent.find('.active_pagination').data('pagination')) - 1;
parent.find('[data-pagination="' + page_no + '"]').trigger('click');
});
$(document).on('click', '.pagination_area .page_next', function (e) {
e.preventDefault();
let parent = $(this).closest('.pagination_area');
let page_no = parseInt(parent.find('.active_pagination').data('pagination')) + 1;
parent.find('[data-pagination="' + page_no + '"]').trigger('click');
});
$(document).on('click', '.pagination_area .pagination_load_more', function () {
let pagination_page = parseInt($(this).attr('data-load-more'));
let parent = $(this).closest('.list_with_filter_section');
let item_class = get_item_class(parent);
if (parent.find(item_class + ':hidden').size() > 0) {
pagination_page = pagination_page + 1;
} else {
pagination_page = 0;
}
$(this).attr('data-load-more', pagination_page).promise().done(function () {
load_pagination(parent, pagination_page);
}).promise().done(function () {
if (parent.find(item_class + ':hidden').length === 0) {
$(this).attr('disabled', 'disabled');
}
}).promise().done(function () {
load_bg_img();
});
});
function load_more_scroll(parent, pagination_page) {
let per_page_item = parseInt(parent.find('input[name="pagination_per_page"]').val());
let start_item = pagination_page > 0 ? pagination_page * per_page_item : 0;
let item_class = get_item_class(parent);
let target = parent.find(item_class + ':nth-child(' + (start_item + 1) + ')');
mpwem_page_scroll_to(target);
}
function load_pagination_initial_item() {
$('.list_with_filter_section').each(function () {
mpwem_add_loader($(this));
$(this).find('[data-bg-image]').each(function () {
mpwem_add_loader($(this));
});
load_pagination($(this), 0);
}).promise().done(function () {
$('.list_with_filter_section').each(function () {
mpwem_remove_loader($(this));
$(this).find('.all_filter_item').slideDown('slow');
});
});
}
function load_pagination(parent, pagination_page) {
let all_item = parent.find('.all_filter_item');
let per_page_item = parseInt(parent.find('input[name="pagination_per_page"]').val());
let pagination_type = parent.find('input[name="pagination_style"]').val();
let start_item = pagination_page > 0 ? pagination_page * per_page_item : 0;
let end_item = pagination_page > 0 ? start_item + per_page_item : per_page_item;
let item = 0;
let items_class = get_item_class(parent);
if (pagination_type === 'load_more') {
start_item = 0;
} else {
let all_item_height = all_item.outerHeight();
all_item.css({"height": all_item_height, "overflow": "hidden"});
mpwem_add_loader(all_item);
}
parent.find(items_class).each(function () {
if (item >= start_item && item < end_item) {
if ($(this).is(':hidden')) {
$(this).slideDown(200);
}
} else {
$(this).slideUp('fast');
}
item++;
}).promise().done(function () {
all_item.css({"height": "auto", "overflow": "inherit"}).promise().done(function () {
filter_qty_palace(parent, items_class);
pagination_management(parent, pagination_page);
mpwem_remove_loader(all_item);
});
});
}
function pagination_management(parent, pagination_page) {
let pagination_type = parent.find('input[name="pagination_style"]').val();
let per_page_item = parseInt(parent.find('input[name="pagination_per_page"]').val());
let total_item = parent.find(get_item_class(parent)).length;
if (total_item <= per_page_item) {
parent.find('.pagination_area').slideUp(200);
} else {
parent.find('.pagination_area').slideDown(200);
if (pagination_type === 'load_more') {
parent.find('[data-load-more]').attr('data-load-more', pagination_page)
} else {
pagination_page_management(parent, pagination_page);
}
}
}
function pagination_page_management(parent, pagination_page) {
let per_page_item = parseInt(parent.find('input[name="pagination_per_page"]').val());
let total_item = parent.find(get_item_class(parent)).length;
let total_active_page = (total_item / per_page_item) + ((total_item % per_page_item) > 0 ? 1 : 0);
let page_limit_start = (pagination_page > 2) ? (pagination_page - 2) : 0;
let page_limit_end = (pagination_page > 2) ? (pagination_page + 2) : 4;
let limit_dif = total_active_page - pagination_page;
if (total_active_page > 5 && limit_dif < 3) {
page_limit_start = page_limit_start - ((limit_dif > 1) ? 1 : 2);
}
let total_page = parent.find('[data-pagination]').length;
for (let i = 0; i < total_page; i++) {
if (i < total_active_page && i >= page_limit_start && i <= page_limit_end) {
parent.find('[data-pagination="' + i + '"]').slideDown(200);
} else {
parent.find('[data-pagination="' + i + '"]').slideUp(200);
}
}
if (pagination_page > 0) {
parent.find('.page_prev').removeAttr('disabled');
} else {
parent.find('.page_prev').prop('disabled', true);
}
if (pagination_page > 2 && total_active_page > 5) {
parent.find('.ellipse_left').slideDown(200);
} else {
parent.find('.ellipse_left').slideUp(200);
}
if (pagination_page < total_active_page - 3 && total_active_page > 5) {
parent.find('.ellipse_right').slideDown(200);
} else {
parent.find('.ellipse_right').slideUp(200);
}
if (pagination_page < total_active_page - 1) {
parent.find('.page_next').removeAttr('disabled');
} else {
parent.find('.page_next').prop('disabled', true);
}
}
function get_item_class(parent, items = '.filter_item') {
if (parent.find('.filter_item.search_on').length > 0 || parent.find('.filter_item.search_of').length > 0) {
items = '.filter_item.search_on';
parent.find('.filter_item.search_of').slideUp('fast');
}
return items;
}
function filter_qty_palace(parent, item_class) {
parent.find('.qty_count').html($(parent).find(item_class + ':visible').length);
parent.find('.total_filter_qty').html($(parent).find(item_class).length);
}
}(jQuery));

3
js/lazysizes.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -26,124 +26,45 @@ function mp_event_wo_commerce_price_format(price) {
}
(function ($) {
//added by sumon
$(document).on('click', '.mp_event_visible_event_time', function (e) {
$(document).on('click', '.mep-event-list-loop .mp_event_visible_event_time', function (e) {
e.preventDefault();
let target=$(this);
$('.mp_event_more_date_list:visible').each(function (index){
$(this).slideUp('fast').siblings('.mp_event_visible_event_time').slideDown('slow').siblings('.mp_event_hide_event_time').slideUp('slow');
}).promise().done(function (){
target.slideUp('fast').siblings('.mp_event_more_date_list , .mp_event_hide_event_time').slideDown('slow');
});
});
$(document).on('click', '.mp_event_hide_event_time', function (e) {
e.preventDefault();
$('.mp_event_more_date_list:visible').each(function (index){
$(this).slideUp('fast').siblings('.mp_event_visible_event_time').slideDown('slow').siblings('.mp_event_hide_event_time').slideUp('slow');
let target = $(this);
$('.mep-event-list-loop .mp_event_visible_event_time').each(function () {
let current=$(this).siblings('ul.mp_event_more_date_list');
if(current.is(':visible')){
let active_text=$(this).data('active-text');
$(this).html(active_text);
current.slideUp(200);
}
}).promise().done(function () {
let current_list=target.siblings('ul.mp_event_more_date_list');
if(current_list.length>0){
if(current_list.is(':visible')){
current_list.slideUp(200);
target.html(target.data('active-text'));
}else{
current_list.slideDown(200);
target.html(target.data('hide-text'));
}
}else{
let event_id = target.data('event-id');
let nonce = target.data('nonce');
$.ajax({
type: 'POST',
url: ajaxurl,
data: {"action": "mep_event_list_date_schedule", "event_id":event_id, "nonce":nonce },
beforeSend: function(){
target.html('<span class="fas fa-spinner fa-pulse"></span>');
},
success: function(data){
$(data).insertAfter(target);
target.html(target.data('hide-text'));
}
});
}
});
});
}(jQuery));
(function ($) {
"use strict";
let mp_event_input_name_list = {
mp_event_title: 'data-event-title',
search_with_city: 'data-city-name',
search_with_category: 'data-category',
search_with_organizer: 'data-organizer'
};
for (let name in mp_event_input_name_list) {
$(document).on('change keyup', '[name="' + name + '"] ', function (e) {
e.preventDefault();
mp_event_search_result($(this));
});
}
$(document).on('change', '.search_with_start_date , .search_with_end_date', function (e) {
e.preventDefault();
mp_event_search_result($(this));
});
function mp_event_search_result(target) {
let parent = target.closest('.search_sort_code_area');
if(check_search_value_exit(parent)) {
let result = 0;
let date_check = mp_event_date_check(parent);
parent.find('.all_event_list .event_item').each(function () {
let active_event = 1;
for (let name in mp_event_input_name_list) {
if (mp_event_single_text_check(parent, name) && active_event > 0) {
active_event = mp_event_single_text_search(parent, $(this), name);
}
}
if (date_check && active_event > 0) {
active_event = mp_event_date_search(parent, $(this));
}
if (active_event > 1) {
result++;
$(this).slideDown('fast');
} else {
$(this).slideUp('fast');
}
}).promise().done(function () {
if (result > 0) {
parent.find('.all_event_list').slideDown('fast');
parent.find('.search_result_empty').slideUp('fast');
} else {
parent.find('.all_event_list').slideUp('fast');
parent.find('.search_result_empty').slideDown('fast');
}
});
}else{
parent.find('.all_event_list').slideDown('fast');
parent.find('.all_event_list .event_item').each(function () {
$(this).slideDown('fast');
});
parent.find('.search_result_empty').slideUp('fast');
}
}
function date_convert_to_str(date) {
date = new Date(date).getTime();
if (date && date !== 'NaN') {
return date;
} else {
return 0;
}
}
function mp_event_single_text_check(parent, inputName) {
let inputText = parent.find('[name="' + inputName + '"]').val();
return (inputText && inputText.length > 0) ? 1 : false;
}
function mp_event_single_text_search(parent, item, inputName) {
let target = parent.find('[name="' + inputName + '"]');
let inputText = target.val();
let currentValue = item.attr(mp_event_input_name_list[inputName]);
return (currentValue.match(new RegExp(inputText, "i"))) ? 2 : 0;
}
function mp_event_date_check(parent) {
let start_date = date_convert_to_str(parent.find('.search_with_start_date').val());
let end_date = date_convert_to_str(parent.find('.search_with_end_date').val());
return (start_date > 0 && end_date > 0) ? 1 : false;
}
function mp_event_date_search(parent, target) {
let start_date = date_convert_to_str(parent.find('.search_with_start_date').val());
let end_date = date_convert_to_str(parent.find('.search_with_end_date').val());
let event_date = date_convert_to_str(target.attr('data-date-time'));
return (event_date > start_date && end_date > event_date) ? 2 : 0;
}
function check_search_value_exit(parent) {
let date_result = mp_event_date_check(parent);
let active_event = 0;
for (let name in mp_event_input_name_list) {
if (mp_event_single_text_check(parent, name)) {
active_event = 1;
}
}
return (date_result || active_event > 0)?1:false;
}
}(jQuery));

View File

@ -1,29 +1,42 @@
<?php
$day = mep_get_event_upcomming_date($event_id,'day');
$month = mep_get_event_upcomming_date($event_id,'month-name');
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$mep_hide_event_hover_btn = mep_get_option('mep_hide_event_hover_btn', 'general_setting_sec', 'no');
$mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text', 'general_setting_sec', 'Book Now');
$day = mep_get_event_upcomming_date($event_id, 'day');
$month = mep_get_event_upcomming_date($event_id, 'month-name');
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$mep_hide_event_hover_btn = mep_get_option('mep_hide_event_hover_btn', 'general_setting_sec', 'no');
$mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text', 'general_setting_sec', 'Book Now');
$taxonomy_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
$date = mep_get_event_upcomming_date($event_id, 'date');
?>
<div class='mep-event-list-loop <?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php echo $org_class.' '.$cat_class; ?>' style="width:calc(<?php echo $width; ?>% - 14px);">
<div class='filter_item mep-event-list-loop <?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
style="width:calc(<?php echo $width; ?>% - 14px);"
>
<?php do_action('mep_event_list_loop_header', $event_id); ?>
<div class="mep_list_thumb">
<a href="<?php echo esc_url(get_the_permalink());?>">
<div class="mep_bg_thumb" style="background-image:url(<?php mep_get_list_thumbnail_src($event_id); ?>)"></div>
</a>
<div class="mep-ev-start-date">
<div class="mep-day"><?php echo apply_filters('mep_event_list_only_day_number',$day,$event_id); ?></div>
<div class="mep-month"><?php echo apply_filters('mep_event_list_only_month_name',$month,$event_id); ?></div>
<a href="<?php echo esc_url(get_the_permalink()); ?>">
<div class="mep_bg_thumb" data-bg-image="<?php mep_get_list_thumbnail_src($event_id,'medium'); ?>" >
<!-- <img data-src="--><?php //mep_get_list_thumbnail_src($event_id); ?><!--" class="lazyload" src="" alt="" />-->
</div>
<?php
</a>
<div class="mep-ev-start-date">
<div class="mep-day"><?php echo apply_filters('mep_event_list_only_day_number', $day, $event_id); ?></div>
<div class="mep-month"><?php echo apply_filters('mep_event_list_only_month_name', $month, $event_id); ?></div>
</div>
<?php
if (is_array($event_multidate) && sizeof($event_multidate) > 0 && $recurring == 'no') { ?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
</div>
<?php }elseif($recurring != 'no'){
<?php } elseif ($recurring != 'no') {
?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
</div>
<?php
}
@ -50,18 +63,18 @@ $mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text
</div>
<?php
if ($style == 'list') {
?>
?>
<div class="mep-event-excerpt">
<?php the_excerpt(); ?>
</div>
<?php } ?>
<?php } ?>
<div class="mep-list-footer">
<ul>
<?php
if ($hide_org_list == 'no') {
if (sizeof($author_terms) > 0) {
?>
?>
<li class="mep_list_org_name">
<div class="evl-ico"><i class="fa fa-university"></i></div>
<div class="evl-cc">
@ -79,7 +92,7 @@ $mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text
if ($hide_location_list == 'no') { ?>
<li class="mep_list_location_name">
<div class="evl-ico"><i class="fas fa-map-marker-alt"></i></div>
<div class="evl-ico"><i class="fas fa-map-marker-alt"></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'); ?>
@ -91,18 +104,18 @@ $mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text
<?php }
}
if ($hide_time_list == 'no' && $recurring == 'no') {
do_action('mep_event_list_date_li',$event_id,'grid');
}elseif($hide_time_list == 'no' && $recurring != 'no'){
do_action('mep_event_list_upcoming_date_li',$event_id);
}?>
do_action('mep_event_list_date_li', $event_id, 'grid');
} elseif ($hide_time_list == 'no' && $recurring != 'no') {
do_action('mep_event_list_upcoming_date_li', $event_id);
} ?>
</ul>
</a>
<?php do_action('mep_event_list_loop_footer', $event_id); ?>
</div>
<?php if('yes'==$mep_hide_event_hover_btn){ ?>
<div class="item_hover_effect">
<a href="<?php echo get_the_permalink($event_id); ?>"><?php echo $mep_hide_event_hover_btn_text; ?></a>
</div>
<?php if ('yes' == $mep_hide_event_hover_btn) { ?>
<div class="item_hover_effect">
<a href="<?php echo get_the_permalink($event_id); ?>"><?php echo $mep_hide_event_hover_btn_text; ?></a>
</div>
<?php } ?>
</div>

View File

@ -1,33 +1,42 @@
<?php
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$day = get_mep_datetime(get_post_meta($event_id,'event_upcoming_datetime',true),'day');
$month = get_mep_datetime(get_post_meta($event_id,'event_upcoming_datetime',true),'month-name');
<?php
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$day = get_mep_datetime(get_post_meta($event_id, 'event_upcoming_datetime', true), 'day');
$month = get_mep_datetime(get_post_meta($event_id, 'event_upcoming_datetime', true), 'month-name');
$taxonomy_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
$date = mep_get_event_upcomming_date($event_id, 'date');
?>
<div class='mep-event-list-loop mep_event_list_item mep_event_minimal_list mix <?php echo $org_class.' '.$cat_class; ?>'>
<?php do_action('mep_event_minimal_list_loop_header',$event_id); ?>
<div class="mep_list_thumb">
<a href="<?php echo get_the_permalink($event_id); ?>"></a>
<div class="mep-ev-start-date">
<div class="mep-day"><?php echo apply_filters('mep_event_list_only_day_number',$day,$event_id); ?></div>
<div class="mep-month"><?php echo apply_filters('mep_event_list_only_month_name',$month,$event_id); ?></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>
<?php
mep_get_event_upcomming_date($event_id,1);
?>
<?php if ($available_seat == 0) {
do_action('mep_show_waitlist_label');
} ?>
<h3 class='mep_list_date'> <?php do_action('mep_event_list_date_li',$event_id,'minimal'); ?> <span class='mep_minimal_list_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span></h3>
</a>
<?php do_action('mep_event_list_loop_footer',$event_id); ?>
</div>
</div>
<?php do_action('mep_event_minimal_list_loop_end',$event_id); ?>
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_minimal_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
>
<?php do_action('mep_event_minimal_list_loop_header', $event_id); ?>
<div class="mep_list_thumb">
<a href="<?php echo get_the_permalink($event_id); ?>"></a>
<div class="mep-ev-start-date">
<div class="mep-day"><?php echo apply_filters('mep_event_list_only_day_number', $day, $event_id); ?></div>
<div class="mep-month"><?php echo apply_filters('mep_event_list_only_month_name', $month, $event_id); ?></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>
<?php
mep_get_event_upcomming_date($event_id, 1);
?>
<?php if ($available_seat == 0) {
do_action('mep_show_waitlist_label');
} ?>
<h3 class='mep_list_date'> <?php do_action('mep_event_list_date_li', $event_id, 'minimal'); ?> <span class='mep_minimal_list_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span></h3>
</a>
<?php do_action('mep_event_list_loop_footer', $event_id); ?>
</div>
</div>
<?php do_action('mep_event_minimal_list_loop_end', $event_id); ?>
</div>

View File

@ -1,19 +1,37 @@
<?php $recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no'; ?>
<div class='mep-event-list-loop mep_event_list_item mep_event_native_list mix <?php echo $org_class.' '.$cat_class; ?>'>
<?php do_action('mep_event_minimal_list_loop_header',$event_id); ?>
<div class="mep_list_thumb">
<a href="<?php echo get_the_permalink($event_id); ?>"><?php mep_get_list_thumbnail($event_id); ?></a>
</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 do_action('mep_event_list_date_li',$event_id,'minimal'); ?> <span class='mep_minimal_list_location'><i class='fa fa-map-marker'></i> <?php mep_get_event_city($event_id); ?></span></h3></a>
<?php do_action('mep_event_list_loop_footer',$event_id); ?>
</div>
</div>
<?php do_action('mep_event_minimal_list_loop_end',$event_id); ?>
</div>
<?php
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$taxonomy_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
$date = mep_get_event_upcomming_date($event_id, 'date');
?>
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_native_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
>
<?php do_action('mep_event_minimal_list_loop_header', $event_id); ?>
<div class="mep_list_thumb">
<a href="<?php echo get_the_permalink($event_id); ?>">
<div class="mep_bg_thumb" data-bg-image="<?php mep_get_list_thumbnail_src($event_id,'thumbnail'); ?>">
<!-- <img data-src="--><?php //mep_get_list_thumbnail_src($event_id); ?><!--" class="lazyload" src="" alt="" />-->
</div>
</a>
</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 do_action('mep_event_list_date_li', $event_id, 'minimal'); ?> <span class='mep_minimal_list_location'><i class='fa fa-map-marker'></i> <?php mep_get_event_city($event_id); ?></span></h3>
</a>
<?php do_action('mep_event_list_loop_footer', $event_id); ?>
</div>
</div>
<?php do_action('mep_event_minimal_list_loop_end', $event_id); ?>
</div>

View File

@ -1,58 +1,68 @@
<?php
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
$taxonomy_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
$date = mep_get_event_upcomming_date($event_id, 'date');
?>
<div class='mep-event-list-loop mep_event_list_item mep_event_spring_list mix <?php echo $org_class.' '.$cat_class; ?>'>
<?php do_action('mep_event_spring_list_loop_header',$event_id); ?>
<div class="mep_list_date_wrapper">
<h4 class='mep_spring_list_date'> <?php echo $start_date_format; ?></h4>
</div>
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_spring_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
>
<?php do_action('mep_event_spring_list_loop_header', $event_id); ?>
<div class="mep_list_date_wrapper">
<h4 class='mep_spring_list_date'> <?php echo $start_date_format; ?></h4>
</div>
<div class="mep_list_event_details mep_list_details_col_one">
<div class="mep_list_event_details mep_list_details_col_one">
<a href="<?php the_permalink(); ?>">
<span class="mep_spring_event_time"><i class="far fa-clock"></i> <?php echo $start_time_format; ?> - <?php echo $end_time_format; ?></span>
<span class='mep_spring_event_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span>
<span class="mep_spring_event_date"><i class="far fa-calendar-alt"></i> <?php echo $start_date_format; ?> - <?php echo $end_date_format; ?></span>
</a>
<?php do_action('mep_event_list_loop_footer',$event_id); ?>
</div>
<div class="mep_list_event_details mep_list_details_col_two">
<h4 class="mep_list_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php if ($available_seat == 0) {
do_action('mep_show_waitlist_label');
} ?>
<span class="mep_price">
<a href="<?php the_permalink(); ?>">
<span class="mep_spring_event_time"><i class="far fa-clock"></i> <?php echo $start_time_format; ?> - <?php echo $end_time_format; ?></span>
<span class='mep_spring_event_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span>
<span class="mep_spring_event_date"><i class="far fa-calendar-alt"></i> <?php echo $start_date_format; ?> - <?php echo $end_date_format; ?></span>
</a>
<?php do_action('mep_event_list_loop_footer', $event_id); ?>
</div>
<div class="mep_list_event_details mep_list_details_col_two">
<h4 class="mep_list_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php if ($available_seat == 0) {
do_action('mep_show_waitlist_label');
} ?>
<span class="mep_price">
<?php if ($show_price == 'yes') {
echo $show_price_label . " " . mep_event_list_price($event_id);
} ?>
} ?>
</span>
<?php if (is_array($event_multidate) && sizeof($event_multidate) > 0 && $recurring == 'no') { ?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
</div>
<?php } elseif($recurring != 'no'){
?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
</div>
<?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>
<?php }
?>
</div>
<div class="mep_list_spring_thumb_wrapper">
<a href="<?php echo get_the_permalink($event_id); ?>">
<div class="mep_list_spring_thumb" style="background-image:url(<?php mep_get_list_thumbnail_src($event_id); ?>)">
</div>
</a>
</div>
<?php do_action('mep_event_spring_list_loop_end',$event_id); ?>
<?php if (is_array($event_multidate) && sizeof($event_multidate) > 0 && $recurring == 'no') { ?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
</div>
<?php } elseif ($recurring != 'no') {
?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
</div>
<?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>
<?php }
?>
</div>
<div class="mep_list_spring_thumb_wrapper">
<a href="<?php echo get_the_permalink($event_id); ?>">
<div class="mep_list_spring_thumb" style="background-image:url(<?php mep_get_list_thumbnail_src($event_id); ?>)">
</div>
</a>
</div>
<?php do_action('mep_event_spring_list_loop_end', $event_id); ?>
</div>

View File

@ -1,61 +1,72 @@
<?php
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
$taxonomy_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
$date = mep_get_event_upcomming_date($event_id, 'date');
?>
<div class='mep-event-list-loop mep_event_list_item mep_event_winter_list mix <?php echo $org_class.' '.$cat_class; ?>'>
<?php do_action('mep_event_winter_list_loop_header',$event_id); ?>
<div class="mep_list_date_wrapper">
<i class="fas fa-caret-right"></i>
<h4 class='mep_winter_list_date'> <span class="mep_winter_list_dd"><?php echo $start_dd; ?></span><span class="mep_winter_list_mm_yy"><?php echo $start_mm_yy; ?></span></h4>
</div>
<div class="mep_list_winter_thumb_wrapper">
<a href="<?php echo get_the_permalink($event_id); ?>">
<div class="mep_list_winter_thumb" style="background-image:url(<?php mep_get_list_thumbnail_src($event_id); ?>)">
</div>
</a>
</div>
<div class="mep_list_event_details">
<h4 class="mep_list_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<div class="mep_list_details_col_wrapper">
<div class="mep_list_details_col_one">
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_winter_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
>
<?php do_action('mep_event_winter_list_loop_header', $event_id); ?>
<div class="mep_list_date_wrapper">
<i class="fas fa-caret-right"></i>
<h4 class='mep_winter_list_date'><span class="mep_winter_list_dd"><?php echo $start_dd; ?></span><span class="mep_winter_list_mm_yy"><?php echo $start_mm_yy; ?></span></h4>
</div>
<div class="mep_list_winter_thumb_wrapper">
<a href="<?php echo get_the_permalink($event_id); ?>">
<div class="mep_list_winter_thumb" data-bg-image="<?php mep_get_list_thumbnail_src($event_id,'thumbnail'); ?>">
<!-- <img data-src="--><?php //mep_get_list_thumbnail_src($event_id); ?><!--" class="lazyload" src="" alt="" />-->
</div>
</a>
</div>
<div class="mep_list_event_details">
<h4 class="mep_list_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<div class="mep_list_details_col_wrapper">
<div class="mep_list_details_col_one">
<span class="mep_price">
<?php if ($show_price == 'yes') {
echo $show_price_label . " " . mep_event_list_price($event_id);
} ?>
</span>
<a href="<?php the_permalink(); ?>">
<span class="mep_winter_event_time"><i class="far fa-clock"></i> <?php echo $start_time_format; ?> - <?php echo $end_time_format; ?></span>
<span class='mep_winter_event_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span>
<span class="mep_winter_event_date"><i class="far fa-calendar-alt"></i> <?php echo $start_date_format; ?> - <?php echo $end_date_format; ?></span>
</a>
</div>
<div class="mep_list_details_col_two">
<?php if ($available_seat == 0) {
do_action('mep_show_waitlist_label');
} ?>
</span>
<a href="<?php the_permalink(); ?>">
<?php if (is_array($event_multidate) && sizeof($event_multidate) > 0 && $recurring == 'no') { ?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
</div>
<?php } elseif($recurring != 'no'){
?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
</div>
<?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>
<?php }
?>
<?php do_action('mep_event_list_loop_footer',$event_id); ?>
</div>
</div>
<span class="mep_winter_event_time"><i class="far fa-clock"></i> <?php echo $start_time_format; ?> - <?php echo $end_time_format; ?></span>
<span class='mep_winter_event_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span>
<span class="mep_winter_event_date"><i class="far fa-calendar-alt"></i> <?php echo $start_date_format; ?> - <?php echo $end_date_format; ?></span>
</a>
</div>
<div class="mep_list_details_col_two">
<?php if ($available_seat == 0) {
do_action('mep_show_waitlist_label');
} ?>
<?php if (is_array($event_multidate) && sizeof($event_multidate) > 0 && $recurring == 'no') { ?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
</div>
<?php do_action('mep_event_winter_list_loop_end',$event_id); ?>
<?php } elseif ($recurring != 'no') {
?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
</div>
<?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>
<?php }
?>
<?php do_action('mep_event_list_loop_footer', $event_id); ?>
</div>
</div>
</div>
<?php do_action('mep_event_winter_list_loop_end', $event_id); ?>
</div>