Skip to content

Commit

Permalink
v5.20.0
Browse files Browse the repository at this point in the history
v5.20.0
  • Loading branch information
webnuswp committed Jun 9, 2021
1 parent 0f418fa commit b8e6059
Show file tree
Hide file tree
Showing 105 changed files with 22,263 additions and 21,123 deletions.
25 changes: 23 additions & 2 deletions 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.2 \
**Stable tag:** 5.19.5 \
**Stable tag:** 5.20.0 \
**Requires PHP:** 5.6 \
**License:** GPLv2 or later \
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -425,6 +425,7 @@ You can see [plugin documentation](https://webnus.net/dox/modern-events-calendar
- [Stripe Payment Integreation](https://webnus.net/modern-events-calendar/) (*pro*)
- [iDEAL payment for the Stripe gateway](https://webnus.net/modern-events-calendar/) (*pro*)
- [Express payment for the Stripe gateway](https://webnus.net/modern-events-calendar/) (*pro*)
- [Bank Transfer](https://webnus.net/modern-events-calendar/) (*pro*)
- [Auto Update](https://webnus.net/dox/modern-events-calendar/how-to-auto-update-plugin/) (*pro*)
- [Weather module](https://webnus.net/dox/modern-events-calendar/weather-module/) (*pro*)
- [PDF invoice](https://webnus.net/modern-events-calendar/) (*pro*)
Expand All @@ -439,7 +440,7 @@ You can see [plugin documentation](https://webnus.net/dox/modern-events-calendar

### 1. WordPress Event Calendar - Full Calendar view

[missing image]
![WordPress Event Calendar - Full Calendar view](https://ps.w.org/modern-events-calendar-lite/assets/screenshot-1.png)

### 2. WordPress Event Calendar - Monthly view

Expand Down Expand Up @@ -604,6 +605,26 @@ You can see [plugin documentation](https://webnus.net/dox/modern-events-calendar

## Changelog

### 5.20.0 – 9 June 2021

- Added: The event cost, event link, more info link with title and target, organizer, and location to the occurrences section to provide an ability to change them per occurrence
- Added: “Activate First Upcoming Date with Event” option in full calendar
- Added: An ability to display all events in the right panel of monthly skins
- Added: An option to show activate the first date of the month in monthly skins instead of the current day in next/previous months
- Added: “Bank Transfer” as a new payment gateway (pro)
- Improved: The flexibility in events URLs
- Improved: The functionality of the “Disable fees per payment gateway” feature (pro)
- Improved: The library inclusion of MEC
- Removed: “Montserrat” font family
- Fixed: An issue in calculating the price per attendee in booking export feature (pro)
- Fixed: Showing ongoing events in calendar method of booking module (pro)
- Fixed: Sending multiple emails after booking edit (pro)
- Fixed: Oversell in some conditions (pro)
- Fixed: Labels issue
- Fixed: Notifications issue
- Fixed: Some issues in multilingual feature and translations
- Fixed: Some PHP notices and warnings

### 5.19.5 – 26 May 2021

- Added: A new ability to show all locations of an event in the event single map (pro)
Expand Down
5 changes: 4 additions & 1 deletion app/features/booking/calendar_novel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// Settings
$settings = $this->main->get_settings();

// Is Booking Enabled for Ongoing Events
$booking_ongoing = (isset($settings['booking_ongoing']) and $settings['booking_ongoing']);

// Options
$event_color = isset($event->data->meta['mec_color']) ? '#'.$event->data->meta['mec_color'] : '';
$allday = isset($event->data->meta['mec_allday']) ? $event->data->meta['mec_allday'] : 0;
Expand Down Expand Up @@ -127,7 +130,7 @@

foreach($dates as $date)
{
if(!isset($date['fake']) and strtotime($date['start']['date']) <= $time and $time <= strtotime($date['end']['date']) and (isset($date['start']['timestamp']) and $date['start']['timestamp'] >= current_time('timestamp', 0)))
if(!isset($date['fake']) and strtotime($date['start']['date']) <= $time and $time <= strtotime($date['end']['date']) and ($booking_ongoing or (isset($date['start']['timestamp']) and $date['start']['timestamp'] >= current_time('timestamp', 0))))
{
$repeat++;
$date_timestamp = $this->book->timestamp($date['start'], $date['end']);
Expand Down
3 changes: 0 additions & 3 deletions app/features/bookingcalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public function load_month()
// Render
$render = $this->getRender();

// Settings
$settings = $this->main->get_settings();

$event_id = $request->getVar('event_id');
$uniqueid = $request->getVar('uniqueid');
$year = $request->getVar('year');
Expand Down
7 changes: 4 additions & 3 deletions app/features/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public function register_post_type()
'rewrite' => array(
'slug' => $this->main->get_main_slug(),
'ep_mask' => EP_MEC_EVENTS,
'with_front' => false,
),
'supports' => $supports,
'show_in_rest' => true,
Expand Down Expand Up @@ -1241,13 +1242,13 @@ public function meta_box_cost($post)
$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'] : 'USD'));
?>
<div class="mec-meta-box-fields mec-event-tab-content" id="mec-cost">
<h4><?php echo $this->main->m('event_cost', __('Event Cost', 'modern-events-calendar-lite')); ?></h4>
<div id="mec_meta_box_cost_form">
<div class="mec-form-row">
<input type="<?php echo ($type === 'alphabetic' ? 'text' : 'number'); ?>" class="mec-col-3" name="mec[cost]" id="mec_cost"
<input type="<?php echo ($type === 'alphabetic' ? 'text' : 'number'); ?>" <?php echo ($type === 'numeric' ? 'min="0" step="any"' : ''); ?> class="mec-col-3" name="mec[cost]" id="mec_cost"
value="<?php echo esc_attr($cost); ?>" title="<?php _e('Cost', 'modern-events-calendar-lite'); ?>" placeholder="<?php _e('Cost', 'modern-events-calendar-lite'); ?>"/>
</div>
</div>
Expand Down Expand Up @@ -4174,7 +4175,7 @@ public function mec_locations_edit($post_id, $mec_locations, $action = 'bulk_edi
if(!term_exists($term_location, 'mec_location')) wp_insert_term($term_location, 'mec_location', array());

$location_id = get_term_by('name', $term_location, 'mec_location')->term_id;
wp_set_object_terms($post_id, (int)$location_id, 'mec_location');
wp_set_object_terms($post_id, (int) $location_id, 'mec_location');
update_post_meta($post_id, 'mec_location_id', $location_id);

if(count($mec_locations) > 1)
Expand Down
2 changes: 1 addition & 1 deletion app/features/feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function rss2($for_comments)
{
// Fetch Events
$this->events = $this->fetch();

// Include Feed template
include_once $rss2;
}
Expand Down
19 changes: 14 additions & 5 deletions app/features/feed/rss2.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@
<sy:updateFrequency><?php echo apply_filters('rss_update_frequency', 1); ?></sy:updateFrequency>
<?php do_action('rss2_head'); ?>

<?php foreach($this->events as $date=>$events): foreach($events as $event): $timezone = $this->main->get_timezone($event); $tz = ($timezone ? new DateTimeZone($timezone) : NULL); ?>
<?php foreach($this->events as $date=>$events): foreach($events as $event): ?>
<?php
$timezone = $this->main->get_timezone($event);
$tz = ($timezone ? new DateTimeZone($timezone) : NULL);

$cost = (isset($event->data->meta) and isset($event->data->meta['mec_cost']) and trim($event->data->meta['mec_cost'])) ? $event->data->meta['mec_cost'] : '';
if(isset($event->date) and isset($event->date['start']) and isset($event->date['start']['timestamp'])) $cost = MEC_feature_occurrences::param($event->ID, $event->date['start']['timestamp'], 'cost', $cost);

$location_id = $this->main->get_master_location_id($event);
?>
<item>
<title><?php echo $this->feed->title($event->ID); ?></title>
<link><?php echo $this->main->get_event_date_permalink($event, $event->date['start']['date']); ?></link>
Expand Down Expand Up @@ -69,12 +78,12 @@
<mec:endHour><?php echo $event->data->time['end']; ?></mec:endHour>
<?php endif; ?>

<?php if(isset($event->data) and isset($event->data->meta) and isset($event->data->meta['mec_location_id']) and isset($event->data->locations[$event->data->meta['mec_location_id']])): ?>
<mec:location><?php echo $event->data->locations[$event->data->meta['mec_location_id']]['address']; ?></mec:location>
<?php if($location_id and isset($event->data->locations[$location_id])): ?>
<mec:location><?php echo $event->data->locations[$location_id]['address']; ?></mec:location>
<?php endif; ?>

<?php if(isset($event->data->meta) and isset($event->data->meta['mec_cost']) and trim($event->data->meta['mec_cost'])): ?>
<mec:cost><?php echo (is_numeric($event->data->meta['mec_cost']) ? $this->main->render_price($event->data->meta['mec_cost'], $event->ID) : $event->data->meta['mec_cost']); ?></mec:cost>
<?php if($cost): ?>
<mec:cost><?php echo (is_numeric($cost) ? $this->main->render_price($cost, $event->ID) : $cost); ?></mec:cost>
<?php endif; ?>

<?php if(isset($event->data->categories) and is_array($event->data->categories) and count($event->data->categories)): ?>
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 @@ -861,7 +861,7 @@ function mec_fes_upload_organizer_thumbnail()
<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>
<div id="mec_meta_box_cost_form">
<div class="mec-form-row">
<input type="<?php echo ($cost_type === 'alphabetic' ? 'text' : 'number'); ?>" class="mec-col-3" name="mec[cost]" id="mec_cost" value="<?php echo esc_attr($cost); ?>" placeholder="<?php _e('Cost', 'modern-events-calendar-lite'); ?>" <?php echo ((isset($this->settings['fes_required_cost']) and $this->settings['fes_required_cost']) ? 'required' : ''); ?> />
<input type="<?php echo ($cost_type === 'alphabetic' ? 'text' : 'number'); ?>" <?php echo ($type === 'numeric' ? 'min="0" step="any"' : ''); ?> class="mec-col-3" name="mec[cost]" id="mec_cost" value="<?php echo esc_attr($cost); ?>" placeholder="<?php _e('Cost', 'modern-events-calendar-lite'); ?>" <?php echo ((isset($this->settings['fes_required_cost']) and $this->settings['fes_required_cost']) ? 'required' : ''); ?> />
</div>
</div>

Expand Down
3 changes: 2 additions & 1 deletion app/features/labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public function register_taxonomy()
'new_item_name'=>sprintf(__('New %s Name', 'modern-events-calendar-lite'), $singular_label),
'popular_items'=>sprintf(__('Popular %s', 'modern-events-calendar-lite'), $plural_label),
'search_items'=>sprintf(__('Search %s', 'modern-events-calendar-lite'), $plural_label),
'back_to_items'=>sprintf(__('← Back to %s', 'modern-events-calendar-lite'), $plural_label),
'back_to_items'=>sprintf(__('← Back to %s', 'modern-events-calendar-lite'), $plural_label),
'not_found'=>sprintf(__('no %s found.', 'modern-events-calendar-lite'), strtolower($plural_label)),
),
'rewrite'=>array('slug'=>'events-label'),
'public'=>false,
Expand Down
5 changes: 3 additions & 2 deletions app/features/locations.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public function register_taxonomy()
'new_item_name'=>sprintf(__('New %s Name', 'modern-events-calendar-lite'), $singular_label),
'popular_items'=>sprintf(__('Popular %s', 'modern-events-calendar-lite'), $plural_label),
'search_items'=>sprintf(__('Search %s', 'modern-events-calendar-lite'), $plural_label),
'back_to_items'=>sprintf(__('← Back to %s', 'modern-events-calendar-lite'), $plural_label),
'back_to_items'=>sprintf(__('← Back to %s', 'modern-events-calendar-lite'), $plural_label),
'not_found'=>sprintf(__('no %s found.', 'modern-events-calendar-lite'), strtolower($plural_label)),
),
'rewrite'=>array('slug'=>'events-location'),
'public'=>false,
Expand Down Expand Up @@ -323,7 +324,7 @@ public function meta_box_location($post)
$api_key = isset($this->settings['google_maps_api_key']) ? $this->settings['google_maps_api_key'] : '';
?>
<div class="mec-meta-box-fields mec-event-tab-content" id="mec-location">
<h4><?php echo sprintf(__('Event %s', 'modern-events-calendar-lite'), $this->main->m('taxonomy_location', __('Location', 'modern-events-calendar-lite'))); ?></h4>
<h4><?php echo sprintf(__('Event Main %s', 'modern-events-calendar-lite'), $this->main->m('taxonomy_location', __('Location', 'modern-events-calendar-lite'))); ?></h4>
<div class="mec-form-row">
<select name="mec[location_id]" id="mec_location_id" title="<?php echo esc_attr__($this->main->m('taxonomy_location', __('Location', 'modern-events-calendar-lite')), 'modern-events-calendar-lite'); ?>">
<option value="1"><?php _e('Hide location', 'modern-events-calendar-lite'); ?></option>
Expand Down
12 changes: 7 additions & 5 deletions app/features/mec.php
Original file line number Diff line number Diff line change
Expand Up @@ -1290,16 +1290,18 @@ public function widget_news()
echo '<div class="mec-metabox-upcoming-wrap"><h3 class="mec-metabox-feed-head">'.esc_html__('Upcoming Events', 'modern-events-calendar-lite').'</h3><ul>';
foreach($upcoming_events as $date => $content)
{
foreach($content as $array_id => $array_content)
foreach($content as $array_id => $event)
{
$location_id = $array_content->data->meta['mec_location_id'];
$event_title = $array_content->data->title;
$event_link = $array_content->data->permalink;
$event_date = $this->main->date_i18n(get_option('date_format'), $array_content->date['start']['date']);
$location_id = $this->main->get_master_location_id($event);

$event_title = $event->data->title;
$event_link = $event->data->permalink;
$event_date = $this->main->date_i18n(get_option('date_format'), $event->date['start']['date']);
$location = get_term($location_id, 'mec_location');

$locationName = '';
if(isset($location->name)) $locationName = $location->name;

echo '<li>
<span aria-hidden="true" class="dashicons dashicons-calendar-alt"></span>
<div class="mec-metabox-upcoming-event">
Expand Down
6 changes: 6 additions & 0 deletions app/features/mec/dyncss.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ function mec_dyn_hex2rgb($cc)

ob_start();

if( isset($styling['disable_gfonts']) && !$styling['disable_gfonts']) {
echo '
.mec-wrap, .mec-wrap div:not([class^="elementor-"]), .lity-container, .mec-wrap h1, .mec-wrap h2, .mec-wrap h3, .mec-wrap h4, .mec-wrap h5, .mec-wrap h6, .entry-content .mec-wrap h1, .entry-content .mec-wrap h2, .entry-content .mec-wrap h3, .entry-content .mec-wrap h4, .entry-content .mec-wrap h5, .entry-content .mec-wrap h6, .mec-wrap .mec-totalcal-box input[type="submit"], .mec-wrap .mec-totalcal-box .mec-totalcal-view span, .mec-agenda-event-title a, .lity-content .mec-events-meta-group-booking select, .lity-content .mec-book-ticket-variation h5, .lity-content .mec-events-meta-group-booking input[type="number"], .lity-content .mec-events-meta-group-booking input[type="text"], .lity-content .mec-events-meta-group-booking input[type="email"],.mec-organizer-item a
{ font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;}';
}

// render headings font familty
if($mec_h_fontfamily_arr): ?>
/* == Custom Fonts For H Tag
Expand Down
Loading

0 comments on commit b8e6059

Please sign in to comment.