Countdown, Coming Soon – Countdown & Clock - Version 1.5.9

Version Description

  • Countdowns table copy shortcode
  • New Ideas sub menu
  • Admin side improvements
  • Countdown Button new features and video example
  • Bug fixed
Download this release

Release Info

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

Code changes from version 1.5.8 to 1.5.9

assets/css/admin.css CHANGED
@@ -59,7 +59,7 @@
59
  }
60
 
61
  .countdownButton-countdown-pro {
62
- background-image: url("../img/countdownButton.png");
63
  background-size: 100% 100%;
64
  }
65
 
@@ -662,4 +662,42 @@ div.ycd-tabs-text-header > div.ycd-toggle-icon-open {
662
 
663
  .ycd-extentsion-pro {
664
  margin-right: 15px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
665
  }
59
  }
60
 
61
  .countdownButton-countdown-pro {
62
+ background-image: url("../img/buttonExt.jpg");
63
  background-size: 100% 100%;
64
  }
65
 
662
 
663
  .ycd-extentsion-pro {
664
  margin-right: 15px;
665
+ }
666
+
667
+ /*tooltip*/
668
+ .ycd-tooltip {
669
+ position: relative;
670
+ }
671
+
672
+ .ycd-tooltip .ycd-tooltiptext {
673
+ visibility: hidden;
674
+ width: 140px;
675
+ background-color: #555;
676
+ color: #fff;
677
+ text-align: center;
678
+ border-radius: 6px;
679
+ padding: 5px;
680
+ position: absolute;
681
+ z-index: 1;
682
+ bottom: 150%;
683
+ left: 50%;
684
+ margin-left: -75px;
685
+ opacity: 0;
686
+ transition: opacity 0.3s;
687
+ }
688
+
689
+ .ycd-tooltip .ycd-tooltiptext::after {
690
+ content: "";
691
+ position: absolute;
692
+ top: 100%;
693
+ left: 50%;
694
+ margin-left: -5px;
695
+ border-width: 5px;
696
+ border-style: solid;
697
+ border-color: #555 transparent transparent transparent;
698
+ }
699
+
700
+ .ycd-tooltip:hover .ycd-tooltiptext {
701
+ visibility: visible;
702
+ opacity: 1;
703
  }
assets/img/buttonExt.jpg ADDED
Binary file
assets/js/Admin.js CHANGED
@@ -20,6 +20,7 @@ YcdAdmin.prototype.init = function() {
20
  this.editor();
21
  this.changeAnimation();
22
  this.buttonFunctions();
 
23
 
24
  /*clock*/
25
  this.clockLivePreview();
@@ -31,6 +32,24 @@ YcdAdmin.prototype.init = function() {
31
  }
32
  };
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  YcdAdmin.prototype.buttonFunctions = function () {
35
  var buttonOpacity = jQuery('#ycd-button-opacity');
36
 
20
  this.editor();
21
  this.changeAnimation();
22
  this.buttonFunctions();
23
+ this.copySortCode();
24
 
25
  /*clock*/
26
  this.clockLivePreview();
32
  }
33
  };
34
 
35
+ YcdAdmin.prototype.copySortCode = function() {
36
+ jQuery('.countdown-shortcode').bind('click', function() {
37
+ var currentId = jQuery(this).data('id');
38
+ var copyText = document.getElementById('ycd-shortcode-input-'+currentId);
39
+ copyText.select();
40
+ document.execCommand('copy');
41
+
42
+ var tooltip = document.getElementById('ycd-tooltip-'+currentId);
43
+ tooltip.innerHTML = ycd_admin_localized.copied;
44
+ });
45
+
46
+ jQuery(document).on('focusout', '.countdown-shortcode',function() {
47
+ var currentId = jQuery(this).data('id');
48
+ var tooltip = document.getElementById('ycd-tooltip-'+currentId);
49
+ tooltip.innerHTML = ycd_admin_localized.copyToClipboard;
50
+ });
51
+ };
52
+
53
  YcdAdmin.prototype.buttonFunctions = function () {
54
  var buttonOpacity = jQuery('#ycd-button-opacity');
55
 
assets/js/Js.php CHANGED
@@ -53,6 +53,8 @@ class Js {
53
  'adminUrl' => admin_url(),
54
  'pkgVersion' => YCD_PKG_VERSION,
55
  'supportURL' => YCD_COUNTDOWN_SUPPORT_URL,
 
 
56
  'proUrl' => YCD_COUNTDOWN_PRO_URL
57
  ));
58
  ScriptsIncluder::registerScript('select2.js');
