Countdown, Coming Soon – Countdown & Clock - Version 1.4.3

Version Description

  • After Countdown Expire: Count Up (new feature)
  • Countdown responsiveness improvement
  • Bug fixed
Download this release

Release Info

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

Code changes from version 1.4.2 to 1.4.3

assets/css/TimeCircles.css CHANGED
@@ -16,4 +16,8 @@
16
  z-index: 999999;
17
  }
18
 
 
 
 
 
19
  .time_circles>div>h4,.time_circles>div>span{margin:0;padding:0;text-align:center;font-family:'Century Gothic',Arial;line-height:1}.time_circles{position:relative;width:100%;height:100%}.time_circles>div{position:absolute;text-align:center}.time_circles>div>h4{text-transform:uppercase}.time_circles>div>span{display:block;width:100%;font-weight:700}
16
  z-index: 999999;
17
  }
18
 
19
+ .ycd-time-circle {
20
+ transform-origin: top left;
21
+ }
22
+
23
  .time_circles>div>h4,.time_circles>div>span{margin:0;padding:0;text-align:center;font-family:'Century Gothic',Arial;line-height:1}.time_circles{position:relative;width:100%;height:100%}.time_circles>div{position:absolute;text-align:center}.time_circles>div>h4{text-transform:uppercase}.time_circles>div>span{display:block;width:100%;font-weight:700}
