Skip to content

Commit

Permalink
v5.17.1
Browse files Browse the repository at this point in the history
v5.17.1
  • Loading branch information
webnuswp committed Feb 17, 2021
1 parent bea0fc0 commit f11c650
Show file tree
Hide file tree
Showing 81 changed files with 16,878 additions and 15,527 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
**Donate link:** https://webnus.net \
**Tags:** Event, Events, Calendar, Booking, Schedule, Organizer, Venue \
**Requires at least:** 4.0.0 \
**Tested up to:** 5.6 \
**Stable tag:** 5.17.0 \
**Tested up to:** 5.6.1 \
**Stable tag:** 5.17.1 \
**Requires PHP:** 5.6 \
**License:** GPLv2 or later \
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -595,6 +595,30 @@ You can see [plugin documentation](https://webnus.net/dox/modern-events-calendar

## Changelog

### 5.17.1 – 17 February 2021

- Added: A new option to manage a percentage of “Last Tickets” globally (pro)
- Added: An ability to manage a percentage of “Last Tickets” per event (pro)
- Improved: The accessibility of MEC invoices (pro)
- Improved: The storage of numeric fields of tickets and fees (pro)
- Improved: Display of featured canceled and custom labels
- Improved: Dark mode in backend and frontend
- Fixed: Settings menu
- Fixed: Duplicate events
- Fixed: User booking limit (pro)
- Fixed: A Fatal error on older versions of PHP
- Fixed: Showing un-rendered notification placeholders (pro)
- Fixed: Bulk booking import (pro)
- Fixed: An issue regarding expired events on full calendar skin
- Fixed: “Booking Cancellation” notification (pro)
- Fixed: iCal export regarding custom day events (pro)
- Fixed: List of the locations and organizers in the wizard popup (add event)
- Fixed: An issue regarding the location without an address in list view modern style
- Fixed: Datepicker style
- Fixed: Category icon setup
- Fixed: Responsive on mobile in the popup modal for booking (pro)
- Fixed: Some minor issues

### v 5.17.0 – 11 February 2021

- Added: New Back-end Interface
Expand Down
30 changes: 28 additions & 2 deletions app/features/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function add_category_fields()
<div class="form-field">
<label for="mec_cat_icon"><?php _e('Category Icon', 'modern-events-calendar-lite'); ?></label>
<input type="hidden" name="mec_cat_icon" id="mec_cat_icon" value=""/>
<a href="<?php echo $this->main->asset('icon.html'); ?>"
<a href="<?php echo $this->main->asset('icon.html'); ?>?&width=680&height=450&inlineId=my-content-id"
class="thickbox mec_category_icon button"><?php echo __('Select icon', 'modern-events-calendar-lite'); ?></a>
</div>
<?php if($fallback): ?>
Expand Down Expand Up @@ -292,7 +292,7 @@ public function edit_category_fields($term)
</th>
<td>
<input type="hidden" name="mec_cat_icon" id="mec_cat_icon" value="<?php echo $icon; ?>"/>
<a href="<?php echo $this->main->asset('icon.html'); ?>"
<a href="<?php echo $this->main->asset('icon.html'); ?>?&width=680&height=450&inlineId=my-content-id"
class="thickbox mec_category_icon button"><?php echo __('Select icon', 'modern-events-calendar-lite'); ?></a>
<?php if (isset($icon)) : ?>
<div class="mec-webnus-icon"><i class="<?php echo $icon; ?> mec-color"></i></div>
Expand Down Expand Up @@ -1560,6 +1560,8 @@ public function meta_box_booking_options($post)
$bookings_user_limit = isset($booking_options['bookings_user_limit']) ? $booking_options['bookings_user_limit'] : '';
$bookings_user_limit_unlimited = isset($booking_options['bookings_user_limit_unlimited']) ? $booking_options['bookings_user_limit_unlimited'] : true;
$bookings_all_occurrences = isset($booking_options['bookings_all_occurrences']) ? $booking_options['bookings_all_occurrences'] : 0;
$bookings_last_few_tickets_percentage_inherite = isset($booking_options['last_few_tickets_percentage_inherit']) ? $booking_options['last_few_tickets_percentage_inherit'] : 1;
$bookings_last_few_tickets_percentage = ((isset($booking_options['last_few_tickets_percentage']) and trim($booking_options['last_few_tickets_percentage']) != '') ? $booking_options['last_few_tickets_percentage'] : (isset($this->settings['booking_last_few_tickets_percentage']) ? $this->settings['booking_last_few_tickets_percentage'] : 15));

$loggedin_discount = isset($booking_options['loggedin_discount']) ? $booking_options['loggedin_discount'] : '';

Expand Down Expand Up @@ -1692,6 +1694,26 @@ public function meta_box_booking_options($post)
</div>
<?php endif; ?>

<?php if(!$FES or ($FES and (!isset($this->settings['fes_section_booking_lftp']) or (isset($this->settings['fes_section_booking_lftp']) and $this->settings['fes_section_booking_lftp'])))): ?>
<div class="mec-form-row">
<h4 class="mec-title"><?php _e('Last Few Tickets Percentage', 'modern-events-calendar-lite'); ?></h4>
<div class="mec-form-row">
<label class="mec-col-4" for="mec_bookings_last_few_tickets_percentage_inherit">
<input type="hidden" name="mec[booking][last_few_tickets_percentage_inherit]" value="0"/>
<input id="mec_bookings_last_few_tickets_percentage_inherit"
<?php
if ($bookings_last_few_tickets_percentage_inherite == 1) {
echo 'checked="checked"';
}
?>
type="checkbox" value="1" name="mec[booking][last_few_tickets_percentage_inherit]" onchange="jQuery(this).parent().parent().find('input[type=number]').toggle();"/>
<?php _e('Inherit from global options', 'modern-events-calendar-lite'); ?>
</label>
<input class="mec-col-4" <?php echo ($bookings_last_few_tickets_percentage_inherite == 1) ? 'style="display: none;"' : ''; ?> type="number" min="1" max="100" step="1" name="mec[booking][last_few_tickets_percentage]" value="<?php echo esc_attr($bookings_last_few_tickets_percentage); ?>" placeholder="<?php _e('15', 'modern-events-calendar-lite'); ?>"/>
</div>
</div>
<?php endif; ?>

</div>

<?php if(!$FES or ($FES and (!isset($this->settings['fes_section_booking_tubl']) or (isset($this->settings['fes_section_booking_tubl']) and $this->settings['fes_section_booking_tubl'])))): ?>
Expand Down Expand Up @@ -3246,6 +3268,10 @@ public function save_event($post_id)
$ticket['ticket_start_time_ampm'] = strtoupper(substr($ticket_render_start_time, 5, 6));
$ticket['ticket_end_time_hour'] = substr($ticket_render_end_time, 0, 2);
$ticket['ticket_end_time_ampm'] = strtoupper(substr($ticket_render_end_time, 5, 6));
$ticket['price'] = trim($ticket['price']);
$ticket['limit'] = trim($ticket['limit']);
$ticket['minimum_ticket'] = trim($ticket['minimum_ticket']);
$ticket['stop_selling_value'] = trim($ticket['stop_selling_value']);

// Bellow conditional block code is used to change ticket dates format to compatible ticket past dates structure for store in db.
if(isset($ticket['dates']))
Expand Down
20 changes: 14 additions & 6 deletions app/features/fes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1146,16 +1146,24 @@ public function fes_form()
$ticket['ticket_start_time_ampm'] = strtoupper(substr($ticket_render_start_time, 5, 6));
$ticket['ticket_end_time_hour'] = substr($ticket_render_end_time, 0, 2);
$ticket['ticket_end_time_ampm'] = strtoupper(substr($ticket_render_end_time, 5, 6));
$ticket['price'] = trim($ticket['price']);
$ticket['limit'] = trim($ticket['limit']);
$ticket['minimum_ticket'] = trim($ticket['minimum_ticket']);
$ticket['stop_selling_value'] = trim($ticket['stop_selling_value']);

// Bellow conditional block code is used to change ticket dates format to compatible ticket past dates structure for store in db.
if ( isset( $ticket[ 'dates' ] ) ) {
foreach ( $ticket[ 'dates' ] as $dates_ticket_key => $dates_ticket_values ) {
if ( isset( $dates_ticket_values[ 'start' ] ) and trim( $dates_ticket_values[ 'start' ] ) ) {
$ticket[ 'dates' ][ $dates_ticket_key ][ 'start' ] = $this->main->standardize_format( $dates_ticket_values[ 'start' ] );
if(isset($ticket['dates']))
{
foreach($ticket['dates'] as $dates_ticket_key => $dates_ticket_values)
{
if(isset($dates_ticket_values['start']) and trim($dates_ticket_values['start']))
{
$ticket['dates'][$dates_ticket_key]['start'] = $this->main->standardize_format($dates_ticket_values['start']);
}

if ( isset( $dates_ticket_values[ 'end' ] ) and trim( $dates_ticket_values[ 'end' ] ) ) {
$ticket[ 'dates' ][ $dates_ticket_key ][ 'end' ] = $this->main->standardize_format( $dates_ticket_values[ 'end' ] );
if(isset($dates_ticket_values['end']) and trim($dates_ticket_values['end']))
{
$ticket['dates'][$dates_ticket_key]['end'] = $this->main->standardize_format($dates_ticket_values['end']);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions app/features/ix.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ public function import_start_bookings()
return array('success' => 0, 'message' => __("Please upload a CSV file.", 'modern-events-calendar-lite'));
}

$bookings = array();
if(($h = fopen($target_path, 'r')) !== false)
{
// MEC Libraries
$gateway = new MEC_gateway();
$book = $this->getBook();

$bookings = array();
while(($data = fgetcsv($h, 1000, ",")) !== false)
{
$booking_id = $data[0];
Expand All @@ -250,7 +250,7 @@ public function import_start_bookings()
$tickets = get_post_meta($event_id, 'mec_tickets', true);
if(!is_array($tickets)) $tickets = array();

$ticket_id = 0;
$ticket_id = NULL;
$ticket_name = $data[5];

foreach($tickets as $tid => $ticket)
Expand All @@ -263,7 +263,7 @@ public function import_start_bookings()
}

// Ticket ID not found!
if(!$ticket_id) continue;
if(is_null($ticket_id)) continue;

$transaction_id = $data[6];

Expand Down Expand Up @@ -418,7 +418,7 @@ public function import_start_bookings()
// Delete File
unlink($target_path);

return array('success' => 1, 'message' => __('The bookings are imported successfully!', 'modern-events-calendar-lite'));
return array('success' => (count($bookings) ? 1 : 0), 'message' => (count($bookings) ? __('The bookings are imported successfully!', 'modern-events-calendar-lite') : __('No bookings found to import!', 'modern-events-calendar-lite')));
}

public function import_start()
Expand Down
4 changes: 2 additions & 2 deletions app/features/labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function edit_form($term)
<option value=""><?php _e('Normal', 'modern-events-calendar-lite'); ?></option>
<option value="mec-label-featured" <?php echo ($style == 'mec-label-featured' ? 'selected="selected"' : ''); ?>><?php _e('Featured', 'modern-events-calendar-lite'); ?></option>
<option value="mec-label-canceled" <?php echo ($style == 'mec-label-canceled' ? 'selected="selected"' : ''); ?>><?php _e('Canceled', 'modern-events-calendar-lite'); ?></option>
<!--<option value="mec-label-custom" <?php echo ($style == 'mec-label-custom' ? 'selected="selected"' : ''); ?>><?php _e('Custom', 'modern-events-calendar-lite'); ?></option>-->
<option value="mec-label-custom" <?php echo ($style == 'mec-label-custom' ? 'selected="selected"' : ''); ?>><?php _e('Custom', 'modern-events-calendar-lite'); ?></option>
</select>
<p class="description"><?php _e('You can show featured, canceled and custom labels by a different style!', 'modern-events-calendar-lite'); ?></p>
</td>
Expand All @@ -142,7 +142,7 @@ public function add_form()
<option value=""><?php _e('Normal', 'modern-events-calendar-lite'); ?></option>
<option value="mec-label-featured"><?php _e('Featured', 'modern-events-calendar-lite'); ?></option>
<option value="mec-label-canceled"><?php _e('Canceled', 'modern-events-calendar-lite'); ?></option>
<!--<option value="mec-label-custom"><?php _e('Custom', 'modern-events-calendar-lite'); ?></option>-->
<option value="mec-label-custom"><?php _e('Custom', 'modern-events-calendar-lite'); ?></option>
</select>
<p class="description"><?php _e('You can show featured, canceled and custom labels by a different style!', 'modern-events-calendar-lite'); ?></p>
</div>
Expand Down
14 changes: 14 additions & 0 deletions app/features/mec/booking.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,20 @@
</span>
</div>
</div>
<h5 class="mec-form-subtitle"><?php _e('Last Few Tickets Flag', 'modern-events-calendar-lite'); ?></h5>
<div class="mec-form-row">
<label class="mec-col-3" for="mec_settings_booking_last_few_tickets_percentage"><?php _e('Percentage', 'modern-events-calendar-lite'); ?></label>
<div class="mec-col-9">
<input type="number" id="mec_settings_booking_last_few_tickets_percentage" name="mec[settings][booking_last_few_tickets_percentage]" value="<?php echo ((isset($settings['booking_last_few_tickets_percentage']) and trim($settings['booking_last_few_tickets_percentage']) != '') ? $settings['booking_last_few_tickets_percentage'] : '15'); ?>" placeholder="<?php esc_attr_e('Default is 15', 'modern-events-calendar-lite'); ?>" />
<span class="mec-tooltip">
<div class="box left">
<h5 class="title"><?php _e('Last Few Tickets Percentage', 'modern-events-calendar-lite'); ?></h5>
<div class="content"><p><?php esc_attr_e("We will show a \"Last Few Tickets\" flag on events when remained tickets are less than this percentage.", 'modern-events-calendar-lite'); ?></p></div>
</div>
<i title="" class="dashicons-before dashicons-editor-help"></i>
</span>
</div>
</div>
<h5 class="mec-form-subtitle"><?php _e('Thank You Page', 'modern-events-calendar-lite'); ?></h5>
<div class="mec-form-row">
<label class="mec-col-3" for="mec_settings_booking_thankyou_page"><?php _e('Thank You Page', 'modern-events-calendar-lite'); ?></label>
Expand Down
Loading

0 comments on commit f11c650

Please sign in to comment.