function update
This commit is contained in:
parent
e38805683c
commit
41d75e31ca
|
@ -87,7 +87,7 @@ div.icon_loader_xs {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.pagination_area button[class*="defaultButton_xs"]:first-child {border: none;}
|
.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"]:last-child {border-radius: 0 5px 5px 0 !important;}
|
||||||
.pagination_area button[class*="defaultButton_xs"].active_pagination {
|
.pagination_area button[class*="defaultButton_xs"].active_pagination {
|
||||||
color: #000;
|
color: #000;
|
||||||
background-color: #DDD;
|
background-color: #DDD;
|
||||||
|
@ -105,6 +105,8 @@ div.icon_loader_xs {
|
||||||
position: relative;
|
position: relative;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
div.buttonGroup [class*="Button"]:first-child {
|
div.buttonGroup [class*="Button"]:first-child {
|
||||||
-webkit-border-radius: 5px 0 0 5px;
|
-webkit-border-radius: 5px 0 0 5px;
|
||||||
|
|
|
@ -1437,7 +1437,7 @@ if (!function_exists('mep_event_template_name')) {
|
||||||
//Use the is_file function to make sure that it is not a directory.
|
//Use the is_file function to make sure that it is not a directory.
|
||||||
if (is_file($filename)) {
|
if (is_file($filename)) {
|
||||||
$file = basename($filename);
|
$file = basename($filename);
|
||||||
$naame = str_replace("?>", "", sanitize_text_field(file_get_contents($filename, false, null, 24, 14)));
|
$naame = str_replace("?>", "", strip_tags(file_get_contents($filename, false, null, 24, 14)));
|
||||||
}
|
}
|
||||||
$theme[$file] = $naame;
|
$theme[$file] = $naame;
|
||||||
}
|
}
|
||||||
|
@ -1954,47 +1954,47 @@ if (!function_exists('mep_save_attendee_info_into_cart')) {
|
||||||
for ($iu = 0; $iu < $count_user; $iu++) {
|
for ($iu = 0; $iu < $count_user; $iu++) {
|
||||||
|
|
||||||
if (isset($mep_user_name[$iu])):
|
if (isset($mep_user_name[$iu])):
|
||||||
$user[$iu]['user_name'] = stripslashes(strip_tags($mep_user_name[$iu]));
|
$user[$iu]['user_name'] = stripslashes(strip_tags($mep_user_name[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_email[$iu])) :
|
if (isset($mep_user_email[$iu])) :
|
||||||
$user[$iu]['user_email'] = stripslashes(strip_tags($mep_user_email[$iu]));
|
$user[$iu]['user_email'] = stripslashes(strip_tags($mep_user_email[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_phone[$iu])) :
|
if (isset($mep_user_phone[$iu])) :
|
||||||
$user[$iu]['user_phone'] = stripslashes(strip_tags($mep_user_phone[$iu]));
|
$user[$iu]['user_phone'] = stripslashes(strip_tags($mep_user_phone[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_address[$iu])) :
|
if (isset($mep_user_address[$iu])) :
|
||||||
$user[$iu]['user_address'] = stripslashes(strip_tags($mep_user_address[$iu]));
|
$user[$iu]['user_address'] = stripslashes(strip_tags($mep_user_address[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_gender[$iu])) :
|
if (isset($mep_user_gender[$iu])) :
|
||||||
$user[$iu]['user_gender'] = stripslashes(strip_tags($mep_user_gender[$iu]));
|
$user[$iu]['user_gender'] = stripslashes(strip_tags($mep_user_gender[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_tshirtsize[$iu])) :
|
if (isset($mep_user_tshirtsize[$iu])) :
|
||||||
$user[$iu]['user_tshirtsize'] = stripslashes(strip_tags($mep_user_tshirtsize[$iu]));
|
$user[$iu]['user_tshirtsize'] = stripslashes(strip_tags($mep_user_tshirtsize[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_company[$iu])) :
|
if (isset($mep_user_company[$iu])) :
|
||||||
$user[$iu]['user_company'] = stripslashes(strip_tags($mep_user_company[$iu]));
|
$user[$iu]['user_company'] = stripslashes(strip_tags($mep_user_company[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_desg[$iu])) :
|
if (isset($mep_user_desg[$iu])) :
|
||||||
$user[$iu]['user_designation'] = stripslashes(strip_tags($mep_user_desg[$iu]));
|
$user[$iu]['user_designation'] = stripslashes(strip_tags($mep_user_desg[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_website[$iu])) :
|
if (isset($mep_user_website[$iu])) :
|
||||||
$user[$iu]['user_website'] = stripslashes(strip_tags($mep_user_website[$iu]));
|
$user[$iu]['user_website'] = stripslashes(strip_tags($mep_user_website[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_vegetarian[$iu])) :
|
if (isset($mep_user_vegetarian[$iu])) :
|
||||||
$user[$iu]['user_vegetarian'] = stripslashes(strip_tags($mep_user_vegetarian[$iu]));
|
$user[$iu]['user_vegetarian'] = stripslashes(strip_tags($mep_user_vegetarian[$iu]));
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($mep_user_ticket_type[$iu])) :
|
if (isset($mep_user_ticket_type[$iu])) :
|
||||||
$user[$iu]['user_ticket_type'] = strip_tags($mep_user_ticket_type[$iu]);
|
$user[$iu]['user_ticket_type'] = strip_tags($mep_user_ticket_type[$iu]);
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
// if ($ticket_price) :
|
// if ($ticket_price) :
|
||||||
|
@ -2020,6 +2020,8 @@ if (!function_exists('mep_save_attendee_info_into_cart')) {
|
||||||
$user[$iu][$_field['mep_fbc_id']] = stripslashes(strip_tags($_POST[$_field['mep_fbc_id']][$iu]));
|
$user[$iu][$_field['mep_fbc_id']] = stripslashes(strip_tags($_POST[$_field['mep_fbc_id']][$iu]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return apply_filters('mep_cart_user_data_prepare', $user, $product_id);
|
return apply_filters('mep_cart_user_data_prepare', $user, $product_id);
|
||||||
}
|
}
|
||||||
|
@ -2585,8 +2587,8 @@ if (!function_exists('mep_wc_link_product_on_save')) {
|
||||||
|
|
||||||
$product_type = mep_get_option('mep_event_product_type', 'general_setting_sec', 'yes');
|
$product_type = mep_get_option('mep_event_product_type', 'general_setting_sec', 'yes');
|
||||||
|
|
||||||
$_tax_status = isset($_POST['_tax_status']) ? sanitize_text_field($_POST['_tax_status']) : 'none';
|
$_tax_status = isset($_POST['_tax_status']) ? strip_tags($_POST['_tax_status']) : 'none';
|
||||||
$_tax_class = isset($_POST['_tax_class']) ? sanitize_text_field($_POST['_tax_class']) : '';
|
$_tax_class = isset($_POST['_tax_class']) ? strip_tags($_POST['_tax_class']) : '';
|
||||||
|
|
||||||
$update__tax_status = update_post_meta($product_id, '_tax_status', $_tax_status);
|
$update__tax_status = update_post_meta($product_id, '_tax_status', $_tax_status);
|
||||||
$update__tax_class = update_post_meta($product_id, '_tax_class', $_tax_class);
|
$update__tax_class = update_post_meta($product_id, '_tax_class', $_tax_class);
|
||||||
|
@ -2926,7 +2928,7 @@ if (!function_exists('mep_event_rich_text_data')) {
|
||||||
"image": [
|
"image": [
|
||||||
"<?php echo get_the_post_thumbnail_url($event_id, 'full'); ?>"
|
"<?php echo get_the_post_thumbnail_url($event_id, 'full'); ?>"
|
||||||
],
|
],
|
||||||
"description": "<?php echo sanitize_text_field(get_the_excerpt($event_id)); ?>",
|
"description": "<?php echo strip_tags(get_the_excerpt($event_id)); ?>",
|
||||||
"performer": {
|
"performer": {
|
||||||
"@type": "PerformingGroup",
|
"@type": "PerformingGroup",
|
||||||
"name": "<?php echo $org_name; ?>"
|
"name": "<?php echo $org_name; ?>"
|
||||||
|
@ -2994,10 +2996,10 @@ if (!function_exists('mep_custom_css_settings_reg')) {
|
||||||
'id' => 'mep_settings_custom_css',
|
'id' => 'mep_settings_custom_css',
|
||||||
'title' => __('Custom CSS', 'mage-eventpress')
|
'title' => __('Custom CSS', 'mage-eventpress')
|
||||||
),
|
),
|
||||||
array(
|
// array(
|
||||||
'id' => 'mep_settings_templates',
|
// 'id' => 'mep_settings_templates',
|
||||||
'title' => __('Templates', 'mage-eventpress')
|
// 'title' => __('Templates', 'mage-eventpress')
|
||||||
),
|
// ),
|
||||||
array(
|
array(
|
||||||
'id' => 'mep_settings_licensing',
|
'id' => 'mep_settings_licensing',
|
||||||
'title' => __('License', 'mage-eventpress')
|
'title' => __('License', 'mage-eventpress')
|
||||||
|
@ -4086,84 +4088,84 @@ function mep_license_error_code($license_data, $item_name = 'this Plugin') {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('wp_ajax_mep_wl_ajax_license_activate', 'mep_wl_ajax_license_activate');
|
// add_action('wp_ajax_mep_wl_ajax_license_activate', 'mep_wl_ajax_license_activate');
|
||||||
function mep_wl_ajax_license_activate() {
|
// function mep_wl_ajax_license_activate() {
|
||||||
|
|
||||||
if (wp_verify_nonce($_POST['nonce'], 'mep-ajax-license-activation-nonce')) {
|
// if (wp_verify_nonce($_POST['nonce'], 'mep-ajax-license-activation-nonce')) {
|
||||||
|
|
||||||
$nonce = sanitize_text_field($_REQUEST['nonce']);
|
// $nonce = sanitize_text_field($_REQUEST['nonce']);
|
||||||
$license = sanitize_text_field($_REQUEST['key']);
|
// $license = sanitize_text_field($_REQUEST['key']);
|
||||||
$key_option_name = sanitize_text_field($_REQUEST['key_option_name']);
|
// $key_option_name = sanitize_text_field($_REQUEST['key_option_name']);
|
||||||
$status_option_name = sanitize_text_field($_REQUEST['status_option_name']);
|
// $status_option_name = sanitize_text_field($_REQUEST['status_option_name']);
|
||||||
$expire_option_name = sanitize_text_field($_REQUEST['expire_option_name']);
|
// $expire_option_name = sanitize_text_field($_REQUEST['expire_option_name']);
|
||||||
$order_id_option_name = sanitize_text_field($_REQUEST['order_id_option_name']);
|
// $order_id_option_name = sanitize_text_field($_REQUEST['order_id_option_name']);
|
||||||
$item_name = sanitize_text_field($_REQUEST['item_name']);
|
// $item_name = sanitize_text_field($_REQUEST['item_name']);
|
||||||
$item_id = sanitize_text_field($_REQUEST['item_id']);
|
// $item_id = sanitize_text_field($_REQUEST['item_id']);
|
||||||
$user_type = isset($_REQUEST['user_type']) ? sanitize_text_field($_REQUEST['user_type']) : 'new';
|
// $user_type = isset($_REQUEST['user_type']) ? sanitize_text_field($_REQUEST['user_type']) : 'new';
|
||||||
|
|
||||||
$plugin_user_status_type = $key_option_name . '_type';
|
// $plugin_user_status_type = $key_option_name . '_type';
|
||||||
|
|
||||||
// data to send in our API request
|
// // data to send in our API request
|
||||||
$api_params = array(
|
// $api_params = array(
|
||||||
'edd_action' => 'activate_license',
|
// 'edd_action' => 'activate_license',
|
||||||
'license' => $license,
|
// 'license' => $license,
|
||||||
'item_id' => $item_id,
|
// 'item_id' => $item_id,
|
||||||
'url' => home_url()
|
// 'url' => home_url()
|
||||||
);
|
// );
|
||||||
// Call the custom API.
|
// // Call the custom API.
|
||||||
$response = wp_remote_post(MEP_STORE_URL, array('timeout' => 15, 'sslverify' => false, 'body' => $api_params));
|
// $response = wp_remote_post(MEP_STORE_URL, array('timeout' => 15, 'sslverify' => false, 'body' => $api_params));
|
||||||
$license_data = json_decode(wp_remote_retrieve_body($response));
|
// $license_data = json_decode(wp_remote_retrieve_body($response));
|
||||||
|
|
||||||
if (is_wp_error($response) || 200 !== wp_remote_retrieve_response_code($response)) {
|
// if (is_wp_error($response) || 200 !== wp_remote_retrieve_response_code($response)) {
|
||||||
$message = (is_wp_error($response) && !empty($response->get_error_message())) ? $response->get_error_message() : __('<h5 class="mep-msg mep-msg-warning">An error occurred, please try again.</h5>');
|
// $message = (is_wp_error($response) && !empty($response->get_error_message())) ? $response->get_error_message() : __('<h5 class="mep-msg mep-msg-warning">An error occurred, please try again.</h5>');
|
||||||
} else {
|
// } else {
|
||||||
|
|
||||||
if (false === $license_data->success) {
|
// if (false === $license_data->success) {
|
||||||
$message = mep_license_error_code($license_data, $item_name);
|
// $message = mep_license_error_code($license_data, $item_name);
|
||||||
} else {
|
// } else {
|
||||||
$payment_id = $license_data->payment_id;
|
// $payment_id = $license_data->payment_id;
|
||||||
$expire = $license_data->expires;
|
// $expire = $license_data->expires;
|
||||||
$message = __("<h5 class='mep-msg mep-msg-success'>Success, License Key is valid for the plugin $item_name. Your Order id is $payment_id. Validity of this licenses is $expire.</h5>", "mage-eventpress");
|
// $message = __("<h5 class='mep-msg mep-msg-success'>Success, License Key is valid for the plugin $item_name. Your Order id is $payment_id. Validity of this licenses is $expire.</h5>", "mage-eventpress");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if ($license_data->success) {
|
// if ($license_data->success) {
|
||||||
echo $message;
|
// echo $message;
|
||||||
update_option($key_option_name, $license);
|
// update_option($key_option_name, $license);
|
||||||
update_option($expire_option_name, $license_data->expires);
|
// update_option($expire_option_name, $license_data->expires);
|
||||||
update_option($order_id_option_name, $license_data->payment_id);
|
// update_option($order_id_option_name, $license_data->payment_id);
|
||||||
update_option($plugin_user_status_type, $user_type);
|
// update_option($plugin_user_status_type, $user_type);
|
||||||
} else {
|
// } else {
|
||||||
update_option($key_option_name, '');
|
// update_option($key_option_name, '');
|
||||||
update_option($expire_option_name, '');
|
// update_option($expire_option_name, '');
|
||||||
update_option($order_id_option_name, '');
|
// update_option($order_id_option_name, '');
|
||||||
}
|
// }
|
||||||
update_option($status_option_name, $license_data->license);
|
// update_option($status_option_name, $license_data->license);
|
||||||
} else {
|
// } else {
|
||||||
_e('Something went wrong, Please Contact with support', 'mep-eventpress');
|
// _e('Something went wrong, Please Contact with support', 'mep-eventpress');
|
||||||
}
|
// }
|
||||||
die();
|
// die();
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
add_action('wp_ajax_mep_wl_ajax_license_deactivate', 'mep_wl_ajax_license_deactivate');
|
// add_action('wp_ajax_mep_wl_ajax_license_deactivate', 'mep_wl_ajax_license_deactivate');
|
||||||
function mep_wl_ajax_license_deactivate() {
|
// function mep_wl_ajax_license_deactivate() {
|
||||||
if (wp_verify_nonce($_POST['nonce'], 'mep-ajax-license-deactivation-nonce')) {
|
// if (wp_verify_nonce($_POST['nonce'], 'mep-ajax-license-deactivation-nonce')) {
|
||||||
$key_option_name = sanitize_text_field($_REQUEST['key_option_name']);
|
// $key_option_name = sanitize_text_field($_REQUEST['key_option_name']);
|
||||||
$status_option_name = sanitize_text_field($_REQUEST['status_option_name']);
|
// $status_option_name = sanitize_text_field($_REQUEST['status_option_name']);
|
||||||
$expire_option_name = sanitize_text_field($_REQUEST['expire_option_name']);
|
// $expire_option_name = sanitize_text_field($_REQUEST['expire_option_name']);
|
||||||
$order_id_option_name = sanitize_text_field($_REQUEST['order_id_option_name']);
|
// $order_id_option_name = sanitize_text_field($_REQUEST['order_id_option_name']);
|
||||||
$item_name = sanitize_text_field($_REQUEST['item_name']);
|
// $item_name = sanitize_text_field($_REQUEST['item_name']);
|
||||||
$item_id = sanitize_text_field($_REQUEST['item_id']);
|
// $item_id = sanitize_text_field($_REQUEST['item_id']);
|
||||||
|
|
||||||
update_option($key_option_name, '');
|
// update_option($key_option_name, '');
|
||||||
update_option($expire_option_name, '');
|
// update_option($expire_option_name, '');
|
||||||
update_option($order_id_option_name, '');
|
// update_option($order_id_option_name, '');
|
||||||
update_option($status_option_name, 'invalid');
|
// update_option($status_option_name, 'invalid');
|
||||||
} else {
|
// } else {
|
||||||
_e('Something went wrong, Please Contact with support', 'mep-eventpress');
|
// _e('Something went wrong, Please Contact with support', 'mep-eventpress');
|
||||||
}
|
// }
|
||||||
die();
|
// die();
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
function checkmydate($date) {
|
function checkmydate($date) {
|
||||||
|
@ -4298,30 +4300,26 @@ function mep_import_elementor_template($filepath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action('wp_ajax_mep_import_ajax_template', 'mep_import_ajax_template');
|
// add_action('wp_ajax_mep_import_ajax_template', 'mep_import_ajax_template');
|
||||||
function mep_import_ajax_template() {
|
// function mep_import_ajax_template() {
|
||||||
|
// if (wp_verify_nonce($_POST['nonce'], 'mep-ajax-import-template-nonce')) {
|
||||||
|
|
||||||
|
// $file = esc_url($_REQUEST['file']);
|
||||||
|
// $type = sanitize_text_field($_REQUEST['type']);
|
||||||
|
// $editor = sanitize_text_field($_REQUEST['editor']);
|
||||||
if (wp_verify_nonce($_POST['nonce'], 'mep-ajax-import-template-nonce')) {
|
// $name = sanitize_text_field($_REQUEST['name']);
|
||||||
|
// $name_slug = sanitize_title($name);
|
||||||
$file = esc_url($_REQUEST['file']);
|
// $count_import = get_option('mep_import_template_' . $name_slug) ? get_option('mep_import_template_' . $name_slug) : 0;
|
||||||
$type = sanitize_text_field($_REQUEST['type']);
|
// $increase_count = $count_import + 1;
|
||||||
$editor = sanitize_text_field($_REQUEST['editor']);
|
// if ($editor == 'elm') {
|
||||||
$name = sanitize_text_field($_REQUEST['name']);
|
// mep_import_elementor_template($file);
|
||||||
$name_slug = sanitize_title($name);
|
// $increase_count = $count_import + 1;
|
||||||
$count_import = get_option('mep_import_template_' . $name_slug) ? get_option('mep_import_template_' . $name_slug) : 0;
|
// update_option('mep_import_template_' . $name_slug, $increase_count);
|
||||||
$increase_count = $count_import + 1;
|
// echo '<h5 class="mep-msg mep-msg-success">The Template: ' . $name . ' Imported Successfully</h5>';
|
||||||
if ($editor == 'elm') {
|
// }
|
||||||
mep_import_elementor_template($file);
|
// }
|
||||||
$increase_count = $count_import + 1;
|
// die();
|
||||||
update_option('mep_import_template_' . $name_slug, $increase_count);
|
// }
|
||||||
echo '<h5 class="mep-msg mep-msg-success">The Template: ' . $name . ' Imported Successfully</h5>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
|
|
||||||
add_filter('mep_check_product_into_cart', 'mep_disable_add_to_cart_if_product_is_in_cart', 10, 2);
|
add_filter('mep_check_product_into_cart', 'mep_disable_add_to_cart_if_product_is_in_cart', 10, 2);
|
||||||
function mep_disable_add_to_cart_if_product_is_in_cart($is_purchasable, $product) {
|
function mep_disable_add_to_cart_if_product_is_in_cart($is_purchasable, $product) {
|
||||||
|
@ -4375,7 +4373,6 @@ if (!function_exists('mep_event_recurring_date_list_in_event_list_loop')) {
|
||||||
<?php if ($show_multidate == 'yes') { ?>
|
<?php if ($show_multidate == 'yes') { ?>
|
||||||
<span class='mep_more_date_btn mep-tem3-title-sec mp_event_visible_event_time'
|
<span class='mep_more_date_btn mep-tem3-title-sec mp_event_visible_event_time'
|
||||||
data-event-id="<?php echo $event_id; ?>"
|
data-event-id="<?php echo $event_id; ?>"
|
||||||
data-nonce="<?php echo wp_create_nonce('mep-ajax-view-date-nonce-'.$event_id); ?>"
|
|
||||||
data-active-text="<?php echo mep_get_option('mep_event_view_more_date_btn_text', 'label_setting_sec', __('View More Date', 'mage-eventpress')); ?>"
|
data-active-text="<?php echo mep_get_option('mep_event_view_more_date_btn_text', 'label_setting_sec', __('View More Date', 'mage-eventpress')); ?>"
|
||||||
data-hide-text="<?php echo mep_get_option('mep_event_hide_date_list_btn_text', 'label_setting_sec', __('Hide Date Lists', 'mage-eventpress')); ?>"
|
data-hide-text="<?php echo mep_get_option('mep_event_hide_date_list_btn_text', 'label_setting_sec', __('Hide Date Lists', 'mage-eventpress')); ?>"
|
||||||
>
|
>
|
||||||
|
@ -4388,14 +4385,12 @@ if (!function_exists('mep_event_recurring_date_list_in_event_list_loop')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action('wp_ajax_mep_event_list_date_schedule', 'mep_event_list_date_schedule');
|
add_action('wp_ajax_mep_event_list_date_schedule', 'mep_event_list_date_schedule');
|
||||||
|
|
||||||
add_action('wp_ajax_nopriv_mep_event_list_date_schedule', 'mep_event_list_date_schedule');
|
add_action('wp_ajax_nopriv_mep_event_list_date_schedule', 'mep_event_list_date_schedule');
|
||||||
|
|
||||||
if (!function_exists('mep_event_list_date_schedule')) {
|
if (!function_exists('mep_event_list_date_schedule')) {
|
||||||
function mep_event_list_date_schedule() {
|
function mep_event_list_date_schedule() {
|
||||||
$event_id = isset($_POST['event_id']) ? sanitize_text_field($_POST['event_id']) : 0;
|
$event_id = isset($_POST['event_id']) ? strip_tags($_POST['event_id']) : 0;
|
||||||
|
|
||||||
if (wp_verify_nonce($_POST['nonce'], 'mep-ajax-view-date-nonce-'.$event_id)) {
|
|
||||||
|
|
||||||
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
|
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
|
||||||
$_more_dates = get_post_meta($event_id, 'mep_event_more_date', true);
|
$_more_dates = get_post_meta($event_id, 'mep_event_more_date', true);
|
||||||
$more_date = apply_filters('mep_event_date_more_date_array_event_list', $_more_dates, $event_id);
|
$more_date = apply_filters('mep_event_date_more_date_array_event_list', $_more_dates, $event_id);
|
||||||
|
@ -4446,7 +4441,6 @@ if (!function_exists('mep_event_list_date_schedule')) {
|
||||||
</ul>
|
</ul>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,7 @@ function mpwem_page_scroll_to(target) {
|
||||||
$(this).addClass('active_pagination').promise().done(function () {
|
$(this).addClass('active_pagination').promise().done(function () {
|
||||||
load_pagination(parent, pagination_page);
|
load_pagination(parent, pagination_page);
|
||||||
}).promise().done(function () {
|
}).promise().done(function () {
|
||||||
|
mpwem_page_scroll_to(parent);
|
||||||
load_bg_img();
|
load_bg_img();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -218,7 +219,7 @@ function mpwem_page_scroll_to(target) {
|
||||||
}).promise().done(function () {
|
}).promise().done(function () {
|
||||||
$('.list_with_filter_section').each(function () {
|
$('.list_with_filter_section').each(function () {
|
||||||
mpwem_remove_loader($(this));
|
mpwem_remove_loader($(this));
|
||||||
$(this).find('.all_filter_item').slideDown('slow');
|
$(this).find('.all_filter_item').css({'height': 'auto', 'overflow': 'inherit'}).slideDown('slow');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -237,7 +238,7 @@ function mpwem_page_scroll_to(target) {
|
||||||
start_item = 0;
|
start_item = 0;
|
||||||
} else {
|
} else {
|
||||||
let all_item_height = all_item.outerHeight();
|
let all_item_height = all_item.outerHeight();
|
||||||
all_item.css({"height": all_item_height, "overflow": "hidden"});
|
//all_item.css({"height": all_item_height, "overflow": "hidden"});
|
||||||
mpwem_add_loader(all_item);
|
mpwem_add_loader(all_item);
|
||||||
}
|
}
|
||||||
parent.find(items_class).each(function () {
|
parent.find(items_class).each(function () {
|
||||||
|
@ -250,7 +251,7 @@ function mpwem_page_scroll_to(target) {
|
||||||
}
|
}
|
||||||
item++;
|
item++;
|
||||||
}).promise().done(function () {
|
}).promise().done(function () {
|
||||||
all_item.css({"height": "auto", "overflow": "inherit"}).promise().done(function () {
|
all_item.css({'height': 'auto', 'overflow': 'inherit'}).promise().done(function () {
|
||||||
filter_qty_palace(parent, items_class);
|
filter_qty_palace(parent, items_class);
|
||||||
pagination_management(parent, pagination_page);
|
pagination_management(parent, pagination_page);
|
||||||
mpwem_remove_loader(all_item);
|
mpwem_remove_loader(all_item);
|
||||||
|
|
|
@ -49,11 +49,10 @@ function mp_event_wo_commerce_price_format(price) {
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
let event_id = target.data('event-id');
|
let event_id = target.data('event-id');
|
||||||
let nonce = target.data('nonce');
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: ajaxurl,
|
url: ajaxurl,
|
||||||
data: {"action": "mep_event_list_date_schedule", "event_id":event_id, "nonce":nonce },
|
data: {"action": "mep_event_list_date_schedule", "event_id":event_id},
|
||||||
beforeSend: function(){
|
beforeSend: function(){
|
||||||
target.html('<span class="fas fa-spinner fa-pulse"></span>');
|
target.html('<span class="fas fa-spinner fa-pulse"></span>');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue