Version Description
- Fixed simple countdown countUp issue
- Fixed Days durations limitation
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.2.5
- assets/js/YcdSimpleCountdown.js +31 -2
- assets/views/generalOptions.php +1 -1
- classes/countdown/Countdown.php +2 -0
- config/config.php +5 -5
- countdown-builder.php +1 -1
- readme.txt +5 -1
assets/js/YcdSimpleCountdown.js
CHANGED
@@ -285,7 +285,9 @@ YcdSimpleCountdown.prototype.countdown = function()
|
|
285 |
// Find the distance between now and the count down date
|
286 |
var distance = that.seconds;
|
287 |
// If the count down is finished, write some text
|
288 |
-
|
|
|
|
|
289 |
clearInterval(x);
|
290 |
that.endBehavior(countdownWrapper, that.options);
|
291 |
return;
|
@@ -310,7 +312,7 @@ YcdSimpleCountdown.prototype.countdown = function()
|
|
310 |
}
|
311 |
jQuery(selector).text(currentUniteValue);
|
312 |
}
|
313 |
-
if (options['ycd-countdown-expire-behavior'] == 'countToUp' && that.seconds <=
|
314 |
that.countdownRun = false;
|
315 |
}
|
316 |
if (!that.countdownRun) {
|
@@ -327,6 +329,33 @@ YcdSimpleCountdown.prototype.countdown = function()
|
|
327 |
}, 1000);
|
328 |
};
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
YcdSimpleCountdown.prototype.addTimeToClock = function()
|
331 |
{
|
332 |
var options = this.options;
|
285 |
// Find the distance between now and the count down date
|
286 |
var distance = that.seconds;
|
287 |
// If the count down is finished, write some text
|
288 |
+
distance = that.getFilteredDistance();
|
289 |
+
|
290 |
+
if (distance <= 0 && that.countdownRun) {
|
291 |
clearInterval(x);
|
292 |
that.endBehavior(countdownWrapper, that.options);
|
293 |
return;
|
312 |
}
|
313 |
jQuery(selector).text(currentUniteValue);
|
314 |
}
|
315 |
+
if (options['ycd-countdown-expire-behavior'] == 'countToUp' && that.seconds <= 0) {
|
316 |
that.countdownRun = false;
|
317 |
}
|
318 |
if (!that.countdownRun) {
|
329 |
}, 1000);
|
330 |
};
|
331 |
|
332 |
+
YcdSimpleCountdown.prototype.getFilteredDistance = function() {
|
333 |
+
if (this.seconds > 0) {
|
334 |
+
return this.seconds;
|
335 |
+
}
|
336 |
+
var options = this.options
|
337 |
+
|
338 |
+
if (options['ycd-countdown-expire-behavior'] == 'countToUp') {
|
339 |
+
this.countdownRun = false;
|
340 |
+
|
341 |
+
if (options['ycd-count-up-from-end-date']) {
|
342 |
+
var date = new Date(
|
343 |
+
ycdmoment(options['ycd-date-time-picker'])
|
344 |
+
.tz(options['ycd-time-zone'])
|
345 |
+
.format('MM/DD/YYYY H:m:s'))
|
346 |
+
.getTime();
|
347 |
+
var now = new Date().getTime();
|
348 |
+
this.seconds = now - date;
|
349 |
+
return this.seconds;
|
350 |
+
}
|
351 |
+
else {
|
352 |
+
return 0;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
return 0;
|
357 |
+
};
|
358 |
+
|
359 |
YcdSimpleCountdown.prototype.addTimeToClock = function()
|
360 |
{
|
361 |
var options = this.options;
|
assets/views/generalOptions.php
CHANGED
@@ -132,7 +132,7 @@ if (class_exists('ycd\AdminHelperPro')) {
|
|
132 |
</div>
|
133 |
<div class="col-md-2">
|
134 |
<label for="ycdCountdownTimeHours"><?php _e('Days', YCD_TEXT_DOMAIN); ?></label>
|
135 |
-
<input type="number" name="ycd-countdown-duration-days" id="ycdCountdownTimeDays" min="0"
|
136 |
</div>
|
137 |
<div class="col-md-2">
|
138 |
<label for="ycdCountdownTimeHours"><?php _e('Hrs', YCD_TEXT_DOMAIN); ?></label>
|
132 |
</div>
|
133 |
<div class="col-md-2">
|
134 |
<label for="ycdCountdownTimeHours"><?php _e('Days', YCD_TEXT_DOMAIN); ?></label>
|
135 |
+
<input type="number" name="ycd-countdown-duration-days" id="ycdCountdownTimeDays" min="0" class="form-control ycd-timer-time-settings" data-type="days" value="<?php echo esc_attr($this->getOptionValue('ycd-countdown-duration-days'))?>">
|
136 |
</div>
|
137 |
<div class="col-md-2">
|
138 |
<label for="ycdCountdownTimeHours"><?php _e('Hrs', YCD_TEXT_DOMAIN); ?></label>
|
classes/countdown/Countdown.php
CHANGED
@@ -1007,6 +1007,8 @@ abstract class Countdown {
|
|
1007 |
$options['ycd-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
1008 |
$options['ycd-countdown-restart'] = $this->getOptionValue('ycd-countdown-restart');
|
1009 |
$options['ycd-countdown-restart-hour'] = $this->getOptionValue('ycd-countdown-restart-hour');
|
|
|
|
|
1010 |
$options['isExpired'] = $isExpired;
|
1011 |
|
1012 |
do_action('ycdIncludeGeneralOptions', $this);
|
1007 |
$options['ycd-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
1008 |
$options['ycd-countdown-restart'] = $this->getOptionValue('ycd-countdown-restart');
|
1009 |
$options['ycd-countdown-restart-hour'] = $this->getOptionValue('ycd-countdown-restart-hour');
|
1010 |
+
$options['ycd-countdown-expire-behavior'] = $this->getOptionValue('ycd-countdown-expire-behavior');
|
1011 |
+
$options['ycd-count-up-from-end-date'] = $this->getOptionValue('ycd-count-up-from-end-date');
|
1012 |
$options['isExpired'] = $isExpired;
|
1013 |
|
1014 |
do_action('ycdIncludeGeneralOptions', $this);
|
config/config.php
CHANGED
@@ -76,7 +76,7 @@ class YcdCountdownConfig
|
|
76 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
77 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
78 |
self::addDefine('YCD_VERSION_PRO', 2.10);
|
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.2.
|
88 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
89 |
-
$versionText = '2.1.
|
90 |
}
|
91 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
92 |
-
self::addDefine('YCD_LAST_UPDATE', 'Dec
|
93 |
-
self::addDefine('YCD_NEXT_UPDATE', '
|
94 |
}
|
95 |
|
96 |
public static function displaySettings()
|
76 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
77 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
78 |
self::addDefine('YCD_VERSION_PRO', 2.10);
|
79 |
+
self::addDefine('YCD_VERSION', 2.25);
|
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.2.5';
|
88 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
89 |
+
$versionText = '2.1.1';
|
90 |
}
|
91 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
92 |
+
self::addDefine('YCD_LAST_UPDATE', 'Dec 25');
|
93 |
+
self::addDefine('YCD_NEXT_UPDATE', 'Jan 2');
|
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.2.
|
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.2.5
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
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.2
|
6 |
-
Stable tag: 2.2.
|
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,10 @@ 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.2.4 =
|
71 |
* Added Countdown Enable start date (New)
|
72 |
* Added Clocks Background color change possibility.
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 5.8.2
|
6 |
+
Stable tag: 2.2.5
|
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.2.5 =
|
71 |
+
* Fixed simple countdown countUp issue
|
72 |
+
* Fixed Days durations limitation
|
73 |
+
|
74 |
= 2.2.4 =
|
75 |
* Added Countdown Enable start date (New)
|
76 |
* Added Clocks Background color change possibility.
|