Countdown, Coming Soon – Countdown & Clock - Version 2.3.9.2

Version Description

Download this release

Release Info

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

Code changes from version 2.3.9.1 to 2.3.9.2

assets/js/YcdGeneral.js CHANGED
@@ -49,7 +49,8 @@ YcgGeneral.prototype.getSeconds = function (options) {
49
  };
50
 
51
  YcgGeneral.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
52
- var currentDate = moment(new Date()).tz(selectedTimezone).format('MM/DD/YYYY H:m:s');
 
53
 
54
  var dateTime = new Date(currentDate).valueOf();
55
  var timeNow = Math.floor(dateTime / 1000);
49
  };
50
 
51
  YcgGeneral.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
52
+ //var currentDate = moment(new Date()).tz(selectedTimezone).format('MM/DD/YYYY H:m:s');
53
+ var currentDate = moment(new Date()).format('MM/DD/YYYY H:m:s');
54
 
55
  var dateTime = new Date(currentDate).valueOf();
56
  var timeNow = Math.floor(dateTime / 1000);
assets/js/ycdTimer.js CHANGED
@@ -636,7 +636,9 @@ jQuery(document).ready(function() {
636
  window.YcdTimersInstance = [];
637
  var renderIds = [];
638
  jQuery('.ycd-timer-time').each(function() {
 
639
  var options = jQuery(this).data('options');
 
640
  var id = jQuery(this).data('id');
641
  if (renderIds.indexOf(id) != '-1') {
642
  return true;
636
  window.YcdTimersInstance = [];
637
  var renderIds = [];
638
  jQuery('.ycd-timer-time').each(function() {
639
+
640
  var options = jQuery(this).data('options');
641
+ var options = JSON.parse(YcdArgs.options);
642
  var id = jQuery(this).data('id');
643
  if (renderIds.indexOf(id) != '-1') {
644
  return true;
classes/countdown/CircleCountdown.php CHANGED
@@ -110,7 +110,7 @@ class CircleCountdown extends Countdown {
110
  ?>
111
  <style type="text/css">
112
  #ycd-circle-<?php echo esc_attr($id); ?> {
113
- padding: <?php echo $padding; ?>;
114
  box-sizing: border-box;
115
  display: inline-block;
116
  }
@@ -134,7 +134,7 @@ class CircleCountdown extends Countdown {
134
  }
135
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Months h4,
136
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Months span {
137
- color: <?php echo $monthsColor; ?>
138
  }
139
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Days h4,
140
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Days span {
@@ -150,7 +150,7 @@ class CircleCountdown extends Countdown {
150
  color: <?php echo esc_attr($minutesTextColor); ?>
151
  }
152
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Seconds h4,
153
- #ycd-circle-<?php echo $id; ?> .textDiv_Seconds span {
154
  color: <?php echo esc_attr($secondsTextColor); ?>
155
  }
156
  .ycd-circle-<?php echo esc_attr($id); ?>-wrapper {
@@ -196,7 +196,7 @@ class CircleCountdown extends Countdown {
196
  ob_start();
197
  ?>
198
  <div class="ycd-circle-<?php echo esc_attr($id); ?>-wrapper ycd-circle-wrapper">
199
- <div id="ycd-circle-<?php echo esc_attr($id); ?>" class="ycd-time-circle" data-options='<?php echo $prepareOptions; ?>' data-all-options='<?php echo $allDataOptions; ?>' data-timer="<?php echo $seconds ?>" style="<?php echo $bgImageStyleStr ?> width: <?php echo $width; ?>; height: 100%; padding: 0; box-sizing: border-box; background-color: inherit"></div>
200
  </div>
201
  <?php
202
  $content .= ob_get_contents();
110
  ?>
111
  <style type="text/css">
112
  #ycd-circle-<?php echo esc_attr($id); ?> {
113
+ padding: <?php echo esc_attr($padding); ?>;
114
  box-sizing: border-box;
115
  display: inline-block;
116
  }
134
  }
135
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Months h4,
136
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Months span {
137
+ color: <?php echo esc_attr($monthsColor); ?>
138
  }
139
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Days h4,
140
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Days span {
150
  color: <?php echo esc_attr($minutesTextColor); ?>
151
  }
152
  #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Seconds h4,
153
+ #ycd-circle-<?php echo esc_attr($id); ?> .textDiv_Seconds span {
154
  color: <?php echo esc_attr($secondsTextColor); ?>
155
  }
156
  .ycd-circle-<?php echo esc_attr($id); ?>-wrapper {
196
  ob_start();
197
  ?>
198
  <div class="ycd-circle-<?php echo esc_attr($id); ?>-wrapper ycd-circle-wrapper">
199
+ <div id="ycd-circle-<?php echo esc_attr($id); ?>" class="ycd-time-circle" data-options='<?php echo $prepareOptions; ?>' data-all-options='<?php echo $allDataOptions; ?>' data-timer="<?php echo esc_attr($seconds) ?>" style="<?php echo esc_attr($bgImageStyleStr); ?> width: <?php echo esc_attr($width); ?>; height: 100%; padding: 0; box-sizing: border-box; background-color: inherit"></div>
200
  </div>
201
  <?php
202
  $content .= ob_get_contents();
classes/countdown/Countdown.php CHANGED
@@ -144,6 +144,8 @@ abstract class Countdown {
144
  ScriptsIncluder::registerScript('YcdGeneral.js',array('dirUrl' => YCD_COUNTDOWN_JS_URL, 'dep' => array('moment')));
145
  ScriptsIncluder::localizeScript('YcdGeneral.js', 'YCD_GENERAL_ARGS', array('YCD_COUNTDOWN_RESET_COOKIE_NAME' => YCD_COUNTDOWN_RESET_COOKIE_NAME, 'isAdmin' => $isAdmin));
146
  ScriptsIncluder::enqueueScript('YcdGeneral.js');
 
 
147
  }
148
 
149
  public static function create($data = array()) {
144
  ScriptsIncluder::registerScript('YcdGeneral.js',array('dirUrl' => YCD_COUNTDOWN_JS_URL, 'dep' => array('moment')));
145
  ScriptsIncluder::localizeScript('YcdGeneral.js', 'YCD_GENERAL_ARGS', array('YCD_COUNTDOWN_RESET_COOKIE_NAME' => YCD_COUNTDOWN_RESET_COOKIE_NAME, 'isAdmin' => $isAdmin));
146
  ScriptsIncluder::enqueueScript('YcdGeneral.js');
147
+ // ScriptsIncluder::registerScript('moment-timezone.js', array('dirUrl' => YCD_COUNTDOWN_JS_URL));
148
+ // ScriptsIncluder::enqueueScript('moment-timezone.js');
149
  }
150
 
151
  public static function create($data = array()) {
classes/countdown/SimpleCountdown.php CHANGED
@@ -67,13 +67,13 @@ class SimpleCountdown extends Countdown
67
  private function timeUnitNumber($unit)
68
  {
69
  $default = '0';
70
- return '<div class="ycd-simple-countdown-time ycd-simple-countdown-number ycd-simple-countdown-'.$unit.'-time">'.$default.'</div>';
71
  }
72
 
73
  private function timeUnitText($unit)
74
  {
75
- $unitLabel = $this->getOptionValue('ycd-simple-'.$unit.'-text');
76
- return '<div class="ycd-simple-countdown-time ycd-simple-countdown-label ycd-simple-countdown-'.$unit.'-label">'.$unitLabel.'</div>';
77
  }
78
 
79
  private function getStyles()
@@ -139,14 +139,14 @@ class SimpleCountdown extends Countdown
139
  $hideUnite = 'ycd-hide';
140
  }
141
  ?>
142
- <div class="ycd-simple-current-unite-wrapper ycd-simple-current-unite-<?php echo esc_attr($unite); ?> <?php echo $hideUnite?>">
143
  <div class="ycd-simple-current-unite"><!-- -->
144
  <?php echo ($textToTop ? $this->timeUnitText($unite): ''); ?>
145
  <?php echo $this->timeUnitNumber($unite); ?><!--
146
  --><?php echo (!$textToTop ? $this->timeUnitText($unite): ''); ?>
147
  </div>
148
  <?php if ($unite != 'seconds'): ?>
149
- <div class="ycd-simple-timer-dots <?php echo $hideDotsClassName; ?>">:</div>
150
  <?php endif; ?>
151
  </div>
152
  <?php endforeach; ?>
67
  private function timeUnitNumber($unit)
68
  {
69
  $default = '0';
70
+ return '<div class="ycd-simple-countdown-time ycd-simple-countdown-number ycd-simple-countdown-'.esc_attr($unit).'-time">'.esc_attr($default).'</div>';
71
  }
72
 
73
  private function timeUnitText($unit)
74
  {
75
+ $unitLabel = $this->getOptionValue('ycd-simple-'.esc_attr($unit).'-text');
76
+ return '<div class="ycd-simple-countdown-time ycd-simple-countdown-label ycd-simple-countdown-'.esc_attr($unit).'-label">'.esc_attr($unitLabel).'</div>';
77
  }
78
 
79
  private function getStyles()
139
  $hideUnite = 'ycd-hide';
140
  }
141
  ?>
142
+ <div class="ycd-simple-current-unite-wrapper ycd-simple-current-unite-<?php echo esc_attr($unite); ?> <?php echo esc_attr($hideUnite)?>">
143
  <div class="ycd-simple-current-unite"><!-- -->
144
  <?php echo ($textToTop ? $this->timeUnitText($unite): ''); ?>
145
  <?php echo $this->timeUnitNumber($unite); ?><!--
146
  --><?php echo (!$textToTop ? $this->timeUnitText($unite): ''); ?>
147
  </div>
148
  <?php if ($unite != 'seconds'): ?>
149
+ <div class="ycd-simple-timer-dots <?php echo esc_attr($hideDotsClassName); ?>">:</div>
150
  <?php endif; ?>
151
  </div>
152
  <?php endforeach; ?>
classes/countdown/TimerCountdown.php CHANGED
@@ -132,8 +132,7 @@ class TimerCountdown extends Countdown {
132
 
133
  private function getTimerContent() {
134
  $id = $this->getId();
135
- $options = $this->getTimerSettings();
136
- $options = json_encode($options);
137
  $timerButton = $this->getOptionValue('ycd-countdown-timer-button');
138
  $enableMilliseconds = $this->getOptionValue('ycd-countdown-timer-milliseconds');
139
 
@@ -168,18 +167,17 @@ class TimerCountdown extends Countdown {
168
  ob_start();
169
  ?>
170
  <div class="ycd-countdown-wrapper ycd-timer-content-wrapper-<?php echo esc_attr($id); ?>">
171
- <div class="ycd-timer-before-html"><?php echo $this->getOptionValue('ycd-before-timer-html'); ?></div>
172
- <div class="ycd-timer-time ycd-timer-container ycd-timer-wrapper-<?php echo esc_attr($id); ?>" data-options='<?php echo $options; ?>' data-id="<?php echo esc_attr($id); ?>">
173
  <div class="timer-time-set ycd-timer-box" id="currentTime">
174
  <div class="ycd-timer-span-wrapper">
175
- <div class="ycd-timer-unit"><span id="ycdDaysValue" class="ycd-days-value-<?php echo esc_attr($id); ?> ycd-timer-number ycd-days-span <?php echo $daysClassName; ?>">00</span><!--
176
- --><span class="ycd-dots ycd-days-span <?php echo $daysClassName; ?>">:</span><div class="ycd-timer-unit-text ycd-timer-unit-text-days <?php echo $daysClassName.' '.$hideLabelsCLass; ?>"><?php echo $daysLabel; ?></div><!--
177
  --></div><div class="ycd-timer-unit"><span id="ycdHoursValue" class="ycd-hours-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><!--
178
- --><span class="ycd-dots">:</span><div class="ycd-timer-unit-text ycd-timer-unit-text-hours <?php echo $hideLabelsCLass; ?>"><?php echo $hoursLabel; ?></div><!--
179
  --></div><div class="ycd-timer-unit"><span id="ycdMinutesValue" class="ycd-minutes-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><!--
180
- --><span class="ycd-dots">:</span><div class="ycd-timer-unit-text ycd-timer-unit-text-minutes <?php echo $hideLabelsCLass; ?>"><?php echo $minutesLabel; ?></div><!--
181
- --></div><div class="ycd-timer-unit"><span id="ycdSecondsValue" class="ycd-seconds-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><div class="ycd-timer-unit-text ycd-timer-unit-text-seconds <?php echo $hideLabelsCLass; ?>"><?php echo $secsLabel; ?></div></div><!--
182
- --><span class="ycd-milliseconds <?php echo $millisecondsClass; ?>">.</span><span class="ycd-milliseconds <?php echo $millisecondsClass; ?> ycd-milliseconds-value ycd-milliseconds-value-<?php echo esc_attr($id); ?>">000</span>
183
  </div>
184
  </div>
185
  <div class="timer-time-set ycd-timer-box ycd-timer-box-next" id="nextTime" style="opacity: 0;">
@@ -194,20 +192,19 @@ class TimerCountdown extends Countdown {
194
  </div>
195
  <div class="ycd-timmer-buttons ycd-timmer-buttons-<?php echo esc_attr($id); ?>">
196
  <?php if (!empty($timerButton)): ?>
197
- <button class="ycd-timer-start-stop ycd-timer-start-stop-<?php echo esc_attr($id); ?> <?php echo $stopButtonClassName; ?>" data-status="<?php echo esc_attr($autoCounting); ?>" data-start="<?php echo esc_attr($startTitle); ?>" data-stop="<?php echo esc_attr($stopTitle);?>"><?php echo esc_attr($buttonTitle); ?></button>
198
  <?php endif; ?>
199
  <?php if (!empty($resetButton)): ?>
200
- <button class="ycd-timer-reset ycd-timer-reset-<?php echo esc_attr($id); ?> <?php echo $resetButtonClassName; ?>"><?php echo esc_attr($resetButtonLabel); ?></button>
201
  <?php endif; ?>
202
  </div>
203
- <?php echo $this->renderSubscriptionForm(); ?>
204
- <?php echo $this->renderProgressBar(); ?>
205
- <div class="ycd-timer-after-html"><?php echo $this->getOptionValue('ycd-after-timer-html'); ?></div>
206
- </div>
207
  <?php
208
  $content = ob_get_contents();
209
  $content .= $this->contentStyles();
210
  ob_end_clean();
 
 
 
211
 
212
  return $content;
213
  }
@@ -218,9 +215,15 @@ class TimerCountdown extends Countdown {
218
  ScriptsIncluder::registerScript('ycdGoogleFonts.js');
219
  ScriptsIncluder::enqueueScript('ycdGoogleFonts.js');
220
  }
221
-
 
 
 
222
  ScriptsIncluder::registerScript('ycdTimer.js');
223
- ScriptsIncluder::localizeScript('ycdTimer.js', 'YcdArgs', array('isAdmin' => is_admin()));
 
 
 
224
  ScriptsIncluder::enqueueScript('ycdTimer.js');
225
  ScriptsIncluder::registerStyle('timer.css');
226
  ScriptsIncluder::enqueueStyle('timer.css');
132
 
133
  private function getTimerContent() {
134
  $id = $this->getId();
135
+
 
136
  $timerButton = $this->getOptionValue('ycd-countdown-timer-button');
137
  $enableMilliseconds = $this->getOptionValue('ycd-countdown-timer-milliseconds');
138
 
167
  ob_start();
168
  ?>
169
  <div class="ycd-countdown-wrapper ycd-timer-content-wrapper-<?php echo esc_attr($id); ?>">
170
+ <div class="ycd-timer-time ycd-timer-container ycd-timer-wrapper-<?php echo esc_attr($id); ?>" data-id="<?php echo esc_attr($id); ?>">
 
171
  <div class="timer-time-set ycd-timer-box" id="currentTime">
172
  <div class="ycd-timer-span-wrapper">
173
+ <div class="ycd-timer-unit"><span id="ycdDaysValue" class="ycd-days-value-<?php echo esc_attr($id); ?> ycd-timer-number ycd-days-span <?php echo esc_attr($daysClassName); ?>">00</span><!--
174
+ --><span class="ycd-dots ycd-days-span <?php echo esc_attr($daysClassName); ?>">:</span><div class="ycd-timer-unit-text ycd-timer-unit-text-days <?php echo esc_attr($daysClassName).' '.esc_attr($hideLabelsCLass); ?>"><?php echo esc_attr($daysLabel); ?></div><!--
175
  --></div><div class="ycd-timer-unit"><span id="ycdHoursValue" class="ycd-hours-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><!--
176
+ --><span class="ycd-dots">:</span><div class="ycd-timer-unit-text ycd-timer-unit-text-hours <?php echo esc_attr($hideLabelsCLass); ?>"><?php echo esc_attr($hoursLabel); ?></div><!--
177
  --></div><div class="ycd-timer-unit"><span id="ycdMinutesValue" class="ycd-minutes-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><!--
178
+ --><span class="ycd-dots">:</span><div class="ycd-timer-unit-text ycd-timer-unit-text-minutes <?php echo esc_attr($hideLabelsCLass); ?>"><?php echo esc_attr($minutesLabel); ?></div><!--
179
+ --></div><div class="ycd-timer-unit"><span id="ycdSecondsValue" class="ycd-seconds-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><div class="ycd-timer-unit-text ycd-timer-unit-text-seconds <?php echo esc_attr($hideLabelsCLass); ?>"><?php echo esc_attr($secsLabel); ?></div></div><!--
180
+ --><span class="ycd-milliseconds <?php echo esc_attr($millisecondsClass); ?>">.</span><span class="ycd-milliseconds <?php echo esc_attr($millisecondsClass); ?> ycd-milliseconds-value ycd-milliseconds-value-<?php echo esc_attr($id); ?>">000</span>
181
  </div>
182
  </div>
183
  <div class="timer-time-set ycd-timer-box ycd-timer-box-next" id="nextTime" style="opacity: 0;">
192
  </div>
193
  <div class="ycd-timmer-buttons ycd-timmer-buttons-<?php echo esc_attr($id); ?>">
194
  <?php if (!empty($timerButton)): ?>
195
+ <button class="ycd-timer-start-stop ycd-timer-start-stop-<?php echo esc_attr($id); ?> <?php echo esc_attr($stopButtonClassName); ?>" data-status="<?php echo esc_attr($autoCounting); ?>" data-start="<?php echo esc_attr($startTitle); ?>" data-stop="<?php echo esc_attr($stopTitle);?>"><?php echo esc_attr($buttonTitle); ?></button>
196
  <?php endif; ?>
197
  <?php if (!empty($resetButton)): ?>
198
+ <button class="ycd-timer-reset ycd-timer-reset-<?php echo esc_attr($id); ?> <?php echo esc_attr($resetButtonClassName); ?>"><?php echo esc_attr($resetButtonLabel); ?></button>
199
  <?php endif; ?>
200
  </div>
 
 
 
 
201
  <?php
202
  $content = ob_get_contents();
203
  $content .= $this->contentStyles();
204
  ob_end_clean();
205
+ $content .= $this->renderSubscriptionForm();
206
+ $content .= $this->renderProgressBar();
207
+ $content .= '</div>';
208
 
209
  return $content;
210
  }
215
  ScriptsIncluder::registerScript('ycdGoogleFonts.js');
216
  ScriptsIncluder::enqueueScript('ycdGoogleFonts.js');
217
  }
218
+ $options = $this->getTimerSettings();
219
+ $options = json_encode($options);
220
+ $settings = array();
221
+
222
  ScriptsIncluder::registerScript('ycdTimer.js');
223
+ ScriptsIncluder::localizeScript('ycdTimer.js', 'YcdArgs', array(
224
+ 'isAdmin' => is_admin(),
225
+ 'options' => $options
226
+ ));
227
  ScriptsIncluder::enqueueScript('ycdTimer.js');
228
  ScriptsIncluder::registerStyle('timer.css');
229
  ScriptsIncluder::enqueueStyle('timer.css');
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.3.9.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.3.9.2
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.9.3
6
- Stable tag: 2.3.9.1
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.9.3
6
+ Stable tag: 2.3.9.2
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html