53
  'adminUrl' => admin_url(),
54
  'pkgVersion' => YCD_PKG_VERSION,
55
  'supportURL' => YCD_COUNTDOWN_SUPPORT_URL,
56
+ 'copied' => __('Copied', YCD_TEXT_DOMAIN),
57
+ 'copyToClipboard' => __('Copy to clipboard', YCD_TEXT_DOMAIN),
58
  'proUrl' => YCD_COUNTDOWN_PRO_URL
59
  ));
60
  ScriptsIncluder::registerScript('select2.js');
classes/Actions.php CHANGED
@@ -32,9 +32,7 @@ class Actions {
32
  add_action('media_buttons', array($this, 'ycdMediaButton'), 11);
33
  add_action('admin_post_ycdSaveSettings', array($this, 'saveSettings'), 10, 1);
34
  add_action('wp_head', array($this, 'wpHead'), 10, 1);
35
- if (YCD_PKG_VERSION == YCD_FREE_VERSION) {
36
- add_action('admin_head', array($this, 'adminHead'));
37
- }
38
  add_action('wp_enqueue_scripts', array($this, 'enqueueScripts'));
39
  add_filter('mce_external_plugins', array($this, 'editorButton'));
40
  }
@@ -52,11 +50,17 @@ class Actions {
52
  }
53
 
54
  public function adminHead() {
55
- echo "<script>jQuery(document).ready(function() {jQuery('#menu-posts-ycdcountdown a[href*=\"page=supports\"]').css({color: 'yellow'});jQuery('#menu-posts-ycdcountdown a[href*=\"page=supports\"]').bind('click', function(e) {e.preventDefault(); window.open('https://wordpress.org/support/plugin/countdown-builder/')}) });</script>";
56
- $script = '<script>';
57
- $script .= "jQuery(document).ready(function() {jQuery('[href*=\"ycdSubscribers\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank');jQuery('[href*=\"ycdNewsletter\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank')});";
58
- $script .= '</script>';
59
-
 
 
 
 
 
 
60
  echo $script;
61
  }
62
 
@@ -195,7 +199,8 @@ class Actions {
195
  $countdownObj = Countdown::find($postId);
196
 
197
  if ($column == 'shortcode') {
198
- echo '<input type="text" onfocus="this.select();" readonly value="[ycd_countdown id='.$postId.']" class="large-text code">';
 
199
  }
200
  if ($column == 'type') {
201
  $title = '';
32
  add_action('media_buttons', array($this, 'ycdMediaButton'), 11);
33
  add_action('admin_post_ycdSaveSettings', array($this, 'saveSettings'), 10, 1);
34
  add_action('wp_head', array($this, 'wpHead'), 10, 1);
35
+ add_action('admin_head', array($this, 'adminHead'));
 
 
36
  add_action('wp_enqueue_scripts', array($this, 'enqueueScripts'));
37
  add_filter('mce_external_plugins', array($this, 'editorButton'));
38
  }
50
  }
51
 
52
  public function adminHead() {
53
+ $script = '';
54
+
55
+ $script = "<script>jQuery(document).ready(function() {jQuery('#menu-posts-ycdcountdown a[href*=\"page=ycdIdeas\"]').css({color: '#55efc3', 'font-size': '17px'});jQuery('#menu-posts-ycdcountdown a[href*=\"page=ycdIdeas\"]').bind('click', function(e) {e.preventDefault(); window.open('https://wordpress.org/support/plugin/countdown-builder/')}) });</script>";
56
+
57
+ if (YCD_PKG_VERSION == YCD_FREE_VERSION) {
58
+ echo "<script>jQuery(document).ready(function() {jQuery('#menu-posts-ycdcountdown a[href*=\"page=supports\"]').css({color: 'yellow'});jQuery('#menu-posts-ycdcountdown a[href*=\"page=supports\"]').bind('click', function(e) {e.preventDefault(); window.open('https://wordpress.org/support/plugin/countdown-builder/')}) });</script>";
59
+ $script .= '<script>';
60
+ $script .= "jQuery(document).ready(function() {jQuery('[href*=\"ycdSubscribers\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank');jQuery('[href*=\"ycdNewsletter\"]').attr(\"href\", '".YCD_COUNTDOWN_PRO_URL."').attr('target', '_blank')});";
61
+ $script .= '</script>';
62
+ }
63
+
64
  echo $script;
65
  }
66
 
199
  $countdownObj = Countdown::find($postId);
200
 
