Countdown, Coming Soon – Countdown & Clock - Version 2.3.9.9

Version Description

Download this release

Release Info

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

Code changes from version 2.3.9.8 to 2.3.9.9

assets/js/Countdown.js CHANGED
@@ -811,7 +811,7 @@ YcdCountdown.prototype.render = function(currentCountdown) {
811
  YcdCountdown.prototype.runCountdown = function (currentCountdown) {
812
  var options = this.getOptions();
813
  var allOptions = this.getAllOptions();
814
-
815
  function countdownComplete(unit, value, total){
816
 
817
  if(total <= 0){
811
  YcdCountdown.prototype.runCountdown = function (currentCountdown) {
812
  var options = this.getOptions();
813
  var allOptions = this.getAllOptions();
814
+ console.log(allOptions);
815
  function countdownComplete(unit, value, total){
816
 
817
  if(total <= 0){
assets/views/afterExpire.php CHANGED
@@ -3,6 +3,7 @@ use ycd\MultipleChoiceButton;
3
  use ycd\AdminHelper;
4
 
5
  $defaultData = AdminHelper::defaultData();
 
6
  ?>
7
  <div class="ycd-bootstrap-wrapper">
8
  <div class="row form-group">
@@ -15,6 +16,7 @@ $defaultData = AdminHelper::defaultData();
15
  <div class="ycd-multichoice-wrapper">
16
  <?php
17
  $multipleChoiceButton = new MultipleChoiceButton($defaultData['countdownExpireTime'], esc_attr($this->getOptionValue('ycd-countdown-expire-behavior')));
 
18
  ?>
19
  </div>
20
  <div id="ycd-countdown-show-text" class="ycd-countdown-show-text ycd-hide">
3
  use ycd\AdminHelper;
4
 
5
  $defaultData = AdminHelper::defaultData();
6
+ $allowed_html = AdminHelper::getAllowedTags();
7
  ?>
8
  <div class="ycd-bootstrap-wrapper">
9
  <div class="row form-group">
16
  <div class="ycd-multichoice-wrapper">
17
  <?php
18
  $multipleChoiceButton = new MultipleChoiceButton($defaultData['countdownExpireTime'], esc_attr($this->getOptionValue('ycd-countdown-expire-behavior')));
19
+ echo wp_kses($multipleChoiceButton, $allowed_html);
20
  ?>
21
  </div>
22
  <div id="ycd-countdown-show-text" class="ycd-countdown-show-text ycd-hide">
assets/views/cricleMainView.php CHANGED
@@ -6,6 +6,7 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
6
  $isPro = '-pro';
7
  $proSpan = '<span class="ycd-pro-span">'.__('pro', YCD_TEXT_DOMAIN).'</span>';
8
  }
 
9
  $defaultData = AdminHelper::defaultData();
10
  $animation = $typeObj->getOptionValue('ycd-circle-animation');
11
  $countdownWidth = $typeObj->getOptionValue('ycd-countdown-width');
@@ -72,7 +73,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
72
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Font Size', YCD_TEXT_DOMAIN); ?></label>
73
  </div>
74
  <div class="col-md-7">
75
- <?php AdminHelper::selectBox($defaultData['font-size'], esc_attr($textFontSize), array('name' => 'ycd-text-font-size', 'class' => 'js-ycd-select js-countdown-font-size')); ?>
 
 
 
76
  </div>
77
  </div>
78
  <div class="row form-group">
@@ -80,7 +84,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
80
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Margin Top', YCD_TEXT_DOMAIN); ?></label>
81
  </div>
82
  <div class="col-md-7">
83
- <?php AdminHelper::selectBox($defaultData['circleTextMarginTop'], esc_attr($this->getOptionValue('ycd-text-margin-top')), array('name' => 'ycd-text-margin-top', 'class' => 'js-ycd-select js-countdown-text-margin-top js-countdown-text-style')); ?>
 
 
 
84
  </div>
85
  </div>
86
  <div class="row form-group">
@@ -88,7 +95,9 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
88
  <label for="ycd-countdown-font-weight" class="ycd-label-of-select"><?php _e('Font Weight', YCD_TEXT_DOMAIN); ?></label>
89
  </div>
90
  <div class="col-md-7">
91
- <?php AdminHelper::selectBox($defaultData['font-weight'], esc_attr($countdownFontWeight), array('name' => 'ycd-countdown-font-weight', 'class' => 'js-ycd-select js-countdown-font-weight')); ?>
 
 
92
  </div>
93
  </div>
94
  <div class="row form-group">
@@ -96,7 +105,9 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
96
  <label for="ycd-countdown-font-style" class="ycd-label-of-select"><?php _e('Font Style', YCD_TEXT_DOMAIN); ?></label>
97
  </div>
98
  <div class="col-md-7">
99
- <?php AdminHelper::selectBox($defaultData['font-style'], esc_attr($countdownFontStyle), array('name' => 'ycd-countdown-font-style', 'class' => 'js-ycd-select js-countdown-font-style')); ?>
 
 
100
  </div>
101
  </div>
102
  <div class="row form-group">
@@ -104,7 +115,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
104
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Font Family', YCD_TEXT_DOMAIN); ?></label>
105
  </div>
106
  <div class="col-md-7 ycd-option-wrapper<?php echo esc_attr($isPro); ?>">
107
- <?php AdminHelper::selectBox($defaultData['font-family'], esc_attr($textFontFamily), array('name' => 'ycd-text-font-family', 'class' => 'js-ycd-select js-countdown-font-family ycd-custom-value-accordion', 'data-custom' => 'customFont')); ?>
 
 
 
108
  </div>
109
  </div>
110
  <div class="ycd-accordion-content ycd-hide-content">
@@ -129,7 +143,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
129
  <label for="ycd-countdown-number-size" class="ycd-label-of-select"><?php _e('Font Size', YCD_TEXT_DOMAIN); ?></label>
130
  </div>
131
  <div class="col-md-7">
132
- <?php AdminHelper::selectBox($defaultData['font-size-number'], esc_attr($this->getOptionValue('ycd-countdown-number-size')), array('name' => 'ycd-countdown-number-size', 'class' => 'js-ycd-select js-countdown-number-size')); ?>
 
 
 
133
  </div>
134
  </div>
135
  <div class="row form-group">
@@ -137,7 +154,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
137
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Margin Top', YCD_TEXT_DOMAIN); ?></label>
138
  </div>
139
  <div class="col-md-7">
140
- <?php AdminHelper::selectBox($defaultData['circleNumberMarginTop'], esc_attr($this->getOptionValue('ycd-number-margin-top')), array('name' => 'ycd-number-margin-top', 'class' => 'js-ycd-select js-countdown-number-margin-bottom js-countdown-number-style')); ?>
 
 
 
141
  </div>
142
  </div>
143
  <div class="row form-group">
@@ -145,7 +165,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
145
  <label for="ycd-countdown-number-font-weight" class="ycd-label-of-select"><?php _e('Font Weight', YCD_TEXT_DOMAIN); ?></label>
146
  </div>
147
  <div class="col-md-7">
148
- <?php AdminHelper::selectBox($defaultData['font-weight'], esc_attr($this->getOptionValue('ycd-countdown-number-font-weight')), array('name' => 'ycd-countdown-number-font-weight', 'class' => 'js-ycd-select js-countdown-number-font-weight')); ?>
 
 
 
149
  </div>
150
  </div>
151
  <div class="row form-group">
@@ -153,7 +176,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
153
  <label for="ycd-countdown-number-font-style" class="ycd-label-of-select"><?php _e('Font Style', YCD_TEXT_DOMAIN); ?></label>
154
  </div>
155
  <div class="col-md-7">
156
- <?php AdminHelper::selectBox($defaultData['font-style'], esc_attr($this->getOptionValue('ycd-countdown-number-font-style')), array('name' => 'ycd-countdown-number-font-style', 'class' => 'js-ycd-select js-countdown-number-font-style')); ?>
 
 
 
157
  </div>
158
  </div>
159
  <div class="row form-group">
@@ -161,7 +187,10 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
161
  <label for="ycd-countdown-number-font" class="ycd-label-of-select"><?php _e('Font Family', YCD_TEXT_DOMAIN); ?></label>
162
  </div>
163
  <div class="col-md-7 ycd-option-wrapper<?php echo esc_attr($isPro); ?>">
164
- <?php AdminHelper::selectBox($defaultData['font-family'], esc_attr($this->getOptionValue('ycd-countdown-number-font')), array('name' => 'ycd-countdown-number-font', 'class' => 'js-ycd-select js-countdown-number-font ycd-custom-value-accordion', 'data-custom' => 'customFont')); ?>
 
 
 
165
  </div>
166
  </div>
167
  <div class="ycd-accordion-content ycd-hide-content">
6
  $isPro = '-pro';
7
  $proSpan = '<span class="ycd-pro-span">'.__('pro', YCD_TEXT_DOMAIN).'</span>';
8
  }
9
+ $allowed_html = AdminHelper::getAllowedTags();
10
  $defaultData = AdminHelper::defaultData();
11
  $animation = $typeObj->getOptionValue('ycd-circle-animation');
12
  $countdownWidth = $typeObj->getOptionValue('ycd-countdown-width');
73
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Font Size', YCD_TEXT_DOMAIN); ?></label>
74
  </div>
75
  <div class="col-md-7">
76
+ <?php
77
+ $fontSize = AdminHelper::selectBox($defaultData['font-size'], esc_attr($textFontSize), array('name' => 'ycd-text-font-size', 'class' => 'js-ycd-select js-countdown-font-size'));
78
+ echo wp_kses($fontSize, $allowed_html);
79
+ ?>
80
  </div>
81
  </div>
82
  <div class="row form-group">
84
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Margin Top', YCD_TEXT_DOMAIN); ?></label>
85
  </div>
86
  <div class="col-md-7">
87
+ <?php
88
+ $circleMarginTop = AdminHelper::selectBox($defaultData['circleTextMarginTop'], esc_attr($this->getOptionValue('ycd-text-margin-top')), array('name' => 'ycd-text-margin-top', 'class' => 'js-ycd-select js-countdown-text-margin-top js-countdown-text-style'));
89
+ echo wp_kses($circleMarginTop, $allowed_html);
90
+ ?>
91
  </div>
92
  </div>
93
  <div class="row form-group">
95
  <label for="ycd-countdown-font-weight" class="ycd-label-of-select"><?php _e('Font Weight', YCD_TEXT_DOMAIN); ?></label>
96
  </div>
97
  <div class="col-md-7">
98
+ <?php $fontWeight = AdminHelper::selectBox($defaultData['font-weight'], esc_attr($countdownFontWeight), array('name' => 'ycd-countdown-font-weight', 'class' => 'js-ycd-select js-countdown-font-weight'));
99
+ echo wp_kses($fontWeight, $allowed_html);
100
+ ?>
101
  </div>
102
  </div>
103
  <div class="row form-group">
105
  <label for="ycd-countdown-font-style" class="ycd-label-of-select"><?php _e('Font Style', YCD_TEXT_DOMAIN); ?></label>
106
  </div>
107
  <div class="col-md-7">
108
+ <?php $fontStyle = AdminHelper::selectBox($defaultData['font-style'], esc_attr($countdownFontStyle), array('name' => 'ycd-countdown-font-style', 'class' => 'js-ycd-select js-countdown-font-style'));
109
+ echo wp_kses($fontStyle, $allowed_html);
110
+ ?>
111
  </div>
112
  </div>
113
  <div class="row form-group">
115
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Font Family', YCD_TEXT_DOMAIN); ?></label>
116
  </div>
117
  <div class="col-md-7 ycd-option-wrapper<?php echo esc_attr($isPro); ?>">
118
+ <?php
119
+ $fontFamily = AdminHelper::selectBox($defaultData['font-family'], esc_attr($textFontFamily), array('name' => 'ycd-text-font-family', 'class' => 'js-ycd-select js-countdown-font-family ycd-custom-value-accordion', 'data-custom' => 'customFont'));
120
+ echo wp_kses($fontFamily, $allowed_html);
121
+ ?>
122
  </div>
123
  </div>
124
  <div class="ycd-accordion-content ycd-hide-content">
143
  <label for="ycd-countdown-number-size" class="ycd-label-of-select"><?php _e('Font Size', YCD_TEXT_DOMAIN); ?></label>
144
  </div>
145
  <div class="col-md-7">
146
+ <?php
147
+ $fontSizeNumber = AdminHelper::selectBox($defaultData['font-size-number'], esc_attr($this->getOptionValue('ycd-countdown-number-size')), array('name' => 'ycd-countdown-number-size', 'class' => 'js-ycd-select js-countdown-number-size'));
148
+ echo wp_kses($fontSizeNumber, $allowed_html);
149
+ ?>
150
  </div>
151
  </div>
152
  <div class="row form-group">
154
  <label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Margin Top', YCD_TEXT_DOMAIN); ?></label>
155
  </div>
156
  <div class="col-md-7">
157
+ <?php
158
+ $cirlceMarginTop = AdminHelper::selectBox($defaultData['circleNumberMarginTop'], esc_attr($this->getOptionValue('ycd-number-margin-top')), array('name' => 'ycd-number-margin-top', 'class' => 'js-ycd-select js-countdown-number-margin-bottom js-countdown-number-style'));
159
+ echo wp_kses($cirlceMarginTop, $allowed_html);
160
+ ?>
161
  </div>
162
  </div>
163
  <div class="row form-group">
165
  <label for="ycd-countdown-number-font-weight" class="ycd-label-of-select"><?php _e('Font Weight', YCD_TEXT_DOMAIN); ?></label>
166
  </div>
167
  <div class="col-md-7">
168
+ <?php
169
+ $fontWeight = AdminHelper::selectBox($defaultData['font-weight'], esc_attr($this->getOptionValue('ycd-countdown-number-font-weight')), array('name' => 'ycd-countdown-number-font-weight', 'class' => 'js-ycd-select js-countdown-number-font-weight'));
170
+ echo wp_kses($fontWeight, $allowed_html);
171
+ ?>
172
  </div>
173
  </div>
174
  <div class="row form-group">
176
  <label for="ycd-countdown-number-font-style" class="ycd-label-of-select"><?php _e('Font Style', YCD_TEXT_DOMAIN); ?></label>
177
  </div>
178
  <div class="col-md-7">
179
+ <?php
180
+ $fontStyle = AdminHelper::selectBox($defaultData['font-style'], esc_attr($this->getOptionValue('ycd-countdown-number-font-style')), array('name' => 'ycd-countdown-number-font-style', 'class' => 'js-ycd-select js-countdown-number-font-style'));
181
+ echo wp_kses($fontStyle, $allowed_html);
182
+ ?>
183
  </div>
184
  </div>
185
  <div class="row form-group">
187
  <label for="ycd-countdown-number-font" class="ycd-label-of-select"><?php _e('Font Family', YCD_TEXT_DOMAIN); ?></label>
188
  </div>
189
  <div class="col-md-7 ycd-option-wrapper<?php echo esc_attr($isPro); ?>">
190
+ <?php
191
+ $fontFamily = AdminHelper::selectBox($defaultData['font-family'], esc_attr($this->getOptionValue('ycd-countdown-number-font')), array('name' => 'ycd-countdown-number-font', 'class' => 'js-ycd-select js-countdown-number-font ycd-custom-value-accordion', 'data-custom' => 'customFont'));
192
+ echo wp_kses($fontFamily, $allowed_html);
193
+ ?>
194
  </div>
195
  </div>
196
  <div class="ycd-accordion-content ycd-hide-content">
classes/countdown/CircleCountdown.php CHANGED
@@ -179,6 +179,7 @@ class CircleCountdown extends Countdown {
179
  $this->includeStyles();
180
  $id = $this->getId();
181
 
 
182
  $seconds = $this->getCountdownTimerAttrSeconds();
183
  $bgImageStyleStr = $this->getBgImageStyleStr();
184
  $bgImageStyleStr .= $this->renderStyles();
@@ -196,7 +197,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 esc_attr($prepareOptions); ?>' data-all-options='<?php echo esc_attr($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();
179
  $this->includeStyles();
180
  $id = $this->getId();
181
 
182
+ $allowed_html = AdminHelper::getAllowedTags();
183
  $seconds = $this->getCountdownTimerAttrSeconds();
184
  $bgImageStyleStr = $this->getBgImageStyleStr();
185
  $bgImageStyleStr .= $this->renderStyles();
197
  ob_start();
198
  ?>
199
  <div class="ycd-circle-<?php echo esc_attr($id); ?>-wrapper ycd-circle-wrapper">
200
+ <div id="ycd-circle-<?php echo esc_attr($id); ?>" class="ycd-time-circle" data-options='<?php echo esc_attr($prepareOptions); ?>' data-all-options='<?php echo esc_attr($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>
201
  </div>
202
  <?php
203
  $content .= ob_get_contents();
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.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.3.9.9
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
helpers/AdminHelper.php CHANGED
@@ -839,7 +839,7 @@ class AdminHelper {
839
  if(!empty($attrs) && isset($attrs)) {
840
 
841
  foreach ($attrs as $attrName => $attrValue) {
842
- $attrString .= ''.esc_attr($attrName).'="'.esc_attr($attrValue).'" ';
843
  }
844
  }
845
 
@@ -1484,7 +1484,8 @@ class AdminHelper {
1484
  'value' => array(),
1485
  'class' => array(),
1486
  'data-options' => array(),
1487
- 'data-id' => array()
 
1488
  ),
1489
  'input' => array(
1490
  'type' => array(),
@@ -1493,7 +1494,8 @@ class AdminHelper {
1493
  'value' => array(),
1494
  'class' => array(),
1495
  'data-attr-href' => array(),
1496
- "checked" => array()
 
1497
  ),
1498
  'span' => array(
1499
  'class' => array(),
@@ -1501,17 +1503,24 @@ class AdminHelper {
1501
  ),
1502
  'label' => array(
1503
  'id' => array(),
1504
- 'class' => array()
 
1505
  ),
1506
  'select' => array(
1507
  'option' => array('value', 'selected'),
1508
  'name' => array(),
1509
  'class' => array(),
1510
- 'js-circle-time-zone' => array()
 
 
 
 
 
1511
  ),
1512
  'canvas' => array(
1513
  'width' => array(),
1514
- 'height' => array()
 
1515
  ),
1516
  "style" => array(),
1517
  'a' => array(
839
  if(!empty($attrs) && isset($attrs)) {
840
 
841
  foreach ($attrs as $attrName => $attrValue) {
842
+ $attrString .= ''.esc_attr($attrName).'='.esc_attr($attrValue).' ';
843
  }
844
  }
845
 
1484
  'value' => array(),
1485
  'class' => array(),
1486
  'data-options' => array(),
1487
+ 'data-id' => array(),
1488
+ 'style' => array()
1489
  ),
1490
  'input' => array(
1491
  'type' => array(),
1494
  'value' => array(),
1495
  'class' => array(),
1496
  'data-attr-href' => array(),
1497
+ "checked" => array(),
1498
+ 'style' => array()
1499
  ),
1500
  'span' => array(
1501
  'class' => array(),
1503
  ),
1504
  'label' => array(
1505
  'id' => array(),
1506
+ 'class' => array(),
1507
+ 'style' => array()
1508
  ),
1509
  'select' => array(
1510
  'option' => array('value', 'selected'),
1511
  'name' => array(),
1512
  'class' => array(),
1513
+ 'js-circle-time-zone' => array(),
1514
+ 'style' => array()
1515
+ ),
1516
+ 'option' => array(
1517
+ 'value' => array(),
1518
+ 'selected' => array()
1519
  ),
1520
  'canvas' => array(
1521
  'width' => array(),
1522
+ 'height' => array(),
1523
+ 'style' => array()
1524
  ),
1525
  "style" => array(),
1526
  'a' => array(
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.8
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.9
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html