Version Description
- Count up from End Date (new)
- Admin panel improvements
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 1.5.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.5 to 1.5.6
- assets/css/admin.css +4 -0
- assets/js/TimeCircles.js +4 -0
- assets/views/afterExpire.php +11 -0
- assets/views/types.php +4 -1
- classes/Actions.php +14 -12
- classes/countdown/CircleCountdown.php +1 -0
- config/config.php +3 -3
- config/optionsConfig.php +1 -0
- countdown-builder.php +1 -1
- readme.txt +6 -2
assets/css/admin.css
CHANGED
@@ -128,6 +128,10 @@
|
|
128 |
position: relative;
|
129 |
}
|
130 |
|
|
|
|
|
|
|
|
|
131 |
.ycd-type-title-pro {
|
132 |
font-size: 23px;
|
133 |
font-weight: 600;
|
128 |
position: relative;
|
129 |
}
|
130 |
|
131 |
+
.ycd-type-title-extensions-pro {
|
132 |
+
top: 42px !important;
|
133 |
+
}
|
134 |
+
|
135 |
.ycd-type-title-pro {
|
136 |
font-size: 23px;
|
137 |
font-weight: 600;
|
assets/js/TimeCircles.js
CHANGED
@@ -726,7 +726,11 @@
|
|
726 |
}
|
727 |
if (typeof attr_data_timer === "number") {
|
728 |
this.data.timer = attr_data_timer;
|
|
|
729 |
this.data.attributes.ref_date = (new Date()).getTime() + (attr_data_timer * 1000);
|
|
|
|
|
|
|
730 |
}
|
731 |
else {
|
732 |
// data-timer and data-date were both not set
|
726 |
}
|
727 |
if (typeof attr_data_timer === "number") {
|
728 |
this.data.timer = attr_data_timer;
|
729 |
+
|
730 |
this.data.attributes.ref_date = (new Date()).getTime() + (attr_data_timer * 1000);
|
731 |
+
if(this.config['ycd-count-up-from-end-date']) {
|
732 |
+
this.data.attributes.ref_date = new Date(moment(this.config['ycd-date-time-picker']).tz(this.config['ycd-circle-time-zone']).format('MM/DD/YYYY H:m:s')).getTime() + (attr_data_timer * 1000);
|
733 |
+
}
|
734 |
}
|
735 |
else {
|
736 |
// data-timer and data-date were both not set
|
assets/views/afterExpire.php
CHANGED
@@ -39,6 +39,17 @@ $defaultData = AdminHelper::defaultData();
|
|
39 |
</div>
|
40 |
</div>
|
41 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
<div id="ycd-countdown-redirect-url" class="ycd-countdown-show-text ycd-hide">
|
43 |
<div class="row">
|
44 |
<div class="col-md-6 ycd-sub-option">
|
39 |
</div>
|
40 |
</div>
|
41 |
</div>
|
42 |
+
<div id="ycd-countdown-countUp-behavior" class="ycd-countdown-show-text ycd-hide">
|
43 |
+
<div class="row">
|
44 |
+
<div class="col-md-6 ycd-sub-option">
|
45 |
+
<label for="ycd-count-up-from-end-date" class="ycd-label-of-input"><?php _e('Count up from End Date', YCD_TEXT_DOMAIN); ?></label>
|
46 |
+
</div>
|
47 |
+
<div class="col-md-6">
|
48 |
+
<input type="checkbox" id="ycd-count-up-from-end-date" name="ycd-count-up-from-end-date" <?php echo esc_attr($this->getOptionValue('ycd-count-up-from-end-date')); ?>>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
|
53 |
<div id="ycd-countdown-redirect-url" class="ycd-countdown-show-text ycd-hide">
|
54 |
<div class="row">
|
55 |
<div class="col-md-6 ycd-sub-option">
|
assets/views/types.php
CHANGED
@@ -39,9 +39,12 @@ $extensionsResult = AdminHelper::separateToActiveAndNotActive($currentExtensions
|
|
39 |
<a class="create-countdown-link" <?php echo AdminHelper::buildCreateCountdownAttrs($type); ?> href="<?php echo YCD_COUNTDOWN_PRO_URL.'#yrm-'.$extension['shortKey']; ?>">
|
40 |
<div class="countdowns-div">
|
41 |
<div class="ycd-type-div <?php echo $extension['shortKey']?>-countdown-pro ycd-pro-version"></div>
|
42 |
-
|
43 |
<div class="ycd-type-view-footer">
|
44 |
<span class="ycd-promotion-video"><?php echo $extension['boxTitle']; ?></span>
|
|
|
|
|
|
|
45 |
</div>
|
46 |
</div>
|
47 |
</a>
|
39 |
<a class="create-countdown-link" <?php echo AdminHelper::buildCreateCountdownAttrs($type); ?> href="<?php echo YCD_COUNTDOWN_PRO_URL.'#yrm-'.$extension['shortKey']; ?>">
|
40 |
<div class="countdowns-div">
|
41 |
<div class="ycd-type-div <?php echo $extension['shortKey']?>-countdown-pro ycd-pro-version"></div>
|
42 |
+
<p class="ycd-type-title-pro ycd-type-title-extensions-pro"><?php echo __('PRO EXTENSION', YCD_TEXT_DOMAIN); ?></p>
|
43 |
<div class="ycd-type-view-footer">
|
44 |
<span class="ycd-promotion-video"><?php echo $extension['boxTitle']; ?></span>
|
45 |
+
<?php if(!empty($extension['videoURL'])): ?>
|
46 |
+
<span class="ycd-play-promotion-video" data-href="<?php echo esc_attr($extension['videoURL']); ?>"></span>
|
47 |
+
<?php endif; ?>
|
48 |
</div>
|
49 |
</div>
|
50 |
</a>
|
classes/Actions.php
CHANGED
@@ -52,6 +52,7 @@ class Actions {
|
|
52 |
}
|
53 |
|
54 |
public function adminHead() {
|
|
|
55 |
$script = '<script>';
|
56 |
$script .= "jQuery(document).ready(function() {jQuery('[href*=\"ycdSubscribers\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank');jQuery('[href*=\"ycdNewsletter\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank')});";
|
57 |
$script .= '</script>';
|
@@ -202,18 +203,19 @@ class Actions {
|
|
202 |
$title = $countdownObj->getTypeTitle();
|
203 |
}
|
204 |
echo $title;
|
205 |
-
$
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
|
|
217 |
}
|
218 |
if ($column == 'onof') {
|
219 |
$checked = '';
|
52 |
}
|
53 |
|
54 |
public function adminHead() {
|
55 |
+
echo "<script>jQuery(document).ready(function() {jQuery('#menu-posts-ycdcountdown a[href*=\"page=supports\"]').css({color: 'yellow'});jQuery('#menu-posts-ycdcountdown a[href*=\"page=supports\"]').bind('click', function(e) {e.preventDefault(); window.open('https://wordpress.org/support/plugin/countdown-builder/')}) });</script>";
|
56 |
$script = '<script>';
|
57 |
$script .= "jQuery(document).ready(function() {jQuery('[href*=\"ycdSubscribers\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank');jQuery('[href*=\"ycdNewsletter\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank')});";
|
58 |
$script .= '</script>';
|
203 |
$title = $countdownObj->getTypeTitle();
|
204 |
}
|
205 |
echo $title;
|
206 |
+
if(!empty($countdownObj) && is_object($countdownObj)) {
|
207 |
+
$allowToShowExpiration = $countdownObj->allowToShowExpiration();
|
208 |
+
if(is_object($countdownObj) && $countdownObj->getIsCountdown() && $allowToShowExpiration) {
|
209 |
+
if($countdownObj->isExpired()) {
|
210 |
+
echo '<div>Date: Expired</div>';
|
211 |
+
}
|
212 |
+
else {
|
213 |
+
$dateString = $countdownObj->getExpireDate();
|
214 |
+
|
215 |
+
echo '<div>Expires after '.$dateString.'</div>';
|
216 |
+
}
|
217 |
+
}
|
218 |
+
}
|
219 |
}
|
220 |
if ($column == 'onof') {
|
221 |
$checked = '';
|
classes/countdown/CircleCountdown.php
CHANGED
@@ -80,6 +80,7 @@ class CircleCountdown extends Countdown {
|
|
80 |
$options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
|
81 |
$options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
|
82 |
$options['ycd-circle-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
|
|
83 |
$options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
|
84 |
// Day numbers
|
85 |
|
80 |
$options['use_background'] = $this->getOptionValue('ycd-countdown-background-circle');
|
81 |
$options['ycd-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
|
82 |
$options['ycd-circle-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
83 |
+
$options['ycd-count-up-from-end-date'] = $this->getOptionValue('ycd-count-up-from-end-date');
|
84 |
$options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
|
85 |
// Day numbers
|
86 |
|
config/config.php
CHANGED
@@ -57,8 +57,8 @@ class YcdCountdownConfig {
|
|
57 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
58 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
59 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
60 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
61 |
-
self::addDefine('YCD_VERSION', 1.
|
62 |
self::addDefine('YCD_FREE_VERSION', 1);
|
63 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
64 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
@@ -171,7 +171,7 @@ class YcdCountdownConfig {
|
|
171 |
'pluginKey' => 'countdown-builder-analytics/countdown-builder-analytics.php',
|
172 |
'isType' => false,
|
173 |
'shortKey' => 'analytics',
|
174 |
-
'videoURL' => '',
|
175 |
'boxTitle' => __('Analytics')
|
176 |
);
|
177 |
|
57 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
58 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
59 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
60 |
+
self::addDefine('YCD_VERSION_PRO', 1.42);
|
61 |
+
self::addDefine('YCD_VERSION', 1.56);
|
62 |
self::addDefine('YCD_FREE_VERSION', 1);
|
63 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
64 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
171 |
'pluginKey' => 'countdown-builder-analytics/countdown-builder-analytics.php',
|
172 |
'isType' => false,
|
173 |
'shortKey' => 'analytics',
|
174 |
+
'videoURL' => 'https://www.youtube.com/watch?v=58asfPjhMS8',
|
175 |
'boxTitle' => __('Analytics')
|
176 |
);
|
177 |
|
config/optionsConfig.php
CHANGED
@@ -217,6 +217,7 @@ class YcdCountdownOptionsConfig {
|
|
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 |
}
|
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 |
+
$options[] = array('name' => 'ycd-count-up-from-end-date', 'type' => 'checkbox', 'defaultValue' => '');
|
221 |
|
222 |
$YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
|
223 |
}
|
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.6
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: adamskaat
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
-
Tested up to: 5.
|
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,10 @@ You need to select the .zip file, there is no need to extract the zip file, just
|
|
64 |
|
65 |
|
66 |
== Changelog ==
|
|
|
|
|
|
|
|
|
67 |
= 1.5.5 =
|
68 |
* More plugins section
|
69 |
* Count Up option save bug fixed
|
2 |
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.6
|
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.6 =
|
68 |
+
* Count up from End Date (new)
|
69 |
+
* Admin panel improvements
|
70 |
+
|
71 |
= 1.5.5 =
|
72 |
* More plugins section
|
73 |
* Count Up option save bug fixed
|