201
  if ($column == 'shortcode') {
202
+ echo '<div class="ycd-tooltip">
203
+ <span class="ycd-tooltiptext" id="ycd-tooltip-'.$postId.'">'.__('Copy to clipboard', YCD_TEXT_DOMAIN).'</span><input type="text" data-id="'.$postId.'" onfocus="this.select();" readonly id="ycd-shortcode-input-'.$postId.'" value="[ycd_countdown id='.$postId.']" class="large-text code countdown-shortcode"></div>';
204
  }
205
  if ($column == 'type') {
206
  $title = '';
classes/RegisterPostType.php CHANGED
@@ -200,6 +200,7 @@ class RegisterPostType {
200
  );
201
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Newsletter', YCD_TEXT_DOMAIN), __('Newsletter', YCD_TEXT_DOMAIN).$menuLabel, 'ycd_manage_options', YCD_COUNTDOWN_NEWSLETTER, array($this, 'countdownNewsletter'));
202
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Support', YCD_TEXT_DOMAIN), __('Support', YCD_TEXT_DOMAIN), 'ycd_manage_options', YCD_COUNTDOWN_SUPPORT, array($this, 'countdownSupport'));
 
203
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Subscribers', YCD_TEXT_DOMAIN), __('Subscribers', YCD_TEXT_DOMAIN).$menuLabel, 'ycd_manage_options', YCD_COUNTDOWN_SUBSCRIBERS, array($this, 'countdownSubscribers'));
204
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('More Plugins', YCD_TEXT_DOMAIN), __('More Plugins', YCD_TEXT_DOMAIN), 'manage_options', YCD_COUNTDOWN_MORE_PLUGINS, array($this, 'morePlugins'));
205
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Settings', YCD_TEXT_DOMAIN), __('Settings', YCD_TEXT_DOMAIN), 'manage_options', YCD_COUNTDOWN_SETTINGS, array($this, 'countdownSettings'));
@@ -218,6 +219,10 @@ class RegisterPostType {
218
  require_once YCD_VIEWS_PATH.'support.php';
219
  }
220
 
 
 
 
 
221
  public function morePlugins() {
222
  require_once YCD_VIEWS_PATH.'morePlugins.php';
223
  }
200
  );
201
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Newsletter', YCD_TEXT_DOMAIN), __('Newsletter', YCD_TEXT_DOMAIN).$menuLabel, 'ycd_manage_options', YCD_COUNTDOWN_NEWSLETTER, array($this, 'countdownNewsletter'));
202
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Support', YCD_TEXT_DOMAIN), __('Support', YCD_TEXT_DOMAIN), 'ycd_manage_options', YCD_COUNTDOWN_SUPPORT, array($this, 'countdownSupport'));
203
+ add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('More ideas?', YCD_TEXT_DOMAIN), __('More ideas?', YCD_TEXT_DOMAIN), 'ycd_manage_options', YCD_COUNTDOWN_IDEAS, array($this, 'countdownIdeas'));
204
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Subscribers', YCD_TEXT_DOMAIN), __('Subscribers', YCD_TEXT_DOMAIN).$menuLabel, 'ycd_manage_options', YCD_COUNTDOWN_SUBSCRIBERS, array($this, 'countdownSubscribers'));
205
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('More Plugins', YCD_TEXT_DOMAIN), __('More Plugins', YCD_TEXT_DOMAIN), 'manage_options', YCD_COUNTDOWN_MORE_PLUGINS, array($this, 'morePlugins'));
206
  add_submenu_page('edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE, __('Settings', YCD_TEXT_DOMAIN), __('Settings', YCD_TEXT_DOMAIN), 'manage_options', YCD_COUNTDOWN_SETTINGS, array($this, 'countdownSettings'));
219
  require_once YCD_VIEWS_PATH.'support.php';
220
  }
221
 
222
+ public function countdownIdeas() {
223
+
224
+ }
225
+
226
  public function morePlugins() {
227
  require_once YCD_VIEWS_PATH.'morePlugins.php';
228
  }
