Countdown, Coming Soon – Countdown & Clock - Version 2.1.0

Version Description

  • Added simple countdown months new time unite
Download this release

Release Info

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

Code changes from version 2.0.9 to 2.1.0

assets/js/YcdSimpleCountdown.js CHANGED
@@ -271,7 +271,7 @@ YcdSimpleCountdown.prototype.render = function()
271
 
272
  YcdSimpleCountdown.prototype.countdown = function()
273
  {
274
- var unites = ['days', 'hours', 'minutes', 'seconds'];
275
  var that = this;
276
  var id = that.id;
277
  var options = this.options;
@@ -292,7 +292,8 @@ YcdSimpleCountdown.prototype.countdown = function()
292
  }
293
  // Time calculations for days, hours, minutes and seconds
294
  var unitesValues = {};
295
- unitesValues.days = Math.floor(distance / (1000 * 60 * 60 * 24));
 
296
  unitesValues.hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
297
  unitesValues.minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
298
  unitesValues.seconds = Math.floor((distance % (1000 * 60)) / 1000);
271
 
272
  YcdSimpleCountdown.prototype.countdown = function()
273
  {
274
+ var unites = ['months', 'days', 'hours', 'minutes', 'seconds'];
275
  var that = this;
276
  var id = that.id;
277
  var options = this.options;
292
  }
293
  // Time calculations for days, hours, minutes and seconds
294
  var unitesValues = {};
295
+ unitesValues.months = Math.floor(distance / (2678400000));
296
+ unitesValues.days = Math.floor(distance % 2678400000/ (1000 * 60 * 60 * 24));
297
  unitesValues.hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
298
  unitesValues.minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
299
  unitesValues.seconds = Math.floor((distance % (1000 * 60)) / 1000);
assets/views/main/simpleMainView.php CHANGED
@@ -20,6 +20,29 @@ $defaultData = AdminHelper::defaultData();
20
  </div>
21
  <div class="row form-group">
22
  <div class="col-md-6">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  <!-- Days section start -->
24
  <div class="row form-group">
25
  <div class="col-md-6">
20
  </div>
21
  <div class="row form-group">
22
  <div class="col-md-6">
23
+ <!-- Mounts section start -->
24
+ <div class="row form-group">
25
+ <div class="col-md-6">
26
+ <label for="ycd-simple-enable-months"><?php _e('Months', YCD_TEXT_DOMAIN); ?></label>
27
+ </div>
28
+ <div class="col-md-6">
29
+ <label class="ycd-switch">
30
+ <input type="checkbox" id="ycd-simple-enable-months" data-time-type="months" name="ycd-simple-enable-months" class="ycd-accordion-checkbox js-ycd-time-status" <?php echo $typeObj->getOptionValue('ycd-simple-enable-months'); ?>>
31
+ <span class="ycd-slider ycd-round"></span>
32
+ </label>
33
+ </div>
34
+ </div>
35
+ <div class="ycd-accordion-content ycd-hide-content">
36
+ <div class="row form-group">
37
+ <div class="col-md-6">
38
+ <label for="ycd-simple-months-text"><?php _e('label', YCD_TEXT_DOMAIN); ?></label>
39
+ </div>
40
+ <div class="col-md-6">
41
+ <input type="text" id="ycd-simple-months-text" class="form-control ycd-simple-text" data-time-type="months" name="ycd-simple-months-text" value="<?php echo esc_attr($typeObj->getOptionValue('ycd-simple-months-text')); ?>" >
42
+ </div>
43
+ </div>
44
+ </div>
45
+ <!-- Mounts section end -->
46
  <!-- Days section start -->
47
  <div class="row form-group">
48
  <div class="col-md-6">
classes/countdown/SimpleCountdown.php CHANGED
@@ -4,7 +4,7 @@ namespace ycd;
4
  class SimpleCountdown extends Countdown
