Version Description
- Bug Fixed
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 1.3.5 |
Comparing to | |
See all releases |
Code changes from version 1.3.4 to 1.3.5
- assets/js/Admin.js +3 -4
- assets/js/Countdown.js +1 -1
- assets/js/clock/canvas_clock.js +1 -1
- assets/views/afterExpire.php +2 -0
- assets/views/generalOptions.php +2 -0
- assets/views/types.php +9 -3
- classes/YcdWidget.php +4 -3
- classes/countdown/Countdown.php +10 -5
- config/config.php +2 -2
- config/optionsConfig.php +50 -50
- countdown-builder.php +1 -1
- readme.txt +4 -1
assets/js/Admin.js
CHANGED
@@ -390,16 +390,15 @@ YcdAdmin.prototype.multipleChoiceButton = function() {
|
|
390 |
}
|
391 |
|
392 |
jQuery(this).on('change', function() {
|
393 |
-
that.hideAllChoiceWrapper(jQuery('.ycd-
|
394 |
that.buildChoiceShowOption(jQuery(this));
|
395 |
});
|
396 |
})
|
397 |
};
|
398 |
|
399 |
YcdAdmin.prototype.hideAllChoiceWrapper = function(choiceOptionsWrapper) {
|
400 |
-
choiceOptionsWrapper.each(function() {
|
401 |
-
var
|
402 |
-
var choiceInputWrapperId = choiceInput.attr('data-attr-href');
|
403 |
jQuery('#'+choiceInputWrapperId).addClass('ycd-hide');
|
404 |
})
|
405 |
};
|
390 |
}
|
391 |
|
392 |
jQuery(this).on('change', function() {
|
393 |
+
that.hideAllChoiceWrapper(jQuery(this).parents('.ycd-multichoice-wrapper').first());
|
394 |
that.buildChoiceShowOption(jQuery(this));
|
395 |
});
|
396 |
})
|
397 |
};
|
398 |
|
399 |
YcdAdmin.prototype.hideAllChoiceWrapper = function(choiceOptionsWrapper) {
|
400 |
+
choiceOptionsWrapper.find('input').each(function() {
|
401 |
+
var choiceInputWrapperId = jQuery(this).attr('data-attr-href');
|
|
|
402 |
jQuery('#'+choiceInputWrapperId).addClass('ycd-hide');
|
403 |
})
|
404 |
};
|
assets/js/Countdown.js
CHANGED
@@ -414,7 +414,7 @@ YcdCountdown.prototype.changeTimesStatus = function() {
|
|
414 |
|
415 |
YcdCountdown.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
|
416 |
|
417 |
-
var currentDate = moment(new Date()).tz(selectedTimezone).format('MM
|
418 |
|
419 |
var dateTime = new Date(currentDate).valueOf();
|
420 |
var timeNow = Math.floor(dateTime / 1000);
|
414 |
|
415 |
YcdCountdown.prototype.setCounterTime = function(calendarValue, selectedTimezone) {
|
416 |
|
417 |
+
var currentDate = moment(new Date()).tz(selectedTimezone).format('MM/DD/YYYY H:m:s');
|
418 |
|
419 |
var dateTime = new Date(currentDate).valueOf();
|
420 |
var timeNow = Math.floor(dateTime / 1000);
|
assets/js/clock/canvas_clock.js
CHANGED
@@ -1353,7 +1353,7 @@ function ycdGetChangedDateFromTimeZone(extraOptions) {
|
|
1353 |
var currentDate = moment()._d;
|
1354 |
if (extraOptions && extraOptions.timeZone != null && extraOptions.timeZone) {
|
1355 |
|
1356 |
-
currentDate = moment().tz(extraOptions.timeZone).format('MM
|
1357 |
}
|
1358 |
|
1359 |
now = new Date(currentDate);
|
1353 |
var currentDate = moment()._d;
|
1354 |
if (extraOptions && extraOptions.timeZone != null && extraOptions.timeZone) {
|
1355 |
|
1356 |
+
currentDate = moment().tz(extraOptions.timeZone).format('MM/DD/YYYY H:m:s');
|
1357 |
}
|
1358 |
|
1359 |
now = new Date(currentDate);
|
assets/views/afterExpire.php
CHANGED
@@ -12,10 +12,12 @@ $defaultData = AdminHelper::defaultData();
|
|
12 |
<div class="col-md-7">
|
13 |
</div>
|
14 |
</div>
|
|
|
15 |
<?php
|
16 |
$multipleChoiceButton = new MultipleChoiceButton($defaultData['countdownExpireTime'], esc_attr($this->getOptionValue('ycd-countdown-expire-behavior')));
|
17 |
echo $multipleChoiceButton;
|
18 |
?>
|
|
|
19 |
<div id="ycd-countdown-show-text" class="ycd-countdown-show-text ycd-hide">
|
20 |
<div>
|
21 |
<div class="col-md-12">
|
12 |
<div class="col-md-7">
|
13 |
</div>
|
14 |
</div>
|
15 |
+
<div class="ycd-multichoice-wrapper">
|
16 |
<?php
|
17 |
$multipleChoiceButton = new MultipleChoiceButton($defaultData['countdownExpireTime'], esc_attr($this->getOptionValue('ycd-countdown-expire-behavior')));
|
18 |
echo $multipleChoiceButton;
|
19 |
?>
|
20 |
+
</div>
|
21 |
<div id="ycd-countdown-show-text" class="ycd-countdown-show-text ycd-hide">
|
22 |
<div>
|
23 |
<div class="col-md-12">
|
assets/views/generalOptions.php
CHANGED
@@ -5,10 +5,12 @@ $defaultData = AdminHelper::defaultData();
|
|
5 |
$dueDate = $this->getOptionValue('ycd-date-time-picker');
|
6 |
?>
|
7 |
<div class="ycd-bootstrap-wrapper">
|
|
|
8 |
<?php
|
9 |
$multipleChoiceButton = new MultipleChoiceButton($defaultData['countdown-date-type'], esc_attr($this->getOptionValue('ycd-countdown-date-type')));
|
10 |
echo $multipleChoiceButton;
|
11 |
?>
|
|
|
12 |
<div id="ycd-countdown-due-date" class="ycd-countdown-show-text ycd-hide">
|
13 |
<div class="row form-group">
|
14 |
<div class="col-md-6">
|
5 |
$dueDate = $this->getOptionValue('ycd-date-time-picker');
|
6 |
?>
|
7 |
<div class="ycd-bootstrap-wrapper">
|
8 |
+
<div class="ycd-multichoice-wrapper">
|
9 |
<?php
|
10 |
$multipleChoiceButton = new MultipleChoiceButton($defaultData['countdown-date-type'], esc_attr($this->getOptionValue('ycd-countdown-date-type')));
|
11 |
echo $multipleChoiceButton;
|
12 |
?>
|
13 |
+
</div>
|
14 |
<div id="ycd-countdown-due-date" class="ycd-countdown-show-text ycd-hide">
|
15 |
<div class="row form-group">
|
16 |
<div class="col-md-6">
|
assets/views/types.php
CHANGED
@@ -10,8 +10,14 @@ $types = Countdown::getCountdownTypes();
|
|
10 |
</div>
|
11 |
</div>
|
12 |
<?php foreach ($types as $type): ?>
|
13 |
-
|
14 |
-
<
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
<?php endforeach; ?>
|
17 |
</div>
|
10 |
</div>
|
11 |
</div>
|
12 |
<?php foreach ($types as $type): ?>
|
13 |
+
<?php if(YCD_PKG_VERSION != YCD_FREE_VERSION && $type->isAvailable()): ?>
|
14 |
+
<a class="create-countdown-link" <?php echo AdminHelper::buildCreateCountdownAttrs($type); ?> href="<?php echo AdminHelper::buildCreateCountdownUrl($type); ?>">
|
15 |
+
<div class="countdowns-div <?php echo AdminHelper::getCountdownThumbClass($type); ?>"><?php echo AdminHelper::getCountdownThumbText($type); ?></div>
|
16 |
+
</a>
|
17 |
+
<?php elseif(YCD_PKG_VERSION == YCD_FREE_VERSION): ?>
|
18 |
+
<a class="create-countdown-link" <?php echo AdminHelper::buildCreateCountdownAttrs($type); ?> href="<?php echo AdminHelper::buildCreateCountdownUrl($type); ?>">
|
19 |
+
<div class="countdowns-div <?php echo AdminHelper::getCountdownThumbClass($type); ?>"><?php echo AdminHelper::getCountdownThumbText($type); ?></div>
|
20 |
+
</a>
|
21 |
+
<?php endif;?>
|
22 |
<?php endforeach; ?>
|
23 |
</div>
|
classes/YcdWidget.php
CHANGED
@@ -18,7 +18,7 @@ class ycd_countdown_widget extends WP_Widget {
|
|
18 |
|
19 |
// Creating widget front-end
|
20 |
public function widget( $args, $instance ) {
|
21 |
-
$cdId = (int)
|
22 |
|
23 |
echo do_shortcode('[ycd_countdown id='.$cdId.']');
|
24 |
}
|
@@ -39,9 +39,10 @@ class ycd_countdown_widget extends WP_Widget {
|
|
39 |
}
|
40 |
|
41 |
// Updating widget replacing old instances with new
|
42 |
-
public function update( $new_instance, $old_instance ) {
|
43 |
-
|
44 |
$instance = array();
|
|
|
45 |
$instance['ycdOption'] = $new_instance['ycdOption'];
|
46 |
return $instance;
|
47 |
}
|
18 |
|
19 |
// Creating widget front-end
|
20 |
public function widget( $args, $instance ) {
|
21 |
+
$cdId = (int)@$instance['ycdOption'];
|
22 |
|
23 |
echo do_shortcode('[ycd_countdown id='.$cdId.']');
|
24 |
}
|
39 |
}
|
40 |
|
41 |
// Updating widget replacing old instances with new
|
42 |
+
public function update( $new_instance, $old_instance = array()) {
|
43 |
+
|
44 |
$instance = array();
|
45 |
+
|
46 |
$instance['ycdOption'] = $new_instance['ycdOption'];
|
47 |
return $instance;
|
48 |
}
|
classes/countdown/Countdown.php
CHANGED
@@ -459,21 +459,26 @@ abstract class Countdown {
|
|
459 |
return $popups;
|
460 |
}
|
461 |
|
462 |
-
public static function shapeIdTitleData($
|
463 |
$idTitle = array();
|
464 |
|
465 |
-
if(empty($
|
466 |
return $idTitle;
|
467 |
}
|
468 |
|
469 |
-
foreach ($
|
470 |
-
$title = $
|
|
|
|
|
471 |
|
|
|
|
|
|
|
472 |
if(empty($title)) {
|
473 |
$title = __('(no title)', YCD_TEXT_DOMAIN);
|
474 |
}
|
475 |
|
476 |
-
$idTitle[$
|
477 |
}
|
478 |
|
479 |
return $idTitle;
|
459 |
return $popups;
|
460 |
}
|
461 |
|
462 |
+
public static function shapeIdTitleData($contdowns) {
|
463 |
$idTitle = array();
|
464 |
|
465 |
+
if(empty($contdowns)) {
|
466 |
return $idTitle;
|
467 |
}
|
468 |
|
469 |
+
foreach ($contdowns as $countdown) {
|
470 |
+
$title = $countdown->getTitle();
|
471 |
+
$id = $countdown->getId();
|
472 |
+
$isActive = Countdown::isActivePost($id);
|
473 |
|
474 |
+
if(!$isActive) {
|
475 |
+
continue;
|
476 |
+
}
|
477 |
if(empty($title)) {
|
478 |
$title = __('(no title)', YCD_TEXT_DOMAIN);
|
479 |
}
|
480 |
|
481 |
+
$idTitle[$id] = $title .' - '. $countdown->getTypeTitle();
|
482 |
}
|
483 |
|
484 |
return $idTitle;
|
config/config.php
CHANGED
@@ -46,8 +46,8 @@ class YcdCountdownConfig {
|
|
46 |
self::addDefine('YCD_PRODUCTS_LIMIT', 1000);
|
47 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
48 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
49 |
-
self::addDefine('YCD_VERSION', 1.
|
50 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
51 |
self::addDefine('YCD_FREE_VERSION', 1);
|
52 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
53 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
46 |
self::addDefine('YCD_PRODUCTS_LIMIT', 1000);
|
47 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
48 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
49 |
+
self::addDefine('YCD_VERSION', 1.35);
|
50 |
+
self::addDefine('YCD_VERSION_PRO', 1.22);
|
51 |
self::addDefine('YCD_FREE_VERSION', 1);
|
52 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
53 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
config/optionsConfig.php
CHANGED
@@ -5,57 +5,57 @@ class YcdCountdownOptionsConfig {
|
|
5 |
public static function init() {
|
6 |
global $YCD_TYPES;
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
|
60 |
public static function optionsValues() {
|
61 |
global $YCD_OPTIONS;
|
5 |
public static function init() {
|
6 |
global $YCD_TYPES;
|
7 |
|
8 |
+
$YCD_TYPES['typeName'] = apply_filters('ycdTypes', array(
|
9 |
+
'circle' => YCD_FREE_VERSION,
|
10 |
+
'timer' => YCD_FREE_VERSION,
|
11 |
+
'clock1' => YCD_FREE_VERSION,
|
12 |
+
'clock2' => YCD_FREE_VERSION,
|
13 |
+
'clock3' => YCD_FREE_VERSION,
|
14 |
+
'clock4' => YCD_SILVER_VERSION,
|
15 |
+
'clock5' => YCD_SILVER_VERSION,
|
16 |
+
'clock6' => YCD_SILVER_VERSION,
|
17 |
+
'clock7' => YCD_SILVER_VERSION,
|
18 |
+
'sticky' => YCD_SILVER_VERSION,
|
19 |
+
'woo' => YCD_GOLD_VERSION,
|
20 |
+
'circlePopup' => YCD_SILVER_VERSION,
|
21 |
+
'flipClock' => YCD_SILVER_VERSION,
|
22 |
+
'flipClockPopup' => YCD_SILVER_VERSION
|
23 |
+
));
|
24 |
|
25 |
+
$YCD_TYPES['typePath'] = apply_filters('ycdTypePaths', array(
|
26 |
+
'circle' => YCD_COUNTDOWNS_PATH,
|
27 |
+
'timer' => YCD_COUNTDOWNS_PATH,
|
28 |
+
'clock1' => YCD_COUNTDOWNS_PATH,
|
29 |
+
'clock2' => YCD_COUNTDOWNS_PATH,
|
30 |
+
'clock3' => YCD_COUNTDOWNS_PATH,
|
31 |
+
'clock4' => YCD_COUNTDOWNS_PATH,
|
32 |
+
'clock5' => YCD_COUNTDOWNS_PATH,
|
33 |
+
'clock6' => YCD_COUNTDOWNS_PATH,
|
34 |
+
'clock7' => YCD_COUNTDOWNS_PATH,
|
35 |
+
'sticky' => YCD_COUNTDOWNS_PATH,
|
36 |
+
'woo' => YCD_COUNTDOWNS_PATH,
|
37 |
+
'circlePopup' => YCD_COUNTDOWNS_PATH,
|
38 |
+
'flipClock' => YCD_COUNTDOWNS_PATH,
|
39 |
+
'flipClockPopup' => YCD_COUNTDOWNS_PATH
|
40 |
+
));
|
41 |
+
|
42 |
+
$YCD_TYPES['titles'] = apply_filters('ycdTitles', array(
|
43 |
+
'circle' => __('Circle', YCD_TEXT_DOMAIN),
|
44 |
+
'timer' => __('Digital', YCD_TEXT_DOMAIN),
|
45 |
+
'clock1' => __('Clock 1', YCD_TEXT_DOMAIN),
|
46 |
+
'clock2' => __('Clock 2', YCD_TEXT_DOMAIN),
|
47 |
+
'clock3' => __('Clock 3', YCD_TEXT_DOMAIN),
|
48 |
+
'clock4' => __('Clock 4', YCD_TEXT_DOMAIN),
|
49 |
+
'clock5' => __('Clock 5', YCD_TEXT_DOMAIN),
|
50 |
+
'clock6' => __('Clock 6', YCD_TEXT_DOMAIN),
|
51 |
+
'clock7' => __('Clock 7', YCD_TEXT_DOMAIN),
|
52 |
+
'sticky' => __('Sticky countdown', YCD_TEXT_DOMAIN),
|
53 |
+
'woo' => __('WooCommerce countdown', YCD_TEXT_DOMAIN),
|
54 |
+
'circlePopup' => __('Circle Popup', YCD_TEXT_DOMAIN),
|
55 |
+
'flipClock' => __('Flip Clock', YCD_TEXT_DOMAIN),
|
56 |
+
'flipClockPopup' => __('Flip Clock Popup', YCD_TEXT_DOMAIN)
|
57 |
+
));
|
58 |
+
}
|
59 |
|
60 |
public static function optionsValues() {
|
61 |
global $YCD_OPTIONS;
|
countdown-builder.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Countdown builder
|
4 |
* Description: The best countdown plugin
|
5 |
-
* Version: 1.3.
|
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.3.5
|
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.0.3
|
6 |
-
Stable tag: 1.3.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -52,6 +52,9 @@ Coming soon
|
|
52 |
|
53 |
== Changelog ==
|
54 |
|
|
|
|
|
|
|
55 |
= 1.3.4 =
|
56 |
* Countdown date duration option(new)
|
57 |
* WooCommerce Countdown (new)
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 5.0.3
|
6 |
+
Stable tag: 1.3.5
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
52 |
|
53 |
== Changelog ==
|
54 |
|
55 |
+
= 1.3.5 =
|
56 |
+
* Bug Fixed
|
57 |
+
|
58 |
= 1.3.4 =
|
59 |
* Countdown date duration option(new)
|
60 |
* WooCommerce Countdown (new)
|