Countdown, Coming Soon – Countdown & Clock - Version 1.9.1

Version Description

  • Sticky Countdown Sections Order
Download this release

Release Info

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

Code changes from version 1.9.0 to 1.9.1

assets/views/main/stickyMainView.php CHANGED
@@ -13,6 +13,7 @@ if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
13
  $createCountdown = AdminHelper::getCreateCountdownUrl();
14
  $args = array('allowTypes' => array('circle'), 'except' => array('sticky'));
15
  $countdownsIdAndTitle = \ycd\Countdown::getCountdownsIdAndTitle($args);
 
16
  ?>
17
  <div class="ycd-bootstrap-wrapper">
18
  <!-- Button settings start -->
@@ -273,6 +274,14 @@ $countdownsIdAndTitle = \ycd\Countdown::getCountdownsIdAndTitle($args);
273
  </div>
274
  </div>
275
  </div>
 
 
 
 
 
 
 
 
276
  </div>
277
  <?php if(YCD_PKG_VERSION != YCD_FREE_VERSION) : ?>
278
  <div class="row form-group">
13
  $createCountdown = AdminHelper::getCreateCountdownUrl();
14
  $args = array('allowTypes' => array('circle'), 'except' => array('sticky'));
15
  $countdownsIdAndTitle = \ycd\Countdown::getCountdownsIdAndTitle($args);
16
+ $stickySectionsOrder = $defaultData['stickySectionsOrder'];
17
  ?>
18
  <div class="ycd-bootstrap-wrapper">
19
  <!-- Button settings start -->
274
  </div>
275
  </div>
276
  </div>
277
+ <div class="row form-group">
278
+ <div class="col-md-6">
279
+ <label class="ycd-label-of-input"><?php _e('Sections order', YCD_TEXT_DOMAIN); ?></label>
280
+ </div>
281
+ <div class="col-md-5">
282
+ <?php echo AdminHelper::selectBox($stickySectionsOrder, esc_attr($this->getOptionValue('ycd-sticky-countdown-sections')), array('name' => 'ycd-sticky-countdown-sections', 'class' => 'js-ycd-select')); ?>
283
+ </div>
284
+ </div>
285
  </div>
286
  <?php if(YCD_PKG_VERSION != YCD_FREE_VERSION) : ?>
287
  <div class="row form-group">
