The Events Calendar - Version 3.11.1

Version Description

Download this release

Release Info

Developer borkweb
Plugin Icon The Events Calendar
Version 3.11.1
Comparing to
See all releases

Code changes from version 3.11 to 3.11.1

readme.txt CHANGED
@@ -4,8 +4,8 @@ Contributors: ModernTribe, roblagatta, borkweb, zbtirrell, barry.hughes, bordon
4
  Tags: events, calendar, event, venue, organizer, dates, date, google maps, conference, workshop, concert, meeting, seminar, summit, class, modern tribe, tribe, widget
5
  Donate link: http://m.tri.be/29
6
  Requires at least: 3.9
7
- Tested up to: 4.2.2
8
- Stable tag: 3.11
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -312,6 +312,13 @@ At no point during the 3.0 lifecycle will the major version change. But you can
312
 
313
  == Changelog ==
314
 
 
 
 
 
 
 
 
315
  = [3.11] 2015-07-22 =
316
 
317
  * Security - Added escaping to a number of previously un-escaped values
@@ -351,7 +358,7 @@ At no point during the 3.0 lifecycle will the major version change. But you can
351
  * Bug - Fixed an issue where the "Export Month's events" button wasn't appearing on Month view
352
  * Bug - Fixed an issue where notification of mismatched TEC Addon versions failed to appear on dot releases above x.9
353
  * Bug - Fixed an issue where ticket prices were not displayed in List View when tickets were marked as "Free" (Cheers to liblogger and tracylove for the heads up!)
354
- * Bug - Fixed a bug where an event's start/end dates were purged when calling tribe_update_event() without passing start/end dates
355
  * Bug - Fixed an issue where events with multiple prices showed inaccurate price ranges in list view (Props to Sonya for reporting this!)
356
  * Bug - Fixed a bug where 24-hour datetime formats would sometimes fail to initialize datetime pickers appropriately (Thank you mtmuddnadd for the help!)
357
  * Bug - Fixed a bug where titles containing certain special character combinations were getting partially stripped (Thank you webquest for the report!)
@@ -809,7 +816,9 @@ Still not happy? Shoot us an email to pro@tri.be or tweet to @moderntribeinc and
809
 
810
  == Upgrade Notice ==
811
 
812
- IMPORTANT NOTICE: 3.10 is a massive update from the 3.9 build, which contains a number of changes under-the-hood. All users are encouraged to backup their site before updating, and to apply the updates on a staging/test site where they can check on + fix customizations as needed before deploying to production.
 
 
813
 
814
  = 3.10 =
815
 
4
  Tags: events, calendar, event, venue, organizer, dates, date, google maps, conference, workshop, concert, meeting, seminar, summit, class, modern tribe, tribe, widget
5
  Donate link: http://m.tri.be/29
6
  Requires at least: 3.9
7
+ Tested up to: 4.2.3
8
+ Stable tag: 3.11.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
312
 
313
  == Changelog ==
314
 
315
+ = [3.11.1] 2015-07-28 =
316
+
317
+ * Bug - Fixed bug where all events regardless of category were shown on category month views while paging through months (thanks to our long-time user Anthony of Design Big Dreams for the first report here!)
318
+ * Bug - Fixed bug where events marked as "Hide From Event Listings" were visible while paging through months in Month View (thanks to Joel on the forums for the heads up!)
319
+ * Bug - Fixed bug where recurring events were hidden in Month View when recurring event instances were disabled in List View (thanks to Rebecca Redding on the forum for letting us know!)
320
+ * Bug - Fixed bug where all admin dashboard post queries inappropriately included event date SQL which caused query/sorting instability (thanks to everyone on the forums who reported this conflict post-launch!)
321
+
322
  = [3.11] 2015-07-22 =
323
 
324
  * Security - Added escaping to a number of previously un-escaped values
358
  * Bug - Fixed an issue where the "Export Month's events" button wasn't appearing on Month view
359
  * Bug - Fixed an issue where notification of mismatched TEC Addon versions failed to appear on dot releases above x.9
360
  * Bug - Fixed an issue where ticket prices were not displayed in List View when tickets were marked as "Free" (Cheers to liblogger and tracylove for the heads up!)
361
+ * Bug - Fixed a bug where an event's start/end dates were purged when calling tribe_update_event() without passing start/end dates
362
  * Bug - Fixed an issue where events with multiple prices showed inaccurate price ranges in list view (Props to Sonya for reporting this!)
363
  * Bug - Fixed a bug where 24-hour datetime formats would sometimes fail to initialize datetime pickers appropriately (Thank you mtmuddnadd for the help!)