5
  {
6
  private $mode = 'textUnderCountdown';
7
- private $timeUnites = array('days', 'hours', 'minutes', 'seconds');
8
 
9
  public function __construct()
10
  {
4
  class SimpleCountdown extends Countdown
5
  {
6
  private $mode = 'textUnderCountdown';
7
+ private $timeUnites = array('months', 'days', 'hours', 'minutes', 'seconds');
8
 
9
  public function __construct()
10
  {
config/config.php CHANGED
@@ -74,8 +74,8 @@ class YcdCountdownConfig
74
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
75
  self::addDefine('YCD_AJAX_SUCCESS', 1);
76
  self::addDefine('YCD_TABLE_LIMIT', 15);
77
- self::addDefine('YCD_VERSION_PRO', 1.95);
78
- self::addDefine('YCD_VERSION', 2.09);
79
  self::addDefine('YCD_FREE_VERSION', 1);
80
  self::addDefine('YCD_SILVER_VERSION', 2);
81
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -83,13 +83,13 @@ class YcdCountdownConfig
83
  self::addDefine('YCD_EXTENSION_VERSION', 99);
84
  require_once(dirname(__FILE__).'/config-pkg.php');
85
 
86
- $versionText = '2.0.9';
87
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
88
  $versionText = '1.9.5';
89
  }
90
  self::addDefine('YCD_VERSION_TEXT', $versionText);
91
- self::addDefine('YCD_LAST_UPDATE', 'May 17');
92
- self::addDefine('YCD_NEXT_UPDATE', 'May 31');
93
  }
94
 
95
  public static function displaySettings()
74
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
75
  self::addDefine('YCD_AJAX_SUCCESS', 1);
76
  self::addDefine('YCD_TABLE_LIMIT', 15);
77
+ self::addDefine('YCD_VERSION_PRO', 1.96);
78
+ self::addDefine('YCD_VERSION', 2.10);
79
  self::addDefine('YCD_FREE_VERSION', 1);
80
  self::addDefine('YCD_SILVER_VERSION', 2);
81
  self::addDefine('YCD_GOLD_VERSION', 3);
83
  self::addDefine('YCD_EXTENSION_VERSION', 99);
84
  require_once(dirname(__FILE__).'/config-pkg.php');
85
 
86
+ $versionText = '2.1.0';
87
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
88
  $versionText = '1.9.5';
89
  }
90
  self::addDefine('YCD_VERSION_TEXT', $versionText);
91
+ self::addDefine('YCD_LAST_UPDATE', 'June 6');
92
+ self::addDefine('YCD_NEXT_UPDATE', 'June 24');
93
  }
94
 
95
  public static function displaySettings()
config/optionsConfig.php CHANGED
@@ -328,6 +328,8 @@ class YcdCountdownOptionsConfig
328
  $options[] = array('name' => 'ycd-sticky-close-text', 'type' => 'text', 'defaultValue' => __('Close', YCD_TEXT_DOMAIN));
329
 
330
  // Simple countdown
 
 
331
  $options[] = array('name' => 'ycd-simple-enable-days', 'type' => 'checkbox', 'defaultValue' => 'on');
332
  $options[] = array('name' => 'ycd-simple-days-text', 'type' => 'text', 'defaultValue' => __('Days', YCD_TEXT_DOMAIN));
333
  $options[] = array('name' => 'ycd-simple-enable-hours', 'type' => 'checkbox', 'defaultValue' => 'on');
328
  $options[] = array('name' => 'ycd-sticky-close-text', 'type' => 'text', 'defaultValue' => __('Close', YCD_TEXT_DOMAIN));
329
 
330
  // Simple countdown
331
+ $options[] = array('name' => 'ycd-simple-enable-months', 'type' => 'checkbox', 'defaultValue' => '');
332
+ $options[] = array('name' => 'ycd-simple-months-text', 'type' => 'text', 'defaultValue' => __('Months', YCD_TEXT_DOMAIN));
333
  $options[] = array('name' => 'ycd-simple-enable-days', 'type' => 'checkbox', 'defaultValue' => 'on');
334
  $options[] = array('name' => 'ycd-simple-days-text', 'type' => 'text', 'defaultValue' => __('Days', YCD_TEXT_DOMAIN));
335
  $options[] = array('name' => 'ycd-simple-enable-hours', 'type' => 'checkbox', 'defaultValue' => 'on');
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: 2.0.9
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: 2.1.0
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.7.2
6
- Stable tag: 2.0.9
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -67,6 +67,9 @@ Yes you can, we have Circle and Flipclock countdown popups.
67
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
68
 
69
  == Changelog ==
 
 
 
70
  = 2.0.9 =
71
  * Fixed Display on option save issue on PHP 8
72
  * Fixed Coming Soon issue for logged in users on PHP 8
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.7.2
6
+ Stable tag: 2.1.0
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
67
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
68
 
69
  == Changelog ==
70
+ = 2.1.0 =
71
+ * Added simple countdown months new time unite
72
+
73
  = 2.0.9 =
74
  * Fixed Display on option save issue on PHP 8
75
  * Fixed Coming Soon issue for logged in users on PHP 8