Countdown, Coming Soon – Countdown & Clock - Version 2.0.9

Version Description

  • Fixed Display on option save issue on PHP 8
  • Fixed Coming Soon issue for logged in users on PHP 8
  • Duration live preview issue Circle and Simple countdowns
Download this release

Release Info

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

Code changes from version 2.0.8 to 2.0.9

assets/css/admin.css CHANGED
@@ -795,4 +795,13 @@ div.ycd-tabs-text-header > div.ycd-toggle-icon-open {
795
  margin-left: 6px;
796
  font-size: 30px;
797
  color: #333333;
 
 
 
 
 
 
 
 
 
798
  }
795
  margin-left: 6px;
796
  font-size: 30px;
797
  color: #333333;
798
+ }
799
+
800
+ .ypm-upgrade-pro-metabox {
801
+ color: black;
802
+ font-size: 17px;
803
+ }
804
+
805
+ .ycd-upgrade-metabox-button-red .h2 {
806
+ margin: 0 !important;
807
  }
assets/js/Countdown.js CHANGED
@@ -365,6 +365,10 @@ YcdCountdown.prototype.chnageDateDuration = function() {
365
  var countdowns = jQuery('.ycd-time-circle');
366
  types.bind('change', function() {
367
  var val = jQuery(this).val();
 
 
 
 
368
  var timeName = jQuery(this).attr('name');
369
  var options = countdowns.data('options');
370
  options[timeName] = val;
365
  var countdowns = jQuery('.ycd-time-circle');
366
  types.bind('change', function() {
367
  var val = jQuery(this).val();
368
+ if (val == '') {
369
+ val = 0;
370
+ jQuery(this).val(val);
371
+ }
372
  var timeName = jQuery(this).attr('name');
373
  var options = countdowns.data('options');
374
  options[timeName] = val;
assets/js/YcdSimpleCountdown.js CHANGED
@@ -94,9 +94,14 @@ YcdSimpleCountdown.prototype.changeDateDuration = function() {
94
  var countdown = this.countdownContainer;
95
  types.bind('change', function() {
96
  var val = jQuery(this).val();
 
 
 
 
 
97
  var timeName = jQuery(this).attr('name');
98
  var options = countdown.data('options');
99
- options[timeName] = val;
100
 
101
  that.reInitSecondsByOptions(options);
102
  });
94
  var countdown = this.countdownContainer;
95
  types.bind('change', function() {
96
  var val = jQuery(this).val();
97
+
98
+ if (val == '') {
99
+ val = 0;
100
+ jQuery(this).val(val);
101
+ }
102
  var timeName = jQuery(this).attr('name');
103
  var options = countdown.data('options');
104
+ options[timeName] = parseInt(val);
105
 
106
  that.reInitSecondsByOptions(options);
107
  });
assets/js/ycdTimer.js CHANGED
@@ -604,7 +604,13 @@ YcdTimer.prototype.changeTime = function() {
604
 
605
  timeSettings.bind('change', function() {
606
  var type = jQuery(this).data('type');
607
- settings[type] = jQuery(this).val();
 
 
 
 
 
 
608
  that.setSettings(settings);
609
  that.resetTimer();
610
  that.this.startTimer();
604
 
605
  timeSettings.bind('change', function() {
606
  var type = jQuery(this).data('type');
607
+ var val = jQuery(this).val();
608
+
609
+ if (val == '') {
610
+ val = 0;
611
+ jQuery(this).val(val);
612
+ }
613
+ settings[type] = val;
614
  that.setSettings(settings);
615
  that.resetTimer();
616
  that.this.startTimer();
assets/views/supportMetabox.php CHANGED
@@ -1,14 +1,17 @@
1
  <div class="ycf-bootstrap-wrapper ycd-support-metabox">
2
  <h3>Support <span class="dashicons dashicons-megaphone"></span></h3>
3
- <p style="text-align: center">
4
  We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just pressing here
5
  <br>
6
- <a href="<?php echo YCD_COUNTDOWN_SUPPORT_URL; ?>" style="font-size: 18px; cursor: pointer;" target="_blank">
7
- <button type="button" id="ycd-report-problem-button" class="ycd-support-button-red" style="margin: 10px;">
8
- <i class="ai1wm-icon-notification"></i>
9
- Report issue
10
- </button>
11
- </a><br>
 
 
 
12
  and we will help you!</p>
13
  </div>
14
  <style>
1
  <div class="ycf-bootstrap-wrapper ycd-support-metabox">
2
  <h3>Support <span class="dashicons dashicons-megaphone"></span></h3>
3
+ <p>
4
  We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just pressing here
5
  <br>
6
+ <div style="text-align: center;">
7
+ <a href="<?php echo YCD_COUNTDOWN_SUPPORT_URL; ?>" style="font-size: 18px; cursor: pointer;" target="_blank">
8
+ <button type="button" id="ycd-report-problem-button" class="ycd-support-button-red" style="margin: 10px;">
9
+ <i class="ai1wm-icon-notification"></i>
10
+ Report issue
11
+ </button>
12
+ </a>
13
+ </div>
14
+ <br>
15
  and we will help you!</p>
16
  </div>
17
  <style>
assets/views/upgrade.php CHANGED
@@ -1,8 +1,8 @@
1
  <div class="ycf-bootstrap-wrapper ycf-pro-wrapper">
2
- <p class="ypm-upgrade-pro">
3
- Want to upgrade to <b>PRO version</b>?
4
  </p>
5
- <button class="ycd-upgrade-button-red">
6
- <b class="h2">Upgrade</b><br><span class="h5">to PRO version</span>
7
  </button>
8
  </div>
1
  <div class="ycf-bootstrap-wrapper ycf-pro-wrapper">
2
+ <p class="ypm-upgrade-pro ypm-upgrade-pro-metabox">
3
+ Do you want to <br><b>UPGRADE TO PRO VERSION</b>?<br>
4
  </p>
5
+ <button class="ycd-upgrade-button-red ycd-upgrade-metabox-button-red">
6
+ <b class="h2">Upgrade Now</b>
7
  </button>
8
  </div>
classes/ConditionBuilder.php CHANGED
@@ -9,6 +9,7 @@ class ConditionBuilder {
9
  private $nameString = '';
10
  private $paramKey;
11
  private $configData;
 
12
 
13
  public function setColumnCount($columnCount) {
14
  $this->columnCount = $columnCount;
@@ -164,7 +165,12 @@ class ConditionBuilder {
164
  $savedValue = $attributes['savedValue'];
165
  if(!empty($fieldAttributes['data-select-type']) && $fieldAttributes['data-select-type'] == 'ajax') {
166
  $currentData = $savedValue;
167
- $savedValue = @array_keys($savedValue);
 
 
 
 
 
168
  }
169
  $fieldHtml .= AdminHelper::selectBox($currentData, $savedValue, $fieldAttributes);
170
  }
9
  private $nameString = '';
10
  private $paramKey;
11
  private $configData;
12
+ private $savedData = array();
13
 
14
  public function setColumnCount($columnCount) {
15
  $this->columnCount = $columnCount;
165
  $savedValue = $attributes['savedValue'];
166
  if(!empty($fieldAttributes['data-select-type']) && $fieldAttributes['data-select-type'] == 'ajax') {
167
  $currentData = $savedValue;
168
+ if (!empty($savedValue)) {
169
+ $savedValue = @array_keys($savedValue);
170
+ }
171
+ else {
172
+ $savedValue = array();
173
+ }
174
  }
175
  $fieldHtml .= AdminHelper::selectBox($currentData, $savedValue, $fieldAttributes);
176
  }
config/config.php CHANGED
@@ -74,8 +74,8 @@ class YcdCountdownConfig
74
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
75
  self::addDefine('YCD_AJAX_SUCCESS', 1);
76
  self::addDefine('YCD_TABLE_LIMIT', 15);
77
- self::addDefine('YCD_VERSION_PRO', 1.94);
78
- self::addDefine('YCD_VERSION', 2.08);
79
  self::addDefine('YCD_FREE_VERSION', 1);
80
  self::addDefine('YCD_SILVER_VERSION', 2);
81
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -83,13 +83,13 @@ class YcdCountdownConfig
83
  self::addDefine('YCD_EXTENSION_VERSION', 99);
84
  require_once(dirname(__FILE__).'/config-pkg.php');
85
 
86
- $versionText = '2.0.8';
87
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
88
- $versionText = '1.9.4';
89
  }
90
  self::addDefine('YCD_VERSION_TEXT', $versionText);
91
- self::addDefine('YCD_LAST_UPDATE', 'May 2');
92
- self::addDefine('YCD_NEXT_UPDATE', 'May 15');
93
  }
94
 
95
  public static function displaySettings()
74
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
75
  self::addDefine('YCD_AJAX_SUCCESS', 1);
76
  self::addDefine('YCD_TABLE_LIMIT', 15);
77
+ self::addDefine('YCD_VERSION_PRO', 1.95);
78
+ self::addDefine('YCD_VERSION', 2.09);
79
  self::addDefine('YCD_FREE_VERSION', 1);
80
  self::addDefine('YCD_SILVER_VERSION', 2);
81
  self::addDefine('YCD_GOLD_VERSION', 3);
83
  self::addDefine('YCD_EXTENSION_VERSION', 99);
84
  require_once(dirname(__FILE__).'/config-pkg.php');
85
 
86
+ $versionText = '2.0.9';
87
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
88
+ $versionText = '1.9.5';
89
  }
90
  self::addDefine('YCD_VERSION_TEXT', $versionText);
91
+ self::addDefine('YCD_LAST_UPDATE', 'May 17');
92
+ self::addDefine('YCD_NEXT_UPDATE', 'May 31');
93
  }
94
 
95
  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.0.8
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.0.9
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: adamskaat
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
- Tested up to: 5.7
6
- Stable tag: 2.0.8
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,11 @@ 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.0.8 =
71
  * Coming soon Automatically start by date
72
  * Coming soon Automatically expire by date
2
  Contributors: adamskaat
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
+ Tested up to: 5.7.2
6
+ Stable tag: 2.0.9
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.0.9 =
71
+ * Fixed Display on option save issue on PHP 8
72
+ * Fixed Coming Soon issue for logged in users on PHP 8
73
+ * Duration live preview issue Circle and Simple countdowns
74
+
75
  = 2.0.8 =
76
  * Coming soon Automatically start by date
77
  * Coming soon Automatically expire by date