Skip to content

Commit

Permalink
v5.19.1
Browse files Browse the repository at this point in the history
v5.19.1
  • Loading branch information
webnuswp committed May 12, 2021
1 parent cb0dfdc commit 7b7be76
Show file tree
Hide file tree
Showing 74 changed files with 26,761 additions and 24,321 deletions.
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Tags:** Event, Events, Calendar, Booking, Schedule, Organizer, Venue \
**Requires at least:** 4.0.0 \
**Tested up to:** 5.7.1 \
**Stable tag:** 5.18.5 \
**Stable tag:** 5.19.1 \
**Requires PHP:** 5.6 \
**License:** GPLv2 or later \
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -392,6 +392,7 @@ You can see [plugin documentation](https://webnus.net/dox/modern-events-calendar
- [Edit Booking Options](https://webnus.net/dox/modern-events-calendar/booking/) (*pro*)
- [Booking reminder notification](https://webnus.net/dox/modern-events-calendar/notifications/) (*pro*)
- [Attendee list](https://webnus.net/dox/modern-events-calendar/buddypress/) (*pro*)
- Event Finish
- Verification email (*pro*)
- Confirmation email (*pro*)
- Cancellation email (*pro*)
Expand Down Expand Up @@ -602,6 +603,59 @@ You can see [plugin documentation](https://webnus.net/dox/modern-events-calendar

## Changelog

### 5.19.1 – 12 May 2021

- Added: An option to disable booking multiple seats on “Sell All Occurrences by One Booking” events per email (pro)
- Added: An option to display custom fields in event sidebar
- Added: An option to change limit of related events
- Added: A new button in backend events manager to filter only upcoming events
- Added: All in one wizards popup
- Improved: The order time field to follow WP date and time format
- Improved: The last few tickets label to use ticket limit instead of total limit when only 1 ticket is defined (pro)
- Fixed: Regarding currency in “Frontend Event Submission”
- Fixed: Bulk edit of posts in Wp backend when filtered by tag
- Fixed: A warning in export file (pro)
- Fixed: Showing booking module when the event is expired and “Booking for ongoing events” option is enabled (pro)
- Fixed: Filtering of shortcakes for category archive
- Fixed: Showing next occurrence of custom repeat events
- Fixed: The event_link placeholder of some notifications
- Fixed: Showing wrong label in Invoices when used price per date option (pro)
- Fixed: Export file when “Discount Per Role” option is used (pro)
- Fixed: An issue regarding the dl in the HTML structure
- Fixed: Tile view in the modal popup method

### 5.19.0 – 5 May 2021

- Added: A new notification to send after at the exact time the event finishes (pro)
- Added: A new option to change the HTML tag of the archive page title
- Added: A new option to include event categories in the breadcrumbs module
- Added: A new option to profile shortcode to hide canceled bookings (pro)
- Added: A new option to profile shortcode to show only upcoming bookings (pro)
- Added: Update tag for Mailchimp subscribers (pro)
- Added: A new feature to hide export module in expired events
- Added: Expired label for expired events
- Added: An ability to insert coupon codes when adding new bookings from the backend (pro)
- Added: A new feature to easily export all bookings from the export menu (pro)
- Added: A new option to disable the fees module in certain payment gateways (pro)
- Changed: Settings menu
- Fixed: The event description placeholder when shortcodes are included in the email notification (pro)
- Fixed: Stripe connect gateway (pro)
- Fixed: Booking date format in WooCommerce when time format is added to the booking date format field (pro)
- Fixed: Booking over the ticket availability (pro)
- Fixed: Available spot skin (pro)
- Fixed: Importing events from Google calendar
- Fixed: A 404 error in the export module (pro)
- Fixed: some issues in the total price field of CSV/Excel import (pro)
- Fixed: The date of MEC feeds (pro)
- Fixed: Some issues regarding special characters in events and book exports
- Fixed: Some issues in quick edit of taxonomies
- Fixed: Sending some notifications twice in special conditions (pro)
- Fixed: The ticket creation form (pro)
- Fixed: The date of booking reminder notification for “Sell all by one booking” events (pro)
- Fixed: Masonry view issue in Firefox (pro)
- Fixed: Tooltip conflicts with Ultimate Addons for Elementor
- Fixed: Timeline view issue when the link is disabled

### 5.18.5 – 21 April 2021

- Added: A new feature to manage a load of MEC assets on pages
Expand Down
48 changes: 44 additions & 4 deletions app/features/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,7 @@ 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_all_occurrences_multiple = isset($booking_options['bookings_all_occurrences_multiple']) ? $booking_options['bookings_all_occurrences_multiple'] : 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']) != '') ? max(1, $booking_options['last_few_tickets_percentage']) : (isset($this->settings['booking_last_few_tickets_percentage']) ? max(1, $this->settings['booking_last_few_tickets_percentage']) : 15));

Expand Down Expand Up @@ -1643,7 +1644,7 @@ public function meta_box_booking_options($post)
echo 'checked="checked"';
}
?>
type="checkbox" value="1" name="mec[booking][bookings_all_occurrences]"/>
type="checkbox" value="1" name="mec[booking][bookings_all_occurrences]" onchange="jQuery('#mec_bookings_all_occurrences_options').toggle();"/>
<?php _e('Sell all occurrences by one booking', 'modern-events-calendar-lite'); ?>
<span class="mec-tooltip">
<div class="box">
Expand All @@ -1658,6 +1659,19 @@ public function meta_box_booking_options($post)
</span>
</label>
</div>
<div class="mec-form-row <?php echo (!$bookings_all_occurrences ? 'mec-util-hidden' : ''); ?>" id="mec_bookings_all_occurrences_options">
<label class="mec-col-8" for="mec_bookings_all_occurrences_multiple">
<input type="hidden" name="mec[booking][bookings_all_occurrences_multiple]" value="0"/>
<input id="mec_bookings_all_occurrences_multiple"
<?php
if ($bookings_all_occurrences_multiple == 1) {
echo 'checked="checked"';
}
?>
type="checkbox" value="1" name="mec[booking][bookings_all_occurrences_multiple]"/>
<?php _e('Allow multiple bookings by same email on different dates.', 'modern-events-calendar-lite'); ?>
</label>
</div>
<?php endif; ?>

<?php if(!$FES or ($FES and (!isset($this->settings['fes_section_booking_io']) or (isset($this->settings['fes_section_booking_io']) and $this->settings['fes_section_booking_io'])))): ?>
Expand Down Expand Up @@ -3491,6 +3505,7 @@ public function add_buttons($which)
if($which === 'top' and $screen->post_type === $this->PT)
{
echo '<a href="'.admin_url('edit.php?post_type='.$this->PT.'&mec-expired=1').'" class="button">'.esc_html__('Expired Events', 'modern-events-calendar-lite').'</a>';
echo '&nbsp;<a href="'.admin_url('edit.php?post_type='.$this->PT.'&mec-upcoming=1').'" class="button">'.esc_html__('Upcoming Events', 'modern-events-calendar-lite').'</a>';
}
}

Expand Down Expand Up @@ -3721,6 +3736,22 @@ public function filter($query)
if(!trim($order)) $order = 'asc';
}

$upcoming = (isset($_REQUEST['mec-upcoming']) ? $_REQUEST['mec-upcoming'] : 0);
if($upcoming)
{
$now = current_time('Y-m-d H:i:s');

$post_id_rows = $this->db->select("SELECT `post_id` FROM `#__mec_dates` WHERE `tstart` >= '".strtotime($now)."' GROUP BY `post_id`", 'loadObjectList');

$post_ids = array();
foreach($post_id_rows as $post_id_row) $post_ids[] = $post_id_row->post_id;

$post_ids = array_unique($post_ids);
$query->set('post__in', $post_ids);

if(!trim($orderby)) $orderby = 'start_date';
}

if($orderby == 'start_date')
{
$meta_query['mec_start_date'] = array(
Expand Down Expand Up @@ -3882,12 +3913,19 @@ public function do_bulk_actions()
exit;
}

public function csvexcel()
public function csvexcel($export_all = false)
{
// MEC Render Library
$render = $this->getRender();

$post_ids = $_GET['post'];
if($export_all){

$post_ids = get_posts('post_type=mec-events&fields=ids&posts_per_page=-1');
}else{

$post_ids = isset($_GET['post']) ? (array) $_GET['post'] : array();
}

$columns = array(__('ID', 'modern-events-calendar-lite'), __('Title', 'modern-events-calendar-lite'), __('Description', 'modern-events-calendar-lite'), __('Start Date', 'modern-events-calendar-lite'), __('Start Time', 'modern-events-calendar-lite'), __('End Date', 'modern-events-calendar-lite'), __('End Time', 'modern-events-calendar-lite'), __('Link', 'modern-events-calendar-lite'), $this->main->m('taxonomy_location', __('Location', 'modern-events-calendar-lite')), __('Address', 'modern-events-calendar-lite'), $this->main->m('taxonomy_organizer', __('Organizer', 'modern-events-calendar-lite')), sprintf(__('%s Tel', 'modern-events-calendar-lite'), $this->main->m('taxonomy_organizer', __('Organizer', 'modern-events-calendar-lite'))), sprintf(__('%s Email', 'modern-events-calendar-lite'), $this->main->m('taxonomy_organizer', __('Organizer', 'modern-events-calendar-lite'))), $this->main->m('event_cost', __('Event Cost', 'modern-events-calendar-lite')), __('Featured Image', 'modern-events-calendar-lite'));

// Event Fields
Expand Down Expand Up @@ -3916,6 +3954,8 @@ public function csvexcel()
$location = isset($data->locations[$data->meta['mec_location_id']]) ? $data->locations[$data->meta['mec_location_id']] : array();
$organizer = isset($data->organizers[$data->meta['mec_organizer_id']]) ? $data->organizers[$data->meta['mec_organizer_id']] : array();

$cost = isset($data->meta['mec_cost']) ? $data->meta['mec_cost'] : null;

$event = array(
$post_id,
html_entity_decode($data->title, ENT_QUOTES | ENT_HTML5),
Expand All @@ -3930,7 +3970,7 @@ public function csvexcel()
(isset($organizer['name']) ? $organizer['name'] : ''),
(isset($organizer['tel']) ? $organizer['tel'] : ''),
(isset($organizer['email']) ? $organizer['email'] : ''),
(is_numeric($data->meta['mec_cost']) ? $this->main->render_price($data->meta['mec_cost'], $post_id) : $data->meta['mec_cost']),
(is_numeric($cost) ? $this->main->render_price($cost, $post_id) : $cost),
$this->main->get_post_thumbnail_url($post_id)
);

Expand Down
2 changes: 1 addition & 1 deletion app/features/fes/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ function mec_fes_upload_organizer_thumbnail()
$currency_per_event = ((isset($this->settings['currency_per_event']) and trim($this->settings['currency_per_event'])) ? $this->settings['currency_per_event'] : 0);

$currencies = $this->main->get_currencies();
$current_currency = (isset($currency['currency']) ? $currency['currency'] : $this->settings['currency']);
$current_currency = (isset($currency['currency']) ? $currency['currency'] : (isset($this->settings['currency']) ? $this->settings['currency'] : NULL));
?>
<div class="mec-meta-box-fields" id="mec-event-cost">
<h4><?php echo $this->main->m('event_cost', __('Event Cost', 'modern-events-calendar-lite')); ?> <?php echo ((isset($this->settings['fes_required_cost']) and $this->settings['fes_required_cost']) ? '<span class="mec-required">*</span>' : ''); ?></h4>
Expand Down
Loading

0 comments on commit 7b7be76

Please sign in to comment.