Simple Calendar – Google Calendar Plugin - Version 2.0.6

Version Description

  • Added minimum and maximum feed date options to fix event display issues and boost performance.
  • Fixed a caching issue to increase performance.
  • Fixed bug where backslashes kept getting added to event titles that already contained single quotes when navigating through pages in widget.
Download this release

Release Info

Developer pderksen
Plugin Icon 128x128 Simple Calendar – Google Calendar Plugin
Version 2.0.6
Comparing to
See all releases

Code changes from version 2.0.5.1 to 2.0.6

class-google-calendar-events.php CHANGED
@@ -18,7 +18,7 @@ class Google_Calendar_Events {
18
  *
19
  * @var string
20
  */
21
- protected $version = '2.0.5.1';
22
 
23
  /**
24
  * Unique identifier for the plugin.
18
  *
19
  * @var string
20
  */
21
+ protected $version = '2.0.6';
22
 
23
  /**
24
  * Unique identifier for the plugin.
google-calendar-events.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Google Calendar Events
13
  * Plugin URI: https://github.com/pderksen/WP-Google-Calendar-Events
14
  * Description: Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
15
- * Version: 2.0.5.1
16
  * Author: Phil Derksen
17
  * Author URI: http://philderksen.com
18
  * License: GPL-2.0+
12
  * Plugin Name: Google Calendar Events
13
  * Plugin URI: https://github.com/pderksen/WP-Google-Calendar-Events
14
  * Description: Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
15
+ * Version: 2.0.6
16
  * Author: Phil Derksen
17
  * Author URI: http://philderksen.com
18
  * License: GPL-2.0+
includes/admin/admin-functions.php CHANGED
@@ -47,6 +47,10 @@ function gce_default_editor_content( $content, $post ) {
47
  add_post_meta( $post->ID, 'gce_list_max_num', 7 );
48
  add_post_meta( $post->ID, 'gce_list_max_length', 'days' );
49
  add_post_meta( $post->ID, 'gce_list_start_offset_num', '0' );
 
 
 
 
50
 
51
  // Default Simple Display Options
52
  add_post_meta( $post->ID, 'gce_display_start', 'time' );
47
  add_post_meta( $post->ID, 'gce_list_max_num', 7 );
48
  add_post_meta( $post->ID, 'gce_list_max_length', 'days' );
49
  add_post_meta( $post->ID, 'gce_list_start_offset_num', '0' );
50
+ add_post_meta( $post->ID, 'gce_feed_start', '1' );
51
+ add_post_meta( $post->ID, 'gce_feed_start_interval', 'months' );
52
+ add_post_meta( $post->ID, 'gce_feed_end', '2' );
53
+ add_post_meta( $post->ID, 'gce_feed_end_interval', 'years' );
54
 
55
  // Default Simple Display Options
56
  add_post_meta( $post->ID, 'gce_display_start', 'time' );
includes/admin/upgrade.php CHANGED
@@ -31,6 +31,11 @@ function gce_upgrade() {
31
  if( version_compare( $version, '2.0.4', '<' ) ) {
32
  gce_v204_upgrade();
33
  }
 
 
 
 
 
34
  }
35
 
36
  $new_version = Google_Calendar_Events::get_instance()->get_plugin_version();
@@ -39,6 +44,28 @@ function gce_upgrade() {
39
  add_option( 'gce_upgrade_has_run', 1 );
40
  }
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  /*
43
  * Run the upgrade to version 2.0.4
44
  *
31
  if( version_compare( $version, '2.0.4', '<' ) ) {
32
  gce_v204_upgrade();
33
  }
34
+
35
+ // Version 2.0.6 upgrade
36
+ if( version_compare( $version, '2.0.6', '<' ) ) {
37
+ gce_v206_upgrade();
38
+ }
39
  }
40
 
41
  $new_version = Google_Calendar_Events::get_instance()->get_plugin_version();
44
  add_option( 'gce_upgrade_has_run', 1 );
45
  }
46
 
47
+ /*
48
+ * Run the upgrade to version 2.0.6
49
+ *
50
+ * @since 2.0.4
51
+ */
52
+ function gce_v206_upgrade() {
53
+
54
+ // Update feeds
55
+ $q = new WP_Query( 'post_type=gce_feed' );
56
+
57
+ if( $q->have_posts() ) {
58
+ while( $q->have_posts() ) {
59
+ $q->the_post();
60
+
61
+ update_post_meta( get_the_ID(), 'gce_feed_start', '1' );
62
+ update_post_meta( get_the_ID(), 'gce_feed_start_interval', 'months' );
63
+ update_post_meta( get_the_ID(), 'gce_feed_end', '2' );
64
+ update_post_meta( get_the_ID(), 'gce_feed_end_interval', 'years' );
65
+ }
66
+ }
67
+ }
68
+
69
  /*
70
  * Run the upgrade to version 2.0.4
71
  *
includes/class-gce-display.php CHANGED
@@ -271,7 +271,7 @@ class GCE_Display {
271
 
272
  $feeds = implode( $this->id, '-' );
273
 
274
- $markup = '<div class="gce-list" data-gce-start-offset="' . $start_offset . '" data-gce-start="' . ( $start + $paging_interval ) . '" data-gce-paging-interval="' . $paging_interval . '" data-gce-paging="' . $paging . '" data-gce-feeds="' . $feeds . '" data-gce-title="' . $this->title . '" data-gce-grouped="' . $grouped . '" data-gce-sort="' . $this->sort . '">' . "\n";
275
 
276
  if( ( $paging != 0 ) && $max_length != 'events' ) {
277
  $p = '<div class="gce-prev"><a href="#" class="gce-change-month-list" title="' . esc_attr__( 'Previous month', 'gce' ) . '" data-gce-paging-direction="back" data-gce-paging-type="' . $paging_type . '">'. __( 'Back', 'gce' ) . '</a></div>';
@@ -316,7 +316,7 @@ class GCE_Display {
316
  if( $max_length != 'events' ) {
317
 
318
  if( $grouped && $key >= $start && $key < $end_time ) {
319
- $markup .= '<div class="gce-list-title">' . esc_html( $this->title ) . ' ' . date_i18n( $event_day[0]->feed->date_format, $key ) . '</div>';
320
  }
321
 
322
  foreach ( $event_day as $num_in_day => $event ) {
@@ -326,7 +326,7 @@ class GCE_Display {
326
  $markup .=
327
  '<div class="gce-feed gce-feed-' . $event->feed->id . '">' .
328
  //If this isn't a grouped list and a date title should be displayed, add the date title
329
- ( ( ! $grouped && isset( $event->title ) ) ? '<div class="gce-list-title">' . esc_attr( $this->title ) . '</div>' : '' ) .
330
  //Add the event markup
331
  $event->get_event_markup( 'list', $num_in_day, $i ) .
332
  '</div>';
@@ -339,7 +339,7 @@ class GCE_Display {
339
  } else {
340
 
341
  if( $grouped && $key >= $start && $event_counter < $max_events ) {
342
- $markup .= '<div class="gce-list-title">' . esc_html( $this->title ) . ' ' . date_i18n( $event_day[0]->feed->date_format, $key ) . '</div>';
343
  }
344
 
345
  foreach ( $event_day as $num_in_day => $event ) {
@@ -347,7 +347,7 @@ class GCE_Display {
347
  if( ( $event->start_time >= $time_now ) && ( $event_counter < $max_events ) ) {
348
  $markup .=
349
  '<div class="gce-feed gce-feed-' . $event->feed->id . '">' .
350
- '<div class="gce-list-title">' . esc_html( $this->title ) . '</div>' .
351
  //Add the event markup
352
  $event->get_event_markup( 'list', $num_in_day, $i ) .
353
  '</div>';
271
 
272
  $feeds = implode( $this->id, '-' );
273
 
274
+ $markup = '<div class="gce-list" data-gce-start-offset="' . $start_offset . '" data-gce-start="' . ( $start + $paging_interval ) . '" data-gce-paging-interval="' . $paging_interval . '" data-gce-paging="' . $paging . '" data-gce-feeds="' . $feeds . '" data-gce-title="' . stripslashes( $this->title ) . '" data-gce-grouped="' . $grouped . '" data-gce-sort="' . $this->sort . '">' . "\n";
275
 
276
  if( ( $paging != 0 ) && $max_length != 'events' ) {
277
  $p = '<div class="gce-prev"><a href="#" class="gce-change-month-list" title="' . esc_attr__( 'Previous month', 'gce' ) . '" data-gce-paging-direction="back" data-gce-paging-type="' . $paging_type . '">'. __( 'Back', 'gce' ) . '</a></div>';
316
  if( $max_length != 'events' ) {
317
 
318
  if( $grouped && $key >= $start && $key < $end_time ) {
319
+ $markup .= '<div class="gce-list-title">' . stripslashes( $this->title ) . ' ' . date_i18n( $event_day[0]->feed->date_format, $key ) . '</div>';
320
  }
321
 
322
  foreach ( $event_day as $num_in_day => $event ) {
326
  $markup .=
327
  '<div class="gce-feed gce-feed-' . $event->feed->id . '">' .
328
  //If this isn't a grouped list and a date title should be displayed, add the date title
329
+ ( ( ! $grouped && isset( $event->title ) ) ? '<div class="gce-list-title">' . stripslashes( $this->title ) . '</div>' : '' ) .
330
  //Add the event markup
331
  $event->get_event_markup( 'list', $num_in_day, $i ) .
332
  '</div>';
339
  } else {
340
 
341
  if( $grouped && $key >= $start && $event_counter < $max_events ) {
342
+ $markup .= '<div class="gce-list-title">' . stripslashes( $this->title ) . ' ' . date_i18n( $event_day[0]->feed->date_format, $key ) . '</div>';
343
  }
344
 
345
  foreach ( $event_day as $num_in_day => $event ) {
347
  if( ( $event->start_time >= $time_now ) && ( $event_counter < $max_events ) ) {
348
  $markup .=
349
  '<div class="gce-feed gce-feed-' . $event->feed->id . '">' .
350
+ '<div class="gce-list-title">' . stripslashes( $this->title ) . '</div>' .
351
  //Add the event markup
352
  $event->get_event_markup( 'list', $num_in_day, $i ) .
353
  '</div>';
includes/class-gce-feed.php CHANGED
@@ -97,11 +97,19 @@ class GCE_Feed {
97
  //Add the default parameters to the querystring (retrieving JSON, not XML)
98
  $query = '?alt=json&sortorder=ascending&orderby=starttime';
99
 
100
- $query .= '&start-min=' . date( 'Y-m-d\TH:i:s', mktime( 0, 0, 0, 1, 1, date( 'Y' ) - 1 ) );
101
- $query .= '&start-max=' . date( 'Y-m-d\TH:i:s', mktime( 0, 0, 0, 1, 1, date( 'Y' ) + 5 ) );
 
 
 
 
 
 
 
 
102
 
103
  // Max results limit for performance.
104
- $query .= '&max-results=1000';
105
 
106
  $ctz = get_option( 'timezone_string' );
107
 
@@ -130,15 +138,19 @@ class GCE_Feed {
130
  * @since 2.0.0
131
  */
132
  private function get_feed_data( $url ) {
133
- $raw_data = wp_remote_get( $url, array(
134
- 'sslverify' => false, //sslverify is set to false to ensure https URLs work reliably. Data source is Google's servers, so is trustworthy
135
- 'timeout' => 10 //Increase timeout from the default 5 seconds to ensure even large feeds are retrieved successfully
136
- ) );
137
-
138
  // First check for transient data to use
139
  if( false !== get_transient( 'gce_feed_' . $this->id ) ) {
140
  $this->events = get_transient( 'gce_feed_' . $this->id );
141
  } else {
 
 
 
 
 
 
 
 
142
  //If $raw_data is a WP_Error, something went wrong
143
  if ( ! is_wp_error( $raw_data ) ) {
144
  //If response code isn't 200, something went wrong
@@ -209,52 +221,40 @@ class GCE_Feed {
209
  return mktime( $hour, $minute, $second, $month, $day, $year );
210
  }
211
 
212
- /**
213
- * Return feed start/end
214
- *
215
- * @since 2.0.0
216
- */
217
- private function set_feed_length( $value, $type ) {
218
- // All times start at 00:00
219
- switch ( $value ) {
220
- case 'today':
221
- $return = mktime( 0, 0, 0, date( 'm' ), date( 'j' ), date( 'Y' ) );
222
- break;
223
- case 'start_week':
224
- $return = mktime( 0, 0, 0, date( 'm' ), ( date( 'j' ) - date( 'w' ) ), date( 'Y' ) );
225
- break;
226
- case 'start_month':
227
- $return = mktime( 0, 0, 0, date( 'm' ), 1, date( 'Y' ) );
228
- break;
229
- case 'end_month':
230
- $return = mktime( 0, 0, 0, date( 'm' ) + 1, 1, date( 'Y' ) );
231
- break;
232
- case 'custom_date':
233
- if( $type == 'start' ) {
234
- $date = get_post_meta( $this->id, 'gce_custom_from', true );
235
- $fallback = mktime( 0, 0, 0, date( 'm' ), 1, date( 'Y' ) );
236
- } else {
237
- $date = get_post_meta( $this->id, 'gce_custom_until', true );
238
- $fallback = mktime( 0, 0, 0, date( 'm' ) + 1, 1, date( 'Y' ) );
239
- }
240
-
241
- if( ! empty( $date ) ) {
242
- $date = explode( '/', $date );
243
- $return = mktime( 0, 0, 0, $date[0], $date[1], $date[2] );
244
- } else {
245
- $return = $fallback;
246
- }
247
- break;
248
- default:
249
- if( $type == 'start' ) {
250
- $return = 0; //any - 1970-01-01 00:00
251
- } else {
252
- // Set default end time
253
- $return = 2145916800;
254
- }
255
  }
256
 
257
- return $return;
 
258
  }
259
 
260
  function get_builder() {
97
  //Add the default parameters to the querystring (retrieving JSON, not XML)
98
  $query = '?alt=json&sortorder=ascending&orderby=starttime';
99
 
100
+ $start = $this->get_feed_start();
101
+
102
+ $end = $this->get_feed_end();
103
+
104
+ $gmt_offset = abs( get_option( 'gmt_offset' ) * 3600 );
105
+
106
+ $query .= '&start-min=' . date( 'Y-m-d\TH:i:s', $start - $gmt_offset );
107
+
108
+ $query .= '&start-max=' . date( 'Y-m-d\TH:i:s', $end - $gmt_offset );
109
+
110
 
111
  // Max results limit for performance.
112
+ $query .= '&max-results=10000';
113
 
114
  $ctz = get_option( 'timezone_string' );
115
 
138
  * @since 2.0.0
139
  */
140
  private function get_feed_data( $url ) {
141
+
 
 
 
 
142
  // First check for transient data to use
143
  if( false !== get_transient( 'gce_feed_' . $this->id ) ) {
144
  $this->events = get_transient( 'gce_feed_' . $this->id );
145
  } else {
146
+
147
+ // Moved the remote get here to be more efficient
148
+ // Pointed out to us by John McManigle ( github.com/mcmanigle )
149
+ $raw_data = wp_remote_get( $url, array(
150
+ 'sslverify' => false, //sslverify is set to false to ensure https URLs work reliably. Data source is Google's servers, so is trustworthy
151
+ 'timeout' => 10 //Increase timeout from the default 5 seconds to ensure even large feeds are retrieved successfully
152
+ ) );
153
+
154
  //If $raw_data is a WP_Error, something went wrong
155
  if ( ! is_wp_error( $raw_data ) ) {
156
  //If response code isn't 200, something went wrong
221
  return mktime( $hour, $minute, $second, $month, $day, $year );
222
  }
223
 
224
+ private function get_feed_start() {
225
+
226
+ $start = get_post_meta( $this->id, 'gce_feed_start', true );
227
+ $interval = get_post_meta( $this->id, 'gce_feed_start_interval', true );
228
+
229
+ switch( $interval ) {
230
+ case 'days':
231
+ return time() - ( $start * 86400 );
232
+ case 'months':
233
+ return time() - ( $start * 2629743 );
234
+ case 'years':
235
+ return time() - ( $start * 31556926 );
236
+ }
237
+
238
+ // fall back just in case. Falls back to 1 year ago
239
+ return time() - 31556926;
240
+ }
241
+
242
+ private function get_feed_end() {
243
+
244
+ $end = get_post_meta( $this->id, 'gce_feed_end', true );
245
+ $interval = get_post_meta( $this->id, 'gce_feed_end_interval', true );
246
+
247
+ switch( $interval ) {
248
+ case 'days':
249
+ return time() + ( $end * 86400 );
250
+ case 'months':
251
+ return time() + ( $end * 2629743 );
252
+ case 'years':
253
+ return time() + ( $end * 31556926 );
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
255
 
256
+ // Falls back to 1 year ahead just in case
257
+ return time() + 31556926;
258
  }
259
 
260
  function get_builder() {
includes/gce-feed-cpt.php CHANGED
@@ -154,6 +154,10 @@ function gce_save_meta( $post_id ) {
154
  'gce_list_max_length',
155
  'gce_list_start_offset_num',
156
  'gce_list_start_offset_direction',
 
 
 
 
157
  // Display options
158
  'gce_display_start',
159
  'gce_display_start_text',
154
  'gce_list_max_length',
155
  'gce_list_start_offset_num',
156
  'gce_list_start_offset_direction',
157
+ 'gce_feed_start',
158
+ 'gce_feed_start_interval',
159
+ 'gce_feed_end',
160
+ 'gce_feed_end_interval',
161
  // Display options
162
  'gce_display_start',
163
  'gce_display_start_text',
readme.txt CHANGED
@@ -85,6 +85,12 @@ There are three ways to install this plugin.
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
 
88
  = 2.0.5.1 =
89
 
90
  * Fix timezone issue.
85
 
86
  == Changelog ==
87
 
88
+ = 2.0.6 =
89
+
90
+ * Added minimum and maximum feed date options to fix event display issues and boost performance.
91
+ * Fixed a caching issue to increase performance.
92
+ * Fixed bug where backslashes kept getting added to event titles that already contained single quotes when navigating through pages in widget.
93
+
94
  = 2.0.5.1 =
95
 
96
  * Fix timezone issue.
views/admin/gce-feed-meta-display.php CHANGED
@@ -32,10 +32,22 @@
32
  $gce_list_max_length = get_post_meta( $post->ID, 'gce_list_max_length', true );
33
  $gce_list_start_offset_num = get_post_meta( $post->ID, 'gce_list_start_offset_num', true );
34
  $gce_list_start_offset_direction = get_post_meta( $post->ID, 'gce_list_start_offset_direction', true );
 
 
 
 
35
 
36
  if( empty( $gce_list_start_offset_num ) ) {
37
  $gce_list_start_offset_num = 0;
38
  }
 
 
 
 
 
 
 
 
39
  ?>
40
 
41
  <div id="gce-admin-promo">
@@ -165,7 +177,7 @@
165
  </tr>
166
 
167
  <tr>
168
- <th scope="row"><label for="gce_list_start_offset_num"><?php _e( 'Start Date Offset', 'gce' ); ?></label></th>
169
  <td>
170
  <input type="number" min="0" step="1" class="small-text" id="gce_list_start_offset_num" name="gce_list_start_offset_num" value="<?php echo $gce_list_start_offset_num; ?>" />
171
  <?php _e( 'Days', 'gce' ); ?>
@@ -173,7 +185,35 @@
173
  <option value="back" <?php selected( $gce_list_start_offset_direction, 'back', true ); ?>><?php _e( 'Back', 'gce' ); ?></option>
174
  <option value="ahead" <?php selected( $gce_list_start_offset_direction, 'ahead', true ); ?>><?php _e( 'Ahead', 'gce' ); ?></option>
175
  </select>
176
- <p class="description"><?php _e( 'If you need to show events starting on a day other than today. (List View only).', 'gce' ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  </td>
178
  </tr>
179
  </table>
32
  $gce_list_max_length = get_post_meta( $post->ID, 'gce_list_max_length', true );
33
  $gce_list_start_offset_num = get_post_meta( $post->ID, 'gce_list_start_offset_num', true );
34
  $gce_list_start_offset_direction = get_post_meta( $post->ID, 'gce_list_start_offset_direction', true );
35
+ $gce_feed_start = get_post_meta( $post->ID, 'gce_feed_start', true );
36
+ $gce_feed_start_interval = get_post_meta( $post->ID, 'gce_feed_start_interval', true );
37
+ $gce_feed_end = get_post_meta( $post->ID, 'gce_feed_end', true );
38
+ $gce_feed_end_interval = get_post_meta( $post->ID, 'gce_feed_end_interval', true );
39
 
40
  if( empty( $gce_list_start_offset_num ) ) {
41
  $gce_list_start_offset_num = 0;
42
  }
43
+
44
+ if( empty( $gce_feed_start ) ) {
45
+ $gce_feed_start = 0;
46
+ }
47
+
48
+ if( empty( $gce_feed_end ) ) {
49
+ $gce_feed_end = 0;
50
+ }
51
  ?>
52
 
53
  <div id="gce-admin-promo">
177
  </tr>
178
 
179
  <tr>
180
+ <th scope="row"><label for="gce_list_start_offset_num"><?php _e( 'Display Start Date Offset', 'gce' ); ?></label></th>
181
  <td>
182
  <input type="number" min="0" step="1" class="small-text" id="gce_list_start_offset_num" name="gce_list_start_offset_num" value="<?php echo $gce_list_start_offset_num; ?>" />
183
  <?php _e( 'Days', 'gce' ); ?>
185
  <option value="back" <?php selected( $gce_list_start_offset_direction, 'back', true ); ?>><?php _e( 'Back', 'gce' ); ?></option>
186
  <option value="ahead" <?php selected( $gce_list_start_offset_direction, 'ahead', true ); ?>><?php _e( 'Ahead', 'gce' ); ?></option>
187
  </select>
188
+ <p class="description"><?php _e( 'Change if you need to initially display events on a date other than today (List View only).', 'gce' ); ?></p>
189
+ </td>
190
+ </tr>
191
+
192
+ <tr>
193
+ <th scope="row"><label for="gce_feed_start"><?php _e( 'Minimum Feed Start Date', 'gce' ); ?></label></th>
194
+ <td>
195
+ <input type="number" min="0" step="1" class="small-text" id="gce_feed_start" name="gce_feed_start" value="<?php echo $gce_feed_start; ?>" />
196
+ <select name="gce_feed_start_interval" id="gce_feed_start_interval">
197
+ <option value="days" <?php selected( $gce_feed_start_interval, 'days', true ); ?>><?php _e( 'Days', 'gce' ); ?></option>
198
+ <option value="months" <?php selected( $gce_feed_start_interval, 'months', true ); ?>><?php _e( 'Months', 'gce' ); ?></option>
199
+ <option value="years" <?php selected( $gce_feed_start_interval, 'years', true ); ?>><?php _e( 'Years', 'gce' ); ?></option>
200
+ </select>
201
+ <?php _e( 'back', 'gce' ); ?>
202
+ <p class="description"><?php _e( 'Set how far back to retrieve events regardless of month or page being displayed.', 'gce' ); ?></p>
203
+ </td>
204
+ </tr>
205
+
206
+ <tr>
207
+ <th scope="row"><label for="gce_feed_end"><?php _e( 'Maximum Feed End Date', 'gce' ); ?></label></th>
208
+ <td>
209
+ <input type="number" min="0" step="1" class="small-text" id="gce_feed_end" name="gce_feed_end" value="<?php echo $gce_feed_end; ?>" />
210
+ <select name="gce_feed_end_interval" id="gce_feed_end_interval">
211
+ <option value="days" <?php selected( $gce_feed_end_interval, 'days', true ); ?>><?php _e( 'Days', 'gce' ); ?></option>
212
+ <option value="months" <?php selected( $gce_feed_end_interval, 'months', true ); ?>><?php _e( 'Months', 'gce' ); ?></option>
213
+ <option value="years" <?php selected( $gce_feed_end_interval, 'years', true ); ?>><?php _e( 'Years', 'gce' ); ?></option>
214
+ </select>
215
+ <?php _e( 'forward', 'gce' ); ?>
216
+ <p class="description"><?php _e( 'Set how far in the future to retrieve events regardless of month or page being displayed.', 'gce' ); ?></p>
217
  </td>
218
  </tr>
219
  </table>
views/widgets.php CHANGED
@@ -208,12 +208,12 @@ class GCE_Widget extends WP_Widget {
208
  </p>
209
  <p>
210
  <label for="<?php echo $this->get_field_id( 'id' ); ?>">
211
- <?php _e( 'Feeds to display, as a comma separated list (e.g. 101,102,103):', 'gce' ); ?>
212
  </label>
213
  <input type="text" id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" value="<?php echo $ids; ?>" class="widefat" />
214
  </p>
215
  <p>
216
- <label for="<?php echo $this->get_field_id( 'display_type' ); ?>"><?php _e( 'Display events as:', 'gce' ); ?></label>
217
  <select id="<?php echo $this->get_field_id( 'display_type' ); ?>" name="<?php echo $this->get_field_name( 'display_type' ); ?>" class="widefat">
218
  <option value="grid"<?php selected( $display_type, 'grid' ); ?>><?php _e( 'Grid', 'gce' ); ?></option>
219
  <option value="list"<?php selected( $display_type, 'list' ); ?>><?php _e( 'List', 'gce' ); ?></option>
@@ -222,13 +222,13 @@ class GCE_Widget extends WP_Widget {
222
  </p>
223
 
224
  <p>
225
- <label for="<?php echo $this->get_field_id( 'paging' ); ?>"><?php _e( 'Show paging links:', 'gce' ); ?></label><br>
226
  <input type="checkbox" id="<?php echo $this->get_field_id( 'paging' ); ?>" name="<?php echo $this->get_field_name( 'paging' ); ?>" class="widefat" value="1" <?php checked( $paging, 1 ); ?>>
227
  <?php _e( 'Check this option to display Next and Back navigation links.', 'gce' ); ?>
228
  </p>
229
 
230
  <p>
231
- <label for="<?php echo $this->get_field_id( 'order' ); ?>"><?php _e( 'Sort order (List View only):' ); ?></label>
232
  <select id="<?php echo $this->get_field_id( 'order' ); ?>" name="<?php echo $this->get_field_name( 'order' ); ?>" class="widefat">
233
  <option value="asc" <?php selected( $order, 'asc' ); ?>><?php _e( 'Ascending', 'gce' ); ?></option>
234
  <option value="desc" <?php selected( $order, 'desc' ); ?>><?php _e( 'Descending', 'gce' ); ?></option>
@@ -236,7 +236,7 @@ class GCE_Widget extends WP_Widget {
236
  </p>
237
 
238
  <p>
239
- <label for="<?php echo $this->get_field_id( 'list_max_num' ); ?>"><?php _e( 'Number of events per page (List View only):', 'gce' ); ?></label><br>
240
  <input type="number" min="0" step="1" class="small-text" id="<?php echo $this->get_field_id( 'list_max_num' ); ?>" name="<?php echo $this->get_field_name( 'list_max_num' ); ?>" value="<?php echo $list_max_num; ?>" />
241
  <select name="<?php echo $this->get_field_name( 'list_max_length' ); ?>" id="<?php echo $this->get_field_id( 'list_max_length' ); ?>">
242
  <option value="days" <?php selected( $list_max_length, 'days', true ); ?>><?php _e( 'Days', 'gce' ); ?></option>
@@ -245,7 +245,7 @@ class GCE_Widget extends WP_Widget {
245
  </p>
246
 
247
  <p>
248
- <label for="<?php echo $this->get_field_id( 'list_start_offset_num' ); ?>"><?php _e( 'Start date offset (List View only):', 'gce' ); ?></label><br>
249
  <input type="number" min="0" step="1" class="small-text" id="<?php echo $this->get_field_id( 'list_start_offset_num' ); ?>" name="<?php echo $this->get_field_name( 'list_start_offset_num' ); ?>" value="<?php echo $list_start_offset_num; ?>" />
250
  <?php _e( 'Days', 'gce' ); ?>
251
  <select name="<?php echo $this->get_field_name( 'list_start_offset_direction' ); ?>" id="<?php echo $this->get_field_id( 'list_start_offset_direction' ); ?>">
@@ -255,7 +255,7 @@ class GCE_Widget extends WP_Widget {
255
  </p>
256
 
257
  <p>
258
- <label for="<?php echo $this->get_field_id( 'display_title' ); ?>"><?php _e( 'Display title on tooltip/list item (e.g. \'Events on 7th March\'). Grouped lists always have a title displayed.', 'gce' ); ?></label>
259
  <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'display_title_text' ); ?>" name="<?php echo $this->get_field_name( 'display_title_text' ); ?>" value="<?php echo $title_text; ?>" />
260
  </p>
261
 
208
  </p>
209
  <p>
210
  <label for="<?php echo $this->get_field_id( 'id' ); ?>">
211
+ <?php _e( 'Feeds to Display (comma separated list - i.e. 101,102,103):', 'gce' ); ?>
212
  </label>
213
  <input type="text" id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" value="<?php echo $ids; ?>" class="widefat" />
214
  </p>
215
  <p>
216
+ <label for="<?php echo $this->get_field_id( 'display_type' ); ?>"><?php _e( 'Display Events as:', 'gce' ); ?></label>
217
  <select id="<?php echo $this->get_field_id( 'display_type' ); ?>" name="<?php echo $this->get_field_name( 'display_type' ); ?>" class="widefat">
218
  <option value="grid"<?php selected( $display_type, 'grid' ); ?>><?php _e( 'Grid', 'gce' ); ?></option>
219
  <option value="list"<?php selected( $display_type, 'list' ); ?>><?php _e( 'List', 'gce' ); ?></option>
222
  </p>
223
 
224
  <p>
225
+ <label for="<?php echo $this->get_field_id( 'paging' ); ?>"><?php _e( 'Show Paging Links:', 'gce' ); ?></label><br>
226
  <input type="checkbox" id="<?php echo $this->get_field_id( 'paging' ); ?>" name="<?php echo $this->get_field_name( 'paging' ); ?>" class="widefat" value="1" <?php checked( $paging, 1 ); ?>>
227
  <?php _e( 'Check this option to display Next and Back navigation links.', 'gce' ); ?>
228
  </p>
229
 
230
  <p>
231
+ <label for="<?php echo $this->get_field_id( 'order' ); ?>"><?php _e( 'Sort Order (List View only):' ); ?></label>
232
  <select id="<?php echo $this->get_field_id( 'order' ); ?>" name="<?php echo $this->get_field_name( 'order' ); ?>" class="widefat">
233
  <option value="asc" <?php selected( $order, 'asc' ); ?>><?php _e( 'Ascending', 'gce' ); ?></option>
234
  <option value="desc" <?php selected( $order, 'desc' ); ?>><?php _e( 'Descending', 'gce' ); ?></option>
236
  </p>
237
 
238
  <p>
239
+ <label for="<?php echo $this->get_field_id( 'list_max_num' ); ?>"><?php _e( 'Number of Events per Page (List View only):', 'gce' ); ?></label><br>
240
  <input type="number" min="0" step="1" class="small-text" id="<?php echo $this->get_field_id( 'list_max_num' ); ?>" name="<?php echo $this->get_field_name( 'list_max_num' ); ?>" value="<?php echo $list_max_num; ?>" />
241
  <select name="<?php echo $this->get_field_name( 'list_max_length' ); ?>" id="<?php echo $this->get_field_id( 'list_max_length' ); ?>">
242
  <option value="days" <?php selected( $list_max_length, 'days', true ); ?>><?php _e( 'Days', 'gce' ); ?></option>
245
  </p>
246
 
247
  <p>
248
+ <label for="<?php echo $this->get_field_id( 'list_start_offset_num' ); ?>"><?php _e( 'Display Start Date Offset (List View only):', 'gce' ); ?></label><br>
249
  <input type="number" min="0" step="1" class="small-text" id="<?php echo $this->get_field_id( 'list_start_offset_num' ); ?>" name="<?php echo $this->get_field_name( 'list_start_offset_num' ); ?>" value="<?php echo $list_start_offset_num; ?>" />
250
  <?php _e( 'Days', 'gce' ); ?>
251
  <select name="<?php echo $this->get_field_name( 'list_start_offset_direction' ); ?>" id="<?php echo $this->get_field_id( 'list_start_offset_direction' ); ?>">
255
  </p>
256
 
257
  <p>
258
+ <label for="<?php echo $this->get_field_id( 'display_title' ); ?>"><?php _e( 'Display Title on Tooltip/List Item (e.g. \'Events on 7th March\'). Grouped lists always have a title displayed.', 'gce' ); ?></label>
259
  <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'display_title_text' ); ?>" name="<?php echo $this->get_field_name( 'display_title_text' ); ?>" value="<?php echo $title_text; ?>" />
260
  </p>
261