Countdown, Coming Soon – Countdown & Clock - Version 1.3.8

Version Description

  • New progress bar option
  • Admin side text improvement
  • Bug fixed
Download this release

Release Info

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

Code changes from version 1.3.7 to 1.3.8

CountdownInit.php CHANGED
@@ -32,6 +32,7 @@ class CountdownInit {
32
  if(YCD_PKG_VERSION > YCD_FREE_VERSION) {
33
  require_once YCD_HELPERS_PATH.'AdminHelperPro.php';
34
  require_once YCD_HELPERS_PATH.'CheckerPro.php';
 
35
  }
36
  require_once(YCD_HELPERS_PATH.'ShowReviewNotice.php');
37
  require_once YCD_HELPERS_PATH.'HelperFunctions.php';
32
  if(YCD_PKG_VERSION > YCD_FREE_VERSION) {
33
  require_once YCD_HELPERS_PATH.'AdminHelperPro.php';
34
  require_once YCD_HELPERS_PATH.'CheckerPro.php';
35
+ require_once YCD_BLOCKS_PATH.'ProgressBar.php';
36
  }
37
  require_once(YCD_HELPERS_PATH.'ShowReviewNotice.php');
38
  require_once YCD_HELPERS_PATH.'HelperFunctions.php';
assets/views/progressBar.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ use ycd\AdminHelper;
3
+ $defaultData = AdminHelper::defaultData();
4
+ $id = $this->getId();
5
+ ?>
6
+ <div class="ycd-bootstrap-wrapper">
7
+ <div class="row form-group">
8
+ <div class="col-md-6">
9
+ <label for="ycd-countdown-enable-progress" class="ycd-label-of-switch"><?php _e('Enable Progress', YCD_TEXT_DOMAIN); ?></label>
10
+ </div>
11
+ <div class="col-md-6">
12
+ <label class="ycd-switch">
13
+ <input type="checkbox" id="ycd-countdown-enable-progress" data-id="<?php echo esc_attr($id);?>" name="ycd-countdown-enable-progress" class="" <?php echo $this->getOptionValue('ycd-countdown-enable-progress'); ?> >
14
+ <span class="ycd-slider ycd-round"></span>
15
+ </label>
16
+ </div>
17
+ </div>
18
+ <div class="row form-group ycd-start-date ycd-hide">
19
+ <div class="col-md-6">
20
+ <label for="ycd-date-progress-start-date" class="ycd-label-of-input"><?php _e('Start Date', YCD_TEXT_DOMAIN); ?></label>
21
+ </div>
22
+ <div class="col-md-6">
23
+ <input type="text" id="ycd-date-progress-start-date" class="form-control ycd-date-time-picker" name="ycd-date-progress-start-date" value="<?php echo esc_attr($this->getOptionValue('ycd-date-progress-start-date')); ?>">
24
+ </div>
25
+ </div>
26
+ <div class="row form-group">
27
+ <div class="col-md-6">
28
+ <label for="ycd-progress-width" class=""><?php _e('Width', YCD_TEXT_DOMAIN); ?></label>
29
+ </div>
30
+ <div class="col-md-6 ycd-option-wrapper<?php echo $isPro; ?>">
31
+ <input type="text" name="ycd-progress-width" class="form-control" id="ycd-progress-width" value="<?php echo $this->getOptionValue('ycd-progress-width'); ?>">
32
+ </div>
33
+ </div>
34
+ <div class="row form-group">
35
+ <div class="col-md-6">
36
+ <label for="ycd-progress-height" class=""><?php _e('Height', YCD_TEXT_DOMAIN); ?></label>
37
+ </div>
38
+ <div class="col-md-6 ycd-option-wrapper<?php echo $isPro; ?>">
39
+ <input type="text" name="ycd-progress-height" class="form-control" id="ycd-progress-height" value="<?php echo $this->getOptionValue('ycd-progress-height'); ?>">
40
+ </div>
41
+ </div>
42
+ <div class="row form-group">
43
+ <div class="col-md-6">
44
+ <label for="ycd-progress-main-color" class=""><?php _e('Background Color', YCD_TEXT_DOMAIN); ?></label>
45
+ </div>
46
+ <div class="col-md-6 ycd-option-wrapper<?php echo $isPro; ?>">
47
+ <div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
48
+ <input type="text" id="ycd-progress-main-color" data-type="bgColor" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-progress-main-color" class="minicolors-input form-control js-ycd-progress-main-color" value="<?php echo esc_attr($this->getOptionValue('ycd-progress-main-color')); ?>">
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <div class="row form-group">
53
+ <div class="col-md-6">
54
+ <label for="ycd-progress-color" class=""><?php _e('Progress Color', YCD_TEXT_DOMAIN); ?></label>
55
+ </div>
56
+ <div class="col-md-6 ycd-option-wrapper<?php echo $isPro; ?>">
57
+ <div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
58
+ <input type="text" id="ycd-progress-color" data-type="progressColor" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-progress-color" class="minicolors-input form-control js-ycd-progress-color" value="<?php echo esc_attr($this->getOptionValue('ycd-progress-color')); ?>">
59
+ </div>
60
+ </div>
61
+ </div>
62
+ <div class="row form-group">
63
+ <div class="col-md-6">
64
+ <label for="ycd-progress-text-color" class=""><?php _e('Progress Text Color', YCD_TEXT_DOMAIN); ?></label>
65
+ </div>
66
+ <div class="col-md-6 ycd-option-wrapper<?php echo $isPro; ?>">
67
+ <div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
68
+ <input type="text" id="ycd-progress-text-color" data-type="color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-progress-text-color" class="minicolors-input form-control js-ycd-progress-text-color" value="<?php echo esc_attr($this->getOptionValue('ycd-progress-text-color')); ?>">
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <?php if(YCD_PKG_VERSION == YCD_FREE_VERSION): ?>
73
+ <a href="<?php echo YCD_COUNTDOWN_PRO_URL; ?>" target="_blank">
74
+ <div class="ycd-pro ycd-pro-options-div">
75
+ <p class="ycd-pro-options-title"><?php _e('PRO Features', YCD_TEXT_DOMAIN); ?></p>
76
+ </div>
77
+ </a>
78
+ <?php endif;?>
79
+ </div>
classes/RegisterPostType.php CHANGED
@@ -113,6 +113,7 @@ class RegisterPostType {
113
  }
114
  $typeObj = new $className();
115
  $typeObj->setId($id);
 
116
  $this->setTypeObj($typeObj);
117
  }