config/config.php CHANGED
@@ -39,6 +39,7 @@ class YcdCountdownConfig {
39
  self::addDefine('YCD_COUNTDOWN_SETTINGS', 'ycdSettings');
40
  self::addDefine('YCD_COUNTDOWN_MORE_PLUGINS', 'ycdPlugins');
41
  self::addDefine('YCD_COUNTDOWN_SUPPORT', 'supports');
 
42
  self::addDefine('YCD_COUNTDOWN_NEWSLETTER', 'ycdNewsletter');
43
  self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS', 'ycdSubscribers');
44
  self::addDefine('YCD_POSTS_TABLE_NAME', 'posts');
@@ -59,7 +60,7 @@ class YcdCountdownConfig {
59
  self::addDefine('YCD_AJAX_SUCCESS', 1);
60
  self::addDefine('YCD_TABLE_LIMIT', 15);
61
  self::addDefine('YCD_VERSION_PRO', 1.44);
62
- self::addDefine('YCD_VERSION', 1.58);
63
  self::addDefine('YCD_FREE_VERSION', 1);
64
  self::addDefine('YCD_SILVER_VERSION', 2);
65
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -180,7 +181,7 @@ class YcdCountdownConfig {
180
  'pluginKey' => 'countdown-builder-call-to-action/countdownBuilderButton.php',
181
  'isType' => false,
182
  'shortKey' => 'countdownButton',
183
- 'videoURL' => '',
184
  'boxTitle' => __('Countdown Button')
185
  );
186
 
39
  self::addDefine('YCD_COUNTDOWN_SETTINGS', 'ycdSettings');
40
  self::addDefine('YCD_COUNTDOWN_MORE_PLUGINS', 'ycdPlugins');
41
  self::addDefine('YCD_COUNTDOWN_SUPPORT', 'supports');
42
+ self::addDefine('YCD_COUNTDOWN_IDEAS', 'ycdIdeas');
43
  self::addDefine('YCD_COUNTDOWN_NEWSLETTER', 'ycdNewsletter');
44
  self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS', 'ycdSubscribers');
45
  self::addDefine('YCD_POSTS_TABLE_NAME', 'posts');
60
  self::addDefine('YCD_AJAX_SUCCESS', 1);
61
  self::addDefine('YCD_TABLE_LIMIT', 15);
62
  self::addDefine('YCD_VERSION_PRO', 1.44);
63
+ self::addDefine('YCD_VERSION', 1.59);
64
  self::addDefine('YCD_FREE_VERSION', 1);
65
  self::addDefine('YCD_SILVER_VERSION', 2);
66
  self::addDefine('YCD_GOLD_VERSION', 3);
181
  'pluginKey' => 'countdown-builder-call-to-action/countdownBuilderButton.php',
182
  'isType' => false,
183
  'shortKey' => 'countdownButton',
184
+ 'videoURL' => 'https://www.youtube.com/watch?v=WwBuEGIy8po',
185
  'boxTitle' => __('Countdown Button')
186
  );
187
 
config/optionsConfig.php CHANGED
@@ -241,6 +241,7 @@ class YcdCountdownOptionsConfig {
241
  $options[] = array('name' => 'ycd-button-hover-bg-color', 'type' => 'text', 'defaultValue' => '#4dba7a');
242
  $options[] = array('name' => 'ycd-button-hover-color', 'type' => 'text', 'defaultValue' => '#ffffff');
243
  $options[] = array('name' => 'ycd-countdown-content-click-url-tab', 'type' => 'checkbox', 'defaultValue' => '');
 
244
 
245
  $YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
246
  }
241
  $options[] = array('name' => 'ycd-button-hover-bg-color', 'type' => 'text', 'defaultValue' => '#4dba7a');
242
  $options[] = array('name' => 'ycd-button-hover-color', 'type' => 'text', 'defaultValue' => '#ffffff');
243
  $options[] = array('name' => 'ycd-countdown-content-click-url-tab', 'type' => 'checkbox', 'defaultValue' => '');
244
+ $options[] = array('name' => 'ycd-countdown-button-behavior', 'type' => 'text', 'defaultValue' => 'redirect');
245
 
246
  $YCD_OPTIONS = apply_filters('ycdCountdownDefaultOptions', $options);
247
  }
countdown-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Countdown builder
4
  * Description: The best countdown plugin
5
- * Version: 1.5.8
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.5.9
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.3
6
- Stable tag: 1.5.8
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -63,6 +63,13 @@ Yes you can, we have Circle and Flipclock countdown popups.
63
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
64
 
65
  == Changelog ==
 
 
 
 
 
 
 
66
  = 1.5.8 =
67
  * Custom JS (new)
68
  * Circle countdown Redirect to new tab (new)
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.3
6
+ Stable tag: 1.5.9
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
63
  You need to select the .zip file, there is no need to extract the zip file, just upload it.
64
 
65
  == Changelog ==
66
+ = 1.5.9 =
67
+ * Countdowns table copy shortcode
68
+ * New Ideas sub menu
69
+ * Admin side improvements
70
+ * Countdown Button new features and video example
71
+ * Bug fixed
72
+
73
  = 1.5.8 =
74
  * Custom JS (new)
75
  * Circle countdown Redirect to new tab (new)