Countdown, Coming Soon – Countdown & Clock - Version 1.7.1

Version Description

  • Add duration Days option (new)
  • Schedule 2 (new)
  • Admin side improvement
Download this release

Release Info

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

Code changes from version 1.7.0 to 1.7.1

CountdownInit.php CHANGED
@@ -81,7 +81,7 @@ class CountdownInit {
81
 
82
  if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
83
  $pluginName = YCD_FILE_NAME;
84
-
85
  $options = array(
86
  'licence' => array(
87
  'key' => YCD_PRO_KEY,
81
 
82
  if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
83
  $pluginName = YCD_FILE_NAME;
84
+
85
  $options = array(
86
  'licence' => array(
87
  'key' => YCD_PRO_KEY,
assets/css/admin.css CHANGED
@@ -708,4 +708,23 @@ div.ycd-tabs-text-header > div.ycd-toggle-icon-open {
708
 
709
  .ycd-postbox-container {
710
  width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
711
  }
708
 
709
  .ycd-postbox-container {
710
  width: 100%;
711
+ }
712
+
713
+ .ycd-support-button-red {
714
+ border: 2px solid #e74c3c;
715
+ color: #e74c3c;
716
+ border-radius: 5px;
717
+ cursor: pointer !important;
718
+ padding: 5px 25px 5px 26px;
719
+ text-transform: uppercase;
720
+ font-weight: 600;
721
+ outline: 0;
722
+ transition: background-color .2s ease-out;
723
+ text-decoration: none;
724
+ margin: 5px auto;
725
+ }
726
+
727
+ .ycd-support-button-red:hover {
728
+ background-color: #e74c3c;
729
+ color: #ffffff;
730
  }
assets/js/Countdown.js CHANGED
@@ -4,6 +4,8 @@ function YcdCountdown() {
4
  this.allOptions = {};
5
  }
6
 
 
 
7
  YcdCountdown.prototype.setOptions = function(options) {
8
  this.options = options;
9
  };
@@ -735,12 +737,6 @@ YcdCountdown.prototype.startTimeCircle = function() {
735
  that.endBehavior(jQuery(this), allOptions)
736
  }
737
 
738
- if (options['ycd-countdown-date-type'] == 'dueDate') {
739
- var val = options['ycd-date-time-picker']+':00';
740
- var selectedTimezone = options['ycd-circle-time-zone'];
741
- var seconds = that.setCounterTime(val, selectedTimezone);
742
- jQuery(this).data('timer', seconds);
743
- }
744
  that.addTimeToClock(options, jQuery(this));
745
  if (jQuery(this).data('expired')) {
746
  options['countdownExpired'] = true;
@@ -754,34 +750,8 @@ YcdCountdown.prototype.startTimeCircle = function() {
754
 
755
  YcdCountdown.prototype.addTimeToClock = function(options, countDown) {
756
 
757
- if(options['ycd-countdown-date-type'] == 'dueDate') {
758
- var val = options['ycd-date-time-picker']+':00';
759
- val = val.replace(/-/g, '/');
760
- var selectedTimezone = options['ycd-circle-time-zone'];
761
- var seconds = this.setCounterTime(val, selectedTimezone);
762
- }
763
- else if(options['ycd-countdown-date-type'] == 'schedule') {
764
- var seconds = YcdCountdownProFunctionality.schedule(options);
765
- }
766
- else {
767
- var hours = parseInt(options['ycd-countdown-duration-hours']);
768
- var minutes = parseInt(options['ycd-countdown-duration-minutes']);
769
- var secondsSaved = parseInt(options['ycd-countdown-duration-seconds']);
770
-
771
- var seconds = hours*60*60 + minutes*60 + secondsSaved;
772
-
773
- if (options['ycd-countdown-save-duration']) {
774
 
775
- if (options['ycd-countdown-save-duration-each-user']) {
776
- var allOptions = jQuery(countDown).data('all-options');
777
- var id = allOptions['id'];
778
- seconds = YcdCountdownProFunctionality.durationSeconds(seconds, options, id);
779
- }
780
- else {
781
- seconds = countDown.data('timer');
782
- }
783
- }
784
- }
785
  countDown.data('expired', false);
786
  if (seconds == 0) {
787
  countDown.data('expired', true);
4
  this.allOptions = {};
5
  }
6
 
7
+ YcdCountdown.prototype = new YcgGeneral();
8
+
9
  YcdCountdown.prototype.setOptions = function(options) {
10
  this.options = options;
11
  };
737
  that.endBehavior(jQuery(this), allOptions)
738
  }
739
 
 
 
 
 
 
 
740
  that.addTimeToClock(options, jQuery(this));
741
  if (jQuery(this).data('expired')) {
742
  options['countdownExpired'] = true;
750
 
751
  YcdCountdown.prototype.addTimeToClock = function(options, countDown) {
752
 
753
+ var seconds = this.getSeconds(options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
754
 
 
 
 
 
 
 
 
 
 
 
755
  countDown.data('expired', false);
756
  if (seconds == 0) {
757
  countDown.data('expired', true);
assets/js/YcdGeneral.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function YcgGeneral() {
2
+
3
+ }
4
+
5
+ YcgGeneral.prototype.getSeconds = function (options) {
6
+ var seconds = 0;
7
+ if(options['ycd-countdown-date-type'] == 'dueDate') {
8
+ var val = options['ycd-date-time-picker']+':00';
9
+ val = val.replace(/-/g, '/');
10
+ var selectedTimezone = options['ycd-time-zone'];
11
+ var seconds = this.setCounterTime(val, selectedTimezone);
12
+ }
13
+ else if(options['ycd-countdown-date-type'] == 'schedule') {
14
+ var seconds = YcdCountdownProFunctionality.schedule(options);
15
+ }
16
+ else if(options['ycd-countdown-date-type'] == 'schedule2') {
17
+ var seconds = YcdCountdownProFunctionality.schedule2(options);
18
+ }
19
+ else {
20
+ var days = parseInt(options['ycd-countdown-duration-days']);
21
+ var hours = parseInt(options['ycd-countdown-duration-hours']);
22
+ var minutes = parseInt(options['ycd-countdown-duration-minutes']);
23
+ var secondsSaved = parseInt(options['ycd-countdown-duration-seconds']);
24
+
25
+ var seconds = days*86400 + hours*60*60 + minutes*60 + secondsSaved;
26
+ if (options['ycd-countdown-save-duration']) {
27
+ if (options['ycd-countdown-save-duration-each-user']) {
28
+ var id = options['id'];
29
+ seconds = YcdCountdownProFunctionality.durationSeconds(seconds, options, id);
30
+ }
31
+ else {
32
+ seconds = options['ycd-timer-seconds'];
33
+ }
34
+ }
35
+ }
36
+
37
+ return seconds;
38
+ };
assets/views/generalOptions.php CHANGED
@@ -63,7 +63,11 @@ $dueDate = $this->getOptionValue('ycd-date-time-picker');
63
  </div>
64
  </div>
65
  <div class="row form-group">
66
- <div class="col-md-6">
 
 
 
 
67
  </div>
68
  <div class="col-md-2">
69
  <label for="ycdCountdownTimeHours"><?php _e('Hrs', YCD_TEXT_DOMAIN); ?></label>
@@ -155,6 +159,56 @@ $dueDate = $this->getOptionValue('ycd-date-time-picker');
155
  </div>
156
  </div>
157
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  <div class="row">
159
  <div class="col-md-6">
160
  <label for="ycd-countdown-end-sound" class="ycd-label-of-switch"><?php _e('Display On', YCD_TEXT_DOMAIN); ?></label>
63
  </div>
64
  </div>
65
  <div class="row form-group">
66
+ <div class="col-md-4">
67
+ </div>
68
+ <div class="col-md-2">
69
+ <label for="ycdCountdownTimeHours"><?php _e('Days', YCD_TEXT_DOMAIN); ?></label>
70
+ <input type="number" name="ycd-countdown-duration-days" id="ycdCountdownTimeDays" min="0" max="60" class="form-control ycd-timer-time-settings" data-type="days" value="<?php echo esc_attr($this->getOptionValue('ycd-countdown-duration-days'))?>">
71
  </div>
72
  <div class="col-md-2">
73
  <label for="ycdCountdownTimeHours"><?php _e('Hrs', YCD_TEXT_DOMAIN); ?></label>
159
  </div>
160
  </div>
161
  </div>
162
+ <div id="ycd-date-schedule2" class="ycd-countdown-show-text ycd-hide">
163
+ <div class="row form-group">
164
+ <div class="col-md-6">
165
+ <label for="ycd-schedule2-time-zone" class="ycd-label-of-input"><?php _e('Time Zone', YCD_TEXT_DOMAIN); ?></label>
166
+ </div>
167
+ <div class="col-md-6">
168
+ <div class="ycd-select-wrapper">
169
+ <?php echo AdminHelper::selectBox($defaultData['time-zone'], esc_attr($this->getOptionValue('ycd-schedule2-time-zone')), array('name' => 'ycd-schedule2-time-zone', 'class' => 'js-ycd-select js-ycd-schedule-time-zone')); ?>
170
+ </div>
171
+ </div>
172
+ </div>
173
+ <div class="row form-group">
174
+ <div class="col-md-6">
175
+ <label><?php _e('Week day(s)', YCD_TEXT_DOMAIN); ?></label>
176
+ </div>
177
+ <div class="col-md-6">
178
+ <div class="ycd-select-wrapper">
179
+ <?php echo AdminHelper::selectBox(
180
+ $defaultData['week-days'],
181
+ $this->getOptionValue('ycd-schedule2-day'),
182
+ array(
183
+ 'name' => 'ycd-schedule2-day[]',
184
+ 'multiple' => 'multiple',
185
+ 'data-week-number-key' => 'startDayNumber',
186
+ 'class' => 'js-ycd-select ycd-date-week-day js-ycd-schedule-start-day'
187
+ )); ?>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <div class="row form-group">
192
+ <div class="col-md-6">
193
+ </div>
194
+ <div class="col-md-2">
195
+ <label class="ycd-label-of-input" for="ycd-schedule2-from"><?php _e('from', YCD_TEXT_DOMAIN); ?></label>
196
+ </div>
197
+ <div class="col-md-4">
198
+ <input type="text" name="ycd-schedule2-from" id="ycd-schedule2-from" class="form-control js-datetimepicker-seconds" value="<?php echo esc_attr($this->getOptionValue('ycd-schedule2-from')); ?>" autocomplete="off">
199
+ </div>
200
+ </div>
201
+ <div class="row form-group">
202
+ <div class="col-md-6">
203
+ </div>
204
+ <div class="col-md-2">
205
+ <label class="ycd-label-of-input" for="ycd-schedule2-to"><?php _e('to', YCD_TEXT_DOMAIN); ?></label>
206
+ </div>
207
+ <div class="col-md-4">
208
+ <input type="text" name="ycd-schedule2-to" id="ycd-schedule2-to" class="form-control js-datetimepicker-seconds" value="<?php echo esc_attr($this->getOptionValue('ycd-schedule2-to')); ?>" autocomplete="off">
209
+ </div>
210
+ </div>
211
+ </div>
212
  <div class="row">
213
  <div class="col-md-6">
214
  <label for="ycd-countdown-end-sound" class="ycd-label-of-switch"><?php _e('Display On', YCD_TEXT_DOMAIN); ?></label>
assets/views/supportMetabox.php CHANGED
@@ -1,7 +1,15 @@
1
  <div class="ycf-bootstrap-wrapper ycd-support-metabox">
2
  <h3>Support</h3>
3
- <p>
4
- We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just <a href="<?php echo YCD_COUNTDOWN_SUPPORT_URL; ?>" style="font-size: 18px;" target="_blank">contact us</a> and we will help you!</p>
 
 
 
 
 
 
 
 
5
  </div>
6
  <style>
7
  .ycd-support-metabox {
1
  <div class="ycf-bootstrap-wrapper ycd-support-metabox">
2
  <h3>Support</h3>
3
+ <p style="text-align: center">
4
+ We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just pressing here
5
+ <br>
6
+ <a href="<?php echo YCD_COUNTDOWN_SUPPORT_URL; ?>" style="font-size: 18px; cursor: pointer;" target="_blank">
7
+ <button type="button" id="ycd-report-problem-button" class="ycd-support-button-red">
8
+ <i class="ai1wm-icon-notification"></i>
9
+ Report issue
10
+ </button>
11
+ </a><br>
12
+ and we will help you!</p>
13
  </div>
14
  <style>
15
  .ycd-support-metabox {
classes/Filters.php CHANGED
@@ -168,7 +168,7 @@ class Filters {
168
  $defaults['countdownExpireTime']['fields'][$key]['attr']['class'] .= ' ycd-option-wrapper-pro';
169
  }
170
  }
171
- $proDateTypes = apply_filters('ycdCountdownProDateType', array('schedule'));
172
  foreach ($defaults['countdown-date-type']['fields'] as $key => $expire) {
173
  $currentValue = $expire['attr']['value'];
174
  if(in_array($currentValue, $proDateTypes)) {
168
  $defaults['countdownExpireTime']['fields'][$key]['attr']['class'] .= ' ycd-option-wrapper-pro';
169
  }
170
  }
171
+ $proDateTypes = apply_filters('ycdCountdownProDateType', array('schedule', 'schedule2'));
172
  foreach ($defaults['countdown-date-type']['fields'] as $key => $expire) {
173
  $currentValue = $expire['attr']['value'];
174
  if(in_array($currentValue, $proDateTypes)) {
classes/countdown/Countdown.php CHANGED
@@ -133,6 +133,8 @@ abstract class Countdown {
133
  }
134
 
135
  public function includeGeneralScripts() {
 
 
136
  ScriptsIncluder::registerScript('moment.js', array('dirUrl' => YCD_COUNTDOWN_JS_URL));
137
  ScriptsIncluder::enqueueScript('moment.js');
138
  }
@@ -831,6 +833,10 @@ abstract class Countdown {
831
  $filteredObj = apply_filters('ycdScheduleExpireSecond', $this);
832
  $seconds = $this->getExpireSeconds();
833
  }
 
 
 
 
834
  else {
835
  $hours = (int)$this->getOptionValue('ycd-countdown-duration-hours');
836
  $minutes = (int)$this->getOptionValue('ycd-countdown-duration-minutes');
@@ -943,20 +949,25 @@ abstract class Countdown {
943
 
944
  public function generalOptionsData() {
945
  $options = array();
 
946
 
 
947
  $options['ycd-countdown-duration-hours'] = $this->getOptionValue('ycd-countdown-duration-hours');
948
  $options['ycd-countdown-duration-minutes'] = $this->getOptionValue('ycd-countdown-duration-minutes');
949
  $options['ycd-countdown-duration-seconds'] = $this->getOptionValue('ycd-countdown-duration-seconds');
950
  $options['ycd-countdown-save-duration'] = $this->getOptionValue('ycd-countdown-save-duration');
951
  $options['ycd-countdown-save-duration-each-user'] = $this->getOptionValue('ycd-countdown-save-duration-each-user');
 
 
 
952
 
953
- return $options;
954
  }
955
 
956
  public function getFlipClockOptionsData() {
957
  $options = array();
958
 
959
- $isExpired = $this->isExpired();
960
  $options['id'] = $this->getId();
961
  $modifiedObj = $this->getCircleSeconds();
962
  $modifiedSavedData = $modifiedObj->datesNumber;
@@ -965,9 +976,6 @@ abstract class Countdown {
965
 
966
  $options += $this->generalOptionsData();
967
 
968
- $options['isExpired'] = $isExpired;
969
- $options['ycd-flip-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
970
- $options['ycd-flip-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
971
  $options['output-format'] = $this->getOutputFormats();
972
  $options['ycd-flip-countdown-year-text'] = $this->getOptionValue('ycd-flip-countdown-year-text');
973
  $options['ycd-flip-countdown-week-text'] = $this->getOptionValue('ycd-flip-countdown-week-text');
@@ -1005,16 +1013,14 @@ abstract class Countdown {
1005
 
1006
  public function getCircleOptionsData() {
1007
  $options = array();
1008
- $isExpired = $this->isExpired();
1009
 
1010
  $modifiedObj = $this->getCircleSeconds();
1011
  $modifiedSavedData = $modifiedObj->datesNumber;
 
1012
  $options['ycd-seconds'] = $modifiedObj->expireSeconds;
1013
  $options['ycd-countdown-date-type'] = $this->getOptionValue('ycd-countdown-date-type');
1014
-
1015
  $options += $this->generalOptionsData();
1016
 
1017
- $options['isExpired'] = $isExpired;
1018
  $options['animation'] = $this->getOptionValue('ycd-circle-animation');
1019
  $options['direction'] = $this->getOptionValue('ycd-countdown-direction');
1020
  $options['fg_width'] = $this->getOptionValue('ycd-circle-width');
@@ -1026,8 +1032,6 @@ abstract class Countdown {
1026
  }
1027
  $options['circle_bg_color'] = $this->getOptionValue('ycd-countdown-bg-circle-color');
1028
  $options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
1029
- $options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
1030
- $options['ycd-circle-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
1031
  $options['ycd-count-up-from-end-date'] = $this->getOptionValue('ycd-count-up-from-end-date');
1032
  $options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
1033
  // Day numbers
133
  }
134
 
135
  public function includeGeneralScripts() {
136
+ ScriptsIncluder::registerScript('YcdGeneral.js', array('dirUrl' => YCD_COUNTDOWN_JS_URL));
137
+ ScriptsIncluder::enqueueScript('YcdGeneral.js');
138
  ScriptsIncluder::registerScript('moment.js', array('dirUrl' => YCD_COUNTDOWN_JS_URL));
139
  ScriptsIncluder::enqueueScript('moment.js');
140
  }
833
  $filteredObj = apply_filters('ycdScheduleExpireSecond', $this);
834
  $seconds = $this->getExpireSeconds();
835
  }
836
+ else if($dateType == 'schedule2') {
837
+ $filteredObj = apply_filters('ycdSchedule2ExpireSecond', $this);
838
+ $seconds = $this->getExpireSeconds();
839
+ }
840
  else {
841
  $hours = (int)$this->getOptionValue('ycd-countdown-duration-hours');
842
  $minutes = (int)$this->getOptionValue('ycd-countdown-duration-minutes');
949
 
950
  public function generalOptionsData() {
951
  $options = array();
952
+ $isExpired = $this->isExpired();
953
 
954
+ $options['ycd-countdown-duration-days'] = $this->getOptionValue('ycd-countdown-duration-days');
955
  $options['ycd-countdown-duration-hours'] = $this->getOptionValue('ycd-countdown-duration-hours');
956
  $options['ycd-countdown-duration-minutes'] = $this->getOptionValue('ycd-countdown-duration-minutes');
957
  $options['ycd-countdown-duration-seconds'] = $this->getOptionValue('ycd-countdown-duration-seconds');
958
  $options['ycd-countdown-save-duration'] = $this->getOptionValue('ycd-countdown-save-duration');
959
  $options['ycd-countdown-save-duration-each-user'] = $this->getOptionValue('ycd-countdown-save-duration-each-user');
960
+ $options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
961
+ $options['ycd-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
962
+ $options['isExpired'] = $isExpired;
963
 
964
+ return apply_filters('ycdGeneralIncludingOptions', $options, $this);
965
  }
966
 
967
  public function getFlipClockOptionsData() {
968
  $options = array();
969
 
970
+
971
  $options['id'] = $this->getId();
972
  $modifiedObj = $this->getCircleSeconds();
973
  $modifiedSavedData = $modifiedObj->datesNumber;
976
 
977
  $options += $this->generalOptionsData();
978
 
 
 
 
979
  $options['output-format'] = $this->getOutputFormats();
980
  $options['ycd-flip-countdown-year-text'] = $this->getOptionValue('ycd-flip-countdown-year-text');
981
  $options['ycd-flip-countdown-week-text'] = $this->getOptionValue('ycd-flip-countdown-week-text');
1013
 
1014
  public function getCircleOptionsData() {
1015
  $options = array();
 
1016
 
1017
  $modifiedObj = $this->getCircleSeconds();
1018
  $modifiedSavedData = $modifiedObj->datesNumber;
1019
+ $options['id'] = $this->getId();
1020
  $options['ycd-seconds'] = $modifiedObj->expireSeconds;
1021
  $options['ycd-countdown-date-type'] = $this->getOptionValue('ycd-countdown-date-type');
 
1022
  $options += $this->generalOptionsData();
1023
 
 
1024
  $options['animation'] = $this->getOptionValue('ycd-circle-animation');
1025
  $options['direction'] = $this->getOptionValue('ycd-countdown-direction');
1026
  $options['fg_width'] = $this->getOptionValue('ycd-circle-width');
1032
  }
1033
  $options['circle_bg_color'] = $this->getOptionValue('ycd-countdown-bg-circle-color');
1034
  $options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
 
 
1035
  $options['ycd-count-up-from-end-date'] = $this->getOptionValue('ycd-count-up-from-end-date');
1036
  $options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
1037
  // Day numbers
config/config.php CHANGED
@@ -66,8 +66,8 @@ class YcdCountdownConfig {
66
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
67
  self::addDefine('YCD_AJAX_SUCCESS', 1);
68
  self::addDefine('YCD_TABLE_LIMIT', 15);
69
- self::addDefine('YCD_VERSION_PRO', 1.56);
70
- self::addDefine('YCD_VERSION', 1.70);
71
  self::addDefine('YCD_FREE_VERSION', 1);
72
  self::addDefine('YCD_SILVER_VERSION', 2);
73
  self::addDefine('YCD_GOLD_VERSION', 3);
66
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
67
  self::addDefine('YCD_AJAX_SUCCESS', 1);
68
  self::addDefine('YCD_TABLE_LIMIT', 15);
69
+ self::addDefine('YCD_VERSION_PRO', 1.57);
70
+ self::addDefine('YCD_VERSION', 1.71);
71
  self::addDefine('YCD_FREE_VERSION', 1);
72
  self::addDefine('YCD_SILVER_VERSION', 2);
73
  self::addDefine('YCD_GOLD_VERSION', 3);
config/optionsConfig.php CHANGED
@@ -151,6 +151,7 @@ class YcdCountdownOptionsConfig {
151
  $options[] = array('name' => 'ycd-countdown-padding', 'type' => 'text', 'defaultValue' => 0);
152
  $options[] = array('name' => 'ycd-flip-time-zone', 'type' => 'text', 'defaultValue' => self::getDefaultTimezone());
153
  $options[] = array('name' => 'ycd-flip-date-time-picker', 'type' => 'text', 'defaultValue' => date('Y-m-d H:i', strtotime(' +1 day')));
 
154
  $options[] = array('name' => 'ycd-countdown-duration-hours', 'type' => 'number', 'defaultValue' => 0);
155
  $options[] = array('name' => 'ycd-countdown-duration-minutes', 'type' => 'number', 'defaultValue' => 0);
156
  $options[] = array('name' => 'ycd-countdown-duration-seconds', 'type' => 'number', 'defaultValue' => 30);
151
  $options[] = array('name' => 'ycd-countdown-padding', 'type' => 'text', 'defaultValue' => 0);
152
  $options[] = array('name' => 'ycd-flip-time-zone', 'type' => 'text', 'defaultValue' => self::getDefaultTimezone());
153
  $options[] = array('name' => 'ycd-flip-date-time-picker', 'type' => 'text', 'defaultValue' => date('Y-m-d H:i', strtotime(' +1 day')));
154
+ $options[] = array('name' => 'ycd-countdown-duration-days', 'type' => 'number', 'defaultValue' => 0);
155
  $options[] = array('name' => 'ycd-countdown-duration-hours', 'type' => 'number', 'defaultValue' => 0);
156
  $options[] = array('name' => 'ycd-countdown-duration-minutes', 'type' => 'number', 'defaultValue' => 0);
157
  $options[] = array('name' => 'ycd-countdown-duration-seconds', 'type' => 'number', 'defaultValue' => 30);
countdown-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Countdown builder
4
  * Description: The best countdown plugin
5
- * Version: 1.7.0
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.1
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
helpers/AdminHelper.php CHANGED
@@ -356,7 +356,20 @@ class AdminHelper {
356
  'value' => 'schedule'
357
  ),
358
  'label' => array(
359
- 'name' => __('Schedule', YCD_TEXT_DOMAIN)
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  )
361
  );
362
  }
356
  'value' => 'schedule'
357
  ),
358
  'label' => array(
359
+ 'name' => __('Schedule 1', YCD_TEXT_DOMAIN)
360
+ )
361
+ );
362
+
363
+ $countdownDateTypeFields[] = array(
364
+ 'attr' => array(
365
+ 'type' => 'radio',
366
+ 'name' => 'ycd-countdown-date-type',
367
+ 'class' => 'ycd-date-type',
368
+ 'data-attr-href' => 'ycd-date-schedule2',
369
+ 'value' => 'schedule2'
370
+ ),
371
+ 'label' => array(
372
+ 'name' => __('Schedule 2', YCD_TEXT_DOMAIN)
373
  )
374
  );
375
  }
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.3.2
6
- Stable tag: 1.7.0
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,11 @@ Yes you can, we have Circle and Flipclock countdown popups.
64
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
65
 
66
  == Changelog ==
 
 
 
 
 
67
  = 1.7.0 =
68
  * Save Duration For Each User (new)
69
  * Admin Side Is Expired Bug Fixed
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.3.2
6
+ Stable tag: 1.7.1
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
64
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
65
 
66
  == Changelog ==
67
+ = 1.7.1 =
68
+ * Add duration Days option (new)
69
+ * Schedule 2 (new)
70
+ * Admin side improvement
71
+
72
  = 1.7.0 =
73
  * Save Duration For Each User (new)
74
  * Admin Side Is Expired Bug Fixed