Countdown, Coming Soon – Countdown & Clock - Version 2.1.2

Version Description

  • Added security for settings save
  • Support menu fixed
Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.2

assets/views/settings.php CHANGED
@@ -16,6 +16,7 @@
16
  <div class="row">
17
  <div class="col-lg-8">
18
  <form method="POST" action="<?php echo admin_url().'admin-post.php?action=ycdSaveSettings'?>">
 
19
  <div class="panel panel-default">
20
  <div class="panel-heading"><?php _e('Settings', YCD_TEXT_DOMAIN)?></div>
21
  <div class="panel-body">
16
  <div class="row">
17
  <div class="col-lg-8">
18
  <form method="POST" action="<?php echo admin_url().'admin-post.php?action=ycdSaveSettings'?>">
19
+ <?php wp_nonce_field('YCD_ADMIN_POST_NONCE', YCD_ADMIN_POST_NONCE);?>
20
  <div class="panel panel-default">
21
  <div class="panel-heading"><?php _e('Settings', YCD_TEXT_DOMAIN)?></div>
22
  <div class="panel-body">
classes/Actions.php CHANGED
@@ -171,10 +171,11 @@ class Actions {
171
  public function adminHead() {
172
  $script = '';
173
 
174
- $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>";
 
175
 
 
176
  if (YCD_PKG_VERSION == YCD_FREE_VERSION) {
177
- 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>";
178
  $script .= '<script>';
179
  $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')});";
180
  $script .= '</script>';
@@ -387,6 +388,13 @@ class Actions {
387
 
388
  public function saveSettings() {
389
  $post = $_POST;
 
 
 
 
 
 
 
390
  $userRoles = $post['ycd-user-roles'];
391
 
392
  if (isset($post['ycd-dont-delete-data'])) {
171
  public function adminHead() {
172
  $script = '';
173
 
174
+ $script = "
175
+ <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>";
176
 
177
+ $script .= "<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>";
178
  if (YCD_PKG_VERSION == YCD_FREE_VERSION) {
 
179
  $script .= '<script>';
180
  $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')});";
181
  $script .= '</script>';
388
 
389
  public function saveSettings() {
390
  $post = $_POST;
391
+
392
+ if(
393
+ !isset($_POST[YCD_ADMIN_POST_NONCE])
394
+ || !wp_verify_nonce($_POST[YCD_ADMIN_POST_NONCE], 'YCD_ADMIN_POST_NONCE')
395
+ ) {
396
+ _e('Sorry, your nonce did not verify.', YRM_LANG);die();
397
+ }
398
  $userRoles = $post['ycd-user-roles'];
399
 
400
  if (isset($post['ycd-dont-delete-data'])) {
config/config.php CHANGED
@@ -60,6 +60,7 @@ class YcdCountdownConfig
60
  self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
61
  self::addDefine('YCD_STORE_URL', 'https://edmonsoft.com/countdown/');
62
  self::addDefine('YCD_PRO_KEY', 'ycdProVersion');
 
63
  self::addDefine('YCD_COUNTDOWN_PRO_URL', 'https://edmonsoft.com/countdown');
64
  self::addDefine('YCD_COUNTDOWN_BUTTON_URL', 'https://edmonsoft.com/countdown/#yrm-analytics');
65
  self::addDefine('YCD_COUNTDOWN_REVIEW_URL', 'https://wordpress.org/support/plugin/countdown-builder/reviews/?filter=5');
@@ -74,8 +75,8 @@ class YcdCountdownConfig
74
  self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
75
  self::addDefine('YCD_AJAX_SUCCESS', 1);
76
  self::addDefine('YCD_TABLE_LIMIT', 15);
77
- self::addDefine('YCD_VERSION_PRO', 1.97);
78
- self::addDefine('YCD_VERSION', 2.11);
79
  self::addDefine('YCD_FREE_VERSION', 1);
80
  self::addDefine('YCD_SILVER_VERSION', 2);
81
  self::addDefine('YCD_GOLD_VERSION', 3);
@@ -83,13 +84,13 @@ class YcdCountdownConfig
83
  self::addDefine('YCD_EXTENSION_VERSION', 99);
84
  require_once(dirname(__FILE__).'/config-pkg.php');
85
 
86
- $versionText = '2.1.0';
87
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
88
- $versionText = '1.9.5';
89
  }
90
  self::addDefine('YCD_VERSION_TEXT', $versionText);
91
- self::addDefine('YCD_LAST_UPDATE', 'June 11');
92
- self::addDefine('YCD_NEXT_UPDATE', 'June 26');
93
  }
94
 
95
  public static function displaySettings()
60
  self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
61
  self::addDefine('YCD_STORE_URL', 'https://edmonsoft.com/countdown/');
62
  self::addDefine('YCD_PRO_KEY', 'ycdProVersion');
63
+ self::addDefine('YCD_ADMIN_POST_NONCE', 'YCD_ADMIN_POST_NONCE');
64
  self::addDefine('YCD_COUNTDOWN_PRO_URL', 'https://edmonsoft.com/countdown');
65
  self::addDefine('YCD_COUNTDOWN_BUTTON_URL', 'https://edmonsoft.com/countdown/#yrm-analytics');
66
  self::addDefine('YCD_COUNTDOWN_REVIEW_URL', 'https://wordpress.org/support/plugin/countdown-builder/reviews/?filter=5');
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', 1.98);
79
+ self::addDefine('YCD_VERSION', 2.12);
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.2';
88
  if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
89
+ $versionText = '1.9.8';
90
  }
91
  self::addDefine('YCD_VERSION_TEXT', $versionText);
92
+ self::addDefine('YCD_LAST_UPDATE', 'June 26');
93
+ self::addDefine('YCD_NEXT_UPDATE', 'July 17');
94
  }
95
 
96
  public static function displaySettings()
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.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 by Adam skaat
5
+ * Version: 2.1.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.7.2
6
- Stable tag: 2.1.1
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.1 =
71
  * Fixed simple countdown date calculation issue
72
  * Fixed schedule issue
3
  Tags: countdown, timer, countdown timer
4
  Requires at least: 3.8
5
  Tested up to: 5.7.2
6
+ Stable tag: 2.1.2
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.2 =
71
+ * Added security for settings save
72
+ * Support menu fixed
73
+
74
  = 2.1.1 =
75
  * Fixed simple countdown date calculation issue
76
  * Fixed schedule issue