Countdown, Coming Soon – Countdown & Clock - Version 2.3.9.1

Version Description

Download this release

Release Info

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

Code changes from version 2.3.9 to 2.3.9.1

assets/js/Sticky.js CHANGED
@@ -18,7 +18,8 @@ YcdSticky.prototype.init = function() {
18
  };
19
 
20
  YcdSticky.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
21
- var currentDate = moment(new Date()).tz(selectedTimezone).format('MM/DD/YYYY H:m:s');
 
22
 
23
  var dateTime = new Date(currentDate).valueOf();
24
  var timeNow = Math.floor(dateTime / 1000);
@@ -42,7 +43,8 @@ YcdSticky.prototype.stickyClock = function() {
42
  this.seconds = that.getSeconds(settings)*1000;
43
 
44
  var runTimer = function () {
45
- var now = moment().tz(settings.timeZone).format('MM/DD/YYYY HH:mm:ss');
 
46
  now = new Date(now).getTime();
47
  that.seconds -= 1000;
48
  var distance = that.seconds;
18
  };
19
 
20
  YcdSticky.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
21
+ ///var currentDate = moment(new Date()).tz(selectedTimezone).format('MM/DD/YYYY H:m:s');
22
+ var currentDate = moment(new Date()).format('MM/DD/YYYY H:m:s');
23
 
24
  var dateTime = new Date(currentDate).valueOf();
25
  var timeNow = Math.floor(dateTime / 1000);
43
  this.seconds = that.getSeconds(settings)*1000;
44
 
45
  var runTimer = function () {
46
+ //var now = moment().tz(settings.timeZone).format('MM/DD/YYYY HH:mm:ss');
47
+ var now = moment().format('MM/DD/YYYY HH:mm:ss');
48
  now = new Date(now).getTime();
49
  that.seconds -= 1000;
50
  var distance = that.seconds;
classes/countdown/Clock1Countdown.php CHANGED
@@ -110,7 +110,7 @@ class Clock1Countdown extends Countdown {
110
 
111
  $style = '<style type="text/css">';
112
  $style .= '.ycd-countdown-'.esc_attr($id).'-wrapper {';
113
- $style .= 'text-align: '.$align;
114
  $style .= '}';
115
  $style .= '</style>';
116
 
@@ -132,7 +132,7 @@ class Clock1Countdown extends Countdown {
132
  $options = json_encode($options);
133
 
134
  $content = '<div class="ycd-countdown-wrapper ycd-countdown-'.esc_attr($id).'-wrapper">';
135
- $content .= '<canvas data-args="'.esc_attr($args).'" data-options="'.esc_attr($options).'" class="ycdClock1" width="'.$width.'px" height="'.$width.'px"></canvas>';
136
  $content .= $this->renderSubscriptionForm();
137
  $content .= '</div>';
138
  $content .= $this->getStylesStr();
110
 
111
  $style = '<style type="text/css">';
112
  $style .= '.ycd-countdown-'.esc_attr($id).'-wrapper {';
113
+ $style .= 'text-align: '.esc_attr($align);
114
  $style .= '}';
115
  $style .= '</style>';
116
 
132
  $options = json_encode($options);
133
 
134
  $content = '<div class="ycd-countdown-wrapper ycd-countdown-'.esc_attr($id).'-wrapper">';
135
+ $content .= '<canvas data-args="'.esc_attr($args).'" data-options="'.esc_attr($options).'" class="ycdClock1" width="'.esc_attr($width).'px" height="'.esc_attr($width).'px"></canvas>';
136
  $content .= $this->renderSubscriptionForm();
137
  $content .= '</div>';
138
  $content .= $this->getStylesStr();
classes/countdown/Clock2Countdown.php CHANGED
@@ -110,7 +110,7 @@ class Clock2Countdown extends Countdown {
110
 
111
  $style = '<style type="text/css">';
112
  $style .= '.ycd-countdown-'.esc_attr($id).'-wrapper {';
113
- $style .= 'text-align: '.$align;
114
  $style .= '}';
115
  $style .= '</style>';
116
 
@@ -132,7 +132,7 @@ class Clock2Countdown extends Countdown {
132
  $options = json_encode($options);
133
 
134
  $content = '<div class="ycd-countdown-wrapper ycd-countdown-'.esc_attr($id).'-wrapper">';
135
- $content .= '<canvas data-args="'.esc_attr($args).'" data-options="'.esc_attr($options).'" class="ycdClock2" width="'.$width.'px" height="'.$width.'px"></canvas>';
136
  $content .= $this->renderSubscriptionForm();
137
  $content .= '</div>';
138
  $content .= $this->getStylesStr();
110
 
111
  $style = '<style type="text/css">';
112
  $style .= '.ycd-countdown-'.esc_attr($id).'-wrapper {';
113
+ $style .= 'text-align: '.esc_attr($align);
114
  $style .= '}';
115
  $style .= '</style>';
116
 
132
  $options = json_encode($options);
133
 
134
  $content = '<div class="ycd-countdown-wrapper ycd-countdown-'.esc_attr($id).'-wrapper">';
135
+ $content .= '<canvas data-args="'.esc_attr($args).'" data-options="'.esc_attr($options).'" class="ycdClock2" width="'.esc_attr($width).'px" height="'.esc_attr($width).'px"></canvas>';
136
  $content .= $this->renderSubscriptionForm();
137
  $content .= '</div>';
138
  $content .= $this->getStylesStr();
classes/countdown/Clock3Countdown.php CHANGED
@@ -110,7 +110,7 @@ class Clock3Countdown extends Countdown {
110
 
111
  $style = '<style type="text/css">';
112
  $style .= '.ycd-countdown-'.esc_attr($id).'-wrapper {';
113
- $style .= 'text-align: '.$align;
114
  $style .= '}';
115
  $style .= '</style>';
116
 
@@ -132,7 +132,7 @@ class Clock3Countdown extends Countdown {
132
  $options = json_encode($options);
133
 
134
  $content = '<div class="ycd-countdown-wrapper ycd-countdown-'.esc_attr($id).'-wrapper">';
135
- $content .= '<canvas data-args="'.esc_attr($args).'" data-options="'.esc_attr($options).'" class="ycdClock3" width="'.$width.'px" height="'.$width.'px"></canvas>';
136
  $content .= $this->renderSubscriptionForm();
137
  $content .= '</div>';
138
  $content .= $this->getStylesStr();
110
 
111
  $style = '<style type="text/css">';
112
  $style .= '.ycd-countdown-'.esc_attr($id).'-wrapper {';
113
+ $style .= 'text-align: '.esc_attr($align);
114
  $style .= '}';
115
  $style .= '</style>';
116
 
132
  $options = json_encode($options);
133
 
134
  $content = '<div class="ycd-countdown-wrapper ycd-countdown-'.esc_attr($id).'-wrapper">';
135
+ $content .= '<canvas data-args="'.esc_attr($args).'" data-options="'.esc_attr($options).'" class="ycdClock3" width="'.esc_attr($width).'px" height="'.esc_attr($width).'px"></canvas>';
136
  $content .= $this->renderSubscriptionForm();
137
  $content .= '</div>';
138
  $content .= $this->getStylesStr();
classes/countdown/StickyCountdown.php CHANGED
@@ -133,8 +133,8 @@ class StickyCountdown extends Countdown {
133
  <?php endif; ?>
134
  <?php if (!empty($enableBorder)): ?>
135
  .ycd-sticky-button {
136
- border: <?php echo $borderWidth.' solid '.$borderColor.' '.$important; ?>;
137
- border-radius: <?php echo $borderRadius.' '.$important; ?>;
138
  <?php endif; ?>
139
  </style>
140
  <?php
@@ -260,51 +260,33 @@ class StickyCountdown extends Countdown {
260
  $closeSectionHtml = $this->getCloseSectionHTML();
261
 
262
  $sectionsHtml = array();
 
 
 
263
 
264
- ob_start();
265
- ?>
266
- <div class="ycd-sticky-header-child ycd-sticky-header-text">
267
- <?php echo $textContent; ?>
268
- </div>
269
- <?php
270
- $sectionsHtml['Text'] = ob_get_contents();
271
- ob_end_clean();
272
 
273
- ob_start();
274
- ?>
275
- <div class="ycd-sticky-header-child ycd-sticky-header-countdown">
276
- <?php echo $this->renderCountdown(); ?>
277
- <?php echo $this->renderProgressBar(); ?>
278
- </div>
279
- <?php
280
- $sectionsHtml['Countdown'] = ob_get_contents();
281
- ob_end_clean();
282
 
283
- ob_start();
284
- ?>
285
- <div class="ycd-sticky-header-child ycd-sticky-header-button">
286
- <input type="button" data-id = "<?php echo esc_attr($id); ?>" class="ycd-sticky-button" value="<?php echo esc_attr($buttonText); ?>">
287
- </div>
288
- <?php
289
- $sectionsHtml['Button'] = ob_get_contents();
290
- ob_end_clean();
291
 
292
-
293
- ob_start();
294
- ?>
295
- <div class="ycd-sticky-header ycd-sticky-header-<?php echo esc_attr($id); ?>" data-id="<?php echo esc_attr($id); ?>" data-settings="<?php echo esc_attr($settings); ?>">
296
- <?php echo $closeSectionHtml; ?>
297
- <?php foreach ($sectionsOrderArray as $sectionKey) {
298
- echo $sectionsHtml[$sectionKey];
299
- }?>
300
-
301
- <div>
302
- <?php echo $this->renderSubscriptionForm(); ?>
303
- </div>
304
- </div>
305
- <?php
306
- $content = ob_get_contents();
307
- ob_end_clean();
308
  $content .= $this->renderStyles();
309
 
310
  return $content;
133
  <?php endif; ?>
134
  <?php if (!empty($enableBorder)): ?>
135
  .ycd-sticky-button {
136
+ border: <?php echo esc_attr($borderWidth).' solid '.esc_attr($borderColor).' '.esc_attr($important); ?>;
137
+ border-radius: <?php echo esc_attr($borderRadius).' '.esc_attr($important); ?>;
138
  <?php endif; ?>
139
  </style>
140
  <?php
260
  $closeSectionHtml = $this->getCloseSectionHTML();
261
 
262
  $sectionsHtml = array();
263
+ $htmlContent = '<div class="ycd-sticky-header-child ycd-sticky-header-text">';
264
+ $htmlContent .= $textContent;
265
+ $htmlContent .= '</div>';
266
 
267
+ $sectionsHtml['Text'] = $htmlContent;
 
 
 
 
 
 
 
268
 
269
+ $contentCountdown = '<div class="ycd-sticky-header-child ycd-sticky-header-countdown">';
270
+ $contentCountdown .= $this->renderCountdown();
271
+ $contentCountdown .= $this->renderProgressBar();
272
+ $contentCountdown .= '</div>';
 
 
 
 
 
273
 
274
+ $sectionsHtml['Countdown'] = $contentCountdown;
 
 
 
 
 
 
 
275
 
276
+ $contentButton = '<div class="ycd-sticky-header-child ycd-sticky-header-button">';
277
+ $contentButton .= '<input type="button" data-id = "'.esc_attr($id).'" class="ycd-sticky-button" value="'.esc_attr($buttonText).'">';
278
+ $contentButton .= '</div>';
279
+
280
+ $sectionsHtml['Button'] = $contentButton;
281
+
282
+ $content = '<div class="ycd-sticky-header ycd-sticky-header-'.esc_attr($id).'" data-id="'.esc_attr($id).'" data-settings="'.esc_attr($settings).'">';
283
+ $content .= $closeSectionHtml;
284
+ foreach ($sectionsOrderArray as $sectionKey) {
285
+ $content .= $sectionsHtml[$sectionKey];
286
+ }
287
+ $content .= '<div>'.$this->renderSubscriptionForm().'</div>';
288
+ $content .= '</div>';
289
+
 
 
290
  $content .= $this->renderStyles();
291
 
292
  return $content;
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
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.1
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
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.1
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html