v 3.6.8 releasd

This commit is contained in:
magepeopleteam 2022-08-04 04:45:25 +00:00
parent 1099f1d482
commit 41926e8a21
16 changed files with 1594 additions and 908 deletions

View File

@ -1420,3 +1420,5 @@ input#mep_search_icon {
border-bottom: 0;
}
}

117
css/welcome-tabs.css Executable file
View File

@ -0,0 +1,117 @@
@charset "utf-8";
/*General CSS*/
.welcome-tabs p { font-size: 15px;}
.welcome-tabs h1, .welcome-tabs h2 { font-size: 30px;}
.welcome-tabs h3, .welcome-tabs h4 { font-size: 25px;}
.welcome-tabs h5, .welcome-tabs h6 { font-size: 20px;}
body.events_page_mep_event_quick_setup_page .notice,
body.events_page_mep_event_quick_setup_page .error,
body.events_page_mep_event_quick_setup_page .updated { display: none !important;}
.welcome-tabs .float-right { float: right;}
.welcome-tabs .float-left { float: right;}
.welcome-tabs .float-none { float: right;}
.welcome-tabs.vertical { position: relative;}
.welcome-tabs .tab-navs { text-align: center;margin: 0;}
.welcome-tabs .tab-nav {
padding: 10px 20px;
background: #FFF;
margin: 4px 25px;
border: 1px solid #EEE;
cursor: pointer;
display: inline-block;
border-radius: 3px;
position: relative;
font-size: 20px;
}
.welcome-tabs .tab-nav.active { background: #2271b1; color: #FFF;border-bottom: 5px solid #000;}
.welcome-tabs .tab-nav:after {
content: "";
width: 60px;
height: 2px;
top: 40%;
right: 0;
position: absolute;
transform: translate(100%, 50%);
border-bottom: 2px dashed #DDD;
}
.welcome-tabs .tab-nav:last-child:after { width: 0;}
.welcome-tabs .tab-nav.done:after { border-bottom: 2px dashed #2FBD1A;}
.welcome-tabs .tab-content {
padding: 30px;
background: #F2f2f2;
display: none;
max-width: 100%;
margin: 40px auto;
}
.welcome-tabs .tab-content.active { display: block;}
.welcome-tabs .next-prev {
width: 100%;
margin: 0 auto;
padding: 0;
}
.welcome-tabs .next-prev .prev { display: none; width: auto; transition: all ease 1s;border: 1px solid #555;float: left;}
.welcome-tabs .next-prev .next {border: 1px solid #555;float: right;
display: inline-block;
width: auto;
text-align: right;
transition: all ease 1s;
}
.welcome-tabs .next-prev span { padding: 15px 20px; display: block; cursor: pointer;font-size: 18px;}
.welcome-tabs .next-prev .next:hover, .welcome-tabs .next-prev .prev:hover { background: #444; color: #FFF;}
.welcome-tabs .submit-wrap { padding: 10px 0; text-align: center;}
.welcome-tabs .submit-wrap input[type="submit"] { padding: 8px 40px; height: auto; font-size: 17px;}
.welcome-tabs .section-title { padding: 0 15px; font-size: 16px; font-weight: 600;}
.welcome-tabs .section-description { padding: 0 15px; margin-bottom: 25px;}
.welcome-tabs .setting-field { margin-bottom: 15px; border-bottom: 1px solid #EEE; padding: 0 15px 15px 15px;}
.welcome-tabs .setting-field:last-child { border-bottom: 1px solid #EEE0;}
.welcome-tabs .setting-field .field-lable { width: 270px; float: left; font-size: 14px; word-break: break-word;}
.welcome-tabs .setting-field .field-input { margin-left: 270px;}
.welcome-tabs .setting-field .description { word-break: break-word;}
/*field-repeatable-wrapper*/
.ppof-settings .repeatable .item-wrap { margin-bottom: 5px; padding-bottom: 0;}
.field-repeatable-wrapper .field-list { margin-top: 18px;}
.welcome-tabs input[type="text"], .welcome-tabs textarea, .welcome-tabs select, .welcome-tabs input[type="range"] { width: 360px; background: #F1F1F1;}
@media (max-width: 1170px) {
.welcome-tabs input[type="text"],
.welcome-tabs textarea,
.welcome-tabs select,
.welcome-tabs input[type="range"],
.welcome-tabs .select2 { width: 100% !important; }
}
@media (max-width: 1440px) {
.welcome-tabs .setting-field .field-lable { width: auto; float: none; font-size: 14px; }
.welcome-tabs .setting-field .field-input { margin-left: 0; }
}
@media (max-width: 1700px) {
.welcome-tabs .setting-field .setting-field .field-lable { width: auto; float: none; font-size: 14px; }
.welcome-tabs .setting-field .setting-field .field-input { margin-left: 0; }
}
.welcome-tabs .pro-feature { background: #FFD87F; padding: 0 5px;}
#ttbm_quick_setup {padding: 50px;max-width: 850px;background-color: #FFF;margin: 100px auto;border-radius: 5px;}
td.woo_btn_td{text-align: right !important;}
.button.setup_save_finish,
td.woo_btn_td .button{
width: auto;font-size: 20px;font-weight: 500;position: relative;
-webkit-justify-content: center;justify-content: center;
background-image: -webkit-linear-gradient(#FF8F8E, #FF8787, #FF7B7D, #FF6369, #FF575F, #FF515A);
background-image: -moz-linear-gradient(#FF8F8E, #FF8787, #FF7B7D, #FF6369, #FF575F, #FF515A);
background-image: linear-gradient(#FF8F8E, #FF8787, #FF7B7D, #FF6369, #FF575F, #FF515A);
border-radius: 5px;
display: -webkit-inline-flex;display: inline-flex;-webkit-align-items: center;align-items: center;
padding: 0 20px;
color: #FFF;min-width: 170px;
}
.setup_save_finish_area{
display: flex;display: -webkit-flex;-webkit-justify-content: center;justify-content: center;
}
table.wc_status_table td{vertical-align: middle;font-size: 16px;min-width: 150px;}
table.wc_status_table td.woo_btn_td span{font-size: 20px; color: #10dd10;}
/*3rd Party*/
.welcome-tabs .field-input .CodeMirror { background: #F1F1F1;}
.welcome-tabs .addon-list .item { display: inline-block; width: 215px; overflow: hidden; padding: 15px 20px;}
.welcome-tabs .addon-list .thumb-wrap img { width: 100%;}
.welcome-tabs .addon-list .addon-title { margin: 10px 0; font-size: 17px;}
.welcome-tabs .addon-list .addon-link a { text-decoration: none;}
div#ttbm_quick_setup .notice {
display: none;
}

View File

@ -66,6 +66,28 @@ function mep_add_admin_scripts($hook)
//loading modal script
wp_enqueue_script('jquery.modal.min', plugin_dir_url(__DIR__) . 'js/jquery.modal.min.js', array('jquery'), 1.0, true);
wp_register_script('welcome-tabs', plugin_dir_url(__DIR__) . 'js/welcome-tabs.js', array('jquery'));
wp_register_style('welcome-tabs', plugin_dir_url(__DIR__) . 'css/welcome-tabs.css');
wp_register_script('welcome-tabs', plugin_dir_url(__DIR__) . 'js/welcome-tabs.js', array('jquery'));
wp_register_style('welcome-tabs', plugin_dir_url(__DIR__) . 'css/welcome-tabs.css');
}
/**

View File

@ -64,6 +64,7 @@ class MP_Event_All_Info_In_One
esc_html_e(' Location :', 'mage-eventpress'); ?></h3>
<hr />
<?php $this->mp_event_venue($post_id); ?>
<?php do_action('mep_event_tab_after_location'); ?>
</div>
<?php do_action('mep_admin_event_details_after_tab_details_location', $post_id); ?>
<div class="mp_tab_item" data-tab-item="#mp_ticket_type_pricing">
@ -73,6 +74,7 @@ class MP_Event_All_Info_In_One
<h3><?php esc_html_e('Extra service Area :', 'mage-eventpress'); ?></h3>
<hr />
<?php $this->mep_event_extra_price_option($post_id); ?>
<?php do_action('mep_event_tab_after_ticket_pricing'); ?>
</div>
<?php do_action('mep_admin_event_details_after_tab_details_ticket_type', $post_id); ?>
<div class="mp_tab_item" data-tab-item="#mp_event_time">
@ -89,6 +91,7 @@ class MP_Event_All_Info_In_One
esc_html_e(' Rich Texts for SEO & Google Schema Text :', 'mage-eventpress'); ?></h3>
<hr />
<?php $this->mp_event_rich_text($post_id); ?>
<?php do_action('mep_event_tab_after_rich_text'); ?>
</div>
<?php do_action('mep_admin_event_details_after_tab_details_rich_text', $post_id); ?>
<div class="mp_tab_item" data-tab-item="#mp_event_settings">
@ -96,6 +99,7 @@ class MP_Event_All_Info_In_One
esc_html_e(' Settings :', 'mage-eventpress'); ?></h3>
<hr />
<?php $this->mp_event_settings($post_id); ?>
<?php do_action('mep_event_tab_after_settings'); ?>
</div>
<?php do_action('mep_admin_event_details_after_tab_details_settings', $post_id); ?>
<?php if (get_option('woocommerce_calc_taxes') == 'yes') { ?>
@ -105,6 +109,7 @@ class MP_Event_All_Info_In_One
esc_html_e(' Tax Settings :', 'mage-eventpress'); ?></h3>
<hr />
<?php $this->mp_event_tax($post_id); ?>
<?php do_action('mep_event_tab_after_tax_settings'); ?>
</div>
<?php } ?>
<?php do_action('mp_event_all_in_tab_item', $post_id); ?>
@ -414,9 +419,11 @@ class MP_Event_All_Info_In_One
<th style="min-width: 80px;" title="<?php esc_attr_e('Ticket Type Name', 'mage-eventpress'); ?>"><?php esc_html_e('Ticket', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php esc_attr_e('Ticket Price', 'mage-eventpress'); ?>"><?php esc_html_e('Price', 'mage-eventpress'); ?></th>
<?php do_action('mep_pricing_table_head_after_price_col'); ?>
<th style="min-width: 80px;" title="<?php esc_attr_e('Available Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Available', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php esc_attr_e('Default Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Default', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php esc_attr_e('Reserve Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Reserve', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php esc_attr_e('Available Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Capacity', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php esc_attr_e('Default Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Default Qty', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php esc_attr_e('Reserve Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Reserve Qty', 'mage-eventpress'); ?>
<?php do_action('add_extra_field_icon',$post_id); ?>
</th>
<?php do_action('mep_add_extra_column'); ?>
<th style="min-width: 150px;" title="<?php esc_attr_e('Sale End Date', 'mage-eventpress'); ?>"><?php esc_html_e('Sale End Date', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;" title="<?php esc_attr_e('Sale End Time', 'mage-eventpress'); ?>"><?php esc_html_e('Sale End Time', 'mage-eventpress'); ?></th>
@ -470,7 +477,7 @@ class MP_Event_All_Info_In_One
} ?>" />
</td>
<?php do_action('mep_add_extra_input_box', $field) ?>
<?php do_action('mep_add_extra_input_box', $field,$count) ?>
<td>
<div class="sell_expire_date">
<input type="date" id="ticket_sale_start_date" class="mp_formControl" value='<?php if (array_key_exists('option_sale_end_date_t', $field) && $field['option_sale_end_date_t'] != '') {
@ -546,7 +553,7 @@ class MP_Event_All_Info_In_One
</table>
</div>
<p>
<button id="add-row-t" class="button"><i class="fas fa-plus-circle"></i> <?php esc_html_e('Add New Ticket Type', 'mage-eventpress'); ?></button>
<button id="add-row-t" class="button" type="button"><i class="fas fa-plus-circle"></i> <?php esc_html_e('Add New Ticket Type', 'mage-eventpress'); ?></button>
</p>
<?php
@ -564,7 +571,7 @@ class MP_Event_All_Info_In_One
<tr>
<th title="<?php esc_attr_e('Extra Service Name', 'mage-eventpress'); ?>"><?php esc_html_e('Name', 'mage-eventpress'); ?></th>
<th title="<?php esc_attr_e('Extra Service Price', 'mage-eventpress'); ?>"><?php esc_html_e('Price', 'mage-eventpress'); ?></th>
<th title="<?php esc_attr_e('Available Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Available', 'mage-eventpress'); ?></th>
<th title="<?php esc_attr_e('Available Qty', 'mage-eventpress'); ?>"><?php esc_html_e('Available Qty', 'mage-eventpress'); ?></th>
<th title="<?php esc_attr_e('Qty Box Type', 'mage-eventpress'); ?>" style="min-width: 140px;"><?php esc_html_e('Qty Box', 'mage-eventpress'); ?></th>
<th></th>
</tr>

View File

@ -3473,6 +3473,7 @@ if (!function_exists('mep_cart_order_data_save_ticket_type')) {
$ticket_type_val = wc_price(mep_get_price_including_tax($eid,(float)$ticket['ticket_price'] * (float)$ticket['ticket_qty']));
$ticket_name_meta = apply_filters('mep_event_order_meta_ticket_name_filter', $ticket_type_name, $ticket);
$item->add_meta_data($ticket_name_meta, $ticket_type_val);
do_action('mep_event_cart_order_data_add_ef', $item, $eid,$ticket['ticket_name']);
}
}
}
@ -4062,19 +4063,7 @@ function mep_show_product_cat_in_event() {
}
}
if (!function_exists('mep_woo_install_check')) {
function mep_woo_install_check() {
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
$plugin_dir = ABSPATH . 'wp-content/plugins/woocommerce';
if (is_plugin_active('woocommerce/woocommerce.php')) {
return 'Yes';
} elseif (is_dir($plugin_dir)) {
return 'Installed But Not Active';
} else {
return 'No';
}
}
}
add_filter('wp_unique_post_slug_is_bad_hierarchical_slug', 'mep_event_prevent_slug_conflict', 10, 4);
@ -4663,3 +4652,83 @@ function mep_change_global_option_section($option_name, $old_sec_name, $new_sec_
}
}
}
if (!function_exists('mep_woo_install_check')) {
function mep_woo_install_check() {
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
$plugin_dir = ABSPATH . 'wp-content/plugins/woocommerce';
if (is_plugin_active('woocommerce/woocommerce.php')) {
return 'Yes';
} elseif (is_dir($plugin_dir)) {
return 'Installed But Not Active';
} else {
return 'No';
}
}
}
add_action( 'pre_get_posts', 'mep_search_query_exlude_hidden_wc_fix' );
function mep_search_query_exlude_hidden_wc_fix( $query = false ) {
if(!is_admin() && is_search()){
$query->set( 'tax_query', array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'exclude-from-search',
'operator' => 'NOT IN',
)
));
}
}
function mep_check_plugin_installed($path){
if (is_plugin_active($path)) {
return true;
}else{
return false;
}
}
add_action('mep_event_tab_after_ticket_pricing','mep_event_pro_purchase_notice');
function mep_event_pro_purchase_notice(){
if(!mep_check_plugin_installed('woocommerce-event-manager-addon-form-builder/addon-builder.php') ) { ?>
<p class="event_meta_help_txtx"><span class="dashicons dashicons-info"></span> <?php _e("Get Individual Attendee Information, PDF Ticketing and Email Function with <a href='https://mage-people.com/product/mage-woo-event-booking-manager-pro/' target='_blank'>Event Manager Pro</a>", 'mage-eventpress'); ?></p>
<?php } if(!mep_check_plugin_installed('woocommerce-event-manager-addon-global-quantity/global-quantity.php')){ ?>
<p class="event_meta_help_txtx"><span class="dashicons dashicons-info"></span> <?php _e("Setup Event Common QTY of All Ticket Type get <a href='https://mage-people.com/product/global-common-qty-addon-for-event-manager' target='_blank'>Global QTY Addon</a>", 'mage-eventpress'); ?></p>
<?php } if(!mep_check_plugin_installed('woocommerce-event-manager-addon-membership-price/membership-price.php')){ ?>
<p class="event_meta_help_txtx"><span class="dashicons dashicons-info"></span> <?php _e("Special Price Option for each user type or membership get <a href='https://mage-people.com/product/membership-pricing-for-event-manager-plugin' target='_blank'>Membership Pricing Addon</a>", 'mage-eventpress'); ?></p>
<?php } if(!mep_check_plugin_installed('woocommerce-event-manager-min-max-quantity-addon/mep_min_max_qty.php')){ ?>
<p class="event_meta_help_txtx"><span class="dashicons dashicons-info"></span> <?php _e("Set maximum/minimum qty buying option with <a href='https://mage-people.com/product/event-max-min-quantity-limiting-addon-for-woocommerce-event-manager' target='_blank'>Max/Min Qty Addon</a>", 'mage-eventpress'); ?></p>
<?php
}
}
add_action('mp_event_recurring_every_day_setting','mep_event_recurring_purchase_notice',90);
function mep_event_recurring_purchase_notice(){
if(!mep_check_plugin_installed('woocommerce-event-manager-addon-recurring-event/recurring_events.php') ) {
?>
<p class="event_meta_help_txtx"><span class="dashicons dashicons-info"></span> <?php _e("Looking for Recurring events function where customer can choose date and time check out our <a href='https://mage-people.com/product/recurring-events-addon-for-event-manager/' target='_blank'>Recurring Addon</a>", 'mage-eventpress'); ?></p>
<?php
}
}

351
inc/quick_setup.php Normal file
View File

@ -0,0 +1,351 @@
<?php
if ( ! defined('ABSPATH')) exit; // if direct access
wp_enqueue_script('welcome-tabs');
wp_enqueue_style( 'welcome-tabs' );
$mep_settings_tab = array();
$mep_settings_tab[] = array(
'id' => 'start',
'title' => sprintf(__('%s Welcome','mage-eventpress'),'<i class="far fa-thumbs-up"></i>'),
'priority' => 1,
'active' => true,
);
$mep_settings_tab[] = array(
'id' => 'general',
'title' => sprintf(__('%s General','mage-eventpress'),'<i class="fas fa-list-ul"></i>'),
'priority' => 2,
'active' => false,
);
$mep_settings_tab[] = array(
'id' => 'done',
'title' => sprintf(__('%s Done','mage-eventpress'),'<i class="fas fa-pencil-alt"></i>'),
'priority' => 4,
'active' => false,
);
$mep_settings_tab = apply_filters('qa_welcome_tabs', $mep_settings_tab);
$tabs_sorted = array();
foreach ($mep_settings_tab as $page_key => $tab) $tabs_sorted[$page_key] = isset( $tab['priority'] ) ? $tab['priority'] : 0;
array_multisort($tabs_sorted, SORT_ASC, $mep_settings_tab);
wp_enqueue_style('font-awesome-5');
if (!function_exists('mep_woo_install_check')) {
function mep_woo_install_check() {
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
$plugin_dir = ABSPATH . 'wp-content/plugins/woocommerce';
if (is_plugin_active('woocommerce/woocommerce.php')) {
return 'Yes';
} elseif (is_dir($plugin_dir)) {
return 'Installed But Not Active';
} else {
return 'No';
}
}
}
add_action('mep_quick_setup_header','mep_woo_quick_setup_action',90);
function mep_woo_quick_setup_action(){
if(isset($_POST['active_woo_btn'])){
activate_plugin('woocommerce/woocommerce.php' );
?>
<script> location.reload(); </script>
<?php
}
if(isset($_POST['install_and_active_woo_btn'])){
echo '<div style="display:none">';
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
$plugin = 'woocommerce';
$api = plugins_api( 'plugin_information', array(
'slug' => $plugin,
'fields' => array(
'short_description' => false,
'sections' => false,
'requires' => false,
'rating' => false,
'ratings' => false,
'downloaded' => false,
'last_updated' => false,
'added' => false,
'tags' => false,
'compatibility' => false,
'homepage' => false,
'donate_link' => false,
),
));
//includes necessary for Plugin_Upgrader and Plugin_Installer_Skin
include_once( ABSPATH . 'wp-admin/includes/file.php' );
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
$upgrader->install($api->download_link);
activate_plugin('woocommerce/woocommerce.php' );
echo '</div>';
}
if(isset($_POST['finish_quick_setup'])){
$url = (isset($_SERVER['HTTPS']) ? "" : "") . "$_SERVER[HTTP_HOST]";
$event_label = isset($_POST['event_label']) ? sanitize_text_field($_POST['event_label']) : 'Events';
$event_slug = isset($_POST['event_slug']) ? sanitize_text_field($_POST['event_slug']) : 'event';
$event_expire_on = isset($_POST['event_expire_on']) ? sanitize_text_field($_POST['event_expire_on']) : 'event_expire_datetime';
$email_from_name = isset($_POST['email_from_name']) ? sanitize_text_field($_POST['email_from_name']) : bloginfo('name');
$email_from_addrss = isset($_POST['email_from_address']) ? sanitize_text_field($_POST['email_from_address']) : "no-reply@$url";
$general_settings_data = get_option('general_setting_sec');
$email_settings_data = get_option('email_setting_sec');
$update_general_settings_arr = [
'mep_event_label' => $event_label,
'mep_event_expire_on_datetimes' => $event_expire_on,
'mep_event_slug' => $event_slug
];
$update_email_settings_arr = [
'mep_email_form_name' => $email_from_name,
'mep_email_form_email' => $email_from_addrss
];
$new_general_settings_data = array_replace($general_settings_data,$update_general_settings_arr);
$new_email_settings_data = array_replace($email_settings_data,$update_email_settings_arr);
update_option( 'general_setting_sec', $new_general_settings_data);
update_option( 'email_setting_sec', $new_email_settings_data);
update_option( 'mep_quick_setup', 'done');
flush_rewrite_rules();
wp_redirect(admin_url('edit.php?post_type=mep_events&page=mep_event_welcome_page'));
}
}
add_action('mep_quick_setup_content_start', 'mep_quick_setup_welcome_content');
function mep_quick_setup_welcome_content($tab){
mep_quick_setup_start();
}
add_action('mep_quick_setup_content_general', 'mep_quick_setup_general_content');
function mep_quick_setup_general_content($tab){
mep_quick_setup_general();
}
add_action('mep_quick_setup_content_done', 'mep_quick_setup_done_content');
function mep_quick_setup_done_content($tab){
mep_quick_setup_done();
}
do_action('mep_quick_setup_header');
?>
<div id="ttbm_quick_setup" class="wrap">
<div id="icon-tools" class="icon32"><br></div>
<h2></h2>
<form method="post" action="">
<input type="hidden" name="qa_hidden" value="Y">
<?php
?>
<div class="welcome-tabs">
<ul class="tab-navs">
<?php
foreach ($mep_settings_tab as $tab){
$id = $tab['id'];
$title = $tab['title'];
$active = $tab['active'];
$data_visible = isset($tab['data_visible']) ? $tab['data_visible'] : '';
$hidden = isset($tab['hidden']) ? $tab['hidden'] : false;
?>
<li <?php if(!empty($data_visible)): ?> data_visible="<?php echo esc_html($data_visible); ?>" <?php endif; ?> class="tab-nav <?php if($hidden) echo 'hidden';?> <?php if($active) echo 'active';?>" data-id="<?php echo esc_html($id); ?>"><?php echo $title; ?></li>
<?php
}
?>
</ul>
<?php
foreach ($mep_settings_tab as $tab){
$id = $tab['id'];
$title = $tab['title'];
$active = $tab['active'];
?>
<div class="tab-content <?php if($active) echo 'active';?>" id="<?php echo esc_html($id); ?>">
<?php
do_action('mep_quick_setup_content_'.$id, $tab);
do_action('mep_after_quick_setup_content', $tab);
?>
</div>
<?php
}
?>
<div class="next-prev">
<div class="prev"><span><?php echo sprintf(__('%s Previous','mage-eventpress'),'&longleftarrow;')?></span></div>
<div class="next"><span><?php echo sprintf(__('Next %s','mage-eventpress'),'&longrightarrow;')?></span></div>
</div>
</div>
<div class="clear clearfix"></div>
<?Php
?>
</form>
</div>
<?php
function mep_quick_setup_start(){
$status = mep_check_woocommerce();
?>
<h2><?php echo __('Event Manager and Tickets Selling Plugin', 'mage-eventpress'); ?></h2>
<p><?php echo __('Thanks for choosing Event Manager and Tickets Selling Plugin for WooCommerce for your site, Please go step by step and choose some options to get started.', 'mage-eventpress'); ?></p>
<table class="wc_status_table widefat" cellspacing="0" id="status">
<tr>
<td data-export-label="WC Version">
<?php if ( $status == 1 ) { ?>
<?php _e( 'Woocommerce already installed and activated', 'mage-eventpress' ); ?>
<?php } elseif ( $status == 0 ) { ?>
<?php _e( 'Woocommerce need to install and active', 'mage-eventpress' ); ?>
<?php } else { ?>
<?php _e( 'Woocommerce already install , please activate it', 'mage-eventpress' ); ?>
<?php } ?>
</td>
<td class="help"><span class="woocommerce-help-tip"></span></td>
<td class="woo_btn_td">
<?php if ( $status == 1 ) { ?>
<span class="fas fa-check-circle"></span>
<?php } elseif ( $status == 0 ) { ?>
<button class="button" type="submit" name="install_and_active_woo_btn">Install & Active Now</button>
<?php } else { ?>
<button class="button" type="submit" name="active_woo_btn">Active Now</button>
<?php } ?>
</td>
</tr>
</table>
<?php
}
function mep_quick_setup_general(){
$general_data = get_option('general_setting_sec');
$email_data = get_option('email_setting_sec');
$url = (isset($_SERVER['HTTPS']) ? "" : "") . "$_SERVER[HTTP_HOST]";
$label = isset($general_data['mep_event_label']) ? $general_data['mep_event_label'] : 'Events';
$slug = isset($general_data['mep_event_slug']) ? $general_data['mep_event_slug'] : 'event';
$expire = isset($general_data['mep_event_expire_on_datetimes']) ? $general_data['mep_event_expire_on_datetimes'] : 'event_expire_datetime';
$from_email = isset($email_data['mep_email_form_name']) ? $email_data['mep_email_form_name'] : bloginfo('name');
$from_email_address = isset($email_data['mep_email_form_email']) ? $email_data['mep_email_form_email'] : "no-reply@$url";
?>
<div class="section">
<div class="section-title"><?php echo __('General settings', 'mage-eventpress'); ?></div>
<p class="description section-description"><?php echo __('Choose some general option.', 'mage-eventpress'); ?></p>
<table class="wc_status_table widefat" cellspacing="0" id="status">
<tr>
<td><?php _e('Event Label:','mage-eventpress'); ?></td>
<td class="help"><span class="woocommerce-help-tip"></span></td>
<td>
<input type="text" name="event_label" value='<?php echo esc_html($label); ?>'/>
<p class="info"><?php _e('It will change the event post type label on the entire plugin.','mage-eventpress'); ?></p>
</td>
</tr>
<tr>
<td><?php _e('Event Slug:','mage-eventpress'); ?></td>
<td class="help"><span class="woocommerce-help-tip"></span></td>
<td>
<input type="text" name="event_slug" value='<?php echo esc_html($slug); ?>'/>
<p class="info"><?php _e('It will change the event slug on the entire plugin. Remember after changing this slug you need to flush permalinks. Just go to Settings->Permalinks hit the Save Settings button','mage-eventpress'); ?></p>
</td>
</tr>
<tr>
<td><?php _e('When will the event expire:','mage-eventpress'); ?></td>
<td class="help"><span class="woocommerce-help-tip"></span></td>
<td>
<select class="regular" name="event_expire_on">
<option value="event_start_datetime" <?php if($expire == 'event_start_datetime'){ echo 'Selected'; } ?>><?php _e('Event Start Time','mage-eventpress'); ?></option>
<option value="event_expire_datetime" <?php if($expire == 'event_expire_datetime'){ echo 'Selected'; } ?>><?php _e('Event End Time','mage-eventpress'); ?></option>
</select>
<p class="info"><?php _e('Please select when the event will expire','mage-eventpress'); ?></p>
</td>
</tr>
<tr>
<td><?php _e('Email From Name:','mage-eventpress'); ?></td>
<td class="help"><span class="woocommerce-help-tip"></span></td>
<td>
<input type="text" name="email_from_name" value='<?php echo esc_html($from_email); ?>'/>
<p class="info"><?php _e('Please enter the email from name','mage-eventpress'); ?></p>
</td>
</tr>
<tr>
<td><?php _e('From Email Address:','mage-eventpress'); ?></td>
<td class="help"><span class="woocommerce-help-tip"></span></td>
<td>
<input type="text" name="email_from_address" value='<?php echo esc_html($from_email_address); ?>'/>
<p class="info"><?php _e('Please enter the email from name','mage-eventpress'); ?></p>
</td>
</tr>
</table>
</div>
<?php
}
function mep_quick_setup_done(){
?>
<div class="section">
<div class="section-title"><?php echo __('Finalize Setup', 'mage-eventpress'); ?></div>
<p class="description section-description"><?php echo __('You are about to Finish & Save Event Manager and Tickets Selling Plugin setup process', 'mage-eventpress'); ?></p>
<div class="setup_save_finish_area">
<button type="submit" name="finish_quick_setup" class="button setup_save_finish"><?php _e('Finish & Save','mage-eventpress'); ?></button>
</div>
</div>
<?php
}
function mep_check_woocommerce(): int {
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$plugin_dir = ABSPATH . 'wp-content/plugins/woocommerce';
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
return 1;
} elseif ( is_dir( $plugin_dir ) ) {
return 2;
} else {
return 0;
}
}

View File

@ -24,7 +24,7 @@ if (!function_exists('mep_event_display_no_seat_text')) {
ob_start();
?>
<span class=event-expire-btn>
<?php echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : esc_html__('No Seats Available', 'mage-eventpress'); ?>
<?php echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : esc_html__('No Seat Availables', 'mage-eventpress'); ?>
</span>
<?php
echo ob_get_clean();

View File

@ -23,8 +23,19 @@ add_action('admin_menu', 'mep_event_welcome_admin_menu');
function mep_event_welcome_admin_menu()
{
add_submenu_page('edit.php?post_type=mep_events', __('Welcome', 'mage-eventpress'), __('<span style="color:#10dd10">Welcome</span>', 'mage-eventpress'), 'manage_options', 'mep_event_welcome_page', 'mep_event_welcome_page');
add_submenu_page('edit.php?post_type=mep_events', __('Quick Setup', 'mage-eventpress'), __('<span style="color:#10dd10">Quick Setup</span>', 'mage-eventpress'), 'manage_options', 'mep_event_quick_setup_page', 'mep_event_quick_setup_page');
add_submenu_page('edit.php?post_type=mep_events', __('Dummy Import', 'mage-eventpress'), __('<span style="color:#10dd10">Dummy Import</span>', 'mage-eventpress'), 'manage_options', 'mep_event_import_page', 'mep_event_import_page');
}
function mep_event_quick_setup_page(){
require_once(dirname(__DIR__) . "/inc/quick_setup.php");
}
function mep_event_welcome_page()
{

View File

@ -33,7 +33,7 @@
row.insertBefore('#repeatable-fieldset-one-t tbody>tr:last');
$('#mep_ticket_type_empty option[value=inputbox]').attr('selected', 'selected');
$('.empty-row-t #mep_ticket_type_empty option[value=inputbox]').removeAttr('selected');
return false;
//return false;
});
$('.remove-row-t').on('click', function () {

73
js/welcome-tabs.js Executable file
View File

@ -0,0 +1,73 @@
jQuery(document).ready(function ($) {
$(document).on('click', '.welcome-tabs .tab-nav', function () {
$(this).parent().parent().children('.tab-navs').children('.tab-nav').removeClass('active');
$(this).addClass('active');
id = $(this).attr('data-id');
$(this).parent().parent().children('.tab-content').removeClass('active');
$(this).parent().parent().children('.tab-content#' + id).addClass('active');
if(id==='start') {
$('.prev').slideUp('fast');
$('.next').slideDown('fast');
}
if(id==='general') {
$('.prev').slideDown('fast');
$('.next').slideDown('fast');
}
if(id==='done') {
$('.prev').slideDown('fast');
$('.next').slideUp('fast');
}
})
$(document).on('click', '.welcome-tabs .next-prev .next', function () {
welcomeTabs = $('.welcome-tabs .tab-nav');
welcomeTabsContent = $('.welcome-tabs .tab-content ');
totalTab = welcomeTabs.length;
for (i = 0; i < welcomeTabs.length; i++) {
tab = welcomeTabs[i];
content = welcomeTabsContent[i];
if (tab.classList.contains('active')) {
currentTabIndex = i;
tab.classList.remove('active');
content.classList.remove('active');
}
}
for (j = 0; j <= currentTabIndex; j++) {
tab = welcomeTabs[j];
tab.classList.add('done');
}
if (typeof welcomeTabs[currentTabIndex + 1] != 'undefined') {
welcomeTabs[currentTabIndex + 1].classList.add('active');
welcomeTabsContent[currentTabIndex + 1].classList.add('active');
}
if(currentTabIndex===0) {
$('.prev').slideDown('fast');
}
if(currentTabIndex===1) {
$('.next').slideUp('fast');
}
})
$(document).on('click', '.welcome-tabs .next-prev .prev', function () {
welcomeTabs = $('.welcome-tabs .tab-nav');
welcomeTabsContent = $('.welcome-tabs .tab-content ');
for (i = 0; i < welcomeTabs.length; i++) {
tab = welcomeTabs[i];
content = welcomeTabsContent[i];
if (tab.classList.contains('active')) {
currentTabIndex = i;
tab.classList.remove('active');
content.classList.remove('active');
}
}
welcomeTabs[currentTabIndex - 1].classList.remove('done');
if (typeof welcomeTabs[currentTabIndex - 1] != 'undefined') {
welcomeTabs[currentTabIndex - 1].classList.add('active');
welcomeTabsContent[currentTabIndex - 1].classList.add('active');
}
if(currentTabIndex===1) {
$('.prev').slideUp('fast');
}
if(currentTabIndex===2) {
$('.next').slideDown('fast');
}
})
});

View File

@ -853,3 +853,10 @@ Bug fixed
Ticket Allocation issue fixed for special char.
Bug fixed
27 Jun 2022*
= 3.6.8=
* Update Release:
Quick Setup Page Added
Bug fixed
04 Aug 2022*

View File

@ -38,7 +38,7 @@
} else {
?>
<input id="eventpxtp_<?php echo esc_attr($count); ?>" type="hidden" class='extra-qty-box etp' name='option_qty[]' data-price='0' value='0' min="0" max="0">
<?php echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : esc_html__('No Seats Available', 'mage-eventpress');
<?php echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : esc_html__('No Seat Availables', 'mage-eventpress');
}
$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);

View File

@ -89,7 +89,7 @@ $event_organizer_icon = mep_get_option('mep_event_organizer_icon', 'icon_s
<div class="df-seat"><?php do_action('mep_event_seat'); ?></div>
</div>
<?php } ?>
<?php if ($hide_org_by_details == 'no') { ?>
<?php if ($hide_org_by_details == 'no' && has_term('','mep_org',get_the_id())) { ?>
<div class="mep-default-sidrbar-meta">
<i class="<?php echo $event_organizer_icon; ?>"></i> <?php do_action('mep_event_organizer'); ?>
</div>

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.7
* Version: 3.6.8
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress
@ -29,8 +29,11 @@ if (is_plugin_active('woocommerce/woocommerce.php')) {
function mep_event_activation_redirect($plugin)
{
$check_quick_setup = get_option('mep_quick_setup') ? get_option('mep_quick_setup') : 'no-done';
$slug = $check_quick_setup == 'done' ? 'edit.php?post_type=mep_events&page=mep_event_welcome_page' : 'edit.php?post_type=mep_events&page=mep_event_quick_setup_page';
if ($plugin == plugin_basename(__FILE__)) {
exit(wp_redirect(admin_url('edit.php?post_type=mep_events&page=mep_event_welcome_page')));
exit(wp_redirect(admin_url($slug)));
}
}
add_action('activated_plugin', 'mep_event_activation_redirect');
@ -85,6 +88,30 @@ if (is_plugin_active('woocommerce/woocommerce.php')) {
} else {
require_once(dirname(__FILE__) . "/lib/classes/class-mep-required-plugins.php");
add_action('admin_enqueue_scripts', 'mep_add_admin_scripts', 10, 1);
function mep_add_admin_scripts($hook)
{
wp_register_script('welcome-tabs', plugin_dir_url(__FILE__) . 'js/welcome-tabs.js', array('jquery'));
wp_register_style('welcome-tabs', plugin_dir_url(__FILE__) . 'css/welcome-tabs.css');
wp_register_script('welcome-tabs', plugin_dir_url(__FILE__) . 'js/welcome-tabs.js', array('jquery'));
wp_register_style('welcome-tabs', plugin_dir_url(__FILE__) . 'css/welcome-tabs.css');
}
add_action('admin_menu', 'mep_event_welcome_admin_menu');
function mep_event_welcome_admin_menu(){
add_menu_page(__( 'Events', 'mage-eventpress' ), __( 'Events', 'mage-eventpress' ), 'manage_options', 'mep_events','mep_event_quick_setup_page','dashicons-calendar-alt', 6);
add_submenu_page('mep_events', __('Quick Setup', 'mage-eventpress'), __('<span style="color:#10dd10">Quick Setup</span>', 'mage-eventpress'), 'manage_options', 'mep_event_quick_setup_page', 'mep_event_quick_setup_page');
}
function mep_event_quick_setup_page(){
require_once(dirname(__FILE__) . "/inc/quick_setup.php");
}
}