Countdown, Coming Soon – Countdown & Clock - Version 2.3.1

Version Description

  • Simple countdown added Text to top (new)
  • Sticky countdown close button text position change possibility (new)
Download this release

Release Info

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

Code changes from version 2.3.0 to 2.3.1

assets/views/admin/comingSoon.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
- use ycd\AdminHelper;
3
- $defaultData = AdminHelper::defaultData();
4
- ?>
5
- <div class="ycd-bootstrap-wrapper ycd-settings-wrapper">
6
- <form method="POST" action="<?php echo admin_url().'admin-post.php?action=ycdComingSoon'?>">
7
- <div class="row">
8
- <div class="col-lg-8">
9
- <div class="row form-group">
10
- <label class="savae-changes-label"><?php _e('Change settings'); ?></label>
11
- <div class="pull-right">
12
- <input type="submit" class="btn btn-primary" value="Save Changes">
13
- </div>
14
- </div>
15
- <?php require_once YCD_ADMIN_VIEWS_PATH.'comingSoonSettings.php'; ?>
16
- <?php require_once YCD_ADMIN_VIEWS_PATH.'comingSoonHeader.php'; ?>
17
- <?php require_once YCD_ADMIN_VIEWS_PATH.'comingSoonDesign.php'; ?>
18
- </div>
19
- <div class="col-lg-6">
20
- </div>
21
- </div>
22
- </form>
23
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/views/main/simpleMainView.php CHANGED
@@ -268,6 +268,15 @@ $defaultData = AdminHelper::defaultData();
268
  <span class="ycd-slider ycd-round"></span>
269
  </label>
270
  </div>
 
 
 
 
 
 
 
 
 
271
  </div>
272
  </div>
273
  <?php
268
  <span class="ycd-slider ycd-round"></span>
269
  </label>
270
  </div>
271
+ <div class="col-md-6">
272
+ <label class="ycd-label-of-switch" for="text-to-top"><?php _e('Text to top', YCD_TEXT_DOMAIN); ?></label>
273
+ </div>
274
+ <div class="col-md-6">
275
+ <label class="ycd-switch">
276
+ <input type="checkbox" id="text-to-top" name="ycd-text-to-top" class="ycd-accordion-checkbox" <?php echo $typeObj->getOptionValue('ycd-text-to-top'); ?>>
277
+ <span class="ycd-slider ycd-round"></span>
278
+ </label>
279
+ </div>
280
  </div>
281
  </div>
282
  <?php
assets/views/main/stickyMainView.php CHANGED
@@ -348,6 +348,14 @@ $stickyExpiration = $defaultData['stickyButtonExpiration'];
348
  <input type="text" name="ycd-sticky-close-text" id="ycd-sticky-close-text" class="form-control" value="<?php echo esc_attr($this->getOptionValue('ycd-sticky-close-text')); ?>">
349
  </div>
350
  </div>
 
 
 
 
 
 
 
 
351
  </div>
352
  <div class="row form-group">
353
  <div class="col-md-6">
348
  <input type="text" name="ycd-sticky-close-text" id="ycd-sticky-close-text" class="form-control" value="<?php echo esc_attr($this->getOptionValue('ycd-sticky-close-text')); ?>">
349
  </div>
350
  </div>
351
+ <div class="row form-group">
352
+ <div class="col-md-6">
353
+ <label class="ycd-label-of-input" for="ycd-sticky-close-position"><?php _e('Close position', YCD_TEXT_DOMAIN); ?></label>
354
+ </div>
355
+ <div class="col-md-5">
356
+ <?php echo AdminHelper::selectBox($defaultData['sticky-close-position'], esc_attr($this->getOptionValue('ycd-sticky-close-position')), array('name' => 'ycd-sticky-close-position', 'class' => 'js-ycd-select')); ?>
357
+ </div>
358
+ </div>
359
  </div>
360
  <div class="row form-group">
361
  <div class="col-md-6">
