Version Description
- Timer reset button
- Timer buttons colors customization
- Circle countdown popup on load event
- Flipclock countdown popup on load event
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.3
- assets/js/ycdTimer.js +46 -3
- assets/views/timerMainView.php +203 -142
- classes/countdown/TimerCountdown.php +26 -5
- config/config.php +2 -2
- config/optionsConfig.php +2 -0
- countdown-builder.php +1 -1
- readme.txt +7 -1
assets/js/ycdTimer.js
CHANGED
@@ -143,8 +143,10 @@ YcdTimer.prototype.buttonListener = function () {
|
|
143 |
var id = this.getId();
|
144 |
var that = this;
|
145 |
var button = jQuery('.ycd-timer-start-stop-'+id);
|
|
|
146 |
|
147 |
-
button.bind('click', function () {
|
|
|
148 |
var status = jQuery(this).data('status');
|
149 |
var title = status ? jQuery(this).data('start') : jQuery(this).data('stop');
|
150 |
jQuery(this).text(title);
|
@@ -158,6 +160,11 @@ YcdTimer.prototype.buttonListener = function () {
|
|
158 |
}
|
159 |
jQuery(this).data('status', status);
|
160 |
});
|
|
|
|
|
|
|
|
|
|
|
161 |
};
|
162 |
|
163 |
YcdTimer.prototype.startTimer = function() {
|
@@ -363,12 +370,48 @@ YcdTimer.prototype.changeColor = function() {
|
|
363 |
if (!timerColor.length) {
|
364 |
return false;
|
365 |
}
|
366 |
-
|
367 |
change: function() {
|
368 |
var val = jQuery(this).val();
|
369 |
jQuery('.ycd-timer-box span').css({color: val})
|
370 |
}
|
371 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
};
|
373 |
|
374 |
YcdTimer.prototype.changeContnetPadding = function() {
|
143 |
var id = this.getId();
|
144 |
var that = this;
|
145 |
var button = jQuery('.ycd-timer-start-stop-'+id);
|
146 |
+
var resetButton = jQuery('.ycd-timer-reset-'+id);
|
147 |
|
148 |
+
button.bind('click', function (e) {
|
149 |
+
e.preventDefault();
|
150 |
var status = jQuery(this).data('status');
|
151 |
var title = status ? jQuery(this).data('start') : jQuery(this).data('stop');
|
152 |
jQuery(this).text(title);
|
160 |
}
|
161 |
jQuery(this).data('status', status);
|
162 |
});
|
163 |
+
|
164 |
+
resetButton.bind('click', function(e) {
|
165 |
+
e.preventDefault();
|
166 |
+
that.resetTimer();
|
167 |
+
})
|
168 |
};
|
169 |
|
170 |
YcdTimer.prototype.startTimer = function() {
|
370 |
if (!timerColor.length) {
|
371 |
return false;
|
372 |
}
|
373 |
+
timerColor.minicolors({
|
374 |
change: function() {
|
375 |
var val = jQuery(this).val();
|
376 |
jQuery('.ycd-timer-box span').css({color: val})
|
377 |
}
|
378 |
+
});
|
379 |
+
|
380 |
+
var stopBgColor = jQuery('#ycd-timer-stop-bg-color');
|
381 |
+
|
382 |
+
stopBgColor.minicolors({
|
383 |
+
change: function() {
|
384 |
+
var val = jQuery(this).val();
|
385 |
+
jQuery('.ycd-timer-start-stop').css({'background-color': val})
|
386 |
+
}
|
387 |
+
});
|
388 |
+
|
389 |
+
var stopColor = jQuery('#ycd-timer-stop-color');
|
390 |
+
|
391 |
+
stopColor.minicolors({
|
392 |
+
change: function() {
|
393 |
+
var val = jQuery(this).val();
|
394 |
+
jQuery('.ycd-timer-start-stop').css({color: val})
|
395 |
+
}
|
396 |
+
});
|
397 |
+
|
398 |
+
var resetBgColor = jQuery('#ycd-timer-reset-bg-color');
|
399 |
+
|
400 |
+
resetBgColor.minicolors({
|
401 |
+
change: function() {
|
402 |
+
var val = jQuery(this).val();
|
403 |
+
jQuery('.ycd-timer-reset').css({'background-color': val})
|
404 |
+
}
|
405 |
+
});
|
406 |
+
|
407 |
+
var resetColor = jQuery('#ycd-timer-reset-color');
|
408 |
+
|
409 |
+
resetColor.minicolors({
|
410 |
+
change: function() {
|
411 |
+
var val = jQuery(this).val();
|
412 |
+
jQuery('.ycd-timer-reset').css({color: val})
|
413 |
+
}
|
414 |
+
});
|
415 |
};
|
416 |
|
417 |
YcdTimer.prototype.changeContnetPadding = function() {
|
assets/views/timerMainView.php
CHANGED
@@ -27,160 +27,221 @@ $textFontFamily = $this->getOptionValue('ycd-text-font-family');
|
|
27 |
<input type="number" name="ycd-timer-seconds" id="ycdTimeSeconds" min="0" max="60" class="form-control ycd-timer-time-settings" data-type="seconds" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-seconds'))?>">
|
28 |
</div>
|
29 |
</div>
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
<div class="row form-group">
|
54 |
<div class="col-md-6">
|
55 |
-
<label for="ycd-timer-
|
56 |
</div>
|
57 |
-
<div class="col-md-4 ycd-timer-font-size">
|
58 |
-
<
|
|
|
|
|
59 |
</div>
|
60 |
</div>
|
61 |
<div class="row form-group">
|
62 |
<div class="col-md-6">
|
63 |
-
<label for="ycd-timer-
|
64 |
-
</div>
|
65 |
-
<div class="col-md-4 ycd-timer-font-size">
|
66 |
-
<
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
</div>
|
96 |
</div>
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
<?php echo AdminHelper::selectBox($defaultData['font-family'], esc_attr($textFontFamily), array('name' => 'ycd-text-font-family', 'class' => 'js-ycd-select js-countdown-font-family')); ?>
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
<?php echo AdminHelper::selectBox($defaultData['bg-image-size'], esc_attr($this->getOptionValue('ycd-bg-image-size')), array('name' => 'ycd-bg-image-size', 'class' => 'js-ycd-select js-ycd-bg-size')); ?>
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
<?php echo AdminHelper::selectBox($defaultData['bg-image-repeat'], esc_attr($this->getOptionValue('ycd-bg-image-repeat')), array('name' => 'ycd-bg-image-repeat', 'class' => 'js-ycd-select js-bg-image-repeat')); ?>
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
</div>
|
185 |
|
186 |
<?php
|
27 |
<input type="number" name="ycd-timer-seconds" id="ycdTimeSeconds" min="0" max="60" class="form-control ycd-timer-time-settings" data-type="seconds" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-seconds'))?>">
|
28 |
</div>
|
29 |
</div>
|
30 |
+
<div class="row form-group">
|
31 |
+
<div class="col-md-6">
|
32 |
+
<label for="ycd-countdown-timer-button" class="ycd-label-of-switch"><?php _e('Enable Button', YCD_TEXT_DOMAIN); ?></label>
|
33 |
+
</div>
|
34 |
+
<div class="col-md-6">
|
35 |
+
<label class="ycd-switch">
|
36 |
+
<input type="checkbox" id="ycd-countdown-timer-button" name="ycd-countdown-timer-button" class="ycd-accordion-checkbox" <?php echo $this->getOptionValue('ycd-countdown-timer-button'); ?>>
|
37 |
+
<span class="ycd-slider ycd-round"></span>
|
38 |
+
</label>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<div class="ycd-accordion-content ycd-hide-content">
|
42 |
+
<div class="row form-group">
|
43 |
+
<div class="col-md-6">
|
44 |
+
<label for="ycd-timer-auto-counting" ><?php _e('enable autocounting', YCD_TEXT_DOMAIN); ?></label>
|
45 |
+
</div>
|
46 |
+
<div class="col-md-4 ycd-timer-font-size">
|
47 |
+
<label class="ycd-switch">
|
48 |
+
<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'); ?>>
|
49 |
+
<span class="ycd-slider ycd-round"></span>
|
50 |
+
</label>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<div class="row form-group">
|
54 |
+
<div class="col-md-6">
|
55 |
+
<label for="ycd-timer-button-start-title" ><?php _e('start label', YCD_TEXT_DOMAIN); ?></label>
|
56 |
+
</div>
|
57 |
+
<div class="col-md-4 ycd-timer-font-size">
|
58 |
+
<input id="ycd-timer-button-start-title" type="text" class="form-control" name="ycd-timer-button-start-title" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-button-start-title')); ?>">
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
<div class="row form-group">
|
62 |
+
<div class="col-md-6">
|
63 |
+
<label for="ycd-timer-button-stop-title" ><?php _e('stop label', YCD_TEXT_DOMAIN); ?></label>
|
64 |
+
</div>
|
65 |
+
<div class="col-md-4 ycd-timer-font-size">
|
66 |
+
<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')); ?>">
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
<div class="row form-group">
|
70 |
<div class="col-md-6">
|
71 |
+
<label for="ycd-timer-stop-bg-color" ><?php _e('background color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
|
72 |
</div>
|
73 |
+
<div class="col-md-4 ycd-timer-font-size ycd-option-wrapper<?php echo $isPro; ?>">
|
74 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
75 |
+
<input type="text" id="ycd-timer-stop-bg-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-timer-stop-bg-color" class="minicolors-input form-control js-ycd-timer-stop-bg-color" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-stop-bg-color')); ?>">
|
76 |
+
</div>
|
77 |
</div>
|
78 |
</div>
|
79 |
<div class="row form-group">
|
80 |
<div class="col-md-6">
|
81 |
+
<label for="ycd-timer-stop-color" ><?php _e('color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
|
82 |
+
</div>
|
83 |
+
<div class="col-md-4 ycd-timer-font-size ycd-option-wrapper<?php echo $isPro; ?>">
|
84 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
85 |
+
<input type="text" id="ycd-timer-stop-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-timer-stop-color" class="minicolors-input form-control js-ycd-timer-stop-color" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-stop-color')); ?>">
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<div class="row form-group">
|
90 |
+
<div class="col-md-6">
|
91 |
+
<label for="ycd-timer-reset-button" ><?php _e('enable reset button', YCD_TEXT_DOMAIN); ?></label>
|
92 |
+
</div>
|
93 |
+
<div class="col-md-4 ycd-timer-font-size">
|
94 |
+
<label class="ycd-switch">
|
95 |
+
<input type="checkbox" id="ycd-timer-reset-button" name="ycd-timer-reset-button" class="ycd-accordion-checkbox" <?php echo $this->getOptionValue('ycd-timer-reset-button'); ?>>
|
96 |
+
<span class="ycd-slider ycd-round"></span>
|
97 |
+
</label>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
<div class="ycd-accordion-content ycd-hide-content">
|
101 |
+
<div class="row form-group">
|
102 |
+
<div class="col-md-6">
|
103 |
+
<label for="ycd-timer-reset-button-label" ><?php _e('label', YCD_TEXT_DOMAIN); ?></label>
|
104 |
+
</div>
|
105 |
+
<div class="col-md-4 ycd-timer-font-size">
|
106 |
+
<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')); ?>">
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
<div class="row form-group">
|
110 |
+
<div class="col-md-6">
|
111 |
+
<label for="ycd-timer-reset-bg-color" ><?php _e('background color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
|
112 |
+
</div>
|
113 |
+
<div class="col-md-4 ycd-timer-font-size ycd-option-wrapper<?php echo $isPro; ?>">
|
114 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
115 |
+
<input type="text" id="ycd-timer-reset-bg-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-timer-reset-bg-color" class="minicolors-input form-control js-ycd-timer-reset-bg-color" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-reset-bg-color')); ?>">
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
<div class="row form-group">
|
120 |
+
<div class="col-md-6">
|
121 |
+
<label for="ycd-timer-reset-color" ><?php _e('color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
|
122 |
+
</div>
|
123 |
+
<div class="col-md-4 ycd-timer-font-size ycd-option-wrapper<?php echo $isPro; ?>">
|
124 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
125 |
+
<input type="text" id="ycd-timer-reset-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-timer-reset-color" class="minicolors-input form-control js-ycd-timer-reset-color" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-reset-color')); ?>">
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
</div>
|
129 |
</div>
|
130 |
+
</div>
|
131 |
+
<div class="row form-group">
|
132 |
+
<div class="col-md-6">
|
133 |
+
<label for="ycd-countdown-end-sound" class="ycd-label-of-switch"><?php _e('Timer End Sound', YCD_TEXT_DOMAIN); ?></label>
|
134 |
+
</div>
|
135 |
+
<div class="col-md-6">
|
136 |
+
<label class="ycd-switch">
|
137 |
+
<input type="checkbox" id="ycd-countdown-end-sound" name="ycd-countdown-end-sound" class="ycd-accordion-checkbox" <?php echo $this->getOptionValue('ycd-countdown-end-sound'); ?>>
|
138 |
+
<span class="ycd-slider ycd-round"></span>
|
139 |
+
</label>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
<!-- Timer end sound sub options -->
|
143 |
+
<div class="ycd-accordion-content ycd-hide-content">
|
144 |
+
<div class="row form-group">
|
145 |
+
<div class="col-md-2">
|
146 |
+
<input id="js-upload-countdown-end-sound" class="btn btn-sm" type="button" value="<?php _e('Change sound', YCD_TEXT_DOMAIN); ?>">
|
147 |
+
</div>
|
148 |
+
<div class="col-md-4">
|
149 |
+
<input type="button" data-default-song="<?= $this->getDefaultValue('ycd-countdown-end-sound-url'); ?>" id="js-reset-to-default-song" class="btn btn-sm btn-danger" value="<?php _e('Reset', YCD_TEXT_DOMAIN); ?>">
|
150 |
+
</div>
|
151 |
+
<div class="col-md-5">
|
152 |
+
<input type="text" id="js-sound-open-url" readonly="" class="form-control input-sm" name="ycd-countdown-end-sound-url" value="<?= esc_attr($this->getOptionValue('ycd-countdown-end-sound-url')); ?>">
|
153 |
+
</div>
|
154 |
+
<div class="col-md-1">
|
155 |
+
<span class="dashicons dashicons-controls-volumeon js-preview-sound"></span>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
<!-- Timer end sound sub options end -->
|
160 |
+
<div class="row form-group">
|
161 |
+
<div class="col-md-6">
|
162 |
+
<label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Font Family', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
163 |
+
</div>
|
164 |
+
<div class="col-md-4 ycd-option-wrapper<?php echo $isPro; ?>">
|
165 |
<?php echo AdminHelper::selectBox($defaultData['font-family'], esc_attr($textFontFamily), array('name' => 'ycd-text-font-family', 'class' => 'js-ycd-select js-countdown-font-family')); ?>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
<div class="row form-group">
|
169 |
+
<div class="col-md-6">
|
170 |
+
<label for="ycd-timer-font-size" ><?php _e('Font Size', YCD_TEXT_DOMAIN); ?></label>
|
171 |
+
</div>
|
172 |
+
<div class="col-md-4 ycd-timer-font-size">
|
173 |
+
<input id="ycd-js-digital-font-size" type="text" name="ycd-timer-font-size" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-font-size')); ?>">
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
+
<div class="row form-group">
|
177 |
+
<div class="col-md-6">
|
178 |
+
<label for="ycd-timer-content-padding" ><?php _e('Content Padding', YCD_TEXT_DOMAIN); ?></label>
|
179 |
+
</div>
|
180 |
+
<div class="col-md-4 ycd-timer-font-size">
|
181 |
+
<input id="ycd-timer-content-padding" class="form-control" type="text" name="ycd-timer-content-padding" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-content-padding')); ?>">
|
182 |
+
</div>
|
183 |
+
<div class="col-md-1">
|
184 |
+
<label><?php _e('px', YCD_TEXT_DOMAIN); ?></label>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
<div class="row form-group">
|
188 |
+
<div class="col-md-6">
|
189 |
+
<label for="ycd-timer-content-alignment" ><?php _e('Alignment', YCD_TEXT_DOMAIN); ?></label>
|
190 |
+
</div>
|
191 |
+
<div class="col-md-4 ycd-timer-font-size">
|
192 |
+
<?php echo AdminHelper::selectBox($defaultData['horizontal-alignment'], esc_attr($this->getOptionValue('ycd-timer-content-alignment')), array('name' => 'ycd-timer-content-alignment', 'class' => 'js-ycd-select ycd-timer-content-alignment')); ?>
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
<div class="row form-group">
|
196 |
+
<div class="col-md-6">
|
197 |
+
<label for="ycd-timer-color" ><?php _e('Numbers Color', YCD_TEXT_DOMAIN); echo $proSpan; ?> </label>
|
198 |
+
</div>
|
199 |
+
<div class="col-md-4 ycd-timer-font-size ycd-option-wrapper<?php echo $isPro; ?>">
|
200 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
201 |
+
<input type="text" id="ycd-timer-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-timer-color" class="minicolors-input form-control js-ycd-timer-color" value="<?php echo esc_attr($this->getOptionValue('ycd-timer-color')); ?>">
|
202 |
+
</div>
|
203 |
+
</div>
|
204 |
+
</div>
|
205 |
+
<div class="row form-group">
|
206 |
+
<div class="col-md-6">
|
207 |
+
<label for="ycd-timer-bg-image" class="ycd-label-of-switch"><?php _e('Background Image', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
208 |
+
</div>
|
209 |
+
<div class="col-md-6 ycd-circles-width-wrapper ycd-option-wrapper<?php echo $isPro; ?>">
|
210 |
+
<label class="ycd-switch">
|
211 |
+
<input type="checkbox" id="ycd-timer-bg-image" name="ycd-timer-bg-image" class="ycd-accordion-checkbox js-ycd-bg-image" <?php echo $this->getOptionValue('ycd-timer-bg-image'); ?>>
|
212 |
+
<span class="ycd-slider ycd-round"></span>
|
213 |
+
</label>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
<div class="ycd-accordion-content ycd-hide-content">
|
217 |
+
<div class="row form-group">
|
218 |
+
<div class="col-md-6">
|
219 |
+
<label for="" class="ycd-label-of-select"><?php _e('Background Size', YCD_TEXT_DOMAIN); ?></label>
|
220 |
+
</div>
|
221 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
222 |
<?php echo AdminHelper::selectBox($defaultData['bg-image-size'], esc_attr($this->getOptionValue('ycd-bg-image-size')), array('name' => 'ycd-bg-image-size', 'class' => 'js-ycd-select js-ycd-bg-size')); ?>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
<div class="row form-group">
|
226 |
+
<div class="col-md-6">
|
227 |
+
<label for="" class="ycd-label-of-select"><?php _e('Background Repeat', YCD_TEXT_DOMAIN); ?></label>
|
228 |
+
</div>
|
229 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
230 |
<?php echo AdminHelper::selectBox($defaultData['bg-image-repeat'], esc_attr($this->getOptionValue('ycd-bg-image-repeat')), array('name' => 'ycd-bg-image-repeat', 'class' => 'js-ycd-select js-bg-image-repeat')); ?>
|
231 |
+
</div>
|
232 |
+
</div>
|
233 |
+
<div class="row form-group">
|
234 |
+
<div class="col-md-6">
|
235 |
+
<input id="js-upload-image-button" class="button js-countdown-image-btn" type="button" value="<?php _e('Select Image', YCD_TEXT_DOMAIN)?>">
|
236 |
+
</div>
|
237 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
238 |
+
<input type="url" name="ycd-bg-image-url" id="ycd-bg-image-url" class="form-control" value="<?php echo esc_attr($this->getOptionValue('ycd-bg-image-url')); ?>">
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
<?php
|
243 |
+
require_once YCD_VIEWS_PATH.'preview.php';
|
244 |
+
?>
|
245 |
</div>
|
246 |
|
247 |
<?php
|
classes/countdown/TimerCountdown.php
CHANGED
@@ -70,6 +70,12 @@ class TimerCountdown extends Countdown {
|
|
70 |
$bgImageSize = $this->getOptionValue('ycd-bg-image-size');
|
71 |
$imageRepeat = $this->getOptionValue('ycd-bg-image-repeat');
|
72 |
$textAlign = $this->getOptionValue('ycd-timer-content-alignment');
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
ob_start();
|
74 |
?>
|
75 |
<style type="text/css" id="ycd-digit-font-family-<?php echo $id; ?>">
|
@@ -87,6 +93,16 @@ class TimerCountdown extends Countdown {
|
|
87 |
padding: <?php echo $timerContentPadding ?>;
|
88 |
}
|
89 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
<style type="text/css">
|
91 |
.ycd-timer-wrapper-<?php echo $id; ?> .ycd-timer-box > span {
|
92 |
color: <?php echo $timerColor; ?>
|
@@ -113,6 +129,8 @@ class TimerCountdown extends Countdown {
|
|
113 |
$startTitle = $this->getOptionValue('ycd-timer-button-start-title');
|
114 |
$stopTitle = $this->getOptionValue('ycd-timer-button-stop-title');
|
115 |
$autoCounting = (bool)$this->getOptionValue('ycd-timer-auto-counting');
|
|
|
|
|
116 |
$buttonTitle = ($autoCounting) ? $stopTitle: $startTitle;
|
117 |
ob_start();
|
118 |
?>
|
@@ -125,11 +143,14 @@ class TimerCountdown extends Countdown {
|
|
125 |
<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>
|
126 |
</div>
|
127 |
</div>
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
133 |
<?php echo $this->renderSubscriptionForm(); ?>
|
134 |
<?php echo $this->renderProgressBar(); ?>
|
135 |
</div>
|
70 |
$bgImageSize = $this->getOptionValue('ycd-bg-image-size');
|
71 |
$imageRepeat = $this->getOptionValue('ycd-bg-image-repeat');
|
72 |
$textAlign = $this->getOptionValue('ycd-timer-content-alignment');
|
73 |
+
|
74 |
+
$startStopBgColor = $this->getOptionValue('ycd-timer-stop-bg-color');
|
75 |
+
$startStopColor = $this->getOptionValue('ycd-timer-stop-color');
|
76 |
+
|
77 |
+
$resetBgColor = $this->getOptionValue('ycd-timer-reset-bg-color');
|
78 |
+
$resetColor = $this->getOptionValue('ycd-timer-reset-color');
|
79 |
ob_start();
|
80 |
?>
|
81 |
<style type="text/css" id="ycd-digit-font-family-<?php echo $id; ?>">
|
93 |
padding: <?php echo $timerContentPadding ?>;
|
94 |
}
|
95 |
</style>
|
96 |
+
<style type="text/css" id="ycd-timer-content-padding-<?php echo $id; ?>">
|
97 |
+
.ycd-countdown-wrapper .ycd-timer-start-stop-<?php echo $id; ?> {
|
98 |
+
background-color: <?php echo $startStopBgColor ?>;
|
99 |
+
color: <?php echo $startStopColor ?>;
|
100 |
+
}
|
101 |
+
.ycd-countdown-wrapper .ycd-timer-reset-<?php echo $id; ?> {
|
102 |
+
background-color: <?php echo $resetBgColor ?>;
|
103 |
+
color: <?php echo $resetColor ?>;
|
104 |
+
}
|
105 |
+
</style>
|
106 |
<style type="text/css">
|
107 |
.ycd-timer-wrapper-<?php echo $id; ?> .ycd-timer-box > span {
|
108 |
color: <?php echo $timerColor; ?>
|
129 |
$startTitle = $this->getOptionValue('ycd-timer-button-start-title');
|
130 |
$stopTitle = $this->getOptionValue('ycd-timer-button-stop-title');
|
131 |
$autoCounting = (bool)$this->getOptionValue('ycd-timer-auto-counting');
|
132 |
+
$resetButton = (bool)$this->getOptionValue('ycd-timer-reset-button');
|
133 |
+
$resetButtonLabel = $this->getOptionValue('ycd-timer-reset-button-label');
|
134 |
$buttonTitle = ($autoCounting) ? $stopTitle: $startTitle;
|
135 |
ob_start();
|
136 |
?>
|
143 |
<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>
|
144 |
</div>
|
145 |
</div>
|
146 |
+
<div class="ycd-timmer-buttons ycd-timmer-buttons-<?php echo esc_attr($id); ?>">
|
147 |
+
<?php if (!empty($timerButton)): ?>
|
148 |
+
<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>
|
149 |
+
<?php endif; ?>
|
150 |
+
<?php if (!empty($resetButton)): ?>
|
151 |
+
<button class="ycd-timer-reset ycd-timer-reset-<?php echo esc_attr($id); ?>"><?php echo esc_attr($resetButtonLabel); ?></button>
|
152 |
+
<?php endif; ?>
|
153 |
+
</div>
|
154 |
<?php echo $this->renderSubscriptionForm(); ?>
|
155 |
<?php echo $this->renderProgressBar(); ?>
|
156 |
</div>
|
config/config.php
CHANGED
@@ -56,8 +56,8 @@ class YcdCountdownConfig {
|
|
56 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
57 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
58 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
59 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
60 |
-
self::addDefine('YCD_VERSION', 1.
|
61 |
self::addDefine('YCD_FREE_VERSION', 1);
|
62 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
63 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
56 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
57 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
58 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
59 |
+
self::addDefine('YCD_VERSION_PRO', 1.39);
|
60 |
+
self::addDefine('YCD_VERSION', 1.53);
|
61 |
self::addDefine('YCD_FREE_VERSION', 1);
|
62 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
63 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
config/optionsConfig.php
CHANGED
@@ -215,6 +215,8 @@ class YcdCountdownOptionsConfig {
|
|
215 |
$options[] = array('name' => 'ycd-timer-auto-counting', 'type' => 'checkbox', 'defaultValue' => 'on');
|
216 |
$options[] = array('name' => 'ycd-timer-button-start-title', 'type' => 'text', 'defaultValue' => __('Start', YCD_TEXT_DOMAIN));
|
217 |
$options[] = array('name' => 'ycd-timer-button-stop-title', 'type' => 'text', 'defaultValue' => __('Stop', YCD_TEXT_DOMAIN));
|
|
|
|
|
218 |
|
219 |
$YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
|
220 |
}
|
215 |
$options[] = array('name' => 'ycd-timer-auto-counting', 'type' => 'checkbox', 'defaultValue' => 'on');
|
216 |
$options[] = array('name' => 'ycd-timer-button-start-title', 'type' => 'text', 'defaultValue' => __('Start', YCD_TEXT_DOMAIN));
|
217 |
$options[] = array('name' => 'ycd-timer-button-stop-title', 'type' => 'text', 'defaultValue' => __('Stop', YCD_TEXT_DOMAIN));
|
218 |
+
$options[] = array('name' => 'ycd-timer-reset-button', 'type' => 'checkbox', 'defaultValue' => '');
|
219 |
+
$options[] = array('name' => 'ycd-timer-reset-button-label', 'type' => 'text', 'defaultValue' => __('Reset', YCD_TEXT_DOMAIN));
|
220 |
|
221 |
$YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
|
222 |
}
|
countdown-builder.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Countdown builder
|
4 |
* Description: The best countdown plugin
|
5 |
-
* Version: 1.5.
|
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.5.3
|
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.2.2
|
6 |
-
Stable tag: 1.5.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -64,6 +64,12 @@ You need to select the .zip file, there is no need to extract the zip file, just
|
|
64 |
|
65 |
|
66 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
= 1.5.2 =
|
68 |
* Enable Timer Button (new)
|
69 |
* Enable/Disable auto counting
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 5.2.2
|
6 |
+
Stable tag: 1.5.3
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
64 |
|
65 |
|
66 |
== Changelog ==
|
67 |
+
= 1.5.3 =
|
68 |
+
* Timer reset button
|
69 |
+
* Timer buttons colors customization
|
70 |
+
* Circle countdown popup on load event
|
71 |
+
* Flipclock countdown popup on load event
|
72 |
+
|
73 |
= 1.5.2 =
|
74 |
* Enable Timer Button (new)
|
75 |
* Enable/Disable auto counting
|