The Events Calendar - Version 3.3.1

Version Description

  • Fixed a bug where all day events created prior to 3.3 would show as ending on the previous day.
Download this release

Release Info

Developer jazbek
Plugin Icon The Events Calendar
Version 3.3.1
Comparing to
See all releases

Code changes from version 3.3 to 3.3.1

lib/the-events-calendar.class.php CHANGED
@@ -22,7 +22,7 @@ if ( !class_exists( 'TribeEvents' ) ) {
22
  const VENUE_POST_TYPE = 'tribe_venue';
23
  const ORGANIZER_POST_TYPE = 'tribe_organizer';
24
  const PLUGIN_DOMAIN = 'tribe-events-calendar';
25
- const VERSION = '3.3';
26
  const FEED_URL = 'http://tri.be/category/products/feed/';
27
  const INFO_API_URL = 'http://wpapi.org/api/plugin/the-events-calendar.php';
28
  const WP_PLUGIN_URL = 'http://wordpress.org/extend/plugins/the-events-calendar/';
@@ -3233,8 +3233,9 @@ if ( !class_exists( 'TribeEvents' ) ) {
3233
 
3234
  $_EventAllDay = isset($_EventAllDay) ? $_EventAllDay : false;
3235
  $_EventStartDate = (isset($_EventStartDate)) ? $_EventStartDate : null;
 
3236
  if ( isset( $_EventEndDate ) ) {
3237
- if ( $_EventAllDay && tribe_get_option( 'multiDayCutoff', '00:00' ) != '00:00' ) {
3238
 
3239
  // If it's an all day event and the EOD cutoff is later than midnight
3240
  // set the end date to be the previous day so it displays correctly in the datepicker
22
  const VENUE_POST_TYPE = 'tribe_venue';
23
  const ORGANIZER_POST_TYPE = 'tribe_organizer';
24
  const PLUGIN_DOMAIN = 'tribe-events-calendar';
25
+ const VERSION = '3.3.1';
26
  const FEED_URL = 'http://tri.be/category/products/feed/';
27
  const INFO_API_URL = 'http://wpapi.org/api/plugin/the-events-calendar.php';
28
  const WP_PLUGIN_URL = 'http://wordpress.org/extend/plugins/the-events-calendar/';
3233
 
3234
  $_EventAllDay = isset($_EventAllDay) ? $_EventAllDay : false;
3235
  $_EventStartDate = (isset($_EventStartDate)) ? $_EventStartDate : null;
3236
+
3237
  if ( isset( $_EventEndDate ) ) {
3238
+ if ( $_EventAllDay && TribeDateUtils::timeOnly( $_EventEndDate ) != '23:59:59' && TribeDateUtils::timeOnly( tribe_event_end_of_day() ) != '23:59:59' ) {
3239
 
3240
  // If it's an all day event and the EOD cutoff is later than midnight
3241
  // set the end date to be the previous day so it displays correctly in the datepicker
lib/tribe-admin-events-list.class.php CHANGED
@@ -287,8 +287,8 @@ if (!class_exists('TribeEventsAdminList')) {
287
  self::advance_date();
288
  }
289
  if ( $column_id == 'end-date' ) {
290
- if ( ! empty( self::$events_list[0]->EventEndDate ) )
291
- echo tribe_event_format_date( strtotime( self::$events_list[0]->EventEndDate ), false );
292
 
293
  if ( self::$start_col_first )
294
  self::advance_date();
287
  self::advance_date();
288
  }
289
  if ( $column_id == 'end-date' ) {
290
+
291
+ echo tribe_get_end_date( self::$events_list[0] );
292
 
293
  if ( self::$start_col_first )
294
  self::advance_date();
public/template-tags/date.php CHANGED
@@ -75,12 +75,13 @@ if( class_exists( 'TribeEvents' ) ) {
75
  }
76
 
77
  if( isset($event->EventEndDate) ){
78
- if ( tribe_event_is_all_day( $event ) && TribeDateUtils::timeOnly( $event->EventEndDate ) != '00:00:00' && tribe_get_option( 'multiDayCutoff', '00:00' ) != '00:00' ) {
79
  // set the event end date to be one day earlier, if it's an all day event and the cutoff is past midnight
80
  // @todo remove this once we can have all day events without a start / end time
81
  $event->EventEndDate = date_create( $event->EventEndDate );
82
  $event->EventEndDate->modify( '-1 day' );
83
  $event->EventEndDate = $event->EventEndDate->format( TribeDateUtils::DBDATEFORMAT );
 
84
  }
85
  $date = strtotime( $event->EventEndDate );
86
  } else{
75
  }
76
 
77
  if( isset($event->EventEndDate) ){
78
+ if ( tribe_event_is_all_day( $event ) && empty( $event->_end_date_fixed ) && TribeDateUtils::timeOnly( $event->EventEndDate ) != '23:59:59' && TribeDateUtils::timeOnly( tribe_event_end_of_day() ) != '23:59' ) {
79
  // set the event end date to be one day earlier, if it's an all day event and the cutoff is past midnight
80
  // @todo remove this once we can have all day events without a start / end time
81
  $event->EventEndDate = date_create( $event->EventEndDate );
82
  $event->EventEndDate->modify( '-1 day' );
83
  $event->EventEndDate = $event->EventEndDate->format( TribeDateUtils::DBDATEFORMAT );
84
+ $event->_end_date_fixed = true;
85
  }
86
  $date = strtotime( $event->EventEndDate );
87
  } else{
public/template-tags/general.php CHANGED
@@ -197,9 +197,9 @@ if ( class_exists( 'TribeEvents' ) ) {
197
  $postId = TribeEvents::postIdHelper( $postId );
198
  $start = (array) tribe_get_event_meta( $postId, '_EventStartDate', false );
199
  sort( $start );
200
- $start = strtotime( $start[0] );
201
  $end = strtotime( tribe_get_event_meta( $postId, '_EventEndDate', true ) );
202
- $output = ( $end > strtotime( tribe_event_end_of_day( $start[0] ) ) );
203
  return apply_filters( 'tribe_event_is_multiday', $output, $postId, $start, $end );
204
  }
205
 
197
  $postId = TribeEvents::postIdHelper( $postId );
198
  $start = (array) tribe_get_event_meta( $postId, '_EventStartDate', false );
199
  sort( $start );
200
+ $start = $start[0];
201
  $end = strtotime( tribe_get_event_meta( $postId, '_EventEndDate', true ) );
202
+ $output = ( $end > strtotime( tribe_event_end_of_day( $start ) ) );
203
  return apply_filters( 'tribe_event_is_multiday', $output, $postId, $start, $end );
204
  }
205
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: events, calendar, event, venue, organizer, dates, date, google maps, confe
5
  Donate link: http://m.tri.be/29
6
  Requires at least: 3.6
7
  Tested up to: 3.8
8
- Stable tag: 3.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -291,6 +291,10 @@ At no point during the 3.0 lifecycle will the major version change. But you can
291
 
292
  3.x is a complete overhaul of the plugin, and as a result we're starting the changelog fresh. For release notes from the 2.x lifecycle, see <a href="http://m.tri.be/k">our 2.x release notes.</a>
293
 
 
 
 
 
294
  = 3.3 =
295
 
296
  * Improved support for international date formats (big props to jeroenjoosen on the forums for the original report on this!)
@@ -416,6 +420,10 @@ Still not happy? Shoot us an email to pro@tri.be or tweet to @moderntribeinc and
416
 
417
  IMPORTANT NOTICE: 3.x upgrade is a HUGE upgrade from 2.x versions. If you are upgrading from an older version, please test thoroughly before updating on your live website.
418
 
 
 
 
 
419
  = 3.3 =
420
 
421
  Please see the changelog for the complete list of changes in this release. Remember to always make a backup of your database and files before updating!
5
  Donate link: http://m.tri.be/29
6
  Requires at least: 3.6
7
  Tested up to: 3.8
8
+ Stable tag: 3.3.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
291
 
292
  3.x is a complete overhaul of the plugin, and as a result we're starting the changelog fresh. For release notes from the 2.x lifecycle, see <a href="http://m.tri.be/k">our 2.x release notes.</a>
293
 
294
+ = 3.3.1 =
295
+
296
+ * Fixed a bug where all day events created prior to 3.3 would show as ending on the previous day.
297
+
298
  = 3.3 =
299
 
300
  * Improved support for international date formats (big props to jeroenjoosen on the forums for the original report on this!)
420
 
421
  IMPORTANT NOTICE: 3.x upgrade is a HUGE upgrade from 2.x versions. If you are upgrading from an older version, please test thoroughly before updating on your live website.
422
 
423
+ = 3.3.1 =
424
+
425
+ Fixed a bug with all day events when event cutoff time is set to be past midnight.
426
+
427
  = 3.3 =
428
 
429
  Please see the changelog for the complete list of changes in this release. Remember to always make a backup of your database and files before updating!
the-events-calendar.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: The Events Calendar
4
  Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
5
- Version: 3.3
6
  Author: Modern Tribe, Inc.
7
  Author URI: http://m.tri.be/1x
8
  Text Domain: tribe-events-calendar
2
  /*
3
  Plugin Name: The Events Calendar
4
  Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
5
+ Version: 3.3.1
6
  Author: Modern Tribe, Inc.
7
  Author URI: http://m.tri.be/1x
8
  Text Domain: tribe-events-calendar