classes/countdown/SimpleCountdown.php CHANGED
@@ -107,6 +107,7 @@ class SimpleCountdown extends Countdown
107
  $availableUnites = array_filter($unites, function($unite) {
108
  return $this->getOptionValue('ycd-simple-enable-'.$unite);
109
  });
 
110
  $this->renderScripts();
111
  $lastUnite = end($availableUnites);
112
  $mode = $this->getMode();
@@ -126,9 +127,10 @@ class SimpleCountdown extends Countdown
126
  }
127
  ?>
128
  <div class="ycd-simple-current-unite-wrapper ycd-simple-current-unite-<?php echo esc_attr($unite); ?> <?php echo $hideUnite?>">
129
- <div class="ycd-simple-current-unite"><!--
130
- --><?php echo $this->timeUnitNumber($unite); ?><!--
131
- --><?php echo $this->timeUnitText($unite); ?>
 
132
  </div>
133
  <?php if ($unite != 'seconds'): ?>
134
  <div class="ycd-simple-timer-dots <?php echo $hideDotsClassName; ?>">:</div>
107
  $availableUnites = array_filter($unites, function($unite) {
108
  return $this->getOptionValue('ycd-simple-enable-'.$unite);
109
  });
110
+ $textToTop = $this->getOptionValue('ycd-text-to-top');
111
  $this->renderScripts();
112
  $lastUnite = end($availableUnites);
113
  $mode = $this->getMode();
127
  }
128
  ?>
129
  <div class="ycd-simple-current-unite-wrapper ycd-simple-current-unite-<?php echo esc_attr($unite); ?> <?php echo $hideUnite?>">
130
+ <div class="ycd-simple-current-unite"><!-- -->
131
+ <?php echo ($textToTop ? $this->timeUnitText($unite): ''); ?>
132
+ <?php echo $this->timeUnitNumber($unite); ?><!--
133
+ --><?php echo (!$textToTop ? $this->timeUnitText($unite): ''); ?>
134
  </div>
135
  <?php if ($unite != 'seconds'): ?>
136
  <div class="ycd-simple-timer-dots <?php echo $hideDotsClassName; ?>">:</div>
classes/countdown/StickyCountdown.php CHANGED
@@ -164,6 +164,7 @@ class StickyCountdown extends Countdown {
164
  }
165
  $id = $this->getId();
166
  $text = $this->getOptionValue('ycd-sticky-close-text');
 
167
  ob_start();
168
  ?>
169
  <div class="ycd-sticky-close-wrapper ycd-sticky-close-wrapper-<?php echo esc_attr($id); ?> " data-id="<?php echo esc_attr($id); ?>">
@@ -173,14 +174,44 @@ class StickyCountdown extends Countdown {
173
  .ycd-sticky-close-wrapper {
174
  display: inline-block;
175
  position: absolute;
176
- top: 8px;
177
- right: 8px;
178
  line-height: 1;
179
  }
180
  .ycd-sticky-close-text {
181
  cursor: pointer;
182
  }
183
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  <?php
185
  $content = ob_get_contents();
186
  ob_end_clean();
164
  }
165
  $id = $this->getId();
166
  $text = $this->getOptionValue('ycd-sticky-close-text');
167
+ $closePosition = $this->getOptionValue('ycd-sticky-close-position');
168
  ob_start();
169
  ?>
170
  <div class="ycd-sticky-close-wrapper ycd-sticky-close-wrapper-<?php echo esc_attr($id); ?> " data-id="<?php echo esc_attr($id); ?>">
174
  .ycd-sticky-close-wrapper {
175
  display: inline-block;
176
  position: absolute;
 
 
177
  line-height: 1;
178
  }
179
  .ycd-sticky-close-text {
180
  cursor: pointer;
181
  }
182
  </style>
