Version Description
- Sticky countdown button redirect to new tab option
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 1.8.1 |
Comparing to | |
See all releases |
Code changes from version 1.8.0 to 1.8.1
- assets/views/main/stickyMainView.php +14 -3
- classes/countdown/StickyCountdown.php +10 -2
- config/config.php +6 -6
- config/optionsConfig.php +1 -0
- countdown-builder.php +1 -1
- helpers/AdminHelper.php +12 -12
- readme.txt +7 -3
assets/views/main/stickyMainView.php
CHANGED
@@ -53,9 +53,20 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
|
|
53 |
<label class="ycd-label-of-input" for="ycd-sticky-url"><?php _e('URL', YCD_TEXT_DOMAIN); ?></label>
|
54 |
</div>
|
55 |
<div class="col-md-5">
|
56 |
-
<input type="url" name="ycd-sticky-url" id="ycd-sticky-url" class="form-control" value="<?php echo esc_attr($this->getOptionValue('ycd-sticky-url')); ?>">
|
57 |
</div>
|
58 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<div class="row">
|
60 |
<div class="col-md-6">
|
61 |
<label for="ycd-sticky-button-padding-enable" class="ycd-label-of-switch"><?php _e('Enable padding', YCD_TEXT_DOMAIN); ?></label>
|
@@ -238,6 +249,7 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
|
|
238 |
</div>
|
239 |
</div>
|
240 |
</div>
|
|
|
241 |
<div class="row form-group">
|
242 |
<div class="col-md-6">
|
243 |
<label class="ycd-label-of-input"><?php _e('Display rule', YCD_TEXT_DOMAIN); ?></label>
|
@@ -247,7 +259,6 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
|
|
247 |
</div>
|
248 |
</div>
|
249 |
<div class="ycd-sub-options-settings">
|
250 |
-
<?php if(YCD_PKG_VERSION != YCD_FREE_VERSION) : ?>
|
251 |
<div class="row form-group">
|
252 |
<div class="col-md-6">
|
253 |
<label class="ycd-label-of-input" for="ycd-sticky-all-pages"><?php _e('All pages', YCD_TEXT_DOMAIN); ?></label>
|
@@ -259,7 +270,7 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
|
|
259 |
</label>
|
260 |
</div>
|
261 |
</div>
|
262 |
-
<?php endif; ?>
|
263 |
</div>
|
|
|
264 |
</div>
|
265 |
<input type="hidden" name="ycd-type" value="<?php echo esc_attr($type); ?>">
|
53 |
<label class="ycd-label-of-input" for="ycd-sticky-url"><?php _e('URL', YCD_TEXT_DOMAIN); ?></label>
|
54 |
</div>
|
55 |
<div class="col-md-5">
|
56 |
+
<input type="url" placeholder="https://www.example.com" name="ycd-sticky-url" id="ycd-sticky-url" class="form-control" value="<?php echo esc_attr($this->getOptionValue('ycd-sticky-url')); ?>">
|
57 |
</div>
|
58 |
</div>
|
59 |
+
<div class="row">
|
60 |
+
<div class="col-md-6">
|
61 |
+
<label for="ycd-sticky-button-redirect-new-tab" class="ycd-label-of-switch"><?php _e('Redirect to new tab', YCD_TEXT_DOMAIN); ?></label>
|
62 |
+
</div>
|
63 |
+
<div class="col-md-6">
|
64 |
+
<label class="ycd-switch">
|
65 |
+
<input type="checkbox" id="ycd-sticky-button-redirect-new-tab" class="" name="ycd-sticky-button-redirect-new-tab" <?php echo $this->getOptionValue('ycd-sticky-button-redirect-new-tab'); ?>>
|
66 |
+
<span class="ycd-slider ycd-round"></span>
|
67 |
+
</label>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
<div class="row">
|
71 |
<div class="col-md-6">
|
72 |
<label for="ycd-sticky-button-padding-enable" class="ycd-label-of-switch"><?php _e('Enable padding', YCD_TEXT_DOMAIN); ?></label>
|
249 |
</div>
|
250 |
</div>
|
251 |
</div>
|
252 |
+
<?php if(YCD_PKG_VERSION != YCD_FREE_VERSION) : ?>
|
253 |
<div class="row form-group">
|
254 |
<div class="col-md-6">
|
255 |
<label class="ycd-label-of-input"><?php _e('Display rule', YCD_TEXT_DOMAIN); ?></label>
|
259 |
</div>
|
260 |
</div>
|
261 |
<div class="ycd-sub-options-settings">
|
|
|
262 |
<div class="row form-group">
|
263 |
<div class="col-md-6">
|
264 |
<label class="ycd-label-of-input" for="ycd-sticky-all-pages"><?php _e('All pages', YCD_TEXT_DOMAIN); ?></label>
|
270 |
</label>
|
271 |
</div>
|
272 |
</div>
|
|
|
273 |
</div>
|
274 |
+
<?php endif; ?>
|
275 |
</div>
|
276 |
<input type="hidden" name="ycd-type" value="<?php echo esc_attr($type); ?>">
|
classes/countdown/StickyCountdown.php
CHANGED
@@ -142,15 +142,23 @@ class StickyCountdown extends Countdown {
|
|
142 |
$settings['timeZone'] = $timeZone;
|
143 |
$settings['ycd-countdown-end-sound'] = $this->getOptionValue('ycd-countdown-end-sound');
|
144 |
$settings['ycd-countdown-end-sound-url'] = $this->getOptionValue('ycd-countdown-end-sound-url');
|
|
|
145 |
$settings['ycd-countdown-expire-behavior'] = $this->getOptionValue('ycd-countdown-expire-behavior');
|
146 |
$settings['ycd-expire-text'] = $this->getOptionValue('ycd-expire-text');
|
147 |
$settings['ycd-expire-url'] = $this->getOptionValue('ycd-expire-url');
|
148 |
$settings['id'] = $id;
|
149 |
$settings = json_encode($settings);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
$textContent = $this->getOptionValue('ycd-sticky-text');
|
152 |
$buttonText = $this->getOptionValue('ycd-sticky-button-text');
|
153 |
-
|
154 |
ob_start();
|
155 |
?>
|
156 |
<div class="ycd-sticky-header ycd-sticky-header-<?php echo esc_attr($id); ?>" data-id="<?php echo esc_attr($id); ?>" data-settings="<?php echo esc_attr($settings); ?>">
|
@@ -162,7 +170,7 @@ class StickyCountdown extends Countdown {
|
|
162 |
<?php echo $this->renderProgressBar(); ?>
|
163 |
</div>
|
164 |
<div class="ycd-sticky-header-child ycd-sticky-header-button">
|
165 |
-
<input type="button" class="ycd-sticky-button" onclick="
|
166 |
</div>
|
167 |
<div>
|
168 |
<?php echo $this->renderSubscriptionForm(); ?>
|
142 |
$settings['timeZone'] = $timeZone;
|
143 |
$settings['ycd-countdown-end-sound'] = $this->getOptionValue('ycd-countdown-end-sound');
|
144 |
$settings['ycd-countdown-end-sound-url'] = $this->getOptionValue('ycd-countdown-end-sound-url');
|
145 |
+
$settings['ycd-sticky-button-redirect-new-tab'] = $this->getOptionValue('ycd-sticky-button-redirect-new-tab');
|
146 |
$settings['ycd-countdown-expire-behavior'] = $this->getOptionValue('ycd-countdown-expire-behavior');
|
147 |
$settings['ycd-expire-text'] = $this->getOptionValue('ycd-expire-text');
|
148 |
$settings['ycd-expire-url'] = $this->getOptionValue('ycd-expire-url');
|
149 |
$settings['id'] = $id;
|
150 |
$settings = json_encode($settings);
|
151 |
+
|
152 |
+
$stickyUrl = $this->getOptionValue('ycd-sticky-url');
|
153 |
+
$actionUrl = "window.location.href = $stickyUrl";
|
154 |
+
|
155 |
+
if ($settings['ycd-sticky-button-redirect-new-tab']) {
|
156 |
+
$actionUrl = "window.open('$stickyUrl')";
|
157 |
+
}
|
158 |
|
159 |
$textContent = $this->getOptionValue('ycd-sticky-text');
|
160 |
$buttonText = $this->getOptionValue('ycd-sticky-button-text');
|
161 |
+
|
162 |
ob_start();
|
163 |
?>
|
164 |
<div class="ycd-sticky-header ycd-sticky-header-<?php echo esc_attr($id); ?>" data-id="<?php echo esc_attr($id); ?>" data-settings="<?php echo esc_attr($settings); ?>">
|
170 |
<?php echo $this->renderProgressBar(); ?>
|
171 |
</div>
|
172 |
<div class="ycd-sticky-header-child ycd-sticky-header-button">
|
173 |
+
<input type="button" class="ycd-sticky-button" onclick="<?php echo $actionUrl; ?>" value="<?php echo esc_attr($buttonText); ?>">
|
174 |
</div>
|
175 |
<div>
|
176 |
<?php echo $this->renderSubscriptionForm(); ?>
|
config/config.php
CHANGED
@@ -68,8 +68,8 @@ class YcdCountdownConfig {
|
|
68 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
69 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
70 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
71 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
72 |
-
self::addDefine('YCD_VERSION', 1.
|
73 |
self::addDefine('YCD_FREE_VERSION', 1);
|
74 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
75 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
@@ -77,13 +77,13 @@ class YcdCountdownConfig {
|
|
77 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
78 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
79 |
|
80 |
-
$versionText = '1.8.
|
81 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
82 |
-
$versionText = '1.6.
|
83 |
}
|
84 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
85 |
-
self::addDefine('YCD_LAST_UPDATE', '
|
86 |
-
self::addDefine('YCD_NEXT_UPDATE', 'July
|
87 |
}
|
88 |
|
89 |
public static function displaySettings() {
|
68 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
69 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
70 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
71 |
+
self::addDefine('YCD_VERSION_PRO', 1.67);
|
72 |
+
self::addDefine('YCD_VERSION', 1.81);
|
73 |
self::addDefine('YCD_FREE_VERSION', 1);
|
74 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
75 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
77 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
78 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
79 |
|
80 |
+
$versionText = '1.8.1';
|
81 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
82 |
+
$versionText = '1.6.7';
|
83 |
}
|
84 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
85 |
+
self::addDefine('YCD_LAST_UPDATE', 'July 2');
|
86 |
+
self::addDefine('YCD_NEXT_UPDATE', 'July 11');
|
87 |
}
|
88 |
|
89 |
public static function displaySettings() {
|
config/optionsConfig.php
CHANGED
@@ -281,6 +281,7 @@ class YcdCountdownOptionsConfig {
|
|
281 |
$options[] = array('name' => 'ycd-sticky-button-border-width', 'type' => 'text', 'defaultValue' => '0px');
|
282 |
$options[] = array('name' => 'ycd-sticky-button-border-radius', 'type' => 'text', 'defaultValue' => '0px');
|
283 |
$options[] = array('name' => 'ycd-stick-countdown-font-weight', 'type' => 'text', 'defaultValue' => 'inherit');
|
|
|
284 |
|
285 |
$YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
|
286 |
}
|
281 |
$options[] = array('name' => 'ycd-sticky-button-border-width', 'type' => 'text', 'defaultValue' => '0px');
|
282 |
$options[] = array('name' => 'ycd-sticky-button-border-radius', 'type' => 'text', 'defaultValue' => '0px');
|
283 |
$options[] = array('name' => 'ycd-stick-countdown-font-weight', 'type' => 'text', 'defaultValue' => 'inherit');
|
284 |
+
$options[] = array('name' => 'ycd-sticky-button-redirect-new-tab', 'type' => 'checkbox', 'defaultValue' => '');
|
285 |
|
286 |
$YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
|
287 |
}
|
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: 1.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: 1.8.1
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
helpers/AdminHelper.php
CHANGED
@@ -396,18 +396,6 @@ class AdminHelper {
|
|
396 |
)
|
397 |
);
|
398 |
|
399 |
-
$countdownDateTypeFields[] = array(
|
400 |
-
'attr' => array(
|
401 |
-
'type' => 'radio',
|
402 |
-
'name' => 'ycd-countdown-date-type',
|
403 |
-
'class' => 'ycd-date-type',
|
404 |
-
'data-attr-href' => 'ycd-date-wooCoupon',
|
405 |
-
'value' => 'wooCoupon'
|
406 |
-
),
|
407 |
-
'label' => array(
|
408 |
-
'name' => __('WooCommerce Coupon', YCD_TEXT_DOMAIN)
|
409 |
-
)
|
410 |
-
);
|
411 |
|
412 |
if(YCD_PKG_VERSION != YCD_SILVER_VERSION) {
|
413 |
$countdownDateTypeFields[] = array(
|
@@ -435,6 +423,18 @@ class AdminHelper {
|
|
435 |
'name' => __('Schedule 2', YCD_TEXT_DOMAIN)
|
436 |
)
|
437 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
}
|
439 |
|
440 |
$data['countdown-date-type'] = array(
|
396 |
)
|
397 |
);
|
398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
|
400 |
if(YCD_PKG_VERSION != YCD_SILVER_VERSION) {
|
401 |
$countdownDateTypeFields[] = array(
|
423 |
'name' => __('Schedule 2', YCD_TEXT_DOMAIN)
|
424 |
)
|
425 |
);
|
426 |
+
$countdownDateTypeFields[] = array(
|
427 |
+
'attr' => array(
|
428 |
+
'type' => 'radio',
|
429 |
+
'name' => 'ycd-countdown-date-type',
|
430 |
+
'class' => 'ycd-date-type',
|
431 |
+
'data-attr-href' => 'ycd-date-wooCoupon',
|
432 |
+
'value' => 'wooCoupon'
|
433 |
+
),
|
434 |
+
'label' => array(
|
435 |
+
'name' => __('WooCommerce Coupon', YCD_TEXT_DOMAIN)
|
436 |
+
)
|
437 |
+
);
|
438 |
}
|
439 |
|
440 |
$data['countdown-date-type'] = array(
|
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.4.
|
6 |
-
Stable tag: 1.8.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -36,6 +36,7 @@ Countdown types
|
|
36 |
* Flipclock countdwon
|
37 |
* Flipclock countdwon & popup
|
38 |
* WooCommerce countdown
|
|
|
39 |
* Coming Soon page
|
40 |
|
41 |
How to create Countdown example
|
@@ -65,9 +66,12 @@ Yes you can, we have Circle and Flipclock countdown popups.
|
|
65 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
66 |
|
67 |
== Changelog ==
|
|
|
|
|
|
|
68 |
= 1.8.0 =
|
69 |
* Add sticky countdown to version
|
70 |
-
* WooCommerce
|
71 |
|
72 |
= 1.7.9 =
|
73 |
* Admin side fixed Warnings
|
2 |
Contributors: adamskaat
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 5.4.2
|
6 |
+
Stable tag: 1.8.1
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
36 |
* Flipclock countdwon
|
37 |
* Flipclock countdwon & popup
|
38 |
* WooCommerce countdown
|
39 |
+
* WooCommerce cuopons
|
40 |
* Coming Soon page
|
41 |
|
42 |
How to create Countdown example
|
66 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
67 |
|
68 |
== Changelog ==
|
69 |
+
= 1.8.1 =
|
70 |
+
* Sticky countdown button redirect to new tab option
|
71 |
+
|
72 |
= 1.8.0 =
|
73 |
* Add sticky countdown to version
|
74 |
+
* WooCommerce coupon integration
|
75 |
|
76 |
= 1.7.9 =
|
77 |
* Admin side fixed Warnings
|