118
 
113
  }
114
  $typeObj = new $className();
115
  $typeObj->setId($id);
116
+ $typeObj->setType($type);
117
  $this->setTypeObj($typeObj);
118
  }
119
 
classes/countdown/CircleCountdown.php CHANGED
@@ -12,14 +12,19 @@ class CircleCountdown extends Countdown {
12
  public $datesNumber;
13
  public function __construct() {
14
  add_action('add_meta_boxes', array($this, 'mainOptions'));
 
15
  add_filter('ycdCountdownDefaultOptions', array($this, 'defaultOptions'), 1, 1);
16
  }
17
 
18
  public function defaultOptions($options) {
19
-
20
  return $options;
21
  }
22
 
 
 
 
 
 
23
  public function includeStyles() {
24
  $this->includeGeneralScripts();
25
  wp_enqueue_script('jquery');
@@ -250,6 +255,7 @@ class CircleCountdown extends Countdown {
250
  <?php
251
  $content .= ob_get_contents();
252
  ob_get_clean();
 
253
  $content .= $this->renderSubscriptionForm();
254
  $content .= '</div>';
255
 
12
  public $datesNumber;
13
  public function __construct() {
14
  add_action('add_meta_boxes', array($this, 'mainOptions'));
15
+ add_action('ycdGeneralMetaboxes', array($this, 'metaboxes'), 10, 1);
16
  add_filter('ycdCountdownDefaultOptions', array($this, 'defaultOptions'), 1, 1);
17
  }
18
 
19
  public function defaultOptions($options) {
 
20
  return $options;
21
  }
22
 
23
+ public function metaboxes($metaboxes) {
24
+ $metaboxes[YCD_PROGRESS_METABOX_KEY] = array('title' => YCD_PROGRESS_METABOX_TITLE, 'position' => 'normal', 'prioritet' => 'high');
25
+ return $metaboxes;
26
+ }
27
+
28
  public function includeStyles() {
29
  $this->includeGeneralScripts();
30
  wp_enqueue_script('jquery');
255
  <?php
256
  $content .= ob_get_contents();
257
  ob_get_clean();
258
+ $content .= $this->renderProgressBar();
259
  $content .= $this->renderSubscriptionForm();
260
  $content .= '</div>';
261
 
classes/countdown/Countdown.php CHANGED
@@ -393,9 +393,9 @@ abstract class Countdown {
393
  public function defaultMainMetaboxes() {
394
  $metaboxes = array();
395
 
396
- $metaboxes['advancedOptions'] = array('title' => 'Advanced options', 'position' => 'normal', 'prioritet' => 'high');
397
- $metaboxes['generalOptions'] = array('title' => 'General options', 'position' => 'normal', 'prioritet' => 'high');
398
- $metaboxes['subscription'] = array('title' => 'Subscription section', 'position' => 'normal', 'prioritet' => 'high');
399
  $metaboxes['afterCountdownExpire'] = array('title' => 'After Expire', 'position' => 'normal', 'prioritet' => 'high');
400
 
401
  return $metaboxes;
@@ -430,6 +430,10 @@ abstract class Countdown {
430
  require_once YCD_VIEWS_PATH.'subscriptionSection.php';
431
  }
432
 
 
 
 
 
433
  public static function isActivePost($postId) {
434
  $enabled = !get_post_meta($postId, 'ycd_enable', true);
435
  $postStatus = get_post_status($postId);
@@ -533,6 +537,133 @@ abstract class Countdown {
533
 
534
  return $subscription->render();
535
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
536
 
537
  /**
538
  * Changing default options form changing options by name
@@ -645,4 +776,18 @@ abstract class Countdown {
645
 
646
  return $filteredObj;
647
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
648
  }
393
  public function defaultMainMetaboxes() {
394
  $metaboxes = array();
395
 
396
+ $metaboxes['advancedOptions'] = array('title' => 'Advanced Options', 'position' => 'normal', 'prioritet' => 'high');
397
+ $metaboxes['generalOptions'] = array('title' => 'General Options', 'position' => 'normal', 'prioritet' => 'high');
398
+ $metaboxes['subscription'] = array('title' => 'Subscription Section', 'position' => 'normal', 'prioritet' => 'high');
399
  $metaboxes['afterCountdownExpire'] = array('title' => 'After Expire', 'position' => 'normal', 'prioritet' => 'high');
400
 
401
  return $metaboxes;
430
  require_once YCD_VIEWS_PATH.'subscriptionSection.php';
431
  }
432
 
433
+ public function ycdMetaboxProgress() {
434
+ require_once YCD_VIEWS_PATH.'progressBar.php';
435
+ }
436
+
437
  public static function isActivePost($postId) {
438
  $enabled = !get_post_meta($postId, 'ycd_enable', true);
439
  $postStatus = get_post_status($postId);
537
 
538
  return $subscription->render();
539
  }
540
+
541
+ public function renderProgressBar() {
542
+ if(!$this->getOptionValue('ycd-countdown-enable-progress')) {
543
+ return '';
544
+ }
545
+ $allSecondsArgs = array(
546
+ 'dateType' => $this->getOptionValue('ycd-countdown-date-type'),
547
+ 'timePicker' => $this->getOptionValue('ycd-date-time-picker'),
548
+ 'timeZone' => $this->getOptionValue('ycd-circle-time-zone'),
549
+ 'durationHours' => (int)$this->getOptionValue('ycd-countdown-duration-hours'),
550
+ 'minutes' => (int)$this->getOptionValue('ycd-countdown-duration-minutes'),
551
+ 'secondsSaved' => (int)$this->getOptionValue('ycd-countdown-duration-seconds')
552
+ );
553
+ $allSeconds = $this->gettProgressAllSeconds();
554
+ $currentSeconds = $this->getProgressCurrentSeconds();
555
+
556
+ $args = array(
557
+ 'id' => $this->getId(),
558
+ 'allSeconds' => $allSeconds,
559
+ 'currentSeconds' => $currentSeconds,
560
+ 'width' => $this->getOptionValue('ycd-progress-width'),
561
+ 'height' => $this->getOptionValue('ycd-progress-height'),
562
+ 'type' => $this->getOptionValue('ycd-countdown-date-type'),
563
+ 'mainColor' => $this->getOptionValue('ycd-progress-main-color'),
564
+ 'progressColor' => $this->getOptionValue('ycd-progress-color'),
565
+ 'textColor' => $this->getOptionValue('ycd-progress-text-color')
566
+ );
567
+
568
+ return Countdown::renderProgress($args);
569
+ }
570
+
571
+ public static function renderProgress($args = array()) {
572
+ $progressBar = new ProgressBar();
573
+ $progressBar->setOptions($args);
574
+
575
+ return $progressBar;
576
+ }
577
+
578
+ private function gettProgressAllSeconds($args = array()) {
579
+ $seconds = 0;
580
+ $filteredObj = $this;
581
+ $countdownType = $this->getType();
582
+ $dateType = $this->getOptionValue('ycd-countdown-date-type');
583
+ $timePicker = $this->getOptionValue('ycd-date-time-picker');
584
+ $timeZone = $this->getOptionValue('ycd-circle-time-zone');
585
+ $durationHours = (int)$this->getOptionValue('ycd-countdown-duration-hours');
586
+ $minutes = (int)$this->getOptionValue('ycd-countdown-duration-minutes');
587
+ $secondsSaved = (int)$this->getOptionValue('ycd-countdown-duration-seconds');
588
+
589
+ $dateType = $dateType;
590
+
591
+ if($dateType == 'dueDate') {
592
+ $dueDate = $timePicker;
593
+ $timezone = $timeZone;
594
+ $dueDate .= ':00';
595
+ $timeDate = new DateTime('now', new DateTimeZone($timezone));
596
+ $timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
597
+ $seconds = strtotime($dueDate)-$timeNow;
598
+ }
599
+ else if($dateType == 'schedule') {
600
+ $filteredObj = apply_filters('ycdScheduleExpireSecond', $this);
601
+ $seconds = $this->getExpireSeconds();
602
+ }
603
+ else {
604
+ $hours = $durationHours;
605
+ $minutes = $minutes;
606
+ $secondsSaved = $secondsSaved;
607
+
608
+ $seconds = $hours*60*60 + $minutes*60 + $secondsSaved;
609
+ }
610
+
611
+ if($countdownType == 'timer') {
612
+ $hours = $this->getOptionValue('ycd-timer-hours');
613
+ $minutes = $this->getOptionValue('ycd-timer-minutes');
614
+ $secondsSaved = $this->getOptionValue('ycd-timer-seconds');
615
+
616
+ $seconds = $hours*60*60 + $minutes*60 + $secondsSaved;
617
+ }
618
+
619
+ return $seconds;
620
+ }
621
+
622
+ private function getProgressCurrentSeconds() {
623
+ $seconds = 0;
624
+ $countdownType = $this->getType();
625
+ $filteredObj = $this;
626
+ $dateType = $this->getOptionValue('ycd-countdown-date-type');
627
+ $startDate = $this->getOptionValue('ycd-date-progress-start-date');
628
+ $timePicker = $this->getOptionValue('ycd-date-time-picker');
629
+ $timezone = $this->getOptionValue('ycd-circle-time-zone');
630
+ $durationHours = (int)$this->getOptionValue('ycd-countdown-duration-hours');
631
+ $minutes = (int)$this->getOptionValue('ycd-countdown-duration-minutes');
632
+ $secondsSaved = (int)$this->getOptionValue('ycd-countdown-duration-seconds');
633
+
634
+ $dateType = $dateType;
635
+
636
+ if($dateType == 'dueDate') {
637
+ $dueDate = $startDate;
638
+ $endDate = $timePicker;
639
+ $timezone = $timezone;
640
+ $dueDate .= ':00';
641
+ $timeDate = new DateTime('now', new DateTimeZone($timezone));
642
+ $timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
643
+ $seconds = strtotime($endDate)-strtotime($dueDate);
644
+ }
645
+ else if($dateType == 'schedule') {
646
+ $filteredObj = apply_filters('ycdScheduleAllSeconds', $this);
647
+ $seconds = $this->getExpireSeconds();
648
+ }
649
+ else {
650
+ $hours = $durationHours;
651
+ $minutes = $minutes;
652
+ $secondsSaved = $secondsSaved;
653
+
654
+ $seconds = $hours*60*60 + $minutes*60 + $secondsSaved;
655
+ }
656
+
657
+ if($countdownType == 'timer') {
658
+ $hours = $this->getOptionValue('ycd-timer-hours');
659
+ $minutes = $this->getOptionValue('ycd-timer-minutes');
660
+ $secondsSaved = $this->getOptionValue('ycd-timer-seconds');
661
+
662
+ $seconds = $hours*60*60 + $minutes*60 + $secondsSaved;
663
+ }
664
+
665
+ return $seconds;
666
+ }
667
 
668
  /**
669
  * Changing default options form changing options by name
776
 
777
  return $filteredObj;
778
  }
779
+
780
+ protected function scheduleOptions(&$options) {
781
+ $modifiedObj = $this->getCircleSeconds();
782
+ $modifiedSavedData = $modifiedObj->datesNumber;
783
+
784
+ $options['startDay'] = $this->getOptionValue('ycd-schedule-start-day');
785
+ $options['startDayNumber'] = $modifiedSavedData['startDayNumber'];
786
+ $options['endDay'] = $this->getOptionValue('ycd-schedule-end-day');
787
+ $options['endDayNumber'] = $modifiedSavedData['endDayNumber'];
788
+ $options['currentDayNumber'] = $modifiedSavedData['currentDayNumber'];
789
+ $options['ycd-schedule-end-to'] = $this->getOptionValue('ycd-schedule-end-to');
790
+ $options['ycd-schedule-start-from'] = $this->getOptionValue('ycd-schedule-start-from');
791
+ $options['ycd-schedule-time-zone'] = $this->getOptionValue('ycd-schedule-time-zone');
792
+ }
793
  }
classes/countdown/TimerCountdown.php CHANGED
@@ -31,6 +31,7 @@ class TimerCountdown extends Countdown {
31
 
32
  public function metaboxes($metaboxes) {
33
  unset($metaboxes['generalOptions']);
 
34
 
35
  return $metaboxes;
36
  }
@@ -117,6 +118,7 @@ class TimerCountdown extends Countdown {
117
  </div>
118
  </div>
119
  <?php echo $this->renderSubscriptionForm(); ?>
 
120
  </div>
121
  <?php
122
  $content = ob_get_contents();
31
 
32
  public function metaboxes($metaboxes) {
33
  unset($metaboxes['generalOptions']);
34
+ $metaboxes[YCD_PROGRESS_METABOX_KEY] = array('title' => YCD_PROGRESS_METABOX_TITLE, 'position' => 'normal', 'prioritet' => 'high');
35
 
36
  return $metaboxes;
37
  }
118
  </div>
119
  </div>
120
  <?php echo $this->renderSubscriptionForm(); ?>
121
+ <?php echo $this->renderProgressBar(); ?>
122
  </div>
123
  <?php
124
  $content = ob_get_contents();
config/config.php CHANGED
@@ -21,6 +21,7 @@ class YcdCountdownConfig {
21
  self::addDefine('YCD_COUNTDOWN_LIB_URL', YCD_COUNTDOWN_URL.'lib/');
22
  self::addDefine('YCD_COUNTDOWN_PATH', WP_PLUGIN_DIR.'/'.YCD_FOLDER_NAME.'/');
23
  self::addDefine('YCD_CLASSES_PATH', YCD_COUNTDOWN_PATH.'classes/');
 
24
  self::addDefine('YCD_DATA_TABLE_PATH', YCD_CLASSES_PATH.'dataTable/');
25
  self::addDefine('YCD_LIB_PATH', YCD_COUNTDOWN_PATH.'lib/');
26
  self::addDefine('YCD_HELPERS_PATH', YCD_COUNTDOWN_PATH.'helpers/');
@@ -44,14 +45,16 @@ class YcdCountdownConfig {
44
  self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
45
  self::addDefine('YCD_COUNTDOWN_PRO_URL', 'https://edmonsoft.com/countdown');
46
  self::addDefine('YCD_COUNTDOWN_REVIEW_URL', 'https://wordpress.org/support/plugin/countdown-builder/reviews/?filter=5');
 
 
47
  self::addDefine('YCD_FILTER_REPEAT_INTERVAL', 50);
48
  self::addDefine('YCD_SHOW_REVIEW_PERIOD', 30);
49
  self::addDefine('YCD_PRODUCTS_LIMIT', 1000);
50
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
51
  self::addDefine('YCD_AJAX_SUCCESS', 1);
52
  self::addDefine('YCD_TABLE_LIMIT', 15);
53
- self::addDefine('YCD_VERSION', 1.37);
54
- self::addDefine('YCD_VERSION_PRO', 1.23);
55
  self::addDefine('YCD_FREE_VERSION', 1);
56
  self::addDefine('YCD_SILVER_VERSION', 2);
57
  self::addDefine('YCD_GOLD_VERSION', 3);
21
  self::addDefine('YCD_COUNTDOWN_LIB_URL', YCD_COUNTDOWN_URL.'lib/');
22
  self::addDefine('YCD_COUNTDOWN_PATH', WP_PLUGIN_DIR.'/'.YCD_FOLDER_NAME.'/');
23
  self::addDefine('YCD_CLASSES_PATH', YCD_COUNTDOWN_PATH.'classes/');
24
+ self::addDefine('YCD_BLOCKS_PATH', YCD_CLASSES_PATH.'blocks/');
25
  self::addDefine('YCD_DATA_TABLE_PATH', YCD_CLASSES_PATH.'dataTable/');
26
  self::addDefine('YCD_LIB_PATH', YCD_COUNTDOWN_PATH.'lib/');
27
  self::addDefine('YCD_HELPERS_PATH', YCD_COUNTDOWN_PATH.'helpers/');
45
  self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
46
  self::addDefine('YCD_COUNTDOWN_PRO_URL', 'https://edmonsoft.com/countdown');
47
  self::addDefine('YCD_COUNTDOWN_REVIEW_URL', 'https://wordpress.org/support/plugin/countdown-builder/reviews/?filter=5');
48
+ self::addDefine('YCD_PROGRESS_METABOX_KEY', 'ycdMetaboxProgress');
49
+ self::addDefine('YCD_PROGRESS_METABOX_TITLE', __('Progress Bar', YCD_TEXT_DOMAIN));
50
  self::addDefine('YCD_FILTER_REPEAT_INTERVAL', 50);
51
  self::addDefine('YCD_SHOW_REVIEW_PERIOD', 30);
52
  self::addDefine('YCD_PRODUCTS_LIMIT', 1000);
53
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
54
  self::addDefine('YCD_AJAX_SUCCESS', 1);
55
  self::addDefine('YCD_TABLE_LIMIT', 15);
56
+ self::addDefine('YCD_VERSION', 1.38);
57
+ self::addDefine('YCD_VERSION_PRO', 1.24);
58
  self::addDefine('YCD_FREE_VERSION', 1);
59
  self::addDefine('YCD_SILVER_VERSION', 2);
60
  self::addDefine('YCD_GOLD_VERSION', 3);
config/optionsConfig.php CHANGED
@@ -74,6 +74,7 @@ class YcdCountdownOptionsConfig {
74
  $options[] = array('name' => 'ycd-type', 'type' => 'text', 'defaultValue' => 'circle');
75
  $options[] = array('name' => 'ycd-countdown-date-type', 'type' => 'text', 'defaultValue' => 'dueDate');
76
  $options[] = array('name' => 'ycd-date-time-picker', 'type' => 'text', 'defaultValue' => date('Y-m-d H:i', strtotime(' +1 day')));
 
77
  $options[] = array('name' => 'ycd-circle-time-zone', 'type' => 'text', 'defaultValue' => self::getDefaultTimezone());
78
  $options[] = array('name' => 'ycd-circle-animation', 'type' => 'text', 'defaultValue' => 'smooth');
79
  $options[] = array('name' => 'ycd-countdown-width', 'type' => 'text', 'defaultValue' => '500');
74
  $options[] = array('name' => 'ycd-type', 'type' => 'text', 'defaultValue' => 'circle');
75
  $options[] = array('name' => 'ycd-countdown-date-type', 'type' => 'text', 'defaultValue' => 'dueDate');
76
  $options[] = array('name' => 'ycd-date-time-picker', 'type' => 'text', 'defaultValue' => date('Y-m-d H:i', strtotime(' +1 day')));
77
+ $options[] = array('name' => 'ycd-date-progress-start-date', 'type' => 'text', 'defaultValue' => date('Y-m-d H:i'));
78
  $options[] = array('name' => 'ycd-circle-time-zone', 'type' => 'text', 'defaultValue' => self::getDefaultTimezone());
79
  $options[] = array('name' => 'ycd-circle-animation', 'type' => 'text', 'defaultValue' => 'smooth');
80
  $options[] = array('name' => 'ycd-countdown-width', 'type' => 'text', 'defaultValue' => '500');
config/proOptionsConfig.php CHANGED
@@ -36,6 +36,14 @@ class proOptionsConfig {
36
  $defaults[] = array('name' => 'ycd-schedule-start-from', 'type' => 'html', 'defaultValue' => '10:00');
37
  $defaults[] = array('name' => 'ycd-schedule-end-to', 'type' => 'html', 'defaultValue' => '18:00');
38
  $defaults[] = array('name' => 'ycd-schedule-time-zone', 'type' => 'html', 'defaultValue' => 'Europe/London');
 
 
 
 
 
 
 
 
39
 
40
  return $defaults;
41
  }
36
  $defaults[] = array('name' => 'ycd-schedule-start-from', 'type' => 'html', 'defaultValue' => '10:00');
37
  $defaults[] = array('name' => 'ycd-schedule-end-to', 'type' => 'html', 'defaultValue' => '18:00');
38
  $defaults[] = array('name' => 'ycd-schedule-time-zone', 'type' => 'html', 'defaultValue' => 'Europe/London');
39
+
40
+ $defaults[] = array('name' => 'ycd-progress-main-color', 'type' => 'html', 'defaultValue' => '#0A5F44');
41
+ $defaults[] = array('name' => 'ycd-progress-color', 'type' => 'html', 'defaultValue' => '#CBEA00');
42
+ $defaults[] = array('name' => 'ycd-progress-text-color', 'type' => 'html', 'defaultValue' => '#ffffff');
43
+ $defaults[] = array('name' => 'ycd-progress-width', 'type' => 'html', 'defaultValue' => '90%');
44
+ $defaults[] = array('name' => 'ycd-progress-height', 'type' => 'html', 'defaultValue' => '22px');
45
+
46
+ $defaults[] = array('name' => 'ycd-countdown-enable-progress', 'type' => 'checkbox', 'defaultValue' => '');
47
 
48
  return $defaults;
49
  }
countdown-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Countdown builder
4
  * Description: The best countdown plugin
5
- * Version: 1.3.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
5
+ * Version: 1.3.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.0.3
6
- Stable tag: 1.3.7
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -53,6 +53,10 @@ We do web development and if you need a developer or if you think you have found
53
  Coming soon
54
 
55
  == Changelog ==
 
 
 
 
56
 
57
  = 1.3.7 =
58
  * Admin side improvment
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.0.3
6
+ Stable tag: 1.3.8
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
53
  Coming soon
54
 
55
  == Changelog ==
56
+ = 1.3.8 =
57
+ * New progress bar option
58
+ * Admin side text improvement
59
+ * Bug fixed
60
 
61
  = 1.3.7 =
62
  * Admin side improvment