version 3.6.4 released

This commit is contained in:
magepeopleteam 2022-04-22 04:07:47 +00:00
parent 65725e3e6b
commit 1262f92fa7
7 changed files with 8545 additions and 191 deletions

View File

@ -499,7 +499,7 @@ if (!class_exists('MAGE_Events_Setting_Controls')) :
'label' => __('Email From Name', 'mage-eventpress'),
'desc' => __('Email From Name', 'mage-eventpress'),
'type' => 'text',
'default' => mep_get_user_display_name_by_email(get_option('admin_email'))
'default' => get_bloginfo( 'name' )
),
array(
'name' => 'mep_email_form_email',

View File

@ -9,7 +9,9 @@ if (!class_exists('EDD_SL_Plugin_Updater')) {
require_once(dirname(__DIR__) . '/lib/classes/class-form-fields-generator.php');
require_once(dirname(__DIR__) . '/lib/classes/class-meta-box.php');
require_once(dirname(__DIR__) . '/lib/classes/class-taxonomy-edit.php');
require_once(dirname(__DIR__) . '/lib/classes/class-mep.php');
require_once(dirname(__DIR__) . "/inc/class/mep_settings_api.php");
require_once(dirname(__DIR__) . "/inc/welcome.php");
require_once(dirname(__DIR__) . "/inc/status.php");
require_once(dirname(__DIR__) . "/inc/mep_cpt.php");
@ -22,7 +24,7 @@ if (!class_exists('EDD_SL_Plugin_Updater')) {
require_once(dirname(__DIR__) . "/inc/mep_enque.php");
require_once(dirname(__DIR__) . "/inc/mep_user_custom_style.php");
require_once(dirname(__DIR__) . "/inc/mep_tax_meta.php");
// require_once(dirname(__DIR__) . "/inc/mep_upgrade.php");
require_once(dirname(__DIR__) . "/inc/mep_functions.php");
require_once(dirname(__DIR__) . "/inc/mep_query.php");
require_once(dirname(__DIR__) . "/support/elementor/elementor-support.php");

View File

@ -4543,196 +4543,9 @@ if (!function_exists('mep_event_list_date_schedule')) {
die();
}
}
if (!class_exists('MPWEM_Helper')) {
class MPWEM_Helper {
public function __construct() {
add_action('mpwem_list_with_filter_section', array($this,'list_with_filter_section'), 10, 2);
add_action('mpwem_pagination', array($this, 'pagination'), 10, 2);
}
public function list_with_filter_section($loop, $params) {
ob_start();
?>
<div class="mpStyle">
<div class="search_sort_code_area">
<div class="search_sort_code">
<div class="sort_code_search_box defaultLayout_xs">
<div class="flexEqual filter_input_area">
<?php
$category_lists = MPWEM_Helper::get_all_taxonomy('mep_cat');
if ($params['category-filter'] == 'yes' && $category_lists && sizeof($category_lists) > 0) {
?>
<label>
<select class="formControl" name="filter_with_category">
<option selected value=""><?php esc_html_e('Select Category', 'mage-eventpress'); ?></option>
<?php foreach ($category_lists as $category) { ?>
<option value="<?php echo esc_attr($category); ?>"><?php echo esc_html($category); ?></option>
<?php } ?>
</select>
</label>
<?php } ?>
<?php
$organizer_lists = MPWEM_Helper::get_all_taxonomy('mep_org');
if ($params['organizer-filter'] == 'yes' && $organizer_lists && sizeof($organizer_lists) > 0) {
?>
<label>
<select class="formControl" name="filter_with_organizer">
<option selected value=""><?php esc_html_e('Select Organizer', 'mage-eventpress'); ?></option>
<?php foreach ($organizer_lists as $organizer) { ?>
<option value="<?php echo esc_attr($organizer); ?>"><?php echo esc_html($organizer); ?></option>
<?php } ?>
</select>
</label>
<?php } ?>
<?php
$city_lists = self::get_all_city();
if ($params['city-filter'] == 'yes' && sizeof($city_lists) > 0) {
?>
<label>
<select class="formControl" name="filter_with_city">
<option selected value=""><?php esc_html_e('Select City', 'mage-eventpress'); ?></option>
<?php foreach ($city_lists as $city_list) { ?>
<option value="<?php echo esc_attr($city_list); ?>"><?php echo esc_html($city_list); ?></option>
<?php } ?>
</select>
</label>
<?php } ?>
<?php if ($params['date-filter'] == 'yes') { ?>
<label>
<input type="text" class="formControl filter_datepicker search_with_start_date" placeholder="<?php esc_html_e('Start date', 'mage-eventpress'); ?>"/>
<span class="fas fa-calendar-alt filter_date_icon"></span>
</label>
<label>
<input type="text" class="formControl filter_datepicker search_with_end_date" placeholder="<?php esc_html_e('End date', 'mage-eventpress'); ?>"/>
<span class="fas fa-calendar-alt filter_date_icon"></span>
</label>
<?php } ?>
</div>
<?php if ($params['title-filter'] == 'yes') { ?>
<div class="filter_input_area">
<label>
<input name="title_filter" placeholder="<?php esc_html_e('Type Name here ....', 'mage-eventpress'); ?>" class="formControl"/>
</label>
</div>
<?php } ?>
</div>
<div class="search_result_empty"><?php esc_html_e('No Match Result Found!', 'mage-eventpress'); ?></div>
</div>
</div>
<p class="textGray textCenter">
<?php esc_html_e('Showing', 'mage-eventpress'); ?>
<strong class="qty_count"><?php echo esc_html($params['show']); ?></strong>
<?php esc_html_e('of', 'mage-eventpress'); ?>
<strong class="total_filter_qty"><?php echo esc_html($loop->post_count); ?></strong>
</p>
</div>
<?php
echo ob_get_clean();
}
public static function get_all_taxonomy($name): array {
$taxonomy = array();
$categories = get_terms(array(
'taxonomy' => $name
));
foreach ($categories as $category) {
$taxonomy[] = $category->name;
}
return array_unique($taxonomy);
}
public static function all_taxonomy_as_text($event_id, $taxonomy): string {
$taxonomy_text = '';
$all_taxonomy = get_the_terms($event_id, $taxonomy);
if ($all_taxonomy && sizeof($all_taxonomy) > 0) {
foreach ($all_taxonomy as $category) {
$taxonomy_text = $taxonomy_text . '- ' . $category->name;
}
}
return $taxonomy_text;
}
public static function get_all_city(): array {
//ob_start();
global $wpdb;
$table_name = $wpdb->prefix . "postmeta";
$sql = "SELECT meta_value FROM $table_name WHERE meta_key ='mep_city' GROUP BY meta_value";
$results = $wpdb->get_results($sql); //or die(mysql_error());
$city_list = array();
foreach ($results as $post) {
if ($post->meta_value) {
$city_list[] = $post->meta_value;
}
}
return $city_list;
}
public function pagination($params, $total_item) {
ob_start();
$per_page = $params['show']>1?$params['show']:$total_item;
?>
<input type="hidden" name="pagination_per_page" value="<?php echo esc_attr($per_page); ?>"/>
<input type="hidden" name="pagination_style" value="<?php echo esc_attr($params['pagination-style']); ?>"/>
<?php if (($params['search-filter'] == 'yes' || $params['pagination'] == 'yes') && $total_item > $per_page) { ?>
<div class="mpStyle pagination_area">
<div class="allCenter">
<?php
if ($params['pagination-style'] == 'load_more') {
?>
<button type="button"
class="defaultButton pagination_load_more"
data-load-more="0"
data-load-more-text="<?php esc_html_e('Load More', 'mage-eventpress'); ?>"
data-load-less-text="<?php esc_html_e('Less More', 'mage-eventpress'); ?>"
>
<?php esc_html_e('Load More', 'mage-eventpress'); ?>
</button>
<?php
} else {
$page_mod = $total_item % $per_page;
$total_page = (int)($total_item / $per_page) + ($page_mod > 0 ? 1 : 0);
?>
<div class="buttonGroup">
<?php if ($total_page > 2) { ?>
<button class="defaultButton_xs page_prev" type="button" title="<?php esc_html_e('GoTO Previous Page', 'mage-eventpress'); ?>" disabled>
<span class="fas fa-chevron-left"></span>
</button>
<?php } ?>
<?php if ($total_page > 5) { ?>
<div class="ellipse_left" disabled>
<div><span class="fas fa-ellipsis-h"></span></div>
</div>
<?php } ?>
<?php for ($i = 0; $i < $total_page; $i++) { ?>
<button class="defaultButton_xs <?php echo esc_html($i) == 0 ? 'active_pagination' : ''; ?>" type="button" data-pagination="<?php echo esc_attr($i); ?>"><?php echo esc_html($i + 1); ?></button>
<?php } ?>
<?php if ($total_page > 5) { ?>
<div class="ellipse_right">
<div><span class="fas fa-ellipsis-h"></span></div>
</div>
<?php } ?>
<?php if ($total_page > 2) { ?>
<button class="defaultButton_xs page_next" type="button" title="<?php esc_html_e('GoTO Next Page', 'mage-eventpress'); ?>">
<span class="fas fa-chevron-right"></span>
</button>
<?php } ?>
</div>
<?php
}
?>
</div>
</div>
<?php
}
echo ob_get_clean();
}
}
new MPWEM_Helper();
}

File diff suppressed because it is too large Load Diff

195
lib/classes/class-mep.php Normal file
View File

@ -0,0 +1,195 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if (!class_exists('MPWEM_Helper')) {
class MPWEM_Helper {
public function __construct() {
add_action('mpwem_list_with_filter_section', array($this,'list_with_filter_section'), 10, 2);
add_action('mpwem_pagination', array($this, 'pagination'), 10, 2);
}
public function list_with_filter_section($loop, $params) {
ob_start();
?>
<div class="mpStyle">
<div class="search_sort_code_area">
<div class="search_sort_code">
<div class="sort_code_search_box defaultLayout_xs">
<div class="flexEqual filter_input_area">
<?php
$category_lists = MPWEM_Helper::get_all_taxonomy('mep_cat');
if ($params['category-filter'] == 'yes' && $category_lists && sizeof($category_lists) > 0) {
?>
<label>
<select class="formControl" name="filter_with_category">
<option selected value=""><?php esc_html_e('Select Category', 'mage-eventpress'); ?></option>
<?php foreach ($category_lists as $category) { ?>
<option value="<?php echo esc_attr($category); ?>"><?php echo esc_html($category); ?></option>
<?php } ?>
</select>
</label>
<?php } ?>
<?php
$organizer_lists = MPWEM_Helper::get_all_taxonomy('mep_org');
if ($params['organizer-filter'] == 'yes' && $organizer_lists && sizeof($organizer_lists) > 0) {
?>
<label>
<select class="formControl" name="filter_with_organizer">
<option selected value=""><?php esc_html_e('Select Organizer', 'mage-eventpress'); ?></option>
<?php foreach ($organizer_lists as $organizer) { ?>
<option value="<?php echo esc_attr($organizer); ?>"><?php echo esc_html($organizer); ?></option>
<?php } ?>
</select>
</label>
<?php } ?>
<?php
$city_lists = self::get_all_city();
if ($params['city-filter'] == 'yes' && sizeof($city_lists) > 0) {
?>
<label>
<select class="formControl" name="filter_with_city">
<option selected value=""><?php esc_html_e('Select City', 'mage-eventpress'); ?></option>
<?php foreach ($city_lists as $city_list) { ?>
<option value="<?php echo esc_attr($city_list); ?>"><?php echo esc_html($city_list); ?></option>
<?php } ?>
</select>
</label>
<?php } ?>
<?php if ($params['date-filter'] == 'yes') { ?>
<label>
<input type="text" class="formControl filter_datepicker search_with_start_date" placeholder="<?php esc_html_e('Start date', 'mage-eventpress'); ?>"/>
<span class="fas fa-calendar-alt filter_date_icon"></span>
</label>
<label>
<input type="text" class="formControl filter_datepicker search_with_end_date" placeholder="<?php esc_html_e('End date', 'mage-eventpress'); ?>"/>
<span class="fas fa-calendar-alt filter_date_icon"></span>
</label>
<?php } ?>
</div>
<?php if ($params['title-filter'] == 'yes') { ?>
<div class="filter_input_area">
<label>
<input name="title_filter" placeholder="<?php esc_html_e('Type Name here ....', 'mage-eventpress'); ?>" class="formControl"/>
</label>
</div>
<?php } ?>
</div>
<div class="search_result_empty"><?php esc_html_e('No Match Result Found!', 'mage-eventpress'); ?></div>
</div>
</div>
<p class="textGray textCenter">
<?php esc_html_e('Showing', 'mage-eventpress'); ?>
<strong class="qty_count"><?php echo esc_html($params['show']); ?></strong>
<?php esc_html_e('of', 'mage-eventpress'); ?>
<strong class="total_filter_qty"><?php echo esc_html($loop->post_count); ?></strong>
</p>
</div>
<?php
echo ob_get_clean();
}
public static function get_all_taxonomy($name): array {
$taxonomy = array();
$categories = get_terms(array(
'taxonomy' => $name
));
foreach ($categories as $category) {
$taxonomy[] = $category->name;
}
return array_unique($taxonomy);
}
public static function all_taxonomy_as_text($event_id, $taxonomy): string {
$taxonomy_text = '';
$all_taxonomy = get_the_terms($event_id, $taxonomy);
if ($all_taxonomy && sizeof($all_taxonomy) > 0) {
foreach ($all_taxonomy as $category) {
$taxonomy_text = $taxonomy_text . '- ' . $category->name;
}
}
return $taxonomy_text;
}
public static function get_all_city(): array {
//ob_start();
global $wpdb;
$table_name = $wpdb->prefix . "postmeta";
$sql = "SELECT meta_value FROM $table_name WHERE meta_key ='mep_city' GROUP BY meta_value";
$results = $wpdb->get_results($sql); //or die(mysql_error());
$city_list = array();
foreach ($results as $post) {
if ($post->meta_value) {
$city_list[] = $post->meta_value;
}
}
return $city_list;
}
public function pagination($params, $total_item) {
ob_start();
$per_page = $params['show']>1?$params['show']:$total_item;
?>
<input type="hidden" name="pagination_per_page" value="<?php echo esc_attr($per_page); ?>"/>
<input type="hidden" name="pagination_style" value="<?php echo esc_attr($params['pagination-style']); ?>"/>
<?php if (($params['search-filter'] == 'yes' || $params['pagination'] == 'yes') && $total_item > $per_page) { ?>
<div class="mpStyle pagination_area">
<div class="allCenter">
<?php
if ($params['pagination-style'] == 'load_more') {
?>
<button type="button"
class="defaultButton pagination_load_more"
data-load-more="0"
data-load-more-text="<?php esc_html_e('Load More', 'mage-eventpress'); ?>"
data-load-less-text="<?php esc_html_e('Less More', 'mage-eventpress'); ?>"
>
<?php esc_html_e('Load More', 'mage-eventpress'); ?>
</button>
<?php
} else {
$page_mod = $total_item % $per_page;
$total_page = (int)($total_item / $per_page) + ($page_mod > 0 ? 1 : 0);
?>
<div class="buttonGroup">
<?php if ($total_page > 2) { ?>
<button class="defaultButton_xs page_prev" type="button" title="<?php esc_html_e('GoTO Previous Page', 'mage-eventpress'); ?>" disabled>
<span class="fas fa-chevron-left"></span>
</button>
<?php } ?>
<?php if ($total_page > 5) { ?>
<div class="ellipse_left" disabled>
<div><span class="fas fa-ellipsis-h"></span></div>
</div>
<?php } ?>
<?php for ($i = 0; $i < $total_page; $i++) { ?>
<button class="defaultButton_xs <?php echo esc_html($i) == 0 ? 'active_pagination' : ''; ?>" type="button" data-pagination="<?php echo esc_attr($i); ?>"><?php echo esc_html($i + 1); ?></button>
<?php } ?>
<?php if ($total_page > 5) { ?>
<div class="ellipse_right">
<div><span class="fas fa-ellipsis-h"></span></div>
</div>
<?php } ?>
<?php if ($total_page > 2) { ?>
<button class="defaultButton_xs page_next" type="button" title="<?php esc_html_e('GoTO Next Page', 'mage-eventpress'); ?>">
<span class="fas fa-chevron-right"></span>
</button>
<?php } ?>
</div>
<?php
}
?>
</div>
</div>
<?php
}
echo ob_get_clean();
}
}
new MPWEM_Helper();
}

View File

@ -42,6 +42,7 @@
}
$ticket_name = mep_remove_apostopie($field['option_name_t']);
do_action('mep_after_ticket_type_qty', $post_id, $ticket_name, $field, $default_quantity,$start_date);
do_action('mepgq_max_qty_hook',$post_id);
?>
</td>
<td class="ticket-price"><span class="tkt-pric">

View File

@ -3,7 +3,7 @@
* Plugin Name: Event Manager and Tickets Selling Plugin for WooCommerce
* Plugin URI: http://mage-people.com
* Description: A Complete Event Solution for WordPress by MagePeople..
* Version: 3.6.3
* Version: 3.6.4
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress