The Events Calendar - Version 1.5.2

Version Description

  • updated ticket display to hide after event end date
  • fix exception handling bugs
Download this release

Release Info

Developer kelseydamas
Plugin Icon The Events Calendar
Version 1.5.2
Comparing to
See all releases

Code changes from version 1.5.1 to 1.5.2

Files changed (3) hide show
  1. readme.txt +6 -1
  2. the-events-calendar.php +10 -9
  3. views/datepicker.php +8 -1
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
5
  Tags: widget, events, simple, tooltips, grid, month, list, calendar, event, venue, eventbrite, registration, tickets, ticketing, eventbright, api, dates, date, plugin, posts, sidebar, template, theme, time, google maps, google, maps, conference, workshop, concert, meeting, seminar, summit, forum
6
  Requires at least: 2.8
7
  Tested up to: 2.9.1
8
- Stable tag: 1.5.1
9
 
10
  == Description ==
11
 
@@ -170,6 +170,11 @@ Please visit the forum for questions or comments: http://wordpress.org/tags/the-
170
 
171
  == Changelog ==
172
 
 
 
 
 
 
173
  = 1.5.1 =
174
 
175
  * updated single.php to improve dependency on eventbrite
5
  Tags: widget, events, simple, tooltips, grid, month, list, calendar, event, venue, eventbrite, registration, tickets, ticketing, eventbright, api, dates, date, plugin, posts, sidebar, template, theme, time, google maps, google, maps, conference, workshop, concert, meeting, seminar, summit, forum
6
  Requires at least: 2.8
7
  Tested up to: 2.9.1
8
+ Stable tag: 1.5.2
9
 
10
  == Description ==
11
 
170
 
171
  == Changelog ==
172
 
173
+ = 1.5.2 =
174
+
175
+ * updated ticket display to hide after event end date
176
+ * fix exception handling bugs
177
+
178
  = 1.5.1 =
179
 
180
  * updated single.php to improve dependency on eventbrite
the-events-calendar.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: The Events Calendar
4
  Plugin URI: http://wordpress.org/extend/plugins/the-events-calendar/
5
  Description: The Events Calendar plugin enables you to rapidly create and manage events using the post editor. Features include optional Eventbrite integration, Google Maps integration as well as default calendar grid and list templates for streamlined one click installation.
6
- Version: 1.5.1
7
  Author URI: http://www.shaneandpeter.com/
8
  Text Domain: events
9
  */
