version 2.2.8 released
This commit is contained in:
parent
3ee5098d48
commit
c0deea6937
|
@ -485,7 +485,36 @@ h3.mep_list_date i, .mep-list-footer ul li i{
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mep-day-details-section {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 0 10px 10px 10px;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mep-day-details-section h4 {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background: #ddd;
|
||||||
|
margin-left: -10px;
|
||||||
|
margin-right: -10px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mep-day-title {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: -20px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mep-day-details {
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mep-day-details p {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
.mep-list-footer {
|
.mep-list-footer {
|
||||||
border-top: 0px solid #ddd;
|
border-top: 0px solid #ddd;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
|
|
@ -103,6 +103,17 @@ class MAGE_Events_Setting_Controls {
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'Price Starts from:'
|
'default' => 'Price Starts from:'
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'mep_event_time_format',
|
||||||
|
'label' => __( 'Event Time Format', 'mage-eventpress' ),
|
||||||
|
'desc' => __( 'Please select what format time you want to display in event fronntend.', 'mage-eventpress' ),
|
||||||
|
'type' => 'select',
|
||||||
|
'default' => '12',
|
||||||
|
'options' => array(
|
||||||
|
'12' => '12 Hour',
|
||||||
|
'24' => '24 Hour'
|
||||||
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
'email_setting_sec' => array(
|
'email_setting_sec' => array(
|
||||||
|
|
|
@ -26,6 +26,11 @@ function mep_event_meta_box_add(){
|
||||||
|
|
||||||
add_meta_box( 'mep-event-available-set-on-off', __('Show Available Seat Count?','mage-eventpress'), 'mep_event_available_seat_cb', 'mep_events', 'side', 'low' );
|
add_meta_box( 'mep-event-available-set-on-off', __('Show Available Seat Count?','mage-eventpress'), 'mep_event_available_seat_cb', 'mep_events', 'side', 'low' );
|
||||||
|
|
||||||
|
|
||||||
|
add_meta_box( 'mep-event-day-details', __('Event Daywise Details','mage-eventpress'), 'mep_event_day_details_cb', 'mep_events', 'normal', 'high' );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mep_event_change_reg_status_cb($post){
|
function mep_event_change_reg_status_cb($post){
|
||||||
|
@ -433,6 +438,133 @@ function mep_event_faq_save($post_id) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function mep_event_day_details_cb() {
|
||||||
|
global $post;
|
||||||
|
$mep_event_day = get_post_meta($post->ID, 'mep_event_day', true);
|
||||||
|
wp_nonce_field( 'mep_event_day_nonce', 'mep_event_day_nonce' );
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function( $ ){
|
||||||
|
$( '#add-day-row' ).on('click', function() {
|
||||||
|
var row = $( '.empty-row-day.screen-reader-text' ).clone(true);
|
||||||
|
row.removeClass( 'empty-row-day screen-reader-text' );
|
||||||
|
row.insertBefore( '#repeatable-fieldset-day-one tbody>tr:last' );
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.remove-day-row' ).on('click', function() {
|
||||||
|
$(this).parents('tr').remove();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<table id="repeatable-fieldset-day-one" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
if ( $mep_event_day ) :
|
||||||
|
foreach ( $mep_event_day as $field ) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id='mep_event_day_r' class="">
|
||||||
|
<input placeholder="Day Title" type="text" class="mep-faq-input" value="<?php if($field['mep_day_title'] != '') echo esc_attr( $field['mep_day_title'] ); ?>" name="mep_day_title[]">
|
||||||
|
<textarea placeholder="Day Details" name="mep_day_content[]" id="" cols="50" rows="4" class="mep-faq-input"><?php if($field['mep_day_content'] != '') echo esc_attr( $field['mep_day_content'] ); ?></textarea>
|
||||||
|
<a class="button remove-day-row" href="#"><?php _e('Remove','mage-eventpress'); ?></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else :
|
||||||
|
// show a blank one
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- empty hidden one for jQuery -->
|
||||||
|
<tr class="empty-row-day screen-reader-text">
|
||||||
|
<td>
|
||||||
|
<div id='mep_event_day_r' class="">
|
||||||
|
<input placeholder="Day Title" type="text" class="mep-faq-input" name="mep_day_title[]">
|
||||||
|
<textarea placeholder="<?php _e('Day Details','mage-eventpress'); ?>" name="mep_day_content[]" id="" cols="50" rows="4" class="mep-faq-input"></textarea>
|
||||||
|
<a class="button remove-day-row" href="#"><?php _e('Remove','mage-eventpress'); ?></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p><a id="add-day-row" class="button" href="#"><?php _e('Add New Day','mage-eventpress'); ?></a></p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
add_action('save_post', 'mep_event_day_data_save');
|
||||||
|
function mep_event_day_data_save($post_id) {
|
||||||
|
global $wpdb;
|
||||||
|
|
||||||
|
if ( ! isset( $_POST['mep_event_day_nonce'] ) ||
|
||||||
|
! wp_verify_nonce( $_POST['mep_event_day_nonce'], 'mep_event_day_nonce' ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!current_user_can('edit_post', $post_id))
|
||||||
|
return;
|
||||||
|
|
||||||
|
$old = get_post_meta($post_id, 'mep_event_day', true);
|
||||||
|
$new = array();
|
||||||
|
// $options = hhs_get_sample_options();
|
||||||
|
|
||||||
|
$names = $_POST['mep_day_title'];
|
||||||
|
$cntent = $_POST['mep_day_content'];
|
||||||
|
|
||||||
|
$order_id = 0;
|
||||||
|
$count = count( $names );
|
||||||
|
|
||||||
|
for ( $i = 0; $i < $count; $i++ ) {
|
||||||
|
|
||||||
|
if ( $names[$i] != '' ) :
|
||||||
|
$new[$i]['mep_day_title'] = stripslashes( strip_tags( $names[$i] ) );
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ( $cntent[$i] != '' ) :
|
||||||
|
$new[$i]['mep_day_content'] = stripslashes( strip_tags( $cntent[$i] ) );
|
||||||
|
endif;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !empty( $new ) && $new != $old )
|
||||||
|
update_post_meta( $post_id, 'mep_event_day', $new );
|
||||||
|
elseif ( empty($new) && $old )
|
||||||
|
delete_post_meta( $post_id, 'mep_event_day', $old );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function mep_event_extra_price_option() {
|
function mep_event_extra_price_option() {
|
||||||
global $post;
|
global $post;
|
||||||
$mep_events_extra_prices = get_post_meta($post->ID, 'mep_events_extra_prices', true);
|
$mep_events_extra_prices = get_post_meta($post->ID, 'mep_events_extra_prices', true);
|
||||||
|
|
|
@ -128,9 +128,6 @@ foreach ($terms as $_terms) {
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="mep_event_list_sec">
|
<div class="mep_event_list_sec">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$now = date('Y-m-d H:i:s');
|
$now = date('Y-m-d H:i:s');
|
||||||
$show_price = mep_get_option( 'mep_event_price_show', 'general_setting_sec', 'yes');
|
$show_price = mep_get_option( 'mep_event_price_show', 'general_setting_sec', 'yes');
|
||||||
|
@ -263,7 +260,7 @@ if($style=='list'){
|
||||||
<div class="evl-ico"><i class="fa fa-calendar"></i> </div>
|
<div class="evl-ico"><i class="fa fa-calendar"></i> </div>
|
||||||
<div class="evl-cc">
|
<div class="evl-cc">
|
||||||
<h5>Time:</h5>
|
<h5>Time:</h5>
|
||||||
<h6><?php echo date('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo date('h:i A', strtotime($event_meta['mep_event_end_date'][0])); ?></h6>
|
<h6><?php mep_get_only_time($event_meta['mep_event_start_date'][0]); ?> - <?php mep_get_only_time($event_meta['mep_event_end_date'][0]); ?></h6>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -505,7 +502,7 @@ if($style=='list'){
|
||||||
<div class="evl-ico"><i class="fa fa-calendar"></i> </div>
|
<div class="evl-ico"><i class="fa fa-calendar"></i> </div>
|
||||||
<div class="evl-cc">
|
<div class="evl-cc">
|
||||||
<h5>Time:</h5>
|
<h5>Time:</h5>
|
||||||
<h6><?php echo date('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo date('h:i A', strtotime($event_meta['mep_event_end_date'][0])); ?></h6>
|
<h6><?php mep_get_only_time($event_meta['mep_event_start_date'][0]); ?> - <?php mep_get_only_time($event_meta['mep_event_end_date'][0]); ?></h6>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -5,7 +5,7 @@ add_action('mep_event_date','mep_ev_datetime');
|
||||||
function mep_ev_datetime(){
|
function mep_ev_datetime(){
|
||||||
global $event_meta;
|
global $event_meta;
|
||||||
?>
|
?>
|
||||||
<p><?php echo date_i18n('D, d M Y h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo date_i18n('D, d M Y h:i A', strtotime($event_meta['mep_event_end_date'][0])); ?></p>
|
<p><?php mep_get_full_time_and_date($event_meta['mep_event_start_date'][0]); ?> - <?php mep_get_full_time_and_date($event_meta['mep_event_end_date'][0]); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,6 @@ add_action('mep_event_time_only','mep_ev_time');
|
||||||
function mep_ev_time(){
|
function mep_ev_time(){
|
||||||
global $event_meta;
|
global $event_meta;
|
||||||
?>
|
?>
|
||||||
<p><?php echo date_i18n('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> </p>
|
<p><?php mep_get_only_time($event_meta['mep_event_start_date'][0]); ?> </p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
|
@ -3,6 +3,26 @@ add_action('mep_event_details','mep_ev_details');
|
||||||
|
|
||||||
|
|
||||||
function mep_ev_details(){
|
function mep_ev_details(){
|
||||||
global $event_meta;
|
global $post, $event_meta;
|
||||||
the_content();
|
the_content();
|
||||||
|
$mep_event_day = get_post_meta($post->ID, 'mep_event_day', true);
|
||||||
|
|
||||||
|
if ( $mep_event_day ){
|
||||||
|
echo '<div class="mep-day-details-section">';
|
||||||
|
echo '<h4>Event Days</h4>';
|
||||||
|
foreach ( $mep_event_day as $field ) {
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="mep-day-title">
|
||||||
|
<?php echo $field['mep_day_title']; ?>
|
||||||
|
</div>
|
||||||
|
<div class="mep-day-details">
|
||||||
|
<p><?php echo $field['mep_day_content']; ?></p>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -34,12 +34,12 @@ $leftt = $leftt+$llft;
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<h5><strong><?php _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $stc; if($mep_available_seat=='on'){ ?> (<strong><?php echo $leftt; ?></strong> Left)<?php } ?></h5>
|
<h5><strong><?php _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $stc; if($mep_available_seat=='on'){ ?> (<strong><?php echo $leftt; ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if($event_meta['mep_total_seat'][0]){ ?>
|
if($event_meta['mep_total_seat'][0]){ ?>
|
||||||
<h5><strong><?php _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $event_meta['mep_total_seat'][0]; if($mep_available_seat=='on'){ ?> (<strong><?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?></strong> Left) <?php } ?></h5>
|
<h5><strong><?php _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $event_meta['mep_total_seat'][0]; if($mep_available_seat=='on'){ ?> (<strong><?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?></strong> <?php _e('Left','mage-eventpress'); ?>) <?php } ?></h5>
|
||||||
<?php }
|
<?php }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: Woocommerce Events Manager
|
* Plugin Name: Woocommerce Events Manager
|
||||||
* Plugin URI: http://mage-people.com
|
* Plugin URI: http://mage-people.com
|
||||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||||
* Version: 2.2.7
|
* Version: 2.2.8
|
||||||
* Author: MagePeople Team
|
* Author: MagePeople Team
|
||||||
* Author URI: http://www.mage-people.com/
|
* Author URI: http://www.mage-people.com/
|
||||||
* Text Domain: mage-eventpress
|
* Text Domain: mage-eventpress
|
||||||
|
@ -853,3 +853,27 @@ function mep_set_custom_edit_event_columns($columns) {
|
||||||
|
|
||||||
return $columns;
|
return $columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function mep_get_full_time_and_date($datetime){
|
||||||
|
$user_set_format = mep_get_option( 'mep_event_time_format','general_setting_sec',12);
|
||||||
|
|
||||||
|
if($user_set_format==12){
|
||||||
|
echo date_i18n('D, d M Y h:i A', strtotime($datetime));
|
||||||
|
}
|
||||||
|
if($user_set_format==24){
|
||||||
|
echo date_i18n('D, d M Y H:i', strtotime($datetime));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function mep_get_only_time($datetime){
|
||||||
|
$user_set_format = mep_get_option( 'mep_event_time_format','general_setting_sec',12);
|
||||||
|
|
||||||
|
if($user_set_format==12){
|
||||||
|
echo date_i18n('h:i A', strtotime($datetime));
|
||||||
|
}
|
||||||
|
if($user_set_format==24){
|
||||||
|
echo date_i18n('H:i', strtotime($datetime));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue