Countdown, Coming Soon – Countdown & Clock - Version 2.1.8

Version Description

  • Change countdown before text after expiration
  • Change countdown after text after expiration
Download this release

Release Info

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

Code changes from version 2.1.7 to 2.1.8

assets/js/Countdown.js CHANGED
@@ -302,7 +302,7 @@ YcdCountdown.prototype.changeScheduleHour = function() {
302
 
303
  if(!hours.length) {
304
  return false;
305
- }
306
  var that = this;
307
  var countdowns = jQuery('.ycd-time-circle');
308
  hours.bind('change', function() {
@@ -789,7 +789,7 @@ YcdCountdown.prototype.addTimeToClock = function(options, countDown) {
789
  if (seconds == 0) {
790
  countDown.data('expired', true);
791
  }
792
-
793
  countDown.data('timer', seconds);
794
 
795
  return countDown;
@@ -799,7 +799,7 @@ YcdCountdown.prototype.render = function(currentCountdown) {
799
  var that = this;
800
  var options = this.getOptions();
801
  var allOptions = this.getAllOptions();
802
-
803
  if (currentCountdown.data('timer') <= 0) {
804
  that.endBehavior(currentCountdown, allOptions);
805
  }
@@ -833,7 +833,7 @@ YcdCountdown.prototype.endBehavior = function(countdown, options) {
833
  var expireUrl = options['ycd-expire-url'];
834
  var countdownWrapper = countdown.parents('.ycd-countdown-wrapper').first();
835
 
836
- jQuery(window).trigger('YcdExpired', {'id': id});
837
 
838
  switch(behavior) {
839
  case 'hideCountdown':
@@ -850,6 +850,21 @@ YcdCountdown.prototype.endBehavior = function(countdown, options) {
850
  }
851
  };
852
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
853
  jQuery(document).ready(function () {
854
  new YcdCountdown();
855
  });
302
 
303
  if(!hours.length) {
304
  return false;
305
+ }
306
  var that = this;
307
  var countdowns = jQuery('.ycd-time-circle');
308
  hours.bind('change', function() {
789
  if (seconds == 0) {
790
  countDown.data('expired', true);
791
  }
792
+
793
  countDown.data('timer', seconds);
794
 
795
  return countDown;
799
  var that = this;
800
  var options = this.getOptions();
801
  var allOptions = this.getAllOptions();
802
+
803
  if (currentCountdown.data('timer') <= 0) {
804
  that.endBehavior(currentCountdown, allOptions);
805
  }
833
  var expireUrl = options['ycd-expire-url'];
834
  var countdownWrapper = countdown.parents('.ycd-countdown-wrapper').first();
835
 
836
+ jQuery(window).trigger('YcdExpired', [{'id': id, 'options': options}]);
837
 
838
  switch(behavior) {
839
  case 'hideCountdown':
850
  }
851
  };
852
 
853
+ jQuery(window).on('YcdExpired', function(e, args) {
854
+ var options = args.options;
855
+
856
+ if (options && options['ycd-countdown-expiration-text-change']) {
857
+ var types = ['before', 'after'];
858
+ for(var i = 0; i<types.length; i ++) {
859
+ var current = types[i];
860
+ if (jQuery('.ycd-circle-expiration-'+current+'-countdown').length) {
861
+ jQuery('.ycd-circle-expiration-'+current+'-countdown').show();
862
+ jQuery('.ycd-circle-'+current+'-countdown').hide();
863
+ }
864
+ }
865
+ }
866
+ });
867
+
868
  jQuery(document).ready(function () {
869
  new YcdCountdown();
870
  });
assets/views/cricleMainView.php CHANGED
@@ -805,8 +805,62 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
805
  ?>
806
  </div>
807
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
  </div>
809
- </div>
810
  <?php
811
  require_once YCD_VIEWS_PATH.'preview.php';
812
  ?>
805
  ?>
806
  </div>
807
  </div>
808
+ <div class="row form-group">
809
+ <div class="col-md-5">
810
+ <label for="ycd-countdown-content-click" class="ycd-label-of-switch"><?php _e('After Expiration Change Texts', YCD_TEXT_DOMAIN); ?></label>
811
+ </div>
812
+ <div class="col-md-7 ycd-circles-width-wrapper ycd-option-wrapper">
813
+ <label class="ycd-switch">
814
+ <input type="checkbox" id="ycd-countdown-expiration-text-change" name="ycd-countdown-expiration-text-change" class="ycd-accordion-checkbox js-ycd-countdown-content-click" <?php echo $typeObj->getOptionValue('ycd-countdown-expiration-text-change'); ?>>
815
+ <span class="ycd-slider ycd-round"></span>
816
+ </label>
817
+ </div>
818
+ </div>
819
+ <div class="ycd-accordion-content ycd-hide-content">
820
+
821
+ <div class="row form-group">
822
+ <div class="col-md-6">
823
+ <label class="ycd-label-of-input" for="ycd-circle-countdown-before-countdown"><?php _e('Before Countdown', YCD_TEXT_DOMAIN); ?></label>
824
+ </div>
825
+ <div class="col-md-12">
826
+ <?php
827
+ $editorId = 'ycd-circle-countdown-expiration-before-countdown';
828
+ $beforeCountdown = $this->getOptionValue($editorId);
829
+ $settings = array(
830
+ 'wpautop' => false,
831
+ 'tinymce' => array(
832
+ 'width' => '100%'
833
+ ),
834
+ 'textarea_rows' => '6',
835
+ 'media_buttons' => true
836
+ );
837
+ wp_editor($beforeCountdown, $editorId, $settings);
838
+ ?>
839
+ </div>
840
+ </div>
841
+ <div class="row form-group">
842
+ <div class="col-md-6">
843
+ <label class="ycd-label-of-input" for="ycd-circle-countdown-before-countdown"><?php _e('After Countdown', YCD_TEXT_DOMAIN); ?></label>
844
+ </div>
845
+ <div class="col-md-12">
846
+ <?php
847
+ $editorId = 'ycd-circle-countdown-expiration-after-countdown';
848
+ $beforeCountdown = $this->getOptionValue($editorId);
849
+ $settings = array(
850
+ 'wpautop' => false,
851
+ 'tinymce' => array(
852
+ 'width' => '100%'
853
+ ),
854
+ 'textarea_rows' => '6',
855
+ 'media_buttons' => true
856
+ );
857
+ wp_editor($beforeCountdown, $editorId, $settings);
858
+ ?>
859
+ </div>
860
+ </div>
861
+ </div>
862
  </div>
863
+ </div>
864
  <?php
865
  require_once YCD_VIEWS_PATH.'preview.php';
866
  ?>
classes/Actions.php CHANGED
@@ -311,7 +311,7 @@ class Actions {
311
  }
312
  ob_start();
313
  $typeObj->chanegSavedDataFromArgs();
314
-
315
  echo $typeObj->renderView();
316
 
317
  if(!empty($content)) {
311
  }
312
  ob_start();
313
  $typeObj->chanegSavedDataFromArgs();
314
+
315
  echo $typeObj->renderView();
316
 
317
  if(!empty($content)) {
classes/countdown/CircleCountdown.php CHANGED
@@ -191,6 +191,7 @@ class CircleCountdown extends Countdown {
191
  $width .= $widthMeasure;
192
  $content = '<div class="ycd-countdown-wrapper">';
193
  $content .= apply_filters('ycdCircleCountdownPrepend', '', $this);
 
194
  $content .= '<div class="ycd-circle-before-countdown">'.do_shortcode($this->getOptionValue('ycd-circle-countdown-before-countdown')).'</div>';
195
  ob_start();
196
  ?>
@@ -201,6 +202,7 @@ class CircleCountdown extends Countdown {
201
  $content .= ob_get_contents();
202
  ob_get_clean();
203
  $content .= $this->additionalFunctionality();
 
204
  $content .= '<div class="ycd-circle-after-countdown" data-key="">'.do_shortcode($this->getOptionValue('ycd-circle-countdown-after-countdown')).'</div>';
205
  $content .= '</div>';
206
 
191
  $width .= $widthMeasure;
192
  $content = '<div class="ycd-countdown-wrapper">';
193
  $content .= apply_filters('ycdCircleCountdownPrepend', '', $this);
194
+ $content .= '<div class="ycd-circle-expiration-before-countdown" style="display: none">'.do_shortcode($this->getOptionValue('ycd-circle-countdown-expiration-before-countdown')).'</div>';
195
  $content .= '<div class="ycd-circle-before-countdown">'.do_shortcode($this->getOptionValue('ycd-circle-countdown-before-countdown')).'</div>';
196
  ob_start();
197
  ?>
202
  $content .= ob_get_contents();
203
  ob_get_clean();
204
  $content .= $this->additionalFunctionality();
205
+ $content .= '<div class="ycd-circle-expiration-after-countdown" data-key="" style="display: none">'.do_shortcode($this->getOptionValue('ycd-circle-countdown-expiration-after-countdown')).'</div>';
206
  $content .= '<div class="ycd-circle-after-countdown" data-key="">'.do_shortcode($this->getOptionValue('ycd-circle-countdown-after-countdown')).'</div>';
207
  $content .= '</div>';
208
 
classes/countdown/Countdown.php CHANGED
@@ -1088,7 +1088,7 @@ abstract class Countdown {
1088
  $options['ycd-countdown-showing-limitation'] = $this->getOptionValue('ycd-countdown-showing-limitation');
1089
  $options['ycd-countdown-expiration-time'] = $this->getOptionValue('ycd-countdown-expiration-time');
1090
  $options['ycd-countdown-switch-number'] = $this->getOptionValue('ycd-countdown-switch-number');
1091
-
1092
  $options['time'] = array(
1093
  'Years' => array(
1094
  'text' => $this->getOptionValue('ycd-countdown-years-text'),
1088
  $options['ycd-countdown-showing-limitation'] = $this->getOptionValue('ycd-countdown-showing-limitation');
1089
  $options['ycd-countdown-expiration-time'] = $this->getOptionValue('ycd-countdown-expiration-time');
1090
  $options['ycd-countdown-switch-number'] = $this->getOptionValue('ycd-countdown-switch-number');
1091
+
1092
  $options['time'] = array(
1093
  'Years' => array(
1094
  'text' => $this->getOptionValue('ycd-countdown-years-text'),
config/config.php CHANGED
@@ -75,8 +75,8 @@ class YcdCountdownConfig
75
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
76
  self::addDefine('YCD_AJAX_SUCCESS', 1);
77
  self::addDefine('YCD_TABLE_LIMIT', 15);
78
- self::addDefine('YCD_VERSION_PRO', 2.03);
79
- self::addDefine('YCD_VERSION', 2.17);
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.1.7';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
- $versionText = '2.0.3';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
- self::addDefine('YCD_LAST_UPDATE', 'Sep 10');
93
- self::addDefine('YCD_NEXT_UPDATE', 'Sep 25');
94
  }
95
 
96
  public static function displaySettings()
75
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
76
  self::addDefine('YCD_AJAX_SUCCESS', 1);
77
  self::addDefine('YCD_TABLE_LIMIT', 15);
78
+ self::addDefine('YCD_VERSION_PRO', 2.04);
79
+ self::addDefine('YCD_VERSION', 2.18);
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.1.8';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
+ $versionText = '2.0.4';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
+ self::addDefine('YCD_LAST_UPDATE', 'Sep 25');
93
+ self::addDefine('YCD_NEXT_UPDATE', 'Oct 8');
94
  }
95
 
96
  public static function displaySettings()
config/optionsConfig.php CHANGED
@@ -303,7 +303,8 @@ class YcdCountdownOptionsConfig
303
  $options[] = array('name' => 'ycd-button-hover-color', 'type' => 'text', 'defaultValue' => '#ffffff');
304
  $options[] = array('name' => 'ycd-countdown-content-click-url-tab', 'type' => 'checkbox', 'defaultValue' => '');
305
  $options[] = array('name' => 'ycd-countdown-button-behavior', 'type' => 'text', 'defaultValue' => 'redirect');
306
-
 
307
  $options[] = array('name' => 'ycd-sticky-button-text', 'type' => 'text', 'defaultValue' => __('Checkout', YCD_TEXT_DOMAIN));
308
  $options[] = array('name' => 'ycd-sticky-bg-color', 'type' => 'text', 'defaultValue' => '#000000');
309
  $options[] = array('name' => 'ycd-sticky-button-color', 'type' => 'text', 'defaultValue' => '#fff');
303
  $options[] = array('name' => 'ycd-button-hover-color', 'type' => 'text', 'defaultValue' => '#ffffff');
304
  $options[] = array('name' => 'ycd-countdown-content-click-url-tab', 'type' => 'checkbox', 'defaultValue' => '');
305
  $options[] = array('name' => 'ycd-countdown-button-behavior', 'type' => 'text', 'defaultValue' => 'redirect');
306
+ $options[] = array('name' => 'ycd-countdown-expiration-text-change', 'type' => 'checkbox', 'defaultValue' => '');
307
+
308
  $options[] = array('name' => 'ycd-sticky-button-text', 'type' => 'text', 'defaultValue' => __('Checkout', YCD_TEXT_DOMAIN));
309
  $options[] = array('name' => 'ycd-sticky-bg-color', 'type' => 'text', 'defaultValue' => '#000000');
310
  $options[] = array('name' => 'ycd-sticky-button-color', 'type' => 'text', 'defaultValue' => '#fff');
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.1.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.1.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.8.1
6
- Stable tag: 2.1.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,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.1.7 =
71
  * Upcoming Day Of Week (Recurring) (New Feature)
72
 
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.8.1
6
+ Stable tag: 2.1.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.1.8 =
71
+ * Change countdown before text after expiration
72
+ * Change countdown after text after expiration
73
+
74
  = 2.1.7 =
75
  * Upcoming Day Of Week (Recurring) (New Feature)
76