Countdown, Coming Soon – Countdown & Clock - Version 2.1.6

Version Description

  • Time zone per user functionality
Download this release

Release Info

Developer adamskaat
Plugin Icon 128x128 Countdown, Coming Soon – Countdown & Clock
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.5 to 2.1.6

assets/js/Countdown.js CHANGED
@@ -635,7 +635,11 @@ YcdCountdown.prototype.changeTimesStatus = function() {
635
 
636
  YcdCountdown.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
637
 
638
- var currentDate = ycdmoment(new Date()).tz(selectedTimezone).format('MM/DD/YYYY H:m:s');
 
 
 
 
639
 
640
  var dateTime = new Date(currentDate).valueOf();
641
  var timeNow = Math.floor(dateTime / 1000);
635
 
636
  YcdCountdown.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
637
 
638
+ var currentDate = ycdmoment(new Date());
639
+ if (selectedTimezone) {
640
+ currentDate.tz(selectedTimezone);
641
+ }
642
+ currentDate.format('MM/DD/YYYY H:m:s');
643
 
644
  var dateTime = new Date(currentDate).valueOf();
645
  var timeNow = Math.floor(dateTime / 1000);
classes/countdown/Countdown.php CHANGED
@@ -815,7 +815,10 @@ abstract class Countdown {
815
  $dateType = $this->getOptionValue('ycd-countdown-date-type');
816
 
817
  $timezone = $this->getOptionValue('ycd-circle-time-zone');
818
- $current = new DateTime('now', new \DateTimeZone($timezone));
 
 
 
819
  $currentDate = $current->format('Y-m-d H:i:s');
820
 
821
  $obj = $this->getCircleSeconds();
@@ -849,7 +852,10 @@ abstract class Countdown {
849
  $dueDate = $this->getOptionValue('ycd-date-time-picker');
850
  $timezone = $this->getOptionValue('ycd-circle-time-zone');
851
  $dueDate .= ':00';
852
- $timeDate = new DateTime('now', new DateTimeZone($timezone));
 
 
 
853
  $timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
854
  $seconds = strtotime($dueDate)-$timeNow;
855
  }
815
  $dateType = $this->getOptionValue('ycd-countdown-date-type');
816
 
817
  $timezone = $this->getOptionValue('ycd-circle-time-zone');
818
+ $current = new DateTime('now');
819
+ if ($timezone) {
820
+ $current = new DateTime('now', new \DateTimeZone($timezone));
821
+ }
822
  $currentDate = $current->format('Y-m-d H:i:s');
823
 
824
  $obj = $this->getCircleSeconds();
852
  $dueDate = $this->getOptionValue('ycd-date-time-picker');
853
  $timezone = $this->getOptionValue('ycd-circle-time-zone');
854
  $dueDate .= ':00';
855
+ $timeDate = new DateTime('now');
856
+ if ($timezone) {
857
+ $timeDate = new DateTime('now', new DateTimeZone($timezone));
858
+ }
859
  $timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
860
  $seconds = strtotime($dueDate)-$timeNow;
861
  }
config/config.php CHANGED
@@ -75,8 +75,8 @@ class YcdCountdownConfig
75
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
76
  self::addDefine('YCD_AJAX_SUCCESS', 1);
77
  self::addDefine('YCD_TABLE_LIMIT', 15);
78
- self::addDefine('YCD_VERSION_PRO', 2.01);
79
- self::addDefine('YCD_VERSION', 2.15);
80
  self::addDefine('YCD_FREE_VERSION', 1);
81
  self::addDefine('YCD_SILVER_VERSION', 2);
82
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -84,13 +84,13 @@ class YcdCountdownConfig
84
  self::addDefine('YCD_EXTENSION_VERSION', 99);
85
  require_once(dirname(__FILE__).'/config-pkg.php');
86
 
87
- $versionText = '2.1.5';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
- $versionText = '2.0.1';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
- self::addDefine('YCD_LAST_UPDATE', 'Aug 16');
93
- self::addDefine('YCD_NEXT_UPDATE', 'Aug 30');
94
  }
95
 
96
  public static function displaySettings()
75
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
76
  self::addDefine('YCD_AJAX_SUCCESS', 1);
77
  self::addDefine('YCD_TABLE_LIMIT', 15);
78
+ self::addDefine('YCD_VERSION_PRO', 2.02);
79
+ self::addDefine('YCD_VERSION', 2.16);
80
  self::addDefine('YCD_FREE_VERSION', 1);
81
  self::addDefine('YCD_SILVER_VERSION', 2);
82
  self::addDefine('YCD_GOLD_VERSION', 3);
84
  self::addDefine('YCD_EXTENSION_VERSION', 99);
85
  require_once(dirname(__FILE__).'/config-pkg.php');
86
 
87
+ $versionText = '2.1.6';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
+ $versionText = '2.0.2';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
+ self::addDefine('YCD_LAST_UPDATE', 'Sep 4');
93
+ self::addDefine('YCD_NEXT_UPDATE', 'Sep 15');
94
  }
95
 
96
  public static function displaySettings()
countdown-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Countdown builder
4
  * Description: The best countdown plugin by Adam skaat
5
- * Version: 2.1.5
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
2
  /**
3
  * Plugin Name: Countdown builder
4
  * Description: The best countdown plugin by Adam skaat
5
+ * Version: 2.1.6
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
helpers/AdminHelper.php CHANGED
@@ -1028,6 +1028,7 @@ class AdminHelper {
1028
  public static function getTimeZones() {
1029
 
1030
  return array(
 
1031
  "Pacific/Midway"=>"(GMT-11:00) Midway",
1032
  "Pacific/Niue"=>"(GMT-11:00) Niue",
1033
  "Pacific/Pago_Pago"=>"(GMT-11:00) Pago Pago",
1028
  public static function getTimeZones() {
1029
 
1030
  return array(
1031
+ "" => "Per User",
1032
  "Pacific/Midway"=>"(GMT-11:00) Midway",
1033
  "Pacific/Niue"=>"(GMT-11:00) Niue",
1034
  "Pacific/Pago_Pago"=>"(GMT-11:00) Pago Pago",
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: adamskaat
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.8.1
6
- Stable tag: 2.1.5
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -67,6 +67,9 @@ Yes you can, we have Circle and Flipclock countdown popups.
67
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
68
 
69
  == Changelog ==
 
 
 
70
  = 2.1.5 =
71
  * Sticky Countdown Button close banner behavior
72
  * Sticky countdown admin side improvement
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.8.1
6
+ Stable tag: 2.1.6
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
67
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
68
 
69
  == Changelog ==
70
+ = 2.1.6 =
71
+ * Time zone per user functionality
72
+
73
  = 2.1.5 =
74
  * Sticky Countdown Button close banner behavior
75
  * Sticky countdown admin side improvement