Countdown, Coming Soon – Countdown & Clock - Version 1.9.6

Version Description

  • Simple countdown numbers font size
  • Simple countdown labels font size
Download this release

Release Info

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

Code changes from version 1.9.5 to 1.9.6

assets/js/YcdSimpleCountdown.js CHANGED
@@ -72,6 +72,22 @@ YcdSimpleCountdown.prototype.changeDateDuration = function() {
72
  });
73
  };
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  YcdSimpleCountdown.prototype.eventListener = function ()
76
  {
77
  var that = this;
@@ -126,6 +142,7 @@ YcdSimpleCountdown.prototype.livePreview = function()
126
  this.changeDate();
127
  this.changeTimeZone();
128
  this.changeDateDuration();
 
129
  };
130
 
131
  YcdSimpleCountdown.prototype.changeText = function()
72
  });
73
  };
74
 
75
+ YcdSimpleCountdown.prototype.changeFontSizes = function() {
76
+ var types = jQuery('.ycd-simple-font-size');
77
+
78
+ if(!types.length) {
79
+ return false;
80
+ }
81
+ var that = this;
82
+ var countdown = this.countdownContainer;
83
+ types.bind('change', function() {
84
+ var val = jQuery(this).val();
85
+ var type = jQuery(this).data('field-type');
86
+
87
+ jQuery('.ycd-simple-countdown-'+type).css({'font-size': val});
88
+ });
89
+ };
90
+
91
  YcdSimpleCountdown.prototype.eventListener = function ()
92
  {
93
  var that = this;
142
  this.changeDate();
143
  this.changeTimeZone();
144
  this.changeDateDuration();
145
+ this.changeFontSizes();
146
  };
147
 
148
  YcdSimpleCountdown.prototype.changeText = function()
assets/views/main/simpleMainView.php CHANGED
@@ -115,6 +115,31 @@ $type = $this->getCurrentTypeFromOptions();
115
  </div>
116
  </div>
117
  <!-- Labels end -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  <?php
119
  require_once YCD_VIEWS_PATH.'preview.php';
120
  ?>
115
  </div>
116
  </div>
117
  <!-- Labels end -->
118
+ <!-- Styles start -->
119
+ <div class="row form-group">
120
+ <div class="col-md-6">
121
+ <label class="ycd-label-of-switch"><?php _e('Styles', YCD_TEXT_DOMAIN); ?></label>
122
+ </div>
123
+ <div class="col-md-6">
124
+ </div>
125
+ </div>
126
+ <div class="row form-group">
127
+ <div class="col-md-6">
128
+ <label for="ycd-simple-numbers-font-size"><?php _e('Numbers font size', YCD_TEXT_DOMAIN); ?></label>
129
+ </div>
130
+ <div class="col-md-6">
131
+ <input type="text" id="ycd-simple-numbers-font-size" class="form-control ycd-simple-font-size" data-field-type="number" name="ycd-simple-numbers-font-size" value="<?php echo esc_attr($typeObj->getOptionValue('ycd-simple-numbers-font-size')); ?>" >
132
+ </div>
133
+ </div>
134
+ <div class="row form-group">
135
+ <div class="col-md-6">
136
+ <label for="ycd-simple-text-font-size"><?php _e('Text font size', YCD_TEXT_DOMAIN); ?></label>
137
+ </div>
138
+ <div class="col-md-6">
139
+ <input type="text" id="ycd-simple-text-font-size" class="form-control ycd-simple-font-size" data-field-type="label" name="ycd-simple-text-font-size" value="<?php echo esc_attr($typeObj->getOptionValue('ycd-simple-text-font-size')); ?>" >
140
+ </div>
141
+ </div>
142
+ <!-- Styles end -->
143
  <?php
144
  require_once YCD_VIEWS_PATH.'preview.php';
145
  ?>
classes/countdown/SimpleCountdown.php CHANGED
@@ -76,6 +76,30 @@ class SimpleCountdown extends Countdown
76
  return '<div class="ycd-simple-countdown-time ycd-simple-countdown-label ycd-simple-countdown-'.$unit.'-label">'.$unitLabel.'</div>';
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  private function render()
80
  {
81
  $unites = $this->getTimeUnites();
@@ -157,6 +181,7 @@ class SimpleCountdown extends Countdown
157
  <?php
158
  $content = ob_get_contents();
159
  ob_end_clean();
 
160
 
161
  return $content;
162
  }