183
+ <?php if ($closePosition == 'top_right'): ?>
184
+ <style>
185
+ .ycd-sticky-close-wrapper {
186
+ top: 8px;
187
+ right: 8px;
188
+ }
189
+ </style>
190
+ <?php endif;?>
191
+ <?php if ($closePosition == 'top_left'): ?>
192
+ <style>
193
+ .ycd-sticky-close-wrapper {
194
+ top: 8px;
195
+ left: 8px;
196
+ }
197
+ </style>
198
+ <?php endif;?>
199
+ <?php if ($closePosition == 'bottom_right'): ?>
200
+ <style>
201
+ .ycd-sticky-close-wrapper {
202
+ bottom: 8px;
203
+ right: 8px;
204
+ }
205
+ </style>
206
+ <?php endif;?>
207
+ <?php if ($closePosition == 'bottom_left'): ?>
208
+ <style>
209
+ .ycd-sticky-close-wrapper {
210
+ bottom: 8px;
211
+ left: 8px;
212
+ }
213
+ </style>
214
+ <?php endif;?>
215
  <?php
216
  $content = ob_get_contents();
217
  ob_end_clean();
config/config.php CHANGED
@@ -76,7 +76,7 @@ class YcdCountdownConfig
76
  self::addDefine('YCD_AJAX_SUCCESS', 1);
77
  self::addDefine('YCD_TABLE_LIMIT', 15);
78
  self::addDefine('YCD_VERSION_PRO', 2.17);
79
- self::addDefine('YCD_VERSION', 2.30);
80
  self::addDefine('YCD_FREE_VERSION', 1);
81
  self::addDefine('YCD_SILVER_VERSION', 2);
82
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -84,13 +84,13 @@ class YcdCountdownConfig
84
  self::addDefine('YCD_EXTENSION_VERSION', 99);
85
  require_once(dirname(__FILE__).'/config-pkg.php');
86
 
87
- $versionText = '2.2.9.2';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
- $versionText = '2.1.7';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
- self::addDefine('YCD_LAST_UPDATE', 'March 3');
93
- self::addDefine('YCD_NEXT_UPDATE', 'March 15');
94
  }
95
 
96
  public static function displaySettings()
76
  self::addDefine('YCD_AJAX_SUCCESS', 1);
77
  self::addDefine('YCD_TABLE_LIMIT', 15);
78
  self::addDefine('YCD_VERSION_PRO', 2.17);
79
+ self::addDefine('YCD_VERSION', 2.31);
80
  self::addDefine('YCD_FREE_VERSION', 1);
81
  self::addDefine('YCD_SILVER_VERSION', 2);
82
  self::addDefine('YCD_GOLD_VERSION', 3);
84
  self::addDefine('YCD_EXTENSION_VERSION', 99);
85
  require_once(dirname(__FILE__).'/config-pkg.php');
86
 
87
+ $versionText = '2.3.1';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
+ $versionText = '2.1.8';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
+ self::addDefine('YCD_LAST_UPDATE', 'March 26');
93
+ self::addDefine('YCD_NEXT_UPDATE', 'April 15');
94
  }
95
 
96
  public static function displaySettings()
config/optionsConfig.php CHANGED
@@ -335,6 +335,7 @@ class YcdCountdownOptionsConfig
335
  $options[] = array('name' => 'ycd-sticky-expire-behavior', 'type' => 'text', 'defaultValue' => 'redirectToURL');
336
  $options[] = array('name' => 'ycd-sticky-button-copy', 'type' => 'text', 'defaultValue' => '');
337
  $options[] = array('name' => 'ycd-sticky-copy-alert', 'type' => 'checkbox', 'defaultValue' => '');
 
338
 
339
  // Simple countdown
340
  $options[] = array('name' => 'ycd-simple-enable-months', 'type' => 'checkbox', 'defaultValue' => '');
@@ -348,6 +349,7 @@ class YcdCountdownOptionsConfig
348
  $options[] = array('name' => 'ycd-simple-enable-seconds', 'type' => 'checkbox', 'defaultValue' => 'on');
349
  $options[] = array('name' => 'ycd-simple-seconds-text', 'type' => 'text', 'defaultValue' => __('Secs', YCD_TEXT_DOMAIN));
