Countdown, Coming Soon – Countdown & Clock - Version 2.0.8

Version Description

  • Coming soon Automatically start by date
  • Coming soon Automatically expire by date
  • Coming soon admin section improvement
Download this release

Release Info

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

Code changes from version 2.0.7 to 2.0.8

assets/js/YcdSimpleCountdown.js CHANGED
@@ -62,7 +62,7 @@ YcdSimpleCountdown.prototype.responsive = function() {
62
  };
63
 
64
  YcdSimpleCountdown.prototype.changeDate = function() {
65
- var datePicker = jQuery('#ycd-date-time-picker');
66
  if(!datePicker.length) {
67
  return false;
68
  }
62
  };
63
 
64
  YcdSimpleCountdown.prototype.changeDate = function() {
65
+ var datePicker = jQuery('#ycd-date-time-picker, #ycd-coming-soon-start');
66
  if(!datePicker.length) {
67
  return false;
68
  }
assets/views/admin/comingSoon/comingSoonHeader.php CHANGED
@@ -6,7 +6,7 @@
6
  <label for="ycd-coming-soon-title"><?php _e('Title', YCD_TEXT_DOMAIN); ?></label>
7
  </div>
8
  <div class="col-md-6">
9
- <input type="text" class="form-control" name="ycd-coming-soon-title" id="ycd-coming-soon-title" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-title'));?>">
10
  </div>
11
  </div>
12
  <div class="row form-group">
@@ -14,7 +14,7 @@
14
  <label for="ycd-coming-soon-seo-description"><?php _e('SEO Meta Description', YCD_TEXT_DOMAIN); ?></label>
15
  </div>
16
  <div class="col-md-6">
17
- <textarea name="ycd-coming-soon-seo-description" id="ycd-coming-soon-seo-description" class="form-control"><?php echo esc_attr($this->getOptionValue('ycd-coming-soon-seo-description'));?></textarea>
18
  </div>
19
  </div>
20
  <div class="row form-group">
@@ -22,7 +22,7 @@
22
  <label for="ycd-coming-soon-favicon"><?php _e('Favicon', YCD_TEXT_DOMAIN); ?></label>
23
  </div>
24
  <div class="col-md-4">
25
- <input type="text" class="form-control" name="ycd-coming-soon-favicon" id="ycd-coming-soon-favicon" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-favicon'));?>">
26
  </div>
27
  <div class="col-md-2">
28
  <button class="js-ycd-image-btn btn btn-primary" data-src-id="ycd-coming-soon-favicon"><?php _e('Select Image', YCD_TEXT_DOMAIN); ?></button>
6
  <label for="ycd-coming-soon-title"><?php _e('Title', YCD_TEXT_DOMAIN); ?></label>
7
  </div>
8
  <div class="col-md-6">
9
+ <input type="text" class="form-control" name="ycd-coming-soon-title" id="ycd-coming-soon-title" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-title'));?>" placeholder="<?php _e('Header title', YCD_TEXT_DOMAIN)?>">
10
  </div>
11
  </div>
12
  <div class="row form-group">
14
  <label for="ycd-coming-soon-seo-description"><?php _e('SEO Meta Description', YCD_TEXT_DOMAIN); ?></label>
15
  </div>
16
  <div class="col-md-6">
17
+ <textarea name="ycd-coming-soon-seo-description" id="ycd-coming-soon-seo-description" class="form-control" placeholder="<?php _e('SEO description', YCD_TEXT_DOMAIN)?>"><?php echo esc_attr($this->getOptionValue('ycd-coming-soon-seo-description'));?></textarea>
18
  </div>
19
  </div>
20
  <div class="row form-group">
22
  <label for="ycd-coming-soon-favicon"><?php _e('Favicon', YCD_TEXT_DOMAIN); ?></label>
23
  </div>
24
  <div class="col-md-4">
25
+ <input type="text" class="form-control" name="ycd-coming-soon-favicon" id="ycd-coming-soon-favicon" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-favicon'));?>" placeholder="<?php _e('Favicon', YCD_TEXT_DOMAIN)?>">
26
  </div>
27
  <div class="col-md-2">
28
  <button class="js-ycd-image-btn btn btn-primary" data-src-id="ycd-coming-soon-favicon"><?php _e('Select Image', YCD_TEXT_DOMAIN); ?></button>
assets/views/admin/comingSoon/comingSoonOptions.php CHANGED
@@ -12,6 +12,75 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
12
  <div class="panel panel-default">
13
  <div class="panel-heading"><?php _e('Options', YCD_TEXT_DOMAIN)?></div>
14
  <div class="panel-body">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  <div class="row form-group">
16
  <div class="col-md-6">
17
  <label for="ycd-coming-soon-for-loggdin" class="ycd-label-of-switch"><?php _e('Show on selected user roles', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
@@ -31,6 +100,8 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
31
  <?php echo HelperFunction::createSelectBox($defaultData['userRoles'], $userSavedRoles, array('name' => 'ycd-coming-soon-user-roles[]', 'class' => 'js-ycd-select ycd-countdowns', 'multiple' => 'multiple', 'id' => 'ycd-coming-soon-user-roles')); ?>
32
  </div>
33
  </div>
 
 
34
  <div class="row form-group">
35
  <div class="col-md-6">
36
  <label for="ycd-coming-soon-whitelist-ip" class="ycd-label-of-switch"><?php _e('White list IP address', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
@@ -50,5 +121,6 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
50
  <input type="text" class="form-control" name="ycd-coming-soon-ip-address" placeholder="<?php _e('You can enter multiple IP address, just separate them with comma', YCD_TEXT_DOMAIN)?>" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-ip-address'))?>">
51
  </div>
52
  </div>
 
53
  </div>
54
  </div>
12
  <div class="panel panel-default">
13
  <div class="panel-heading"><?php _e('Options', YCD_TEXT_DOMAIN)?></div>
14
  <div class="panel-body">
15
+ <?php if (YcdDataAccess::isHidden('comingSoonSchedule')): ?>
16
+ <!-- Start automatically enable countdown -->
17
+ <div class="row form-group">
18
+ <div class="col-md-6">
19
+ <label for="ycd-coming-soon-automat-enable" class="ycd-label-of-switch"><?php _e('Automatically start by date', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
20
+ </div>
21
+ <div class="col-md-6 ycd-circles-width-wrapper ycd-option-wrapper<?php echo $isPro; ?>">
22
+ <label class="ycd-switch">
23
+ <input type="checkbox" id="ycd-coming-soon-automat-enable" name="ycd-coming-soon-automat-enable" class="ycd-accordion-checkbox" <?php echo $this->getOptionValue('ycd-coming-soon-automat-enable'); ?>>
24
+ <span class="ycd-slider ycd-round"></span>
25
+ </label>
26
+ </div>
27
+ </div>
28
+ <div class="ycd-accordion-content ycd-hide-content">
29
+ <div class="row form-group">
30
+ <div class="col-md-6">
31
+ <label for="ycd-coming-soon-start-timezone" class="ycd-label-of-input"><?php _e('Time Zone', YCD_TEXT_DOMAIN); ?></label>
32
+ </div>
33
+ <div class="col-md-6">
34
+ <div class="ycd-select-wrapper">
35
+ <?php echo AdminHelper::selectBox($defaultData['time-zone'], esc_attr($this->getOptionValue('ycd-coming-soon-start-timezone')), array('name' => 'ycd-coming-soon-start-timezone', 'class' => 'js-ycd-select')); ?>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div class="row form-group">
40
+ <div class="col-md-6">
41
+ <label for="ycd-coming-soon-user-roles"><?php _e('Select start date', YCD_TEXT_DOMAIN)?></label>
42
+ </div>
43
+ <div class="col-md-6">
44
+ <input type="text" id="ycd-coming-soon-start" class="form-control ycd-date-time-picker" name="ycd-coming-soon-start" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-start')); ?>">
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <!-- End automatically enable countdown -->
49
+ <!-- Start automatically expiration countdown -->
50
+ <div class="row form-group">
51
+ <div class="col-md-6">
52
+ <label for="ycd-coming-soon-automat-expiration" class="ycd-label-of-switch"><?php _e('Automatically Expire by date', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
53
+ </div>
54
+ <div class="col-md-6 ycd-circles-width-wrapper ycd-option-wrapper<?php echo $isPro; ?>">
55
+ <label class="ycd-switch">
56
+ <input type="checkbox" id="ycd-coming-soon-automat-expiration" name="ycd-coming-soon-automat-expiration" class="ycd-accordion-checkbox" <?php echo $this->getOptionValue('ycd-coming-soon-automat-expiration'); ?>>
57
+ <span class="ycd-slider ycd-round"></span>
58
+ </label>
59
+ </div>
60
+ </div>
61
+ <div class="ycd-accordion-content ycd-hide-content">
62
+ <div class="row form-group">
63
+ <div class="col-md-6">
64
+ <label for="ycd-coming-soon-expiration-timezone" class="ycd-label-of-input"><?php _e('Time Zone', YCD_TEXT_DOMAIN); ?></label>
65
+ </div>
66
+ <div class="col-md-6">
67
+ <div class="ycd-select-wrapper">
68
+ <?php echo AdminHelper::selectBox($defaultData['time-zone'], esc_attr($this->getOptionValue('ycd-coming-soon-expiration-timezone')), array('name' => 'ycd-coming-soon-expiration-timezone', 'class' => 'js-ycd-select')); ?>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="row form-group">
73
+ <div class="col-md-6">
74
+ <label for="ycd-coming-soon-expiration"><?php _e('Select expiration date', YCD_TEXT_DOMAIN)?></label>
75
+ </div>
76
+ <div class="col-md-6">
77
+ <input type="text" id="ycd-coming-soon-expiration" class="form-control ycd-date-time-picker" name="ycd-coming-soon-expiration" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-expiration')); ?>">
78
+ </div>
79
+ </div>
80
+ </div>
81
+ <!-- End automatically expiration countdown -->
82
+ <?php endif; ?>
83
+ <!-- start User role options -->
84
  <div class="row form-group">
85
  <div class="col-md-6">
86
  <label for="ycd-coming-soon-for-loggdin" class="ycd-label-of-switch"><?php _e('Show on selected user roles', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
100
  <?php echo HelperFunction::createSelectBox($defaultData['userRoles'], $userSavedRoles, array('name' => 'ycd-coming-soon-user-roles[]', 'class' => 'js-ycd-select ycd-countdowns', 'multiple' => 'multiple', 'id' => 'ycd-coming-soon-user-roles')); ?>
101
  </div>
102
  </div>
103
+ <!-- end User role options -->
104
+ <!-- start white list option -->
105
  <div class="row form-group">
106
  <div class="col-md-6">
107
  <label for="ycd-coming-soon-whitelist-ip" class="ycd-label-of-switch"><?php _e('White list IP address', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
121
  <input type="text" class="form-control" name="ycd-coming-soon-ip-address" placeholder="<?php _e('You can enter multiple IP address, just separate them with comma', YCD_TEXT_DOMAIN)?>" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-ip-address'))?>">
122
  </div>
123
  </div>
124
+ <!-- end white list option -->
125
  </div>
126
  </div>
classes/countdown/ComingSoon.php CHANGED
@@ -110,15 +110,23 @@ Class ComingSoon {
110
  $defaults['ycd-coming-soon-countdown-custom-js'] = '';
111
  $defaults['ycd-coming-soon-whitelist-ip'] = '';
112
  $defaults['ycd-coming-soon-for-loggdin'] = '';
 
 
113
  $defaults['ycd-coming-soon-ip-address'] = '';
114
  $defaults['ycd-coming-soon-user-roles'] = '';
 
 
 
 
115
  $defaults['checkboxes'] = array(
116
  'ycd-enable-coming-soon',
117
  'ycd-coming-soon-bg-image',
118
  'ycd-coming-soon-add-countdown',
119
  'ycd-coming-soon-bg-video',
120
  'ycd-coming-soon-whitelist-ip',
121
- 'ycd-coming-soon-for-loggdin'
 
 
122
  );
123
 
124
  return apply_filters('ycdComingSoonDefaults', $defaults);
@@ -182,7 +190,7 @@ Class ComingSoon {
182
  $savedData[$name] = $postData[$name];
183
  }
184
  }
185
-
186
  $savedDataString = json_encode($savedData);
187
  update_option('ycdComingSoonSettings', $savedDataString);
188
  }
110
  $defaults['ycd-coming-soon-countdown-custom-js'] = '';
111
  $defaults['ycd-coming-soon-whitelist-ip'] = '';
112
  $defaults['ycd-coming-soon-for-loggdin'] = '';
113
+ $defaults['ycd-coming-soon-automat-enable'] = '';
114
+ $defaults['ycd-coming-soon-automat-expiration'] = '';
115
  $defaults['ycd-coming-soon-ip-address'] = '';
116
  $defaults['ycd-coming-soon-user-roles'] = '';
117
+ $defaults['ycd-coming-soon-start'] = '';
118
+ $defaults['ycd-coming-soon-start-timezone'] = '';
119
+ $defaults['ycd-coming-soon-expiration'] = '';
120
+ $defaults['ycd-coming-soon-expiration-timezone'] = '';
121
  $defaults['checkboxes'] = array(
122
  'ycd-enable-coming-soon',
123
  'ycd-coming-soon-bg-image',
124
  'ycd-coming-soon-add-countdown',
125
  'ycd-coming-soon-bg-video',
126
  'ycd-coming-soon-whitelist-ip',
127
+ 'ycd-coming-soon-for-loggdin',
128
+ 'ycd-coming-soon-automat-enable',
129
+ 'ycd-coming-soon-automat-expiration',
130
  );
131
 
132
  return apply_filters('ycdComingSoonDefaults', $defaults);
190
  $savedData[$name] = $postData[$name];
191
  }
192
  }
193
+ do_action('ycdComingSoonSave', $savedData);
194
  $savedDataString = json_encode($savedData);
195
  update_option('ycdComingSoonSettings', $savedDataString);
196
  }
config/boot.php CHANGED
@@ -7,4 +7,5 @@ if(YCD_PKG_VERSION > YCD_FREE_VERSION) {
7
  die();
8
  }
9
  }
10
- require_once dirname(__FILE__).'/optionsConfig.php';
 
7
  die();
8
  }
9
  }