76
  return '<div class="ycd-simple-countdown-time ycd-simple-countdown-label ycd-simple-countdown-'.$unit.'-label">'.$unitLabel.'</div>';
77
  }
78
 
79
+ private function getStyles()
80
+ {
81
+ $style = '';
82
+ $id = $this->getId();
83
+ $numberFontSize = $this->getOptionValue('ycd-simple-numbers-font-size');
84
+ $labelSize = $this->getOptionValue('ycd-simple-text-font-size');
85
+
86
+ ob_start();
87
+ ?>
88
+ <style>
89
+ .ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-number {
90
+ font-size: <?php echo $numberFontSize; ?>;
91
+ }
92
+ .ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-label {
93
+ font-size: <?php echo $labelSize; ?>;
94
+ }
95
+ </style>
96
+ <?php
97
+ $style .= ob_get_contents();
98
+ ob_end_clean();
99
+
100
+ return $style;
101
+ }
102
+
103
  private function render()
104
  {
105
  $unites = $this->getTimeUnites();
181
  <?php
182
  $content = ob_get_contents();
183
  ob_end_clean();
184
+ $content .= $this->getStyles();
185
 
186
  return $content;
187
  }
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.81);
74
- self::addDefine('YCD_VERSION', 1.95);
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.5';
83
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
84
- $versionText = '1.8.1';
85
  }
86
  self::addDefine('YCD_VERSION_TEXT', $versionText);
87
- self::addDefine('YCD_LAST_UPDATE', 'Dec 26');
88
- self::addDefine('YCD_NEXT_UPDATE', 'Dec 31');
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.82);
74
+ self::addDefine('YCD_VERSION', 1.96);
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.6';
83
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
84
+ $versionText = '1.8.2';
85
  }
86
  self::addDefine('YCD_VERSION_TEXT', $versionText);
87
+ self::addDefine('YCD_LAST_UPDATE', 'Jan 1');
88
+ self::addDefine('YCD_NEXT_UPDATE', 'Jan 25');
89
  }
90
 
91
  public static function displaySettings() {
config/optionsConfig.php CHANGED
@@ -308,6 +308,9 @@ class YcdCountdownOptionsConfig {
308
  $options[] = array('name' => 'ycd-simple-enable-seconds', 'type' => 'checkbox', 'defaultValue' => 'on');
309
  $options[] = array('name' => 'ycd-simple-seconds-text', 'type' => 'text', 'defaultValue' => __('Secs', YCD_TEXT_DOMAIN));
310
 
 
 
 
311
  $YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
312
  }
313
 
308
  $options[] = array('name' => 'ycd-simple-enable-seconds', 'type' => 'checkbox', 'defaultValue' => 'on');
309
  $options[] = array('name' => 'ycd-simple-seconds-text', 'type' => 'text', 'defaultValue' => __('Secs', YCD_TEXT_DOMAIN));
310
 
311
+ $options[] = array('name' => 'ycd-simple-numbers-font-size', 'type' => 'text', 'defaultValue' => __('35px', YCD_TEXT_DOMAIN));
312
+ $options[] = array('name' => 'ycd-simple-text-font-size', 'type' => 'text', 'defaultValue' => __('12px', YCD_TEXT_DOMAIN));
313
+
314
  $YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
315
  }
316
 
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.5
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.6
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.6.1
6
- Stable tag: 1.9.5
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
  = 1.9.5 =
71
  * Simple Countdown type live preview improvement
72
  * Fixed Sticky Countdown issue on Iphone devices
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.6.1
6
+ Stable tag: 1.9.6
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
+ = 1.9.6 =
71
+ * Simple countdown numbers font size
72
+ * Simple countdown labels font size
73
+
74
  = 1.9.5 =
75
  * Simple Countdown type live preview improvement
76
  * Fixed Sticky Countdown issue on Iphone devices