classes/countdown/StickyCountdown.php CHANGED
@@ -70,7 +70,18 @@ class StickyCountdown extends Countdown {
70
  $borderWidth = $this->getOptionValue('ycd-sticky-button-border-width');
71
  $borderRadius = $this->getOptionValue('ycd-sticky-button-border-radius');
72
  $borderColor = $this->getOptionValue('ycd-sticky-button-border-color');
73
-
 
 
 
 
 
 
 
 
 
 
 
74
  ob_start();
75
  ?>
76
  <style type="text/css">
@@ -87,7 +98,7 @@ class StickyCountdown extends Countdown {
87
  }
88
 
89
  .ycd-sticky-header-child {
90
- width: 33%;
91
  display: inline-block;
92
  text-align: center;
93
  vertical-align: middle;
@@ -174,20 +185,48 @@ class StickyCountdown extends Countdown {
174
 
175
  $textContent = $this->getOptionValue('ycd-sticky-text');
176
  $buttonText = $this->getOptionValue('ycd-sticky-button-text');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
  ob_start();
179
  ?>
180
  <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); ?>">
181
- <div class="ycd-sticky-header-child ycd-sticky-header-text">
182
- <?php echo $textContent; ?>
183
- </div>
184
- <div class="ycd-sticky-header-child ycd-sticky-header-countdown">
185
- <?php echo $this->renderCountdown(); ?>
186
- <?php echo $this->renderProgressBar(); ?>
187
- </div>
188
- <div class="ycd-sticky-header-child ycd-sticky-header-button">
189
- <input type="button" class="ycd-sticky-button" onclick="<?php echo $actionUrl; ?>" value="<?php echo esc_attr($buttonText); ?>">
190
- </div>
191
  <div>
192
  <?php echo $this->renderSubscriptionForm(); ?>
193
  </div>
70
  $borderWidth = $this->getOptionValue('ycd-sticky-button-border-width');
71
  $borderRadius = $this->getOptionValue('ycd-sticky-button-border-radius');
72
  $borderColor = $this->getOptionValue('ycd-sticky-button-border-color');
73
+
74
+ $sectionsOrder = $this->getOptionValue('ycd-sticky-countdown-sections');
75
+ $sectionsOrderArray = explode('-', $sectionsOrder);
76
+ $countCols = count($sectionsOrderArray);
77
+ $sectionsWidth = '33';
78
+
79
+ if ($countCols == 1) {
80
+ $sectionsWidth = '100';
81
+ }
82
+ else if ($countCols == 2) {
83
+ $sectionsWidth = '49';
84
+ }
85
  ob_start();
86
  ?>
87
  <style type="text/css">
98
  }
99
 
100
  .ycd-sticky-header-child {
101
+ width: <?php echo $sectionsWidth; ?>%;
102
  display: inline-block;
103
  text-align: center;
104
  vertical-align: middle;
185
 
186
  $textContent = $this->getOptionValue('ycd-sticky-text');
187
  $buttonText = $this->getOptionValue('ycd-sticky-button-text');
188
+ $sectionsOrder = $this->getOptionValue('ycd-sticky-countdown-sections');
189
+ $sectionsOrderArray = explode('-', $sectionsOrder);
190
+
191
+ $sectionsHtml = array();
192
+
193
+ ob_start();
194
+ ?>
195
+ <div class="ycd-sticky-header-child ycd-sticky-header-text">
196
+ <?php echo $textContent; ?>
197
+ </div>
198
+ <?php
199
+ $sectionsHtml['Text'] = ob_get_contents();
200
+ ob_end_clean();
201
+
202
+ ob_start();
203
+ ?>
204
+ <div class="ycd-sticky-header-child ycd-sticky-header-countdown">
205
+ <?php echo $this->renderCountdown(); ?>
206
+ <?php echo $this->renderProgressBar(); ?>
207
+ </div>
208
+ <?php
209
+ $sectionsHtml['Countdown'] = ob_get_contents();
210
+ ob_end_clean();
211
+
212
+ ob_start();
213
+ ?>
214
+ <div class="ycd-sticky-header-child ycd-sticky-header-button">
215
+ <input type="button" class="ycd-sticky-button" onclick="<?php echo $actionUrl; ?>" value="<?php echo esc_attr($buttonText); ?>">
216
+ </div>
217
+ <?php
218
+ $sectionsHtml['Button'] = ob_get_contents();
219
+ ob_end_clean();
220
+
221
 
222
  ob_start();
223
  ?>
224
  <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); ?>">
225
+
226
+ <?php foreach ($sectionsOrderArray as $sectionKey) {
227
+ echo $sectionsHtml[$sectionKey];
228
+ }?>
229
+
 
 
 
 
 
230
  <div>
231
  <?php echo $this->renderSubscriptionForm(); ?>
232
  </div>
config/config.php CHANGED
@@ -70,8 +70,8 @@ class YcdCountdownConfig {
70
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
71
  self::addDefine('YCD_AJAX_SUCCESS', 1);
72
  self::addDefine('YCD_TABLE_LIMIT', 15);
73
- self::addDefine('YCD_VERSION_PRO', 1.75);
74
- self::addDefine('YCD_VERSION', 1.89);
75
  self::addDefine('YCD_FREE_VERSION', 1);
76
  self::addDefine('YCD_SILVER_VERSION', 2);
77
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -79,13 +79,13 @@ class YcdCountdownConfig {
79
  self::addDefine('YCD_EXTENSION_VERSION', 99);
80
  require_once(dirname(__FILE__).'/config-pkg.php');
81
 
82
- $versionText = '1.9.0';
83
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
84
- $versionText = '1.7.6';
85
  }
86
  self::addDefine('YCD_VERSION_TEXT', $versionText);
87
- self::addDefine('YCD_LAST_UPDATE', 'Oct 18');
88
- self::addDefine('YCD_NEXT_UPDATE', 'Nov 28');
89
  }
90
 
91
  public static function displaySettings() {
70
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
71
  self::addDefine('YCD_AJAX_SUCCESS', 1);
72
  self::addDefine('YCD_TABLE_LIMIT', 15);
73
+ self::addDefine('YCD_VERSION_PRO', 1.77);
74
+ self::addDefine('YCD_VERSION', 1.91);
75
  self::addDefine('YCD_FREE_VERSION', 1);
76
  self::addDefine('YCD_SILVER_VERSION', 2);
77
  self::addDefine('YCD_GOLD_VERSION', 3);
79
  self::addDefine('YCD_EXTENSION_VERSION', 99);
80
  require_once(dirname(__FILE__).'/config-pkg.php');
81
 
82
+ $versionText = '1.9.1';
83
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
84
+ $versionText = '1.7.7';
85
  }
86
  self::addDefine('YCD_VERSION_TEXT', $versionText);
87
+ self::addDefine('YCD_LAST_UPDATE', 'Nov 2');
88
+ self::addDefine('YCD_NEXT_UPDATE', 'Dec 2');
89
  }