10
+ require_once(dirname(__FILE__).'/optionsConfig.php');
11
+ require_once(dirname(__FILE__).'/dataAccess.php');
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.92);
78
- self::addDefine('YCD_VERSION', 2.07);
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.7';
87
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
88
- $versionText = '1.9.3';
89
  }
90
  self::addDefine('YCD_VERSION_TEXT', $versionText);
91
- self::addDefine('YCD_LAST_UPDATE', 'April 24');
92
- self::addDefine('YCD_NEXT_UPDATE', 'May 9');
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.94);
78
+ self::addDefine('YCD_VERSION', 2.08);
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.0.8';
87
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
88
+ $versionText = '1.9.4';
89
  }
90
  self::addDefine('YCD_VERSION_TEXT', $versionText);
91
+ self::addDefine('YCD_LAST_UPDATE', 'May 2');
92
+ self::addDefine('YCD_NEXT_UPDATE', 'May 15');
93
  }
94
 
95
  public static function displaySettings()
config/dataAccess.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class YcdDataAccess
4
+ {
5
+ public static function getAllDataAcess()
6
+ {
7
+ $access = array(
8
+ 'comingSoonSchedule' => array('hideLevels' => array(YCD_SILVER_VERSION))
9
+ );
10
+
11
+ return apply_filters('ycdDataAccessObjects', $access);
12
+ }
13
+
14
+ public static function isHidden($key)
15
+ {
16
+ $accessObjects = self::getAllDataAcess();
17
+
18
+ if (!empty($accessObjects[$key])) {
19
+ return !in_array(YCD_PKG_VERSION, $accessObjects[$key]['hideLevels']);
20
+ }
21
+
22
+ return true;
23
+ }
24
+ }
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.7
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.0.8
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
6
- Stable tag: 2.0.7
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,11 @@ 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.7 =
71
  * Added possibility add shortcode inside Coming soon page content
72
  * Fixed added slashes issue in coming soon page content
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.7
6
+ Stable tag: 2.0.8
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.0.8 =
71
+ * Coming soon Automatically start by date
72
+ * Coming soon Automatically expire by date
73
+ * Coming soon admin section improvement
74
+
75
  = 2.0.7 =
76
  * Added possibility add shortcode inside Coming soon page content
77
  * Fixed added slashes issue in coming soon page content