364
  * Bug - Fixed a bug where titles containing certain special character combinations were getting partially stripped (Thank you webquest for the report!)
816
 
817
  == Upgrade Notice ==
818
 
819
+ = 3.11 =
820
+
821
+ 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!
822
 
823
  = 3.10 =
824
 
src/Tribe/Main.php CHANGED
@@ -24,7 +24,7 @@ if ( ! class_exists( 'Tribe__Events__Main' ) ) {
24
  const VENUE_POST_TYPE = 'tribe_venue';
25
  const ORGANIZER_POST_TYPE = 'tribe_organizer';
26
 
27
- const VERSION = '3.11';
28
  const MIN_ADDON_VERSION = '3.11';
29
  const FEED_URL = 'https://theeventscalendar.com/feed/';
30
  const INFO_API_URL = 'http://wpapi.org/api/plugin/the-events-calendar.php';
@@ -400,7 +400,7 @@ if ( ! class_exists( 'Tribe__Events__Main' ) ) {
400
  add_action( 'plugins_loaded', array( 'Tribe__Events__Support', 'getInstance' ) );
401
  add_action( 'plugins_loaded', array( $this, 'set_meta_factory_global' ) );
402
  add_action( 'plugins_loaded', array( 'Tribe__Events__App_Shop', 'instance' ) );
403
- add_action( 'plugins_loaded', array( 'Tribe__Events__Admin_List', 'init' ) );
404
 
405
  // Load organizer and venue editors
406
  add_action( 'admin_menu', array( $this, 'addVenueAndOrganizerEditor' ) );
@@ -2101,6 +2101,24 @@ if ( ! class_exists( 'Tribe__Events__Main' ) ) {
2101
  }
2102
  }
2103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2104
  /**
2105
  * Set the displaying class property.
2106
  *
24
  const VENUE_POST_TYPE = 'tribe_venue';
25
  const ORGANIZER_POST_TYPE = 'tribe_organizer';
26
 
27
+ const VERSION = '3.11.1';
28
  const MIN_ADDON_VERSION = '3.11';
29
  const FEED_URL = 'https://theeventscalendar.com/feed/';
30
  const INFO_API_URL = 'http://wpapi.org/api/plugin/the-events-calendar.php';
400
  add_action( 'plugins_loaded', array( 'Tribe__Events__Support', 'getInstance' ) );
401
  add_action( 'plugins_loaded', array( $this, 'set_meta_factory_global' ) );
402
  add_action( 'plugins_loaded', array( 'Tribe__Events__App_Shop', 'instance' ) );
403
+ add_action( 'current_screen', array( $this, 'init_admin_list_screen' ) );
404
 
405
  // Load organizer and venue editors
406
  add_action( 'admin_menu', array( $this, 'addVenueAndOrganizerEditor' ) );
2101
  }
2102
  }
2103
 
2104
+ /**
2105
+ * Initializes admin-specific items for the events admin list dashboard page. Hooked to the
2106
+ * current_screen action
2107
+ *
2108
+ * @param WP_Screen $screen WP Admin screen object for the current page
2109
+ */
2110
+ public function init_admin_list_screen( $screen ) {
2111
+ if ( 'edit' !== $screen->base ) {
2112
+ return;
2113
+ }
2114
+
2115
+ if ( Tribe__Events__Main::POSTTYPE !== $screen->post_type ) {
2116
+ return;
2117
+ }
2118
+
2119
+ Tribe__Events__Admin_List::init();
2120
+ }
2121
+
2122
  /**
2123
  * Set the displaying class property.
2124
  *
src/Tribe/Template/Month.php CHANGED
@@ -141,13 +141,7 @@ if ( ! class_exists( 'Tribe__Events__Template__Month' ) ) {
141
  }
142
  }
143
 
144
- $this->use_cache = tribe_get_option( 'enable_month_view_cache', false );
145
-
146
- // Cache the result of month/content.php
147
- if ( $this->use_cache ) {
148
- $cache_expiration = apply_filters( 'tribe_events_month_view_transient_expiration', HOUR_IN_SECONDS );
149
- $this->html_cache = new Tribe__Events__Template_Part_Cache( 'month/content.php', serialize( $args ), $cache_expiration, 'save_post' );
150
- }
151
 
152
  $args = (array) $args;
153
  $this->args = $args;
@@ -157,6 +151,7 @@ if ( ! class_exists( 'Tribe__Events__Template__Month' ) ) {
157
  $this->final_grid_date = self::calculate_final_cell_date( $this->requested_date );
158
 
159
  $args = array_merge( $args, array(
 
160
  'fields' => 'ids',
161
  'start_date' => tribe_event_beginning_of_day( $this->first_grid_date ),
162
  'end_date' => tribe_event_end_of_day( $this->final_grid_date ),
@@ -170,6 +165,14 @@ if ( ! class_exists( 'Tribe__Events__Template__Month' ) ) {
170
 
171
  $args = apply_filters( 'tribe_events_in_month_args', $args );
172
 
 
 
 
 
 
 
 
 
173
  // get all the ids for the events in this month, speeds up queries
174
  $this->events_in_month = tribe_get_events( $args );
175
 
@@ -306,6 +309,7 @@ if ( ! class_exists( 'Tribe__Events__Template__Month' ) ) {
306
 
307
  $args = wp_parse_args(
308
  array(
 
309
  'start_date' => tribe_event_beginning_of_day( $date ),
310
  'end_date' => tribe_event_end_of_day( $date ),
311
  'posts_per_page' => $this->events_per_day,
@@ -675,9 +679,7 @@ if ( ! class_exists( 'Tribe__Events__Template__Month' ) ) {
675
 
676
  Tribe__Events__Main::instance()->displaying = 'month';
677
 
678
- if ( isset( $_POST['tribe_event_category'] ) ) {
679
- $query_args['tribe_events_cat'] = $_POST['tribe_event_category'];
680
- }
681
 
682
  query_posts( $query_args );
683
 
@@ -696,5 +698,22 @@ if ( ! class_exists( 'Tribe__Events__Template__Month' ) ) {
696
  die();
697
  }
698
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699
  } // class Tribe__Events__Template__Month
700
  }
141
  }
142
  }
143
 
144
+ $args = $this->maybe_inject_category_arg( $args );
 
 
 
 
 
 
145
 
146
  $args = (array) $args;
147
  $this->args = $args;
151
  $this->final_grid_date = self::calculate_final_cell_date( $this->requested_date );
152
 
153
  $args = array_merge( $args, array(
154
+ 'eventDisplay' => 'month',
155
  'fields' => 'ids',
156
  'start_date' => tribe_event_beginning_of_day( $this->first_grid_date ),
157
  'end_date' => tribe_event_end_of_day( $this->final_grid_date ),
165
 
166
  $args = apply_filters( 'tribe_events_in_month_args', $args );
167
 
168
+ $this->use_cache = tribe_get_option( 'enable_month_view_cache', false );
169
+
170
+ // Cache the result of month/content.php
171
+ if ( $this->use_cache ) {
172
+ $cache_expiration = apply_filters( 'tribe_events_month_view_transient_expiration', HOUR_IN_SECONDS );
173
+ $this->html_cache = new Tribe__Events__Template_Part_Cache( 'month/content.php', serialize( $args ), $cache_expiration, 'save_post' );
174
+ }
175
+
176
  // get all the ids for the events in this month, speeds up queries
177
  $this->events_in_month = tribe_get_events( $args );
178
 
309
 
310
  $args = wp_parse_args(
311
  array(
312
+ 'eventDisplay' => 'month',
313
  'start_date' => tribe_event_beginning_of_day( $date ),
314
  'end_date' => tribe_event_end_of_day( $date ),
315
  'posts_per_page' => $this->events_per_day,
679
 
680
  Tribe__Events__Main::instance()->displaying = 'month';
681
 
682
+ $query_args = $this->maybe_inject_category_arg( $query_args );
 
 
683
 
684
  query_posts( $query_args );
685
 
698
  die();
699
  }
700
  }
701
+
702
+ /**
703
+ * Injects the Tribe__Events__Main::TAXONOMY argument into query_args if passed in via POST or GET
704
+ *
705
+ * @param array $args Current query args to augment
706
+ *
707
+ * @return array Array of args
708
+ */
709
+ public function maybe_inject_category_arg( $args ) {
710
+ if ( ! empty( $_POST['tribe_event_category'] ) ) {
711
+ $args[ Tribe__Events__Main::TAXONOMY ] = $_POST['tribe_event_category'];
712
+ } elseif ( ! empty( $_GET['tribe_event_category'] ) ) {
713
+ $args[ Tribe__Events__Main::TAXONOMY ] = $_GET['tribe_event_category'];
714
+ }
715
+
716
+ return $args;
717
+ }
718
  } // class Tribe__Events__Template__Month
719
  }
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.11
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.11.1
6
  Author: Modern Tribe, Inc.
7
  Author URI: http://m.tri.be/1x
8
  Text Domain: tribe-events-calendar