90
 
91
  public static function displaySettings() {
config/optionsConfig.php CHANGED
@@ -291,7 +291,8 @@ class YcdCountdownOptionsConfig {
291
  $options[] = array('name' => 'ycd-stick-countdown-font-weight', 'type' => 'text', 'defaultValue' => 'inherit');
292
  $options[] = array('name' => 'ycd-sticky-button-redirect-new-tab', 'type' => 'checkbox', 'defaultValue' => '');
293
  $options[] = array('name' => 'ycd-sticky-countdown-mode', 'type' => 'text', 'defaultValue' => 'stickyCountdownDefault');
294
-
 
295
  $YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
296
  }
297
 
291
  $options[] = array('name' => 'ycd-stick-countdown-font-weight', 'type' => 'text', 'defaultValue' => 'inherit');
292
  $options[] = array('name' => 'ycd-sticky-button-redirect-new-tab', 'type' => 'checkbox', 'defaultValue' => '');
293
  $options[] = array('name' => 'ycd-sticky-countdown-mode', 'type' => 'text', 'defaultValue' => 'stickyCountdownDefault');
294
+ $options[] = array('name' => 'ycd-sticky-countdown-sections', 'type' => 'text', 'defaultValue' => 'Text-Countdown-Button');
295
+
296
  $YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
297
  }
298
 
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.9.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: 1.9.1
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
helpers/AdminHelper.php CHANGED
@@ -713,6 +713,18 @@ class AdminHelper {
713
  'is' => __('Is', YCD_TEXT_DOMAIN),
714
  'isNot' => __('Is not', YCD_TEXT_DOMAIN),
715
  );
 
 
 
 
 
 
 
 
 
 
 
 
716
 
717
  $data['coming-soon-countdown-position'] = array(
718
  'YcdComingSoonPageBeforeHeader' => 'Before Header',
713
  'is' => __('Is', YCD_TEXT_DOMAIN),
714
  'isNot' => __('Is not', YCD_TEXT_DOMAIN),
715
  );
716
+ $data['stickySectionsOrder'] = array(
717
+ 'Text-Countdown-Button' => __('Text Countdown Button', YCD_TEXT_DOMAIN),
718
+ 'Text-Button-Countdown' => __('Text Button Countdown', YCD_TEXT_DOMAIN),
719
+ 'Countdown-Text-Button' => __('Countdown Text Button', YCD_TEXT_DOMAIN),
720
+ 'Countdown-Button-Text' => __('Countdown Button Text', YCD_TEXT_DOMAIN),
721
+ 'Button-Text-Countdown' => __('Button Text Countdown', YCD_TEXT_DOMAIN),
722
+ 'Button-Countdown-Text' => __('Button Countdown Text', YCD_TEXT_DOMAIN),
723
+ 'Text-Countdown' => __('Text Countdown', YCD_TEXT_DOMAIN),
724
+ 'Countdown-Text' => __('Countdown Text', YCD_TEXT_DOMAIN),
725
+ 'Button-Countdown' => __('Button Countdown', YCD_TEXT_DOMAIN),
726
+ 'Countdown-Button' => __('Countdown Button', YCD_TEXT_DOMAIN)
727
+ );
728
 
729
  $data['coming-soon-countdown-position'] = array(
730
  '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.5.1
6
- Stable tag: 1.9.0
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -66,6 +66,10 @@ Yes you can, we have Circle and Flipclock countdown popups.
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.9.0 =
70
  * Inside Sticky Countdown type, added possibility select another countdown type to show countdown
71
  * Coming Soon type code improvements
2
  Contributors: adamskaat
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
+ Tested up to: 5.5.3
6
+ Stable tag: 1.9.1
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
66
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
67
 
68
  == Changelog ==
69
+
70
+ = 1.9.1 =
71
+ * Sticky Countdown Sections Order
72
+
73
  = 1.9.0 =
74
  * Inside Sticky Countdown type, added possibility select another countdown type to show countdown
75
  * Coming Soon type code improvements