Version Description
- Save Duration (new)
- Code optimization
Download this release
Release Info
| Developer | adamskaat |
| Plugin | |
| Version | 1.6.9 |
| Comparing to | |
| See all releases | |
Code changes from version 1.6.8 to 1.6.9
- assets/js/Countdown.js +4 -0
- assets/views/generalOptions.php +11 -0
- classes/countdown/CircleCountdown.php +2 -75
- classes/countdown/Countdown.php +161 -0
- config/config.php +2 -2
- config/optionsConfig.php +1 -0
- countdown-builder.php +1 -1
- readme.txt +5 -1
assets/js/Countdown.js
CHANGED
|
@@ -769,6 +769,10 @@ YcdCountdown.prototype.addTimeToClock = function(options, countDown) {
|
|
| 769 |
var secondsSaved = parseInt(options['ycd-countdown-duration-seconds']);
|
| 770 |
|
| 771 |
var seconds = hours*60*60 + minutes*60 + secondsSaved;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 772 |
}
|
| 773 |
countDown.data('expired', false);
|
| 774 |
if (seconds == 0) {
|
| 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 |
+
seconds = countDown.data('timer');
|
| 775 |
+
}
|
| 776 |
}
|
| 777 |
countDown.data('expired', false);
|
| 778 |
if (seconds == 0) {
|
assets/views/generalOptions.php
CHANGED
|
@@ -32,6 +32,17 @@ $dueDate = $this->getOptionValue('ycd-date-time-picker');
|
|
| 32 |
</div>
|
| 33 |
</div>
|
| 34 |
<div id="ycd-date-duration" class="ycd-countdown-show-text ycd-hide">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
<div class="row form-group">
|
| 36 |
<div class="col-md-6">
|
| 37 |
</div>
|
| 32 |
</div>
|
| 33 |
</div>
|
| 34 |
<div id="ycd-date-duration" class="ycd-countdown-show-text ycd-hide">
|
| 35 |
+
<div class="row">
|
| 36 |
+
<div class="col-md-6">
|
| 37 |
+
<label for="ycd-countdown-save-duration" class="ycd-label-of-switch"><?php _e('Save Duration', YCD_TEXT_DOMAIN); ?></label>
|
| 38 |
+
</div>
|
| 39 |
+
<div class="col-md-6">
|
| 40 |
+
<label class="ycd-switch">
|
| 41 |
+
<input type="checkbox" id="ycd-countdown-save-duration" name="ycd-countdown-save-duration" <?php echo $this->getOptionValue('ycd-countdown-save-duration'); ?>>
|
| 42 |
+
<span class="ycd-slider ycd-round"></span>
|
| 43 |
+
</label>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
<div class="row form-group">
|
| 47 |
<div class="col-md-6">
|
| 48 |
</div>
|
classes/countdown/CircleCountdown.php
CHANGED
|
@@ -60,79 +60,6 @@ class CircleCountdown extends Countdown {
|
|
| 60 |
require_once YCD_PREVIEW_VIEWS_PATH.'circlePreview.php';
|
| 61 |
}
|
| 62 |
|
| 63 |
-
public function prepareOptions() {
|
| 64 |
-
$options = array();
|
| 65 |
-
$modifiedObj = $this->getCircleSeconds();
|
| 66 |
-
$modifiedSavedData = $modifiedObj->datesNumber;
|
| 67 |
-
$options['ycd-seconds'] = $modifiedObj->expireSeconds;
|
| 68 |
-
$options['ycd-countdown-date-type'] = $this->getOptionValue('ycd-countdown-date-type');
|
| 69 |
-
$options['ycd-countdown-duration-hours'] = $this->getOptionValue('ycd-countdown-duration-hours');
|
| 70 |
-
$options['ycd-countdown-duration-minutes'] = $this->getOptionValue('ycd-countdown-duration-minutes');
|
| 71 |
-
$options['ycd-countdown-duration-seconds'] = $this->getOptionValue('ycd-countdown-duration-seconds');
|
| 72 |
-
$options['animation'] = $this->getOptionValue('ycd-circle-animation');
|
| 73 |
-
$options['direction'] = $this->getOptionValue('ycd-countdown-direction');
|
| 74 |
-
$options['fg_width'] = $this->getOptionValue('ycd-circle-width');
|
| 75 |
-
$options['bg_width'] = $this->getOptionValue('ycd-circle-bg-width');
|
| 76 |
-
$options['start_angle'] = $this->getOptionValue('ycd-circle-start-angle');
|
| 77 |
-
$options['count_past_zero'] = false;
|
| 78 |
-
if($this->getOptionValue('ycd-countdown-expire-behavior') == 'countToUp') {
|
| 79 |
-
$options['count_past_zero'] = true;
|
| 80 |
-
}
|
| 81 |
-
$options['circle_bg_color'] = $this->getOptionValue('ycd-countdown-bg-circle-color');
|
| 82 |
-
$options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
|
| 83 |
-
$options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
|
| 84 |
-
$options['ycd-circle-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
| 85 |
-
$options['ycd-count-up-from-end-date'] = $this->getOptionValue('ycd-count-up-from-end-date');
|
| 86 |
-
$options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
|
| 87 |
-
// Day numbers
|
| 88 |
-
|
| 89 |
-
$options['startDay'] = $this->getOptionValue('ycd-schedule-start-day');
|
| 90 |
-
$options['startDayNumber'] = $modifiedSavedData['startDayNumber'];
|
| 91 |
-
$options['endDay'] = $this->getOptionValue('ycd-schedule-end-day');
|
| 92 |
-
$options['endDayNumber'] = $modifiedSavedData['endDayNumber'];
|
| 93 |
-
$options['currentDayNumber'] = $modifiedSavedData['currentDayNumber'];
|
| 94 |
-
$options['ycd-schedule-end-to'] = $this->getOptionValue('ycd-schedule-end-to');
|
| 95 |
-
$options['ycd-schedule-start-from'] = $this->getOptionValue('ycd-schedule-start-from');
|
| 96 |
-
$options['ycd-countdown-showing-limitation'] = $this->getOptionValue('ycd-countdown-showing-limitation');
|
| 97 |
-
$options['ycd-countdown-expiration-time'] = $this->getOptionValue('ycd-countdown-expiration-time');
|
| 98 |
-
$options['ycd-countdown-switch-number'] = $this->getOptionValue('ycd-countdown-switch-number');
|
| 99 |
-
|
| 100 |
-
$options['time'] = array(
|
| 101 |
-
'Years' => array(
|
| 102 |
-
'text' => $this->getOptionValue('ycd-countdown-years-text'),
|
| 103 |
-
'color' => $this->getOptionValue('ycd-countdown-years-color'),
|
| 104 |
-
'show' => $this->getOptionValue('ycd-countdown-years')
|
| 105 |
-
),
|
| 106 |
-
'Months' => array(
|
| 107 |
-
'text' => $this->getOptionValue('ycd-countdown-months-text'),
|
| 108 |
-
'color' => $this->getOptionValue('ycd-countdown-months-color'),
|
| 109 |
-
'show' => $this->getOptionValue('ycd-countdown-months')
|
| 110 |
-
),
|
| 111 |
-
'Days' => array(
|
| 112 |
-
'text' => $this->getOptionValue('ycd-countdown-days-text'),
|
| 113 |
-
'color' => $this->getOptionValue('ycd-countdown-days-color'),
|
| 114 |
-
'show' => $this->getOptionValue('ycd-countdown-days')
|
| 115 |
-
),
|
| 116 |
-
'Hours' => array(
|
| 117 |
-
'text' => $this->getOptionValue('ycd-countdown-hours-text'),
|
| 118 |
-
'color' => $this->getOptionValue('ycd-countdown-hours-color'),
|
| 119 |
-
'show' => $this->getOptionValue('ycd-countdown-hours')
|
| 120 |
-
),
|
| 121 |
-
'Minutes' => array(
|
| 122 |
-
'text' => $this->getOptionValue('ycd-countdown-minutes-text'),
|
| 123 |
-
'color' => $this->getOptionValue('ycd-countdown-minutes-color'),
|
| 124 |
-
'show' => $this->getOptionValue('ycd-countdown-minutes')
|
| 125 |
-
),
|
| 126 |
-
'Seconds' => array(
|
| 127 |
-
'text' => $this->getOptionValue('ycd-countdown-seconds-text'),
|
| 128 |
-
'color' => $this->getOptionValue('ycd-countdown-seconds-color'),
|
| 129 |
-
'show' => $this->getOptionValue('ycd-countdown-seconds')
|
| 130 |
-
),
|
| 131 |
-
);
|
| 132 |
-
|
| 133 |
-
return $options;
|
| 134 |
-
}
|
| 135 |
-
|
| 136 |
public function getDataAllOptions() {
|
| 137 |
$savedData = $this->getSavedData();
|
| 138 |
$savedData['id'] = $this->getId();
|
|
@@ -252,13 +179,13 @@ class CircleCountdown extends Countdown {
|
|
| 252 |
$this->includeStyles();
|
| 253 |
$id = $this->getId();
|
| 254 |
|
| 255 |
-
$seconds =
|
| 256 |
|
| 257 |
$bgImageStyleStr = $this->getBgImageStyleStr();
|
| 258 |
$bgImageStyleStr .= $this->renderStyles();
|
| 259 |
$allDataOptions = $this->getDataAllOptions();
|
| 260 |
$allDataOptions = json_encode($allDataOptions, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT);
|
| 261 |
-
$prepareOptions = $this->
|
| 262 |
$prepareOptions = json_encode($prepareOptions, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT);
|
| 263 |
$width = (int)$this->getOptionValue('ycd-countdown-width');
|
| 264 |
$widthMeasure = $this->getOptionValue('ycd-dimension-measure');
|
| 60 |
require_once YCD_PREVIEW_VIEWS_PATH.'circlePreview.php';
|
| 61 |
}
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
public function getDataAllOptions() {
|
| 64 |
$savedData = $this->getSavedData();
|
| 65 |
$savedData['id'] = $this->getId();
|
| 179 |
$this->includeStyles();
|
| 180 |
$id = $this->getId();
|
| 181 |
|
| 182 |
+
$seconds = $this->getCountdownTimerAttrSeconds();
|
| 183 |
|
| 184 |
$bgImageStyleStr = $this->getBgImageStyleStr();
|
| 185 |
$bgImageStyleStr .= $this->renderStyles();
|
| 186 |
$allDataOptions = $this->getDataAllOptions();
|
| 187 |
$allDataOptions = json_encode($allDataOptions, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT);
|
| 188 |
+
$prepareOptions = $this->getCircleOptionsData();
|
| 189 |
$prepareOptions = json_encode($prepareOptions, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT);
|
| 190 |
$width = (int)$this->getOptionValue('ycd-countdown-width');
|
| 191 |
$widthMeasure = $this->getOptionValue('ycd-dimension-measure');
|
classes/countdown/Countdown.php
CHANGED
|
@@ -171,9 +171,27 @@ abstract class Countdown {
|
|
| 171 |
|
| 172 |
update_post_meta($postId, 'ycd-display-settings', $settings);
|
| 173 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
|
| 175 |
public function save() {
|
| 176 |
$options = $this->getSanitizedData();
|
|
|
|
| 177 |
$postId = $this->getId();
|
| 178 |
|
| 179 |
update_post_meta($postId, 'ycd_options', $options);
|
|
@@ -922,4 +940,147 @@ abstract class Countdown {
|
|
| 922 |
|
| 923 |
return $idTitles;
|
| 924 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 925 |
}
|
| 171 |
|
| 172 |
update_post_meta($postId, 'ycd-display-settings', $settings);
|
| 173 |
}
|
| 174 |
+
|
| 175 |
+
private function filterSavedData($options) {
|
| 176 |
+
if (!empty($options['ycd-countdown-date-type']) && $options['ycd-countdown-date-type'] == 'duration') {
|
| 177 |
+
if (!empty($options['ycd-countdown-save-duration'])) {
|
| 178 |
+
|
| 179 |
+
$hours = (int)$options['ycd-countdown-duration-hours'];
|
| 180 |
+
$minutes = (int)$options['ycd-countdown-duration-minutes'];
|
| 181 |
+
$secondsSaved = (int)$options['ycd-countdown-duration-seconds'];
|
| 182 |
+
|
| 183 |
+
$seconds = $hours*60*60 + $minutes*60 + $secondsSaved;
|
| 184 |
+
|
| 185 |
+
$options['ycd-countdown-duration-saved-str-time'] = strtotime('+'.$seconds.' seconds');
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
return $options;
|
| 190 |
+
}
|
| 191 |
|
| 192 |
public function save() {
|
| 193 |
$options = $this->getSanitizedData();
|
| 194 |
+
$options = $this->filterSavedData($options);
|
| 195 |
$postId = $this->getId();
|
| 196 |
|
| 197 |
update_post_meta($postId, 'ycd_options', $options);
|
| 940 |
|
| 941 |
return $idTitles;
|
| 942 |
}
|
| 943 |
+
|
| 944 |
+
protected function getCountdownTimerAttrSeconds() {
|
| 945 |
+
$seconds = 0;
|
| 946 |
+
$countdownDateType = $this->getOptionValue('ycd-countdown-date-type');
|
| 947 |
+
|
| 948 |
+
if($this->getOptionValue('ycd-countdown-save-duration') && $countdownDateType == 'duration') {
|
| 949 |
+
$seconds = $this->getOptionValue('ycd-countdown-duration-saved-str-time') - strtotime('now');
|
| 950 |
+
}
|
| 951 |
+
|
| 952 |
+
return $seconds;
|
| 953 |
+
}
|
| 954 |
+
|
| 955 |
+
public function generalOptionsData() {
|
| 956 |
+
$options = array();
|
| 957 |
+
|
| 958 |
+
$options['ycd-countdown-duration-hours'] = $this->getOptionValue('ycd-countdown-duration-hours');
|
| 959 |
+
$options['ycd-countdown-duration-minutes'] = $this->getOptionValue('ycd-countdown-duration-minutes');
|
| 960 |
+
$options['ycd-countdown-duration-seconds'] = $this->getOptionValue('ycd-countdown-duration-seconds');
|
| 961 |
+
$options['ycd-countdown-save-duration'] = $this->getOptionValue('ycd-countdown-save-duration');
|
| 962 |
+
|
| 963 |
+
return $options;
|
| 964 |
+
}
|
| 965 |
+
|
| 966 |
+
public function getFlipClockOptionsData() {
|
| 967 |
+
$options = array();
|
| 968 |
+
|
| 969 |
+
$options['id'] = $this->getId();
|
| 970 |
+
$modifiedObj = $this->getCircleSeconds();
|
| 971 |
+
$modifiedSavedData = $modifiedObj->datesNumber;
|
| 972 |
+
$options['ycd-seconds'] = $modifiedObj->expireSeconds;
|
| 973 |
+
$options['ycd-countdown-date-type'] = $this->getOptionValue('ycd-countdown-date-type');
|
| 974 |
+
|
| 975 |
+
$options += $this->generalOptionsData();
|
| 976 |
+
|
| 977 |
+
$options['ycd-flip-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
|
| 978 |
+
$options['ycd-flip-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
| 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');
|
| 982 |
+
$options['ycd-flip-countdown-days-text'] = $this->getOptionValue('ycd-flip-countdown-days-text');
|
| 983 |
+
$options['ycd-flip-countdown-hours-text'] = $this->getOptionValue('ycd-flip-countdown-hours-text');
|
| 984 |
+
$options['ycd-flip-countdown-minutes-text'] = $this->getOptionValue('ycd-flip-countdown-minutes-text');
|
| 985 |
+
$options['ycd-flip-countdown-seconds-text'] = $this->getOptionValue('ycd-flip-countdown-seconds-text');
|
| 986 |
+
$options['ycd-countdown-expire-behavior'] = $this->getOptionValue('ycd-countdown-expire-behavior');
|
| 987 |
+
$options['count_past_zero'] = false;
|
| 988 |
+
if($this->getOptionValue('ycd-countdown-expire-behavior') == 'countToUp') {
|
| 989 |
+
$options['count_past_zero'] = true;
|
| 990 |
+
}
|
| 991 |
+
if (!empty($this->getOptionValue('ycd-count-up-from-end-date'))) {
|
| 992 |
+
$options['countUp'] = true;
|
| 993 |
+
}
|
| 994 |
+
$options['ycd-expire-text'] = $this->getOptionValue('ycd-expire-text');
|
| 995 |
+
$options['ycd-expire-url'] = $this->getOptionValue('ycd-expire-url');
|
| 996 |
+
$options['ycd-countdown-end-sound'] = $this->getOptionValue('ycd-countdown-end-sound');
|
| 997 |
+
$options['ycd-countdown-end-sound-url'] = $this->getOptionValue('ycd-countdown-end-sound-url');
|
| 998 |
+
$options['ycd-countdown-end-sound'] = $this->getOptionValue('ycd-countdown-end-sound');
|
| 999 |
+
$options['ycd-countdown-end-sound-url'] = $this->getOptionValue('ycd-countdown-end-sound-url');
|
| 1000 |
+
$options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
|
| 1001 |
+
// Day numbers
|
| 1002 |
+
|
| 1003 |
+
$options['startDay'] = $this->getOptionValue('ycd-schedule-start-day');
|
| 1004 |
+
$options['startDayNumber'] = $modifiedSavedData['startDayNumber'];
|
| 1005 |
+
$options['endDay'] = $this->getOptionValue('ycd-schedule-end-day');
|
| 1006 |
+
$options['endDayNumber'] = $modifiedSavedData['endDayNumber'];
|
| 1007 |
+
$options['currentDayNumber'] = $modifiedSavedData['currentDayNumber'];
|
| 1008 |
+
$options['ycd-schedule-end-to'] = $this->getOptionValue('ycd-schedule-end-to');
|
| 1009 |
+
$options['ycd-schedule-start-from'] = $this->getOptionValue('ycd-schedule-start-from');
|
| 1010 |
+
|
| 1011 |
+
return $options;
|
| 1012 |
+
}
|
| 1013 |
+
|
| 1014 |
+
public function getCircleOptionsData() {
|
| 1015 |
+
$options = array();
|
| 1016 |
+
$modifiedObj = $this->getCircleSeconds();
|
| 1017 |
+
$modifiedSavedData = $modifiedObj->datesNumber;
|
| 1018 |
+
$options['ycd-seconds'] = $modifiedObj->expireSeconds;
|
| 1019 |
+
$options['ycd-countdown-date-type'] = $this->getOptionValue('ycd-countdown-date-type');
|
| 1020 |
+
|
| 1021 |
+
$options += $this->generalOptionsData();
|
| 1022 |
+
|
| 1023 |
+
$options['animation'] = $this->getOptionValue('ycd-circle-animation');
|
| 1024 |
+
$options['direction'] = $this->getOptionValue('ycd-countdown-direction');
|
| 1025 |
+
$options['fg_width'] = $this->getOptionValue('ycd-circle-width');
|
| 1026 |
+
$options['bg_width'] = $this->getOptionValue('ycd-circle-bg-width');
|
| 1027 |
+
$options['start_angle'] = $this->getOptionValue('ycd-circle-start-angle');
|
| 1028 |
+
$options['count_past_zero'] = false;
|
| 1029 |
+
if($this->getOptionValue('ycd-countdown-expire-behavior') == 'countToUp') {
|
| 1030 |
+
$options['count_past_zero'] = true;
|
| 1031 |
+
}
|
| 1032 |
+
$options['circle_bg_color'] = $this->getOptionValue('ycd-countdown-bg-circle-color');
|
| 1033 |
+
$options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
|
| 1034 |
+
$options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
|
| 1035 |
+
$options['ycd-circle-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
| 1036 |
+
$options['ycd-count-up-from-end-date'] = $this->getOptionValue('ycd-count-up-from-end-date');
|
| 1037 |
+
$options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
|
| 1038 |
+
// Day numbers
|
| 1039 |
+
|
| 1040 |
+
$options['startDay'] = $this->getOptionValue('ycd-schedule-start-day');
|
| 1041 |
+
$options['startDayNumber'] = $modifiedSavedData['startDayNumber'];
|
| 1042 |
+
$options['endDay'] = $this->getOptionValue('ycd-schedule-end-day');
|
| 1043 |
+
$options['endDayNumber'] = $modifiedSavedData['endDayNumber'];
|
| 1044 |
+
$options['currentDayNumber'] = $modifiedSavedData['currentDayNumber'];
|
| 1045 |
+
$options['ycd-schedule-end-to'] = $this->getOptionValue('ycd-schedule-end-to');
|
| 1046 |
+
$options['ycd-schedule-start-from'] = $this->getOptionValue('ycd-schedule-start-from');
|
| 1047 |
+
$options['ycd-countdown-showing-limitation'] = $this->getOptionValue('ycd-countdown-showing-limitation');
|
| 1048 |
+
$options['ycd-countdown-expiration-time'] = $this->getOptionValue('ycd-countdown-expiration-time');
|
| 1049 |
+
$options['ycd-countdown-switch-number'] = $this->getOptionValue('ycd-countdown-switch-number');
|
| 1050 |
+
|
| 1051 |
+
$options['time'] = array(
|
| 1052 |
+
'Years' => array(
|
| 1053 |
+
'text' => $this->getOptionValue('ycd-countdown-years-text'),
|
| 1054 |
+
'color' => $this->getOptionValue('ycd-countdown-years-color'),
|
| 1055 |
+
'show' => $this->getOptionValue('ycd-countdown-years')
|
| 1056 |
+
),
|
| 1057 |
+
'Months' => array(
|
| 1058 |
+
'text' => $this->getOptionValue('ycd-countdown-months-text'),
|
| 1059 |
+
'color' => $this->getOptionValue('ycd-countdown-months-color'),
|
| 1060 |
+
'show' => $this->getOptionValue('ycd-countdown-months')
|
| 1061 |
+
),
|
| 1062 |
+
'Days' => array(
|
| 1063 |
+
'text' => $this->getOptionValue('ycd-countdown-days-text'),
|
| 1064 |
+
'color' => $this->getOptionValue('ycd-countdown-days-color'),
|
| 1065 |
+
'show' => $this->getOptionValue('ycd-countdown-days')
|
| 1066 |
+
),
|
| 1067 |
+
'Hours' => array(
|
| 1068 |
+
'text' => $this->getOptionValue('ycd-countdown-hours-text'),
|
| 1069 |
+
'color' => $this->getOptionValue('ycd-countdown-hours-color'),
|
| 1070 |
+
'show' => $this->getOptionValue('ycd-countdown-hours')
|
| 1071 |
+
),
|
| 1072 |
+
'Minutes' => array(
|
| 1073 |
+
'text' => $this->getOptionValue('ycd-countdown-minutes-text'),
|
| 1074 |
+
'color' => $this->getOptionValue('ycd-countdown-minutes-color'),
|
| 1075 |
+
'show' => $this->getOptionValue('ycd-countdown-minutes')
|
| 1076 |
+
),
|
| 1077 |
+
'Seconds' => array(
|
| 1078 |
+
'text' => $this->getOptionValue('ycd-countdown-seconds-text'),
|
| 1079 |
+
'color' => $this->getOptionValue('ycd-countdown-seconds-color'),
|
| 1080 |
+
'show' => $this->getOptionValue('ycd-countdown-seconds')
|
| 1081 |
+
),
|
| 1082 |
+
);
|
| 1083 |
+
|
| 1084 |
+
return $options;
|
| 1085 |
+
}
|
| 1086 |
}
|
config/config.php
CHANGED
|
@@ -63,8 +63,8 @@ class YcdCountdownConfig {
|
|
| 63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 66 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
| 67 |
-
self::addDefine('YCD_VERSION', 1.
|
| 68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
| 63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 66 |
+
self::addDefine('YCD_VERSION_PRO', 1.55);
|
| 67 |
+
self::addDefine('YCD_VERSION', 1.69);
|
| 68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
config/optionsConfig.php
CHANGED
|
@@ -162,6 +162,7 @@ class YcdCountdownOptionsConfig {
|
|
| 162 |
$options[] = array('name' => 'ycd-circle-countdown-after-countdown', 'type' => 'html', 'defaultValue' => '');
|
| 163 |
|
| 164 |
// timer clock
|
|
|
|
| 165 |
$options[] = array('name' => 'ycd-timer-hours', 'type' => 'number', 'defaultValue' => 0);
|
| 166 |
$options[] = array('name' => 'ycd-timer-minutes', 'type' => 'number', 'defaultValue' => 0);
|
| 167 |
$options[] = array('name' => 'ycd-timer-seconds', 'type' => 'number', 'defaultValue' => 30);
|
| 162 |
$options[] = array('name' => 'ycd-circle-countdown-after-countdown', 'type' => 'html', 'defaultValue' => '');
|
| 163 |
|
| 164 |
// timer clock
|
| 165 |
+
$options[] = array('name' => 'ycd-countdown-save-duration', 'type' => 'checkbox', 'defaultValue' => '');
|
| 166 |
$options[] = array('name' => 'ycd-timer-hours', 'type' => 'number', 'defaultValue' => 0);
|
| 167 |
$options[] = array('name' => 'ycd-timer-minutes', 'type' => 'number', 'defaultValue' => 0);
|
| 168 |
$options[] = array('name' => 'ycd-timer-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.6.
|
| 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.6.9
|
| 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.3.2
|
| 6 |
-
Stable tag: 1.6.
|
| 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,10 @@ 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.6.8 =
|
| 68 |
* Circle countdown text margin top (new)
|
| 69 |
* Circle countdown numbers margin top (new)
|
| 3 |
Tags: countdown, timer, countdown timer
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 5.3.2
|
| 6 |
+
Stable tag: 1.6.9
|
| 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.6.9 =
|
| 68 |
+
* Save Duration (new)
|
| 69 |
+
* Code optimization
|
| 70 |
+
|
| 71 |
= 1.6.8 =
|
| 72 |
* Circle countdown text margin top (new)
|
| 73 |
* Circle countdown numbers margin top (new)
|