@@ -309,7 +309,6 @@ if ( !class_exists( 'The_Events_Calendar' ) ) {
309
  * @return void
310
  */
311
  function __construct( ) {
312
- if( $this->debug ) error_log( "construct events calendar" );
313
  $this->currentDay = '';
314
  $this->pluginDir = basename(dirname(__FILE__));
315
  $this->pluginUrl = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
@@ -403,7 +402,6 @@ if ( !class_exists( 'The_Events_Calendar' ) ) {
403
  }
404
 
405
  public function templateChooser() {
406
- if( $this->debug ) error_log( "template chooser" );
407
  // list view
408
  if ( $this->in_event_category() && ( events_displaying_upcoming() || events_displaying_past() ) ) {
409
  if (file_exists(TEMPLATEPATH.'/events/list.php') ) {
@@ -801,7 +799,6 @@ if ( !class_exists( 'The_Events_Calendar' ) ) {
801
  // there was an error with a sub-plugin saving the post details
802
  // make sure the error is saved somehow and displayed
803
  update_post_meta( $postId, Eventbrite_for_The_Events_Calendar::EVENTBRITEERROPT, trim( $e->getMessage() ) );
804
- return false;
805
  }
806
  //update meta fields
807
  foreach ( $this->metaTags as $tag ) {
@@ -810,6 +807,7 @@ if ( !class_exists( 'The_Events_Calendar' ) ) {
810
  update_post_meta( $postId, $tag, $_POST[$htmlElement] );
811
  }
812
  }
 
813
  // merge event category into this post
814
  update_post_meta( $postId, '_EventCost', the_event_cost( $postId ) ); // XXX eventbrite cost field
815
  $cats = wp_get_object_terms($postId, 'category', array('fields' => 'ids'));
@@ -1360,11 +1358,14 @@ if( class_exists( 'The_Events_Calendar' ) && !function_exists( 'get_event_style'
1360
  global $post;
1361
  $postId = $post->ID;
1362
  }
1363
- $cost = false;
1364
- apply_filters('the_event_cost',$cost);
1365
- if ($cost) {
1366
- return $cost;
1367
- } elseif ( $cost = get_post_meta( $postId, '_EventCost', true ) ) {
 
 
 
1368
  return $cost;
1369
  } else {
1370
  return __('Free');
3
  Plugin Name: The Events Calendar
4
  Plugin URI: http://wordpress.org/extend/plugins/the-events-calendar/
5
  Description: The Events Calendar plugin enables you to rapidly create and manage events using the post editor. Features include optional Eventbrite integration, Google Maps integration as well as default calendar grid and list templates for streamlined one click installation.
6
+ Version: 1.5.2
7
  Author URI: http://www.shaneandpeter.com/
8
  Text Domain: events
9
  */
309
  * @return void
310
  */
311
  function __construct( ) {
 
312
  $this->currentDay = '';
313
  $this->pluginDir = basename(dirname(__FILE__));
314
  $this->pluginUrl = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
402
  }
403
 
404
  public function templateChooser() {
 
405
  // list view
406
  if ( $this->in_event_category() && ( events_displaying_upcoming() || events_displaying_past() ) ) {
407
  if (file_exists(TEMPLATEPATH.'/events/list.php') ) {
799
  // there was an error with a sub-plugin saving the post details
800
  // make sure the error is saved somehow and displayed
801
  update_post_meta( $postId, Eventbrite_for_The_Events_Calendar::EVENTBRITEERROPT, trim( $e->getMessage() ) );
 
802
  }
803
  //update meta fields
804
  foreach ( $this->metaTags as $tag ) {
807
  update_post_meta( $postId, $tag, $_POST[$htmlElement] );
808
  }
809
  }
810
+ do_action( 'sp_events_update_meta', $postId );
811
  // merge event category into this post
812
  update_post_meta( $postId, '_EventCost', the_event_cost( $postId ) ); // XXX eventbrite cost field
813
  $cats = wp_get_object_terms($postId, 'category', array('fields' => 'ids'));
1358
  global $post;
1359
  $postId = $post->ID;
1360
  }
1361
+ if( class_exists( 'Eventbrite_for_The_Events_Calendar' ) ) {
1362
+ global $spEventBrite;
1363
+ $returned = $spEventBrite->the_event_cost($postId);
1364
+ if($returned) {
1365
+ return $returned;
1366
+ }
1367
+ }
1368
+ if ( $cost = get_post_meta( $postId, '_EventCost', true ) ) {
1369
  return $cost;
1370
  } else {
1371
  return __('Free');
views/datepicker.php CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  <script type="text/javascript" charset="utf-8">
2
  jQuery(document).ready(function(){
3
  jQuery('.<?php echo $prefix; ?>events-dropdown').change(function( ){
@@ -5,7 +12,7 @@
5
  yearSelect = jQuery('#<?php echo $prefix; ?>events-year');
6
  jumpMonth = monthSelect.attr("options")[monthSelect.attr("selectedIndex")].value;
7
  jumpYear = yearSelect.attr("options")[yearSelect.attr("selectedIndex")].value;
8
- location.href = '<?php echo trailingslashit( events_get_events_link() ); ?>' + jumpYear + '-' + jumpMonth + '/';
9
  });
10
  });
11
  </script>
1
+ <?php
2
+ if( '' == get_option('permalink_structure') ) {
3
+ $link = trailingslashit( get_bloginfo('url') ) . '?cat=' . $spEvents->eventCategory() . '&eventDisplay=month&eventDate=';
4
+ } else {
5
+ $link = get_bloginfo( 'url' ) . '/' . $spEvents->getCategoryBase() . '/' . strtolower( The_Events_Calendar::CATEGORYNAME ) . '/';
6
+ }
7
+ ?>
8
  <script type="text/javascript" charset="utf-8">
9
  jQuery(document).ready(function(){
10
  jQuery('.<?php echo $prefix; ?>events-dropdown').change(function( ){
12
  yearSelect = jQuery('#<?php echo $prefix; ?>events-year');
13
  jumpMonth = monthSelect.attr("options")[monthSelect.attr("selectedIndex")].value;
14
  jumpYear = yearSelect.attr("options")[yearSelect.attr("selectedIndex")].value;
15
+ location.href = '<?php echo $link; ?>' + jumpYear + '-' + jumpMonth;
16
  });
17
  });
18
  </script>