Countdown, Coming Soon – Countdown & Clock - Version 2.2.7

Version Description

  • Hide Editor Media buttons (new settings)
  • Settings options save improvement
Download this release

Release Info

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

Code changes from version 2.2.6 to 2.2.7

assets/views/settings.php CHANGED
@@ -6,6 +6,7 @@
6
  $dontDeleteData = (get_option('ycd-delete-data') ? 'checked': '');
7
  $hideComingSoon = (get_option('ycd-hide-coming-soon-menu') ? 'checked': '');
8
  $printScripts = (get_option('ycd-print-scripts-to-page') ? 'checked': '');
 
9
  ?>
10
  <?php if(!empty($_GET['saved'])) : ?>
11
  <div id="default-message" class="updated notice notice-success is-dismissible">
@@ -26,7 +27,7 @@
26
  </div>
27
  <div class="col-md-2">
28
  <label class="ycd-switch">
29
- <input type="checkbox" id="ycd-dont-delete-data" name="ycd-dont-delete-data" class="ycd-accordion-checkbox" <?= $dontDeleteData ?> >
30
  <span class="ycd-slider ycd-round"></span>
31
  </label>
32
  </div>
@@ -57,6 +58,17 @@
57
  <span class="ycd-slider ycd-round"></span>
58
  </label>
59
  </div>
 
 
 
 
 
 
 
 
 
 
 
60
  </div>
61
  <div class="row form-group">
62
  <div class="col-md-5">
6
  $dontDeleteData = (get_option('ycd-delete-data') ? 'checked': '');
7
  $hideComingSoon = (get_option('ycd-hide-coming-soon-menu') ? 'checked': '');
8
  $printScripts = (get_option('ycd-print-scripts-to-page') ? 'checked': '');
9
+ $hideMediaButton = (get_option('ycd-hide-editor-media-button') ? 'checked': '');
10
  ?>
11
  <?php if(!empty($_GET['saved'])) : ?>
12
  <div id="default-message" class="updated notice notice-success is-dismissible">
27
  </div>
28
  <div class="col-md-2">
29
  <label class="ycd-switch">
30
+ <input type="checkbox" id="ycd-delete-data" name="ycd-delete-data" class="ycd-accordion-checkbox" <?= $dontDeleteData ?> >
31
  <span class="ycd-slider ycd-round"></span>
32
  </label>
33
  </div>
58
  <span class="ycd-slider ycd-round"></span>
59
  </label>
60
  </div>
61
+ </div>
62
+ <div class="row form-group">
63
+ <div class="col-md-5">
64
+ <label for="ycd-hide-editor-media-button"><?php _e('Hide Editor Media buttons', YCD_TEXT_DOMAIN)?></label>
65
+ </div>
66
+ <div class="col-md-4">
67
+ <label class="ycd-switch">
68
+ <input type="checkbox" id="ycd-hide-editor-media-button" name="ycd-hide-editor-media-button" class="ycd-accordion-checkbox" <?= $hideMediaButton ?> >
69
+ <span class="ycd-slider ycd-round"></span>
70
+ </label>
71
+ </div>
72
  </div>
73
  <div class="row form-group">
74
  <div class="col-md-5">
classes/Actions.php CHANGED
@@ -158,6 +158,9 @@ class Actions {
158
  }
159
 
160
  public function editorButton($buttons) {
 
 
 
161
  $isLoadedMediaData = $this->isLoadedMediaData();
162
  new Tickbox(true, $isLoadedMediaData);
163
  $buttons['countdownBuilder'] = plugins_url('/../assets/js/admin/ycd-tinymce-plugin.js',__FILE__ );
@@ -394,32 +397,25 @@ class Actions {
394
  !isset($_POST[YCD_ADMIN_POST_NONCE])
395
  || !wp_verify_nonce($_POST[YCD_ADMIN_POST_NONCE], 'YCD_ADMIN_POST_NONCE')
396
  ) {
397
- _e('Sorry, your nonce did not verify.', YRM_LANG);die();
398
  }
399
- $userRoles = $post['ycd-user-roles'];
400
 
401
- if (isset($post['ycd-dont-delete-data'])) {
402
- update_option('ycd-delete-data', true);
403
- }
404
- else {
405
- delete_option('ycd-delete-data');
406
- }
407
-
408
- if (isset($post['ycd-hide-coming-soon-menu'])) {
409
- update_option('ycd-hide-coming-soon-menu', true);
410
- }
411
- else {
412
- delete_option('ycd-hide-coming-soon-menu');
413
- }
414
-
415
- if (isset($post['ycd-print-scripts-to-page'])) {
416
- update_option('ycd-print-scripts-to-page', true);
417
- }
418
- else {
419
- delete_option('ycd-print-scripts-to-page');
420
  }
421
 
422
- update_option('ycd-user-roles', $userRoles);
423
  wp_redirect(admin_url().'edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE.'&page='.YCD_COUNTDOWN_SETTINGS.'&saved=1');
424
  }
425
 
158
  }
