Countdown, Coming Soon – Countdown & Clock - Version 1.4.2

Version Description

  • New custom Css code posibility
  • Features improvements
  • Code improvements
Download this release

Release Info

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

Code changes from version 1.4.1 to 1.4.2

assets/css/TimeCircles.css CHANGED
@@ -1 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .time_circles>div>h4,.time_circles>div>span{margin:0;padding:0;text-align:center;font-family:'Century Gothic',Arial;line-height:1}.time_circles{position:relative;width:100%;height:100%}.time_circles>div{position:absolute;text-align:center}.time_circles>div>h4{text-transform:uppercase}.time_circles>div>span{display:block;width:100%;font-weight:700}
1
+ .ycd-circle-video {
2
+ position: absolute !important;
3
+ top: 0 !important;
4
+ left: 0 !important;
5
+ display: block !important;
6
+ transform-origin: top left;
7
+ }
8
+
9
+ .ycd-countdown-wrapper {
10
+ position: relative;
11
+ }
12
+
13
+ .ycd-circle-after-countdown,
14
+ .ycd-circle-before-countdown {
15
+ position: relative;
16
+ z-index: 999999;
17
+ }
18
+
19
  .time_circles>div>h4,.time_circles>div>span{margin:0;padding:0;text-align:center;font-family:'Century Gothic',Arial;line-height:1}.time_circles{position:relative;width:100%;height:100%}.time_circles>div{position:absolute;text-align:center}.time_circles>div>h4{text-transform:uppercase}.time_circles>div>span{display:block;width:100%;font-weight:700}
assets/css/admin.css CHANGED
@@ -527,4 +527,9 @@ div.ycd-tabs-text-header > div.ycd-toggle-icon-open {
527
 
528
  #ycd-woo-selected-products > div > div.col-md-5 > span > span.selection > span {
529
  width: 300px !important;
 
 
 
 
 
530
  }
527
 
528
  #ycd-woo-selected-products > div > div.col-md-5 > span > span.selection > span {
529
  width: 300px !important;
530
+ }
531
+
532
+ .ycd-bootstrap-wrapper .CodeMirror-scroll {
533
+ margin-right: 0 !important;
534
+ border: 1px solid #ccc;
535
  }
assets/js/Admin.js CHANGED
@@ -17,6 +17,7 @@ YcdAdmin.prototype.init = function() {
17
  this.redirectToProWebpage();
18
  this.newsletter();
19
  this.promotionalVideo();
 
20
 
21
  /*clock*/
22
  this.clockLivePreview();
@@ -27,6 +28,53 @@ YcdAdmin.prototype.init = function() {
27
  }
28
  };
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  YcdAdmin.prototype.proOptions = function() {
31
  var proOptions = jQuery('label .ycd-pro-span');
32
 
17
  this.redirectToProWebpage();
18
  this.newsletter();
19
  this.promotionalVideo();
20
+ this.editor();
21
 
22
  /*clock*/
23
  this.clockLivePreview();
28
  }
29
  };
30
 
31
+ YcdAdmin.prototype.editor = function() {
32
+ (function($){
33
+ $(function(){
34
+ if( $('#ycd-edtitor-head').length ) {
35
+ var editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
36
+ editorSettings.codemirror = _.extend(
37
+ {},
38
+ editorSettings.codemirror,
39
+ {
40
+ indentUnit: 2,
41
+ tabSize: 2
42
+ }
43
+ );
44
+ var editor = wp.codeEditor.initialize( $('#ycd-edtitor-head'), editorSettings );
45
+ }
46
+
47
+ if( $('#ycd-edtitor-js').length ) {
48
+ var editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
49
+ editorSettings.codemirror = _.extend(
50
+ {},
51
+ editorSettings.codemirror,
52
+ {
53
+ indentUnit: 2,
54
+ tabSize: 2,
55
+ mode: 'javascript',
56
+ }
57
+ );
58
+ var editor = wp.codeEditor.initialize( $('#ycd-edtitor-js'), editorSettings );
59
+ }
60
+
61
+ if( $('#ycd-edtitor-css').length ) {
62
+ var editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
63
+ editorSettings.codemirror = _.extend(
64
+ {},
65
+ editorSettings.codemirror,
66
+ {
67
+ indentUnit: 2,
68
+ tabSize: 2,
69
+ mode: 'css',
70
+ }
71
+ );
72
+ var editor = wp.codeEditor.initialize( $('#ycd-edtitor-css'), editorSettings );
73
+ }
74
+ });
75
+ })(jQuery);
76
+ };
77
+
78
  YcdAdmin.prototype.proOptions = function() {
79
  var proOptions = jQuery('label .ycd-pro-span');
80
 
assets/js/Countdown.js CHANGED
@@ -179,7 +179,7 @@ YcdCountdown.prototype.changeSchedileTimeZone = function() {
179
  countdowns = that.addTimeToClock(options, countdowns);
180
  jQuery('.ycd-time-circle').TimeCircles().restart();
181
  });