350
  $options[] = array('name' => 'ycd-enable-simple-double-digits', 'type' => 'checkbox', 'defaultValue' => '');
 
351
 
352
  $options[] = array('name' => 'ycd-simple-numbers-font-size', 'type' => 'text', 'defaultValue' => __('35px', YCD_TEXT_DOMAIN));
353
  $options[] = array('name' => 'ycd-simple-text-font-size', 'type' => 'text', 'defaultValue' => __('12px', YCD_TEXT_DOMAIN));
335
  $options[] = array('name' => 'ycd-sticky-expire-behavior', 'type' => 'text', 'defaultValue' => 'redirectToURL');
336
  $options[] = array('name' => 'ycd-sticky-button-copy', 'type' => 'text', 'defaultValue' => '');
337
  $options[] = array('name' => 'ycd-sticky-copy-alert', 'type' => 'checkbox', 'defaultValue' => '');
338
+ $options[] = array('name' => 'ycd-sticky-close-position', 'type' => 'text', 'defaultValue' => 'top_right');
339
 
340
  // Simple countdown
341
  $options[] = array('name' => 'ycd-simple-enable-months', 'type' => 'checkbox', 'defaultValue' => '');
349
  $options[] = array('name' => 'ycd-simple-enable-seconds', 'type' => 'checkbox', 'defaultValue' => 'on');
350
  $options[] = array('name' => 'ycd-simple-seconds-text', 'type' => 'text', 'defaultValue' => __('Secs', YCD_TEXT_DOMAIN));
351
  $options[] = array('name' => 'ycd-enable-simple-double-digits', 'type' => 'checkbox', 'defaultValue' => '');
352
+ $options[] = array('name' => 'ycd-text-to-top', 'type' => 'checkbox', 'defaultValue' => '');
353
 
354
  $options[] = array('name' => 'ycd-simple-numbers-font-size', 'type' => 'text', 'defaultValue' => __('35px', YCD_TEXT_DOMAIN));
355
  $options[] = array('name' => 'ycd-simple-text-font-size', 'type' => 'text', 'defaultValue' => __('12px', YCD_TEXT_DOMAIN));
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.3.0
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.3.1
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
helpers/AdminHelper.php CHANGED
@@ -793,6 +793,13 @@ class AdminHelper {
793
  'Button-Countdown' => __('Button Countdown', YCD_TEXT_DOMAIN),
794
  'Countdown-Button' => __('Countdown Button', YCD_TEXT_DOMAIN)
795
  );
 
 
 
 
 
 
 
796
 
797
  $data['coming-soon-countdown-position'] = array(
798
  'YcdComingSoonPageBeforeHeader' => 'Before Header',
793
  'Button-Countdown' => __('Button Countdown', YCD_TEXT_DOMAIN),
794
  'Countdown-Button' => __('Countdown Button', YCD_TEXT_DOMAIN)
795
  );
796
+
797
+ $data['sticky-close-position'] = array(
798
+ 'top_right' => __('Top Right', YCD_TEXT_DOMAIN),
799
+ 'top_left' => __('Top Left', YCD_TEXT_DOMAIN),
800
+ 'bottom_left' => __('Bottom Left', YCD_TEXT_DOMAIN),
801
+ 'bottom_right' => __('Bottom Right', YCD_TEXT_DOMAIN),
802
+ );
803
 
804
  $data['coming-soon-countdown-position'] = array(
805
  'YcdComingSoonPageBeforeHeader' => 'Before Header',
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.9
6
- Stable tag: 2.3.0
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,10 @@ 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.3.0 =
71
  * Added compatibility with Polylang
72
 
2
  Contributors: adamskaat
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
+ Tested up to: 5.9.2
6
+ Stable tag: 2.3.1
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.3.1 =
71
+ * Simple countdown added Text to top (new)
72
+ * Sticky countdown close button text position change possibility (new)
73
+
74
  = 2.3.0 =
75
  * Added compatibility with Polylang
76