159
 
160
  public function editorButton($buttons) {
161
+ if (get_option('ycd-hide-editor-media-button')) {
162
+ return $buttons;
163
+ }
164
  $isLoadedMediaData = $this->isLoadedMediaData();
165
  new Tickbox(true, $isLoadedMediaData);
166
  $buttons['countdownBuilder'] = plugins_url('/../assets/js/admin/ycd-tinymce-plugin.js',__FILE__ );
397
  !isset($_POST[YCD_ADMIN_POST_NONCE])
398
  || !wp_verify_nonce($_POST[YCD_ADMIN_POST_NONCE], 'YCD_ADMIN_POST_NONCE')
399
  ) {
400
+ _e('Sorry, your nonce did not verify.', YCD_TEXT_DOMAIN);die();
401
  }
 
402
 
403
+ $options = array(
404
+ 'ycd-print-scripts-to-page',
405
+ 'ycd-hide-coming-soon-menu',
406
+ 'ycd-delete-data',
407
+ 'ycd-user-roles',
408
+ 'ycd-hide-editor-media-button'
409
+ );
410
+
411
+ foreach ($options as $option) {
412
+ $current = '';
413
+ if (!empty($_POST[$option])) {
414
+ $current = $_POST[$option];
415
+ }
416
+ update_option($option, $current);
 
 
 
 
 
417
  }
418
 
 
419
  wp_redirect(admin_url().'edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE.'&page='.YCD_COUNTDOWN_SETTINGS.'&saved=1');
420
  }
421
 
classes/Tickbox.php CHANGED
@@ -6,6 +6,11 @@ class Tickbox {
6
  private $isLoadedMediaData = false;
7
 
8
  public function __construct($isEditorButton = false, $isLoadedMediaData = false) {
 
 
 
 
 
9
  if (isset($isEditorButton)) {
10
  $this->isEditorButton = $isEditorButton;
11
  }
6
  private $isLoadedMediaData = false;
7
 
8
  public function __construct($isEditorButton = false, $isLoadedMediaData = false) {
9
+
10
+ if (get_option('ycd-hide-editor-media-button')) {
11
+ return false;
12
+ }
13
+
14
  if (isset($isEditorButton)) {
15
  $this->isEditorButton = $isEditorButton;
16
  }
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.12);
79
- self::addDefine('YCD_VERSION', 2.26);
80
  self::addDefine('YCD_FREE_VERSION', 1);
81
  self::addDefine('YCD_SILVER_VERSION', 2);
82
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -84,9 +84,9 @@ class YcdCountdownConfig
84
  self::addDefine('YCD_EXTENSION_VERSION', 99);
85
  require_once(dirname(__FILE__).'/config-pkg.php');
86
 
87
- $versionText = '2.2.6';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
- $versionText = '2.1.2';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
  self::addDefine('YCD_LAST_UPDATE', 'Jan 4');
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.13);
79
+ self::addDefine('YCD_VERSION', 2.27);
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.2.7';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
+ $versionText = '2.1.3';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
  self::addDefine('YCD_LAST_UPDATE', 'Jan 4');
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.2.6
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.2.7
6
  * Author: Adam Skaat
7
  * Author URI: https://edmonsoft.com/countdown
8
  * License: GPLv2
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: adamskaat
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
- Tested up to: 5.8.2
6
- Stable tag: 2.2.6
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.2.6 =
71
  * Added Enable date for the timers
72
 
2
  Contributors: adamskaat
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
+ Tested up to: 5.8.3
6
+ Stable tag: 2.2.7
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.2.7 =
71
+ * Hide Editor Media buttons (new settings)
72
+ * Settings options save improvement
73
+
74
  = 2.2.6 =
75
  * Added Enable date for the timers
76