182
- }
183
 
184
  YcdCountdown.prototype.changeScheduleHour = function() {
185
  var hours = jQuery('.js-datetimepicker-seconds');
@@ -610,6 +610,7 @@ YcdCountdown.prototype.startTimeCircle = function() {
610
  that.setOptions(options);
611
  that.setAllOptions(allOptions);
612
  that.render(jQuery(this));
 
613
  });
614
  };
615
 
179
  countdowns = that.addTimeToClock(options, countdowns);
180
  jQuery('.ycd-time-circle').TimeCircles().restart();
181
  });
182
+ };
183
 
184
  YcdCountdown.prototype.changeScheduleHour = function() {
185
  var hours = jQuery('.js-datetimepicker-seconds');
610
  that.setOptions(options);
611
  that.setAllOptions(allOptions);
612
  that.render(jQuery(this));
613
+ jQuery(window).trigger('ycdCircleReady');
614
  });
615
  };
616
 
assets/js/Js.php CHANGED
@@ -73,6 +73,9 @@ class Js {
73
 
74
  if(in_array($hook, $allowedPages) || get_post_type(@$_GET['post']) == YCD_COUNTDOWN_POST_TYPE || $_GET['post_type'] == YCD_COUNTDOWN_POST_TYPE) {
75
  wp_enqueue_script('jquery-ui-core');
 
 
 
76
  ScriptsIncluder::enqueueScript('Admin.js');
77
  if(YCD_PKG_VERSION != YCD_FREE_VERSION) {
78
  ScriptsIncluder::registerScript('AdminPro.js');
73
 
74
  if(in_array($hook, $allowedPages) || get_post_type(@$_GET['post']) == YCD_COUNTDOWN_POST_TYPE || $_GET['post_type'] == YCD_COUNTDOWN_POST_TYPE) {
75
  wp_enqueue_script('jquery-ui-core');
76
+ if(function_exists('wp_enqueue_code_editor')) {
77
+ wp_enqueue_code_editor(array( 'type' => 'text/html'));
78
+ }
79
  ScriptsIncluder::enqueueScript('Admin.js');
80
  if(YCD_PKG_VERSION != YCD_FREE_VERSION) {
81
  ScriptsIncluder::registerScript('AdminPro.js');
assets/views/cricleMainView.php CHANGED
@@ -140,7 +140,7 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
140
  </div>
141
  <!-- Number styles end -->
142
  <!-- Countdown fonts end -->
143
-
144
  <!-- -->
145
  <div class="row form-group">
146
  <div class="col-md-5">
@@ -196,7 +196,7 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
196
  </div>
197
  </div>
198
  <!-- Countdown formats years end -->
199
-
200
  <!-- Countdown formats months start -->
201
 
202
  <div class="row form-group">
@@ -242,7 +242,7 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
242
  </div>
243
 
244
  <!-- Countdown formats months end -->
245
-
246
  <!-- Countdown formats Days start -->
247
 
248
  <div class="row form-group">
@@ -549,6 +549,27 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
549
  </div>
550
  </div>
551
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
552
  <div class="row form-group">
553
  <div class="col-md-5">
554
  <label for="ycd-countdown-padding" class="ycd-label-of-input"><?php _e('Countdown Padding', YCD_TEXT_DOMAIN); ?></label>
@@ -606,5 +627,4 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
606
  require_once YCD_VIEWS_PATH.'preview.php';
607
  ?>
608
  </div>
609
-
610
  <input type="hidden" name="ycd-type" value="<?php echo esc_attr($type); ?>">
140
  </div>
141
  <!-- Number styles end -->
142
  <!-- Countdown fonts end -->
143
+
144
  <!-- -->
145
  <div class="row form-group">
146
  <div class="col-md-5">
196
  </div>
197
  </div>
198
  <!-- Countdown formats years end -->
199
+
200
  <!-- Countdown formats months start -->
201
 
202
  <div class="row form-group">
242
  </div>
243
 
244
  <!-- Countdown formats months end -->
245
+
246
  <!-- Countdown formats Days start -->
247
 
248
  <div class="row form-group">
549
  </div>
550
  </div>
551
  </div>
552
+ <div class="row form-group">
553
+ <div class="col-md-5">
554
+ <label for="ycd-countdown-bg-video" class="ycd-label-of-switch"><?php _e('Background Video', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
555
+ </div>
556
+ <div class="col-md-7 ycd-circles-width-wrapper ycd-option-wrapper<?php echo $isPro; ?>">
557
+ <label class="ycd-switch">
558
+ <input type="checkbox" id="ycd-countdown-bg-video" name="ycd-countdown-bg-video" class="ycd-accordion-checkbox js-ycd-bg-video" <?php echo $typeObj->getOptionValue('ycd-countdown-bg-video'); ?>>
559
+ <span class="ycd-slider ycd-round"></span>
560
+ </label>
561
+ </div>
562
+ </div>
563
+ <div class="ycd-accordion-content ycd-hide-content">
564
+ <div class="row form-group">
565
+ <div class="col-md-5">
566
+ <input id="js-upload-video-button" class="button js-countdown-video-btn" type="button" value="<?php _e('Select Video', YCD_TEXT_DOMAIN)?>">
567
+ </div>
568
+ <div class="col-md-7 ycd-circles-width-wrapper">
569
+ <input type="url" name="ycd-bg-video-url" id="ycd-bg-video-url" class="form-control" value="<?php echo esc_attr($typeObj->getOptionValue('ycd-bg-video-url')); ?>">
570
+ </div>
571
+ </div>
572
+ </div>
573
  <div class="row form-group">
574
  <div class="col-md-5">
575
  <label for="ycd-countdown-padding" class="ycd-label-of-input"><?php _e('Countdown Padding', YCD_TEXT_DOMAIN); ?></label>
627
  require_once YCD_VIEWS_PATH.'preview.php';
628
  ?>
629
  </div>
 
630
  <input type="hidden" name="ycd-type" value="<?php echo esc_attr($type); ?>">
assets/views/generalOptions.php CHANGED
@@ -152,4 +152,12 @@ $dueDate = $this->getOptionValue('ycd-date-time-picker');
152
  </div>
153
  </div>
154
  </div>
155
- </div>
 
 
 
 
 
 
 
 
152
  </div>
153
  </div>
154
  </div>
155
+ <div class="row">
156
+ <div class="col-md-12">
157
+ <div>
158
+ <label for="ycd-edtitor-css" class="ycd-label-of-switch"><?php _e('Custom CSS', YCD_TEXT_DOMAIN); ?></label>
159
+ </div>
160
+ <textarea id="ycd-edtitor-css" id="ycd-edtitor-css" rows="5" name="ycd-custom-css" class="widefat textarea"><?php echo esc_attr($this->getOptionValue('ycd-custom-css')); ?></textarea>
161
+ </div>
162
+ </div>
163
+ </div>
classes/Actions.php CHANGED
@@ -178,12 +178,12 @@ class Actions {
178
  $content = ob_get_contents();
179
  ob_get_clean();
180
 
181
- return $content;
182
  }
183
 
184
  public function tableColumnValues($column, $postId) {
185
  $countdownObj = Countdown::find($postId);
186
-
187
  if ($column == 'shortcode') {
188
  echo '<input type="text" onfocus="this.select();" readonly value="[ycd_countdown id='.$postId.']" class="large-text code">';
189
  }
178
  $content = ob_get_contents();
179
  ob_get_clean();
180
 
181
+ return apply_filters('ycdCountdownContent', $content, $typeObj);
182
  }
183
 
184
  public function tableColumnValues($column, $postId) {
185
  $countdownObj = Countdown::find($postId);
186
+
187
  if ($column == 'shortcode') {
188
  echo '<input type="text" onfocus="this.select();" readonly value="[ycd_countdown id='.$postId.']" class="large-text code">';
189
  }
classes/Filters.php CHANGED
@@ -13,6 +13,15 @@ class Filters {
13
  add_filter('ycdDefaults', array($this, 'defaults'), 10, 1);
14
  add_filter('post_updated_messages' , array($this, 'updatedMessages'), 10, 1);
15
  add_filter('cron_schedules', array($this, 'cronAddMinutes'), 10, 1);
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
  public function cronAddMinutes($schedules)
13
  add_filter('ycdDefaults', array($this, 'defaults'), 10, 1);
14
  add_filter('post_updated_messages' , array($this, 'updatedMessages'), 10, 1);
15
  add_filter('cron_schedules', array($this, 'cronAddMinutes'), 10, 1);
16
+ add_filter('ycdCountdownContent', array($this, 'countdownContent'), 10, 2);
17
+ }
18
+
19
+ public function countdownContent($content, $obj) {
20
+ if(!empty($obj->getOptionValue('ycd-custom-css'))) {
21
+ $content .= '<style>'.$obj->getOptionValue('ycd-custom-css').'</style>';
22
+ }
23
+
24
+ return $content;
25
  }
26
 
27
  public function cronAddMinutes($schedules)
classes/countdown/CircleCountdown.php CHANGED
@@ -247,6 +247,7 @@ class CircleCountdown extends Countdown {
247
  $widthMeasure = $this->getOptionValue('ycd-dimension-measure');
248
  $width .= $widthMeasure;
249
  $content = '<div class="ycd-countdown-wrapper">';
 
250
  $content .= '<div class="ycd-circle-before-countdown">'.$this->getOptionValue('ycd-circle-countdown-before-countdown').'</div>';
251
  ob_start();
252
  ?>
247
  $widthMeasure = $this->getOptionValue('ycd-dimension-measure');
248
  $width .= $widthMeasure;
249
  $content = '<div class="ycd-countdown-wrapper">';
250
+ $content .= apply_filters('ycdCircleCountdownPrepend', '', $this);
251
  $content .= '<div class="ycd-circle-before-countdown">'.$this->getOptionValue('ycd-circle-countdown-before-countdown').'</div>';
252
  ob_start();
253
  ?>
config/config.php CHANGED
@@ -55,7 +55,7 @@ class YcdCountdownConfig {
55
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
56
  self::addDefine('YCD_AJAX_SUCCESS', 1);
57
  self::addDefine('YCD_TABLE_LIMIT', 15);
58
- self::addDefine('YCD_VERSION', 1.341);
59
  self::addDefine('YCD_VERSION_PRO', 1.27);
60
  self::addDefine('YCD_FREE_VERSION', 1);
61
  self::addDefine('YCD_SILVER_VERSION', 2);
55
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
56
  self::addDefine('YCD_AJAX_SUCCESS', 1);
57
  self::addDefine('YCD_TABLE_LIMIT', 15);
58
+ self::addDefine('YCD_VERSION', 1.42);
59
  self::addDefine('YCD_VERSION_PRO', 1.27);
60
  self::addDefine('YCD_FREE_VERSION', 1);
61
  self::addDefine('YCD_SILVER_VERSION', 2);
config/proOptionsConfig.php CHANGED
@@ -98,6 +98,7 @@ class proOptionsConfig {
98
  $defaults[] = array('name' => 'ycd-clock7-time-color', 'type' => 'html', 'defaultValue' => '#ccc');
99
 
100
  $defaults[] = array('name' => 'ycd-countdown-enable-progress', 'type' => 'checkbox', 'defaultValue' => '');
 
101
 
102
  return $defaults;
103
  }
98
  $defaults[] = array('name' => 'ycd-clock7-time-color', 'type' => 'html', 'defaultValue' => '#ccc');
99
 
100
  $defaults[] = array('name' => 'ycd-countdown-enable-progress', 'type' => 'checkbox', 'defaultValue' => '');
101
+ $defaults[] = array('name' => 'ycd-countdown-bg-video', 'type' => 'checkbox', 'defaultValue' => '');
102
 
103
  return $defaults;
104
  }
countdown-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Countdown builder
4
  * Description: The best countdown plugin
5
- * Version: 1.4.1
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
5
+ * Version: 1.4.2
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.1.1
6
- Stable tag: 1.4.1
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -44,7 +44,7 @@ We do web development and if you need a developer or if you think you have found
44
 
45
  == Installation ==
46
 
47
- 1. Upload the 'Countdown – Countdown & Clock' folder to the '/wp-content/plugins/' directory.
48
  2. Activate the "countdown-builder" list plugin through the 'Plugins' menu in WordPress.
49
  3. Check the Countdowns Menu button and start adding Countdown.
50
 
@@ -64,6 +64,11 @@ You need to select the .zip file, there is no need to extract the zip file, just
64
 
65
 
66
  == Changelog ==
 
 
 
 
 
67
  = 1.4.1 =
68
  * Before Circle countdown content (new feature)
69
  * After Circle countdown content (new feature)
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.1.1
6
+ Stable tag: 1.4.2
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
44
 
45
  == Installation ==
46
 
47
+ 1. Upload the 'Countdown' plugin folder to the '/wp-content/plugins/' directory.
48
  2. Activate the "countdown-builder" list plugin through the 'Plugins' menu in WordPress.
49
  3. Check the Countdowns Menu button and start adding Countdown.
50
 
64
 
65
 
66
  == Changelog ==
67
+ = 1.4.2 =
68
+ * New custom Css code posibility
69
+ * Features improvements
70
+ * Code improvements
71
+
72
  = 1.4.1 =
73
  * Before Circle countdown content (new feature)
74
  * After Circle countdown content (new feature)