assets/js/Countdown.js CHANGED
@@ -25,9 +25,32 @@ YcdCountdown.prototype.init = function() {
25
  this.minicolors();
26
  this.ionRangeSlider();
27
  this.imageUpload();
 
28
  this.livePreview();
29
  };
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  YcdCountdown.prototype.imageUpload = function() {
32
  var custom_uploader;
33
  jQuery('#js-upload-image-button').click(function(e) {
@@ -661,7 +684,7 @@ YcdCountdown.prototype.render = function(currentCountdown) {
661
 
662
  YcdCountdown.prototype.endBehavior = function(countdown, options) {
663
 
664
- if(YcdArgs.isAdmin) {
665
  return false;
666
  }
667
  if (options['ycd-countdown-end-sound']) {
25
  this.minicolors();
26
  this.ionRangeSlider();
27
  this.imageUpload();
28
+ this.responsive();
29
  this.livePreview();
30
  };
31
 
32
+ YcdCountdown.prototype.responsive = function() {
33
+ var scale = function () {
34
+ var scaleDegree = jQuery('.ycd-circle-wrapper').width()/jQuery('.ycd-time-circle').width();
35
+
36
+ if(jQuery('.ycd-time-circle').width() > jQuery('.ycd-circle-wrapper').width()) {
37
+ jQuery('.ycd-time-circle').css({
38
+ 'transform': 'scale('+ scaleDegree +', '+scaleDegree+')'
39
+ });
40
+ }
41
+ else {
42
+ jQuery('.ycd-time-circle').css({
43
+ 'transform': 'scale('+ 1 +', '+1+')'
44
+ });
45
+ }
46
+ };
47
+
48
+ scale();
49
+ jQuery(window).resize(function () {
50
+ scale();
51
+ })
52
+ };
53
+
54
  YcdCountdown.prototype.imageUpload = function() {
55
  var custom_uploader;
56
  jQuery('#js-upload-image-button').click(function(e) {
684
 
685
  YcdCountdown.prototype.endBehavior = function(countdown, options) {
686
 
687
+ if(YcdArgs.isAdmin || options['ycd-countdown-expire-behavior'] == 'countToUp') {
688
  return false;
689
  }
690
  if (options['ycd-countdown-end-sound']) {
assets/js/TimeCircles.js CHANGED
@@ -486,6 +486,9 @@
486
 
487
  // Compare current time with reference
488
  diff = (this.data.attributes.ref_date - curDate) / 1000;
 
 
 
489
  old_diff = (this.data.attributes.ref_date - prevDate) / 1000;
490
 
491
  var floor = this.config.animation !== "smooth";
486
 
487
  // Compare current time with reference
488
  diff = (this.data.attributes.ref_date - curDate) / 1000;
489
+ if(this.config.count_past_zero) {
490
+ diff = Math.abs(diff);
491
+ }
492
  old_diff = (this.data.attributes.ref_date - prevDate) / 1000;
493
 
494
  var floor = this.config.animation !== "smooth";
classes/countdown/CircleCountdown.php CHANGED
@@ -73,6 +73,9 @@ class CircleCountdown extends Countdown {
73
  $options['bg_width'] = $this->getOptionValue('ycd-circle-bg-width');
74
  $options['start_angle'] = $this->getOptionValue('ycd-circle-start-angle');
75
  $options['count_past_zero'] = false;
 
 
 
76
  $options['circle_bg_color'] = $this->getOptionValue('ycd-countdown-bg-circle-color');
77
  $options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
78
  $options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
@@ -215,10 +218,6 @@ class CircleCountdown extends Countdown {
215
  #ycd-circle-<?php echo $id; ?> .textDiv_Seconds span {
216
  color: <?php echo $secondsTextColor; ?>
217
  }
218
-
219
- .ycd-time-circle {
220
- max-width: 100% !important;
221
- }
222
 
223
  .ycd-circle-<?php echo $id; ?>-wrapper {
224
  text-align: <?php echo $circleAlignment; ?>;
73
  $options['bg_width'] = $this->getOptionValue('ycd-circle-bg-width');
74
  $options['start_angle'] = $this->getOptionValue('ycd-circle-start-angle');
75
  $options['count_past_zero'] = false;
76
+ if($this->getOptionValue('ycd-countdown-expire-behavior') == 'countToUp') {
77
+ $options['count_past_zero'] = true;
78
+ }
79
  $options['circle_bg_color'] = $this->getOptionValue('ycd-countdown-bg-circle-color');
80
  $options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
81
  $options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
218
  #ycd-circle-<?php echo $id; ?> .textDiv_Seconds span {
219
  color: <?php echo $secondsTextColor; ?>
220
  }
 
 
 
 
221
 
222
  .ycd-circle-<?php echo $id; ?>-wrapper {
223
  text-align: <?php echo $circleAlignment; ?>;
config/config.php CHANGED
@@ -55,8 +55,8 @@ class YcdCountdownConfig {
55
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
56
  self::addDefine('YCD_AJAX_SUCCESS', 1);
57
  self::addDefine('YCD_TABLE_LIMIT', 15);
58
- self::addDefine('YCD_VERSION', 1.42);
59
- self::addDefine('YCD_VERSION_PRO', 1.27);
60
  self::addDefine('YCD_FREE_VERSION', 1);
61
  self::addDefine('YCD_SILVER_VERSION', 2);
62
  self::addDefine('YCD_GOLD_VERSION', 3);
55
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
56
  self::addDefine('YCD_AJAX_SUCCESS', 1);
57
  self::addDefine('YCD_TABLE_LIMIT', 15);
58
+ self::addDefine('YCD_VERSION', 1.43);
59
+ self::addDefine('YCD_VERSION_PRO', 1.28);
60
  self::addDefine('YCD_FREE_VERSION', 1);
61
  self::addDefine('YCD_SILVER_VERSION', 2);
62
  self::addDefine('YCD_GOLD_VERSION', 3);
countdown-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Countdown builder
4
  * Description: The best countdown plugin
5
- * Version: 1.4.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
5
+ * Version: 1.4.3
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
helpers/AdminHelper.php CHANGED
@@ -324,6 +324,18 @@ class AdminHelper {
324
  'name' => __('Hide Countdown', YCD_TEXT_DOMAIN)
325
  )
326
  ),
 
 
 
 
 
 
 
 
 
 
 
 
327
  array(
328
  'attr' => array(
329
  'type' => 'radio',
324
  'name' => __('Hide Countdown', YCD_TEXT_DOMAIN)
325
  )
326
  ),
327
+ array(
328
+ 'attr' => array(
329
+ 'type' => 'radio',
330
+ 'name' => 'ycd-countdown-expire-behavior',
331
+ 'class' => 'ycd-countdown-hide-behavior ycd-form-radio',
332
+ 'data-attr-href' => 'ycd-countdown-countUp-behavior',
333
+ 'value' => 'countToUp'
334
+ ),
335
+ 'label' => array(
336
+ 'name' => __('Count Up', YCD_TEXT_DOMAIN)
337
+ )
338
+ ),
339
  array(
340
  'attr' => array(
341
  'type' => 'radio',
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.1.1
6
- Stable tag: 1.4.2
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -21,7 +21,7 @@ You can use our Countdown timer in your posts/pages via shortcode example like t
21
 
22
  Countdown types
23
 
24
- * Circle
25
  * Digital
26
  * Clock 1
27
  * Clock 2
@@ -64,6 +64,11 @@ You need to select the .zip file, there is no need to extract the zip file, just
64
 
65
 
66
  == Changelog ==
 
 
 
 
 
67
  = 1.4.2 =
68
  * New custom Css code posibility
69
  * Features improvements
@@ -266,4 +271,4 @@ You need to select the .zip file, there is no need to extract the zip file, just
266
  * Code improvement
267
 
268
  = 1.0 =
269
- * Plugin publish
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.1.1
6
+ Stable tag: 1.4.3
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
21
 
22
  Countdown types
23
 
24
+ * Circle Countdown
25
  * Digital
26
  * Clock 1
27
  * Clock 2
64
 
65
 
66
  == Changelog ==
67
+ = 1.4.3 =
68
+ * After Countdown Expire: Count Up (new feature)
69
+ * Countdown responsiveness improvement
70
+ * Bug fixed
71
+
72
  = 1.4.2 =
73
  * New custom Css code posibility
74
  * Features improvements
271
  * Code improvement
272
 
273
  = 1.0 =
274
+ * Plugin publish