Version Description
- Time zone per user functionality
Download this release
Release Info
Developer | adamskaat |
Plugin | 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 +5 -1
- classes/countdown/Countdown.php +8 -2
- config/config.php +6 -6
- countdown-builder.php +1 -1
- helpers/AdminHelper.php +1 -0
- readme.txt +4 -1
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())
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
|
|
|
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'
|
|
|
|
|
|
|
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.
|
79 |
-
self::addDefine('YCD_VERSION', 2.
|
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.
|
88 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
89 |
-
$versionText = '2.0.
|
90 |
}
|
91 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
92 |
-
self::addDefine('YCD_LAST_UPDATE', '
|
93 |
-
self::addDefine('YCD_NEXT_UPDATE', '
|
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.
|
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.
|
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
|