function update
This commit is contained in:
parent
1dcbceacfb
commit
956f554fab
|
@ -72,9 +72,7 @@ function mep_event_enqueue_scripts()
|
||||||
wp_enqueue_script('jquery-ui-accordion');
|
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-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('mep-event-style', plugin_dir_url(__DIR__) . 'css/style.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('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', "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);
|
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);
|
||||||
wp_enqueue_style('mep-calendar-min-style', plugin_dir_url(__DIR__) . 'css/calendar.min.css', array());
|
wp_enqueue_style('mep-calendar-min-style', plugin_dir_url(__DIR__) . 'css/calendar.min.css', array());
|
||||||
|
|
|
@ -649,6 +649,7 @@ class MP_Event_All_Info_In_One
|
||||||
<th style="min-width: 120px;"><?php _e('Start Time', 'mage-eventpress'); ?></th>
|
<th style="min-width: 120px;"><?php _e('Start Time', 'mage-eventpress'); ?></th>
|
||||||
<th style="min-width: 120px;"><?php _e('End Date', 'mage-eventpress'); ?></th>
|
<th style="min-width: 120px;"><?php _e('End Date', 'mage-eventpress'); ?></th>
|
||||||
<th style="min-width: 120px;"><?php _e('End Time', 'mage-eventpress'); ?></th>
|
<th style="min-width: 120px;"><?php _e('End Time', 'mage-eventpress'); ?></th>
|
||||||
|
<?php do_action('mep_date_table_head',$post_id); ?>
|
||||||
<th style="min-width: 60px;"><?php _e('Action', 'mage-eventpress'); ?></th>
|
<th style="min-width: 60px;"><?php _e('Action', 'mage-eventpress'); ?></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="mp_event_type_sortable">
|
<tbody class="mp_event_type_sortable">
|
||||||
|
@ -673,6 +674,7 @@ class MP_Event_All_Info_In_One
|
||||||
echo date('H:i', strtotime($values['event_end_time'][0]));
|
echo date('H:i', strtotime($values['event_end_time'][0]));
|
||||||
} ?>" />
|
} ?>" />
|
||||||
</td>
|
</td>
|
||||||
|
<?php do_action('mep_date_table_body_default_date',$post_id); ?>
|
||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -706,6 +708,8 @@ class MP_Event_All_Info_In_One
|
||||||
echo date('H:i', strtotime($field['event_more_end_time']));
|
echo date('H:i', strtotime($field['event_more_end_time']));
|
||||||
} ?>" />
|
} ?>" />
|
||||||
</td>
|
</td>
|
||||||
|
<?php do_action('mep_date_table_body_more_date',$post_id, $field); ?>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div class="mp_event_remove_move">
|
<div class="mp_event_remove_move">
|
||||||
<button class="button remove-row-d" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
|
<button class="button remove-row-d" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
|
||||||
|
@ -732,6 +736,7 @@ class MP_Event_All_Info_In_One
|
||||||
<td>
|
<td>
|
||||||
<input type="time" class="mp_formControl" name="event_more_end_time[]" placeholder="End Time" value="" />
|
<input type="time" class="mp_formControl" name="event_more_end_time[]" placeholder="End Time" value="" />
|
||||||
</td>
|
</td>
|
||||||
|
<?php do_action('mep_date_table_empty',$post_id); ?>
|
||||||
<td>
|
<td>
|
||||||
<button class="button remove-row-d"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span><?php _e('Remove', 'mage-eventpress'); ?></button>
|
<button class="button remove-row-d"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span><?php _e('Remove', 'mage-eventpress'); ?></button>
|
||||||
</td>
|
</td>
|
||||||
|
@ -759,15 +764,15 @@ class MP_Event_All_Info_In_One
|
||||||
$event_rt_prv_date = get_post_meta($post_id, 'mep_rt_event_prvdate', true) ? get_post_meta($post_id, 'mep_rt_event_prvdate', true) : $event_start_date;
|
$event_rt_prv_date = get_post_meta($post_id, 'mep_rt_event_prvdate', true) ? get_post_meta($post_id, 'mep_rt_event_prvdate', true) : $event_start_date;
|
||||||
$rt_status = get_post_meta($post_id, 'mep_rich_text_status', true) ? get_post_meta($post_id, 'mep_rich_text_status', true) : 'enable';
|
$rt_status = get_post_meta($post_id, 'mep_rich_text_status', true) ? get_post_meta($post_id, 'mep_rich_text_status', true) : 'enable';
|
||||||
?>
|
?>
|
||||||
<div class='mep_rich_text_status_section'>
|
<div class='mep_rich_text_status_section'>
|
||||||
<label for='mep_rich_text_status'>
|
<label for='mep_rich_text_status'>
|
||||||
<?php _e('Rich Text Status','mage-eventpress'); ?>
|
<?php _e('Rich Text Status','mage-eventpress'); ?>
|
||||||
<select id='mep_rich_text_status' name='mep_rich_text_status'>
|
<select id='mep_rich_text_status' name='mep_rich_text_status'>
|
||||||
<option value='enable' <?php if($rt_status == 'enable'){ echo 'Selected'; } ?>><?php _e('Enable','mage-eventpress'); ?></option>
|
<option value='enable' <?php if($rt_status == 'enable'){ echo 'Selected'; } ?>><?php _e('Enable','mage-eventpress'); ?></option>
|
||||||
<option value='disable' <?php if($rt_status == 'disable'){ echo 'Selected'; } ?>><?php _e('Disable','mage-eventpress'); ?></option>
|
<option value='disable' <?php if($rt_status == 'disable'){ echo 'Selected'; } ?>><?php _e('Disable','mage-eventpress'); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<table id='mep_rich_text_table' <?php if($rt_status == 'disable'){ ?> style='display:none;' <?php } ?>>
|
<table id='mep_rich_text_table' <?php if($rt_status == 'disable'){ ?> style='display:none;' <?php } ?>>
|
||||||
<tr>
|
<tr>
|
||||||
<th><span><?php _e('Type :', 'mage-eventpress'); ?></span></th>
|
<th><span><?php _e('Type :', 'mage-eventpress'); ?></span></th>
|
||||||
|
@ -832,7 +837,7 @@ class MP_Event_All_Info_In_One
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<script>
|
<script>
|
||||||
jQuery('[name="mep_rich_text_status"]').change(function() {
|
jQuery('[name="mep_rich_text_status"]').change(function() {
|
||||||
var rich_status = jQuery(this).val() ? jQuery(this).val() : 'enable';
|
var rich_status = jQuery(this).val() ? jQuery(this).val() : 'enable';
|
||||||
if(rich_status == 'enable'){
|
if(rich_status == 'enable'){
|
||||||
|
@ -843,11 +848,7 @@ class MP_Event_All_Info_In_One
|
||||||
jQuery('#mep_rich_text_table').hide(500);
|
jQuery('#mep_rich_text_table').hide(500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1403,9 +1404,11 @@ function mep_event_meta_save($post_id)
|
||||||
update_post_meta($pid, 'mp_event_virtual_type_des', $mp_event_virtual_type_des);
|
update_post_meta($pid, 'mp_event_virtual_type_des', $mp_event_virtual_type_des);
|
||||||
|
|
||||||
|
|
||||||
if (!empty($mdate) && $mdate != $oldm) {
|
$_mdate = apply_filters('mep_more_date_arr_save', $mdate);
|
||||||
update_post_meta($post_id, 'mep_event_more_date', $mdate);
|
|
||||||
} elseif (empty($mdate) && $oldm) {
|
if (!empty($_mdate) && $_mdate != $oldm) {
|
||||||
|
update_post_meta($post_id, 'mep_event_more_date', $_mdate);
|
||||||
|
} elseif (empty($_mdate) && $oldm) {
|
||||||
delete_post_meta($post_id, 'mep_event_more_date', $oldm);
|
delete_post_meta($post_id, 'mep_event_more_date', $oldm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,8 +310,19 @@ function mep_get_event_ticket_price_by_name($event,$type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mep_get_ticket_price_by_event($event,$type,$default_price=0) {
|
||||||
|
$ticket_type = get_post_meta($event,'mep_event_ticket_type',true);
|
||||||
|
if($ticket_type){
|
||||||
|
$all_ticket_tyle = get_post_meta($event,'mep_event_ticket_type',true);
|
||||||
|
foreach ($all_ticket_tyle as $key => $val) {
|
||||||
|
if ($val['option_name_t'] === $type) {
|
||||||
|
return (int) $val['option_price_t'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return $default_price;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!function_exists('mep_attendee_create')) {
|
if (!function_exists('mep_attendee_create')) {
|
||||||
|
@ -399,7 +410,8 @@ $ticket_total_price = (mep_get_event_ticket_price_by_name($event_id,$ticket_type
|
||||||
update_post_meta( $pid, 'ea_tshirtsize', $tshirtsize );
|
update_post_meta( $pid, 'ea_tshirtsize', $tshirtsize );
|
||||||
update_post_meta( $pid, 'ea_ticket_type', $ticket_type );
|
update_post_meta( $pid, 'ea_ticket_type', $ticket_type );
|
||||||
update_post_meta( $pid, 'ea_ticket_qty', $ticket_qty);
|
update_post_meta( $pid, 'ea_ticket_qty', $ticket_qty);
|
||||||
update_post_meta( $pid, 'ea_ticket_price', $ticket_total_price);
|
update_post_meta( $pid, 'ea_ticket_price', mep_get_ticket_price_by_event($event_id,$ticket_type,0));
|
||||||
|
update_post_meta( $pid, 'ea_ticket_order_amount', $ticket_total_price);
|
||||||
update_post_meta( $order_id, 'ea_ticket_qty', $ticket_qty);
|
update_post_meta( $order_id, 'ea_ticket_qty', $ticket_qty);
|
||||||
update_post_meta( $order_id, 'ea_ticket_type', $ticket_type );
|
update_post_meta( $order_id, 'ea_ticket_type', $ticket_type );
|
||||||
update_post_meta( $order_id, 'ea_event_id', $event_id );
|
update_post_meta( $order_id, 'ea_event_id', $event_id );
|
||||||
|
@ -3255,9 +3267,6 @@ if (!function_exists('mep_get_event_dates_arr')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$event_dates = array_merge($date_arr,$m_date_arr);
|
$event_dates = array_merge($date_arr,$m_date_arr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return apply_filters('mep_event_dates_in_calender_free',$event_dates,$event_id);
|
return apply_filters('mep_event_dates_in_calender_free',$event_dates,$event_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,6 +198,24 @@ function mep_get_all_order_data_and_create_attendee()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (get_option('mep_attendee_ticket_price_update_01') != 'completed') {
|
||||||
|
$args = array(
|
||||||
|
'post_type' => 'mep_events_attendees',
|
||||||
|
'posts_per_page' => -1
|
||||||
|
);
|
||||||
|
|
||||||
|
$qr = new WP_Query($args);
|
||||||
|
foreach ($qr->posts as $result) {
|
||||||
|
$post_id = $result->ID;
|
||||||
|
$event_id = get_post_meta($post_id,'ea_event_id',true);
|
||||||
|
$ticket_type = get_post_meta($post_id,'ea_ticket_type',true);
|
||||||
|
update_post_meta($post_id, 'ea_ticket_price', mep_get_ticket_price_by_event($event_id,$ticket_type,0));
|
||||||
|
}
|
||||||
|
update_option('mep_attendee_ticket_price_update_01', 'completed');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (get_option('mep_attendee_checkin_update_01') != 'completed') {
|
if (get_option('mep_attendee_checkin_update_01') != 'completed') {
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
|
|
Loading…
Reference in New Issue