Countdown, Coming Soon – Countdown & Clock - Version 1.7.4

Version Description

  • Timer start button Custom class name (new)
  • Timer reset button Custom class name (new)
  • Timer AutoPlay after restart (new)
Download this release

Release Info

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

Code changes from version 1.7.3 to 1.7.4

assets/css/timer.css CHANGED
@@ -28,7 +28,7 @@
28
 
29
  .ycd-timer-span-wrapper span.ycd-timer-number {
30
  width: 92px;
31
- display: inline-block;
32
  }
33
 
34
  .ycd-milliseconds-value {
@@ -38,4 +38,8 @@
38
 
39
  .ycd-hide {
40
  display: none !important;
 
 
 
 
41
  }
28
 
29
  .ycd-timer-span-wrapper span.ycd-timer-number {
30
  width: 92px;
31
+ vertical-align: text-top;
32
  }
33
 
34
  .ycd-milliseconds-value {
38
 
39
  .ycd-hide {
40
  display: none !important;
41
+ }
42
+
43
+ .ycd-dots {
44
+ vertical-align: text-top;
45
  }
assets/js/ycdTimer.js CHANGED
@@ -1,6 +1,7 @@
1
  function YcdTimer() {
2
  this.ycdAudio = false;
3
  this.countdown = true;
 
4
  }
5
 
6
  YcdTimer.prototype.setAlarm = function() {
@@ -30,6 +31,7 @@ YcdTimer.prototype.init = function() {
30
  this.buttonListener();
31
  this.resetTimer();
32
  if (settings['timerButton'] && settings['autoCounting'] == '') {
 
33
  return '';
34
  }
35
  this.startTimer();
@@ -147,6 +149,7 @@ YcdTimer.prototype.buttonListener = function () {
147
  var that = this;
148
  var button = jQuery('.ycd-timer-start-stop-'+id);
149
  var resetButton = jQuery('.ycd-timer-reset-'+id);
 
150
 
151
  button.bind('click', function (e) {
152
  e.preventDefault();
@@ -154,6 +157,7 @@ YcdTimer.prototype.buttonListener = function () {
154
  var title = status ? jQuery(this).data('start') : jQuery(this).data('stop');
155
  jQuery(this).text(title);
156
  status = status ? 0: 1;
 
157
 
158
  if (!status) {
159
  clearInterval(that.countdownHandle);
@@ -167,6 +171,11 @@ YcdTimer.prototype.buttonListener = function () {
167
  resetButton.bind('click', function(e) {
168
  e.preventDefault();
169
  that.resetTimer();
 
 
 
 
 
170
  })
171
  };
172
 
1
  function YcdTimer() {
2
  this.ycdAudio = false;
3
  this.countdown = true;
4
+ this.status = 1;
5
  }
6
 
7
  YcdTimer.prototype.setAlarm = function() {
31
  this.buttonListener();
32
  this.resetTimer();
33
  if (settings['timerButton'] && settings['autoCounting'] == '') {
34
+ this.renderTimer();
35
  return '';
36
  }
37
  this.startTimer();
149
  var that = this;
150
  var button = jQuery('.ycd-timer-start-stop-'+id);
151
  var resetButton = jQuery('.ycd-timer-reset-'+id);
152
+ var options = this.getSettings();
153
 
154
  button.bind('click', function (e) {
155
  e.preventDefault();
157
  var title = status ? jQuery(this).data('start') : jQuery(this).data('stop');
158
  jQuery(this).text(title);
159
  status = status ? 0: 1;
160
+ that.status = status;
161
 
162
  if (!status) {
163
  clearInterval(that.countdownHandle);
171
  resetButton.bind('click', function(e) {
172
  e.preventDefault();
173
  that.resetTimer();
174
+ var status = that.status;
175
+ if (!status && options['ycd-timer-reset-button-run']) {
176
+ button.click();
177
+ }
178
+
179
  })
180
  };
181
 
assets/views/timerMainView.php CHANGED
@@ -56,7 +56,7 @@ $textFontFamily = $this->getOptionValue('ycd-text-font-family');
56
  </div>
57
  <div class="col-md-4 ycd-timer-font-size">
58
  <label class="ycd-switch">
59
- <input type="checkbox" id="ycd-timer-auto-counting" name="ycd-timer-auto-counting" class="ycd-accordion-checkbox" <?php echo $this->getOptionValue('ycd-timer-auto-counting'); ?>>
60
  <span class="ycd-slider ycd-round"></span>
61
  </label>
62
  </div>
@@ -77,6 +77,14 @@ $textFontFamily = $this->getOptionValue('ycd-text-font-family');
77
  <input id="ycd-timer-button-stop-title" type="text" class="form-control" name="ycd-timer-button-stop-title" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-button-stop-title')); ?>">
78
  </div>
79
  </div>
 
 
 
 
 
 
 
 
80
  <div class="row form-group">
81
  <div class="col-md-6">
82
  <label for="ycd-timer-stop-bg-color" ><?php _e('background color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
@@ -117,6 +125,25 @@ $textFontFamily = $this->getOptionValue('ycd-text-font-family');
117
  <input id="ycd-timer-reset-button-label" type="text" class="form-control" name="ycd-timer-reset-button-label" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-reset-button-label')); ?>">
118
  </div>
119
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  <div class="row form-group">
121
  <div class="col-md-6">
122
  <label for="ycd-timer-reset-bg-color" ><?php _e('background color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
56
  </div>
57
  <div class="col-md-4 ycd-timer-font-size">
58
  <label class="ycd-switch">
59
+ <input type="checkbox" id="ycd-timer-auto-counting" name="ycd-timer-auto-counting" class="" <?php echo $this->getOptionValue('ycd-timer-auto-counting'); ?>>
60
  <span class="ycd-slider ycd-round"></span>
61
  </label>
62
  </div>
77
  <input id="ycd-timer-button-stop-title" type="text" class="form-control" name="ycd-timer-button-stop-title" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-button-stop-title')); ?>">
78
  </div>
79
  </div>
80
+ <div class="row form-group">
81
+ <div class="col-md-6">
82
+ <label for="ycd-timer-button-stop-custom-class" ><?php _e('Custom class name', YCD_TEXT_DOMAIN); ?></label>
83
+ </div>
84
+ <div class="col-md-4 ycd-timer-font-size">
85
+ <input id="ycd-timer-button-stop-custom-class" type="text" class="form-control" name="ycd-timer-button-stop-custom-class" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-button-stop-custom-class')); ?>">
86
+ </div>
87
+ </div>
88
  <div class="row form-group">
89
  <div class="col-md-6">
90
  <label for="ycd-timer-stop-bg-color" ><?php _e('background color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
125
  <input id="ycd-timer-reset-button-label" type="text" class="form-control" name="ycd-timer-reset-button-label" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-reset-button-label')); ?>">
126
  </div>
127
  </div>
128
+ <div class="row form-group">
129
+ <div class="col-md-6">
130
+ <label for="ycd-timer-reset-button-class-name" ><?php _e('Custom class name', YCD_TEXT_DOMAIN); ?></label>
131
+ </div>
132
+ <div class="col-md-4 ycd-timer-font-size">
133
+ <input id="ycd-timer-reset-button-class-name" type="text" class="form-control" name="ycd-timer-reset-button-class-name" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-reset-button-class-name')); ?>">
134
+ </div>
135
+ </div>
136
+ <div class="row form-group">
137
+ <div class="col-md-6">
138
+ <label for="ycd-timer-reset-button-run" ><?php _e('AutoPlay after restart', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
139
+ </div>
140
+ <div class="col-md-4 ycd-timer-font-size ycd-option-wrapper<?php echo $isPro; ?>">
141
+ <label class="ycd-switch">
142
+ <input type="checkbox" id="ycd-timer-reset-button-run" name="ycd-timer-reset-button-run" <?php echo $this->getOptionValue('ycd-timer-reset-button-run'); ?>>
143
+ <span class="ycd-slider ycd-round"></span>
144
+ </label>
145
+ </div>
146
+ </div>
147
  <div class="row form-group">
148
  <div class="col-md-6">
149
  <label for="ycd-timer-reset-bg-color" ><?php _e('background color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
classes/countdown/Countdown.php CHANGED
@@ -599,7 +599,7 @@ abstract class Countdown {
599
  $options['ycd-countdown-end-sound'] = $this->getOptionValue('ycd-countdown-end-sound');
600
  $options['ycd-countdown-end-sound-url'] = $this->getOptionValue('ycd-countdown-end-sound-url');
601
 
602
- return $options;
603
  }
604
 
605
  public function renderSubscriptionForm() {
599
  $options['ycd-countdown-end-sound'] = $this->getOptionValue('ycd-countdown-end-sound');
600
  $options['ycd-countdown-end-sound-url'] = $this->getOptionValue('ycd-countdown-end-sound-url');
601
 
602
+ return apply_filters('ycdGeneralDataAllOptions', $options, $this);
603
  }
604
 
605
  public function renderSubscriptionForm() {
classes/countdown/TimerCountdown.php CHANGED
@@ -50,7 +50,7 @@ class TimerCountdown extends Countdown {
50
  public function getTimerSettings() {
51
  $options = array();
52
  $allDataOptions = $this->getDataAllOptions();
53
-
54
  $options['id'] = $this->getId();
55
  $options['hours'] = $this->getOptionValue('ycd-timer-hours');
56
  $options['minutes'] = $this->getOptionValue('ycd-timer-minutes');
@@ -77,6 +77,11 @@ class TimerCountdown extends Countdown {
77
 
78
  $resetBgColor = $this->getOptionValue('ycd-timer-reset-bg-color');
79
  $resetColor = $this->getOptionValue('ycd-timer-reset-color');
 
 
 
 
 
80
  ob_start();
81
  ?>
82
  <style type="text/css" id="ycd-digit-font-family-<?php echo $id; ?>">
@@ -105,14 +110,13 @@ class TimerCountdown extends Countdown {
105
  }
106
  </style>
107
  <style type="text/css">
108
- .ycd-timer-wrapper-<?php echo $id; ?> .ycd-timer-box > span {
109
- color: <?php echo $timerColor; ?>
110
  }
111
  .ycd-timer-wrapper-<?php echo $id; ?> {
112
  <?php echo 'background-image: url('.$imageUrl.'); background-repeat: '.$imageRepeat.'; background-size: '.$bgImageSize.'; '; ?>
113
  text-align: <?php echo $textAlign; ?>;
114
  }
115
-
116
  </style>
117
  <?php
118
  $styles = ob_get_contents();
@@ -138,6 +142,8 @@ class TimerCountdown extends Countdown {
138
  $autoCounting = (bool)$this->getOptionValue('ycd-timer-auto-counting');
139
  $resetButton = (bool)$this->getOptionValue('ycd-timer-reset-button');
140
  $resetButtonLabel = $this->getOptionValue('ycd-timer-reset-button-label');
 
 
141
  $buttonTitle = ($autoCounting) ? $stopTitle: $startTitle;
142
  ob_start();
143
  ?>
@@ -145,9 +151,13 @@ class TimerCountdown extends Countdown {
145
  <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); ?>">
146
  <div class="timer-time-set ycd-timer-box" id="currentTime">
147
  <div class="ycd-timer-span-wrapper">
148
- <span id="ycdHoursValue" class="ycd-hours-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><span>:</span><span id="ycdMinutesValue" class="ycd-minutes-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><span>:</span><span id="ycdSecondsValue" class="ycd-seconds-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><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>
 
 
 
 
 
149
  </div>
150
-
151
  </div>
152
  <div class="timer-time-set ycd-timer-box" id="nextTime" style="opacity: 0;">
153
  <span id="ycdHoursNext"class="ycd-hours-next-value-<?php echo esc_attr($id); ?>">00</span><span>:</span><span id="ycdMinutesNext" class="ycd-minutes-next-value-<?php echo esc_attr($id); ?>">00</span><span>:</span><span id="ycdSecondsNext" class="ycd-seconds-next-value-<?php echo esc_attr($id); ?>">00</span>
@@ -155,10 +165,10 @@ class TimerCountdown extends Countdown {
155
  </div>
156
  <div class="ycd-timmer-buttons ycd-timmer-buttons-<?php echo esc_attr($id); ?>">
157
  <?php if (!empty($timerButton)): ?>
158
- <button class="ycd-timer-start-stop ycd-timer-start-stop-<?php echo esc_attr($id); ?>" 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>
159
  <?php endif; ?>
160
  <?php if (!empty($resetButton)): ?>
161
- <button class="ycd-timer-reset ycd-timer-reset-<?php echo esc_attr($id); ?>"><?php echo esc_attr($resetButtonLabel); ?></button>
162
  <?php endif; ?>
163
  </div>
164
  <?php echo $this->renderSubscriptionForm(); ?>
50
  public function getTimerSettings() {
51
  $options = array();
52
  $allDataOptions = $this->getDataAllOptions();
53
+
54
  $options['id'] = $this->getId();
55
  $options['hours'] = $this->getOptionValue('ycd-timer-hours');
56
  $options['minutes'] = $this->getOptionValue('ycd-timer-minutes');
77
 
78
  $resetBgColor = $this->getOptionValue('ycd-timer-reset-bg-color');
79
  $resetColor = $this->getOptionValue('ycd-timer-reset-color');
80
+ $important = '';
81
+
82
+ if(!is_admin()) {
83
+ $important = '!important';
84
+ }
85
  ob_start();
86
  ?>
87
  <style type="text/css" id="ycd-digit-font-family-<?php echo $id; ?>">
110
  }
111
  </style>
112
  <style type="text/css">
113
+ .ycd-timer-wrapper-<?php echo $id; ?> .ycd-timer-box span {
114
+ color: <?php echo $timerColor; ?> <?php echo $important; ?>;
115
  }
116
  .ycd-timer-wrapper-<?php echo $id; ?> {
117
  <?php echo 'background-image: url('.$imageUrl.'); background-repeat: '.$imageRepeat.'; background-size: '.$bgImageSize.'; '; ?>
118
  text-align: <?php echo $textAlign; ?>;
119
  }
 
120
  </style>
121
  <?php
122
  $styles = ob_get_contents();
142
  $autoCounting = (bool)$this->getOptionValue('ycd-timer-auto-counting');
143
  $resetButton = (bool)$this->getOptionValue('ycd-timer-reset-button');
144
  $resetButtonLabel = $this->getOptionValue('ycd-timer-reset-button-label');
145
+ $stopButtonClassName = $this->getOptionValue('ycd-timer-button-stop-custom-class');
146
+ $resetButtonClassName = $this->getOptionValue('ycd-timer-reset-button-class-name');
147
  $buttonTitle = ($autoCounting) ? $stopTitle: $startTitle;
148
  ob_start();
149
  ?>
151
  <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); ?>">
152
  <div class="timer-time-set ycd-timer-box" id="currentTime">
153
  <div class="ycd-timer-span-wrapper">
154
+ <span id="ycdHoursValue" class="ycd-hours-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><!--
155
+ --><span class="ycd-dots">:</span><!--
156
+ --><span id="ycdMinutesValue" class="ycd-minutes-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><!--
157
+ --><span class="ycd-dots">:</span><!--
158
+ --><span id="ycdSecondsValue" class="ycd-seconds-value-<?php echo esc_attr($id); ?> ycd-timer-number">00</span><!--
159
+ --><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>
160
  </div>
 
161
  </div>
162
  <div class="timer-time-set ycd-timer-box" id="nextTime" style="opacity: 0;">
163
  <span id="ycdHoursNext"class="ycd-hours-next-value-<?php echo esc_attr($id); ?>">00</span><span>:</span><span id="ycdMinutesNext" class="ycd-minutes-next-value-<?php echo esc_attr($id); ?>">00</span><span>:</span><span id="ycdSecondsNext" class="ycd-seconds-next-value-<?php echo esc_attr($id); ?>">00</span>
165
  </div>
166
  <div class="ycd-timmer-buttons ycd-timmer-buttons-<?php echo esc_attr($id); ?>">
167
  <?php if (!empty($timerButton)): ?>
168
+ <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>
169
  <?php endif; ?>
170
  <?php if (!empty($resetButton)): ?>
171
+ <button class="ycd-timer-reset ycd-timer-reset-<?php echo esc_attr($id); ?> <?php echo $resetButtonClassName; ?>"><?php echo esc_attr($resetButtonLabel); ?></button>
172
  <?php endif; ?>
173
  </div>
174
  <?php echo $this->renderSubscriptionForm(); ?>
config/config.php CHANGED
@@ -67,8 +67,8 @@ class YcdCountdownConfig {
67
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
68
  self::addDefine('YCD_AJAX_SUCCESS', 1);
69
  self::addDefine('YCD_TABLE_LIMIT', 15);
70
- self::addDefine('YCD_VERSION_PRO', 1.59);
71
- self::addDefine('YCD_VERSION', 1.73);
72
  self::addDefine('YCD_FREE_VERSION', 1);
73
  self::addDefine('YCD_SILVER_VERSION', 2);
74
  self::addDefine('YCD_GOLD_VERSION', 3);
67
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
68
  self::addDefine('YCD_AJAX_SUCCESS', 1);
69
  self::addDefine('YCD_TABLE_LIMIT', 15);
70
+ self::addDefine('YCD_VERSION_PRO', 1.60);
71
+ self::addDefine('YCD_VERSION', 1.74);
72
  self::addDefine('YCD_FREE_VERSION', 1);
73
  self::addDefine('YCD_SILVER_VERSION', 2);
74
  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.7.3
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.7.4
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.4
6
- Stable tag: 1.7.3
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -23,7 +23,7 @@ Countdown types
23
 
24
  * Circle Countdown
25
  * Digital
26
- * Timer
27
  * Clock 1
28
  * Clock 2
29
  * Clock 3
@@ -65,8 +65,12 @@ Yes you can, we have Circle and Flipclock countdown popups.
65
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
66
 
67
  == Changelog ==
 
 
 
 
 
68
  = 1.7.3 =
69
- * Countup issue fixed
70
  * Fixed Saved duration issue related to Days
71
  * Reset duration (new)
72
 
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.4
6
+ Stable tag: 1.7.4
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
23
 
24
  * Circle Countdown
25
  * Digital
26
+ * Timer Countdown
27
  * Clock 1
28
  * Clock 2
29
  * Clock 3
65
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
66
 
67
  == Changelog ==
68
+ = 1.7.4 =
69
+ * Timer start button Custom class name (new)
70
+ * Timer reset button Custom class name (new)
71
+ * Timer AutoPlay after restart (new)
72
+
73
  = 1.7.3 =
 
74
  * Fixed Saved duration issue related to Days
75
  * Reset duration (new)
76