Simple Calendar – Google Calendar Plugin - Version 3.0.6

Version Description

  • November 24, 2015 =

  • Fix: Fixed bug with days being off by one day.

  • Fix: Added check for array to avoid array_combine() PHP error.

  • Fix: Allow last list event to show correctly.

  • Tweak: Update shortcode to not check for a singular page.

Download this release

Release Info

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

Code changes from version 3.0.5 to 3.0.6

google-calendar-events.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Calendar
4
  * Plugin URI: https://simplecalendar.io
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
- * Version: 3.0.5
7
  * Author: Moonstone Media
8
  * Author URI: https://simplecalendar.io
9
  * Text Domain: google-calendar-events
@@ -29,7 +29,7 @@ if ( version_compare( PHP_VERSION, '5.3.0' ) === -1 ) {
29
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
30
  $this_plugin_dir = plugin_dir_url( __FILE__ );
31
  $this_plugin_constants = array(
32
- 'SIMPLE_CALENDAR_VERSION' => '3.0.5',
33
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
34
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
35
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
3
  * Plugin Name: Simple Calendar
4
  * Plugin URI: https://simplecalendar.io
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
+ * Version: 3.0.6
7
  * Author: Moonstone Media
8
  * Author URI: https://simplecalendar.io
9
  * Text Domain: google-calendar-events
29
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
30
  $this_plugin_dir = plugin_dir_url( __FILE__ );
31
  $this_plugin_constants = array(
32
+ 'SIMPLE_CALENDAR_VERSION' => '3.0.6',
33
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
34
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
35
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
includes/calendars/views/default-calendar-list.php CHANGED
@@ -282,9 +282,12 @@ class Default_Calendar_List implements Calendar_View {
282
  $timestamps = array_keys( $events );
283
  $lower_bound = array_filter( $timestamps, array( $this, 'filter_events_before' ) );
284
  $higher_bound = array_filter( $lower_bound, array( $this, 'filter_events_after' ) );
285
- $filtered = array_intersect_key( $events, array_combine( $higher_bound, $higher_bound ) );
286
- foreach ( $filtered as $timestamp => $events ) {
287
- $paged_events[ intval( $timestamp ) ] = $events;
 
 
 
288
  }
289
 
290
  } else {
@@ -318,7 +321,7 @@ class Default_Calendar_List implements Calendar_View {
318
 
319
  // Put resulting events in an associative array, with Ymd date as key for easy retrieval in calendar days loop.
320
  foreach ( $paged_events as $timestamp => $events ) {
321
- if ( $timestamp < $this->end ) {
322
  $date = Carbon::createFromTimestamp( $timestamp, $calendar->timezone )->endOfDay()->format( 'Ymd' );
323
  $daily_events[ intval( $date ) ][] = $events;
324
  }
282
  $timestamps = array_keys( $events );
283
  $lower_bound = array_filter( $timestamps, array( $this, 'filter_events_before' ) );
284
  $higher_bound = array_filter( $lower_bound, array( $this, 'filter_events_after' ) );
285
+
286
+ if ( is_array( $higher_bound ) ) {
287
+ $filtered = array_intersect_key( $events, array_combine( $higher_bound, $higher_bound ) );
288
+ foreach ( $filtered as $timestamp => $events ) {
289
+ $paged_events[ intval( $timestamp ) ] = $events;
290
+ }
291
  }
292
 
293
  } else {
321
 
322
  // Put resulting events in an associative array, with Ymd date as key for easy retrieval in calendar days loop.
323
  foreach ( $paged_events as $timestamp => $events ) {
324
+ if ( $timestamp <= $this->end ) {
325
  $date = Carbon::createFromTimestamp( $timestamp, $calendar->timezone )->endOfDay()->format( 'Ymd' );
326
  $daily_events[ intval( $date ) ][] = $events;
327
  }
includes/functions/shared.php CHANGED
@@ -227,14 +227,14 @@ function simcal_get_calendar_names_i18n( $group, $style = 'full' ) {
227
  $format = '';
228
  $length = 0;
229
 
230
- $date = Carbon\Carbon::now( 'UTC' );
231
 
232
  if ( 'month' == $group ) {
233
  $date->month( 0 )->startOfMonth();
234
  $format = 'short' == $style ? 'M' : 'F';
235
  $length = 11;
236
  } elseif ( 'day' == $group ) {
237
- $date->next( 0 );
238
  $format = 'short' == $style ? 'D' : 'l';
239
  $length = 6;
240
  } elseif ( 'meridiem' == $group ) {
227
  $format = '';
228
  $length = 0;
229
 
230
+ $date = Carbon\Carbon::now();
231
 
232
  if ( 'month' == $group ) {
233
  $date->month( 0 )->startOfMonth();
234
  $format = 'short' == $style ? 'M' : 'F';
235
  $length = 11;
236
  } elseif ( 'day' == $group ) {
237
+ $date->next( 6 );
238
  $format = 'short' == $style ? 'D' : 'l';
239
  $length = 6;
240
  } elseif ( 'meridiem' == $group ) {
includes/shortcodes.php CHANGED
@@ -63,7 +63,7 @@ class Shortcodes {
63
 
64
  $id = absint( $args['id'] );
65
 
66
- if ( is_singular() && $id > 0 ) {
67
 
68
  $calendar = simcal_get_calendar( $id );
69
 
63
 
64
  $id = absint( $args['id'] );
65
 
66
+ if ( $id > 0 ) {
67
 
68
  $calendar = simcal_get_calendar( $id );
69
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: moonstonemedia, pderksen, nickyoung87, nekojira, rosshanney
3
  Tags: calendar, calendars, calendar manager, custom calendar, custom calendars, event, events, events feed, google calendar, google
4
  Requires at least: 4.0
5
  Tested up to: 4.4
6
- Stable tag: 3.0.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -78,6 +78,13 @@ We'd love your help! Here's a few things you can do:
78
 
79
  == Changelog ==
80
 
 
 
 
 
 
 
 
81
  = 3.0.5 - November 19, 2015 =
82
 
83
  * Fix: Fixed a bug where HTML in event description was not being rendered properly.
3
  Tags: calendar, calendars, calendar manager, custom calendar, custom calendars, event, events, events feed, google calendar, google
4
  Requires at least: 4.0
5
  Tested up to: 4.4
6
+ Stable tag: 3.0.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
78
 
79
  == Changelog ==
80
 
81
+ = 3.0.6 - November 24, 2015 =
82
+
83
+ * Fix: Fixed bug with days being off by one day.
84
+ * Fix: Added check for array to avoid array_combine() PHP error.
85
+ * Fix: Allow last list event to show correctly.
86
+ * Tweak: Update shortcode to not check for a singular page.
87
+
88
  = 3.0.5 - November 19, 2015 =
89
 
90
  * Fix: Fixed a bug where HTML in event description was not being rendered properly.
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitd7fd2f5a0195111b055fe64c47ac4621::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInitfb9c55c44aeb82116b5db95cd3a22ff8::getLoader();
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitd7fd2f5a0195111b055fe64c47ac4621 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitd7fd2f5a0195111b055fe64c47ac4621 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitd7fd2f5a0195111b055fe64c47ac4621', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitd7fd2f5a0195111b055fe64c47ac4621', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInitfb9c55c44aeb82116b5db95cd3a22ff8 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitfb9c55c44aeb82116b5db95cd3a22ff8', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitfb9c55c44aeb82116b5db95cd3a22ff8', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -87,68 +87,6 @@
87
  "ui"
88
  ]
89
  },
90
- {
91
- "name": "symfony/translation",
92
- "version": "v2.7.6",
93
- "version_normalized": "2.7.6.0",
94
- "source": {
95
- "type": "git",
96
- "url": "https://github.com/symfony/translation.git",
97
- "reference": "6ccd9289ec1c71d01a49d83480de3b5293ce30c8"
98
- },
99
- "dist": {
100
- "type": "zip",
101
- "url": "https://api.github.com/repos/symfony/translation/zipball/6ccd9289ec1c71d01a49d83480de3b5293ce30c8",
102
- "reference": "6ccd9289ec1c71d01a49d83480de3b5293ce30c8",
103
- "shasum": ""
104
- },
105
- "require": {
106
- "php": ">=5.3.9"
107
- },
108
- "conflict": {
109
- "symfony/config": "<2.7"
110
- },
111
- "require-dev": {
112
- "psr/log": "~1.0",
113
- "symfony/config": "~2.7",
114
- "symfony/intl": "~2.4",
115
- "symfony/yaml": "~2.2"
116
- },
117
- "suggest": {
118
- "psr/log": "To use logging capability in translator",
119
- "symfony/config": "",
120
- "symfony/yaml": ""
121
- },
122
- "time": "2015-10-27 15:38:06",
123
- "type": "library",
124
- "extra": {
125
- "branch-alias": {
126
- "dev-master": "2.7-dev"
127
- }
128
- },
129
- "installation-source": "dist",
130
- "autoload": {
131
- "psr-4": {
132
- "Symfony\\Component\\Translation\\": ""
133
- }
134
- },
135
- "notification-url": "https://packagist.org/downloads/",
136
- "license": [
137
- "MIT"
138
- ],
139
- "authors": [
140
- {
141
- "name": "Fabien Potencier",
142
- "email": "fabien@symfony.com"
143
- },
144
- {
145
- "name": "Symfony Community",
146
- "homepage": "https://symfony.com/contributors"
147
- }
148
- ],
149
- "description": "Symfony Translation Component",
150
- "homepage": "https://symfony.com"
151
- },
152
  {
153
  "name": "nesbot/carbon",
154
  "version": "1.21.0",
@@ -361,5 +299,70 @@
361
  "keywords": [
362
  "google"
363
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  }
365
  ]
87
  "ui"
88
  ]
89
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  {
91
  "name": "nesbot/carbon",
92
  "version": "1.21.0",
299
  "keywords": [
300
  "google"
301
  ]
302
+ },
303
+ {
304
+ "name": "symfony/translation",
305
+ "version": "v2.7.7",
306
+ "version_normalized": "2.7.7.0",
307
+ "source": {
308
+ "type": "git",
309
+ "url": "https://github.com/symfony/translation.git",
310
+ "reference": "e4ecb9c3ba1304eaf24de15c2d7a428101c1982f"
311
+ },
312
+ "dist": {
313
+ "type": "zip",
314
+ "url": "https://api.github.com/repos/symfony/translation/zipball/e4ecb9c3ba1304eaf24de15c2d7a428101c1982f",
315
+ "reference": "e4ecb9c3ba1304eaf24de15c2d7a428101c1982f",
316
+ "shasum": ""
317
+ },
318
+ "require": {
319
+ "php": ">=5.3.9"
320
+ },
321
+ "conflict": {
322
+ "symfony/config": "<2.7"
323
+ },
324
+ "require-dev": {
325
+ "psr/log": "~1.0",
326
+ "symfony/config": "~2.7",
327
+ "symfony/intl": "~2.4",
328
+ "symfony/yaml": "~2.2"
329
+ },
330
+ "suggest": {
331
+ "psr/log": "To use logging capability in translator",
332
+ "symfony/config": "",
333
+ "symfony/yaml": ""
334
+ },
335
+ "time": "2015-11-18 13:41:01",
336
+ "type": "library",
337
+ "extra": {
338
+ "branch-alias": {
339
+ "dev-master": "2.7-dev"
340
+ }
341
+ },
342
+ "installation-source": "dist",
343
+ "autoload": {
344
+ "psr-4": {
345
+ "Symfony\\Component\\Translation\\": ""
346
+ },
347
+ "exclude-from-classmap": [
348
+ "/Tests/"
349
+ ]
350
+ },
351
+ "notification-url": "https://packagist.org/downloads/",
352
+ "license": [
353
+ "MIT"
354
+ ],
355
+ "authors": [
356
+ {
357
+ "name": "Fabien Potencier",
358
+ "email": "fabien@symfony.com"
359
+ },
360
+ {
361
+ "name": "Symfony Community",
362
+ "homepage": "https://symfony.com/contributors"
363
+ }
364
+ ],
365
+ "description": "Symfony Translation Component",
366
+ "homepage": "https://symfony.com"
367
  }
368
  ]
vendor/symfony/translation/PluralizationRules.php CHANGED
@@ -131,6 +131,7 @@ class PluralizationRules
131
  case 'fr':
132
  case 'gun':
133
  case 'hi':
 
134
  case 'ln':
135
  case 'mg':
136
  case 'nso':
131
  case 'fr':
132
  case 'gun':
133
  case 'hi':
134
+ case 'hy':
135
  case 'ln':
136
  case 'mg':
137
  case 'nso':
vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php CHANGED
@@ -30,7 +30,7 @@ class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase
30
 
31
  public function testLoadWithInternalErrorsEnabled()
32
  {
33
- libxml_use_internal_errors(true);
34
 
35
  $this->assertSame(array(), libxml_get_errors());
36
 
@@ -41,6 +41,9 @@ class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase
41
  $this->assertEquals('en', $catalogue->getLocale());
42
  $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources());
43
  $this->assertSame(array(), libxml_get_errors());
 
 
 
44
  }
45
 
46
  public function testLoadWithResname()
30
 
31
  public function testLoadWithInternalErrorsEnabled()
32
  {
33
+ $internalErrors = libxml_use_internal_errors(true);
34
 
35
  $this->assertSame(array(), libxml_get_errors());
36
 
41
  $this->assertEquals('en', $catalogue->getLocale());
42
  $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources());
43
  $this->assertSame(array(), libxml_get_errors());
44
+
45
+ libxml_clear_errors();
46
+ libxml_use_internal_errors($internalErrors);
47
  }
48
 
49
  public function testLoadWithResname()
vendor/symfony/translation/Tests/PluralizationRulesTest.php CHANGED
@@ -61,7 +61,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
61
  {
62
  return array(
63
  array('1', array('ay','bo', 'cgg','dz','id', 'ja', 'jbo', 'ka','kk','km','ko','ky')),
64
- array('2', array('nl', 'fr', 'en', 'de', 'de_GE')),
65
  array('3', array('be','bs','cs','hr')),
66
  array('4', array('cy','mt', 'sl')),
67
  array('5', array()),
61
  {
62
  return array(
63
  array('1', array('ay','bo', 'cgg','dz','id', 'ja', 'jbo', 'ka','kk','km','ko','ky')),
64
+ array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')),
65
  array('3', array('be','bs','cs','hr')),
66
  array('4', array('cy','mt', 'sl')),
67
  array('5', array()),
vendor/symfony/translation/composer.json CHANGED
@@ -33,7 +33,10 @@
33
  "psr/log": "To use logging capability in translator"
34
  },
35
  "autoload": {
36
- "psr-4": { "Symfony\\Component\\Translation\\": "" }
 
 
 
37
  },
38
  "minimum-stability": "dev",
39
  "extra": {
33
  "psr/log": "To use logging capability in translator"
34
  },
35
  "autoload": {
36
+ "psr-4": { "Symfony\\Component\\Translation\\": "" },
37
+ "exclude-from-classmap": [
38
+ "/Tests/"
39
+ ]
40
  },
41
  "minimum-stability": "dev",
42
  "extra": {
vendor/symfony/translation/phpunit.xml.dist CHANGED
@@ -20,8 +20,8 @@
20
  <whitelist>
21
  <directory>./</directory>
22
  <exclude>
23
- <directory>./vendor</directory>
24
  <directory>./Tests</directory>
 
25
  </exclude>
26
  </whitelist>
27
  </filter>
20
  <whitelist>
21
  <directory>./</directory>
22
  <exclude>
 
23
  <directory>./Tests</directory>
24
+ <directory>./vendor</directory>
25
  </exclude>
26
  </whitelist>
27
  </filter>