Version Description
- Code fixes
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 2.3.3 |
Comparing to | |
See all releases |
Code changes from version 2.3.2 to 2.3.3
- classes/Actions.php +3 -4
- classes/Ajax.php +3 -3
- classes/RegisterPostType.php +1 -1
- classes/countdown/ComingSoon.php +3 -4
- classes/countdown/Countdown.php +1 -1
- classes/countdown/SimpleCountdown.php +8 -8
- config/config.php +1 -1
- countdown-builder.php +1 -1
- helpers/TypesNavBar.php +1 -1
- readme.txt +5 -2
classes/Actions.php
CHANGED
@@ -399,7 +399,6 @@ class Actions {
|
|
399 |
}
|
400 |
|
401 |
public function saveSettings() {
|
402 |
-
$post = $_POST;
|
403 |
|
404 |
if(
|
405 |
!isset($_POST[YCD_ADMIN_POST_NONCE])
|
@@ -419,7 +418,7 @@ class Actions {
|
|
419 |
foreach ($options as $option) {
|
420 |
$current = '';
|
421 |
if (!empty($_POST[$option])) {
|
422 |
-
$current = $_POST[$option];
|
423 |
}
|
424 |
update_option($option, $current);
|
425 |
}
|
@@ -429,8 +428,8 @@ class Actions {
|
|
429 |
|
430 |
public function comingSoon() {
|
431 |
check_admin_referer('ycdSaveComingSoon');
|
432 |
-
|
433 |
-
ComingSoon::saveComingSoonSettings(
|
434 |
$adminUrl = admin_url().'/edit.php';
|
435 |
|
436 |
$url = add_query_arg( array(
|
399 |
}
|
400 |
|
401 |
public function saveSettings() {
|
|
|
402 |
|
403 |
if(
|
404 |
!isset($_POST[YCD_ADMIN_POST_NONCE])
|
418 |
foreach ($options as $option) {
|
419 |
$current = '';
|
420 |
if (!empty($_POST[$option])) {
|
421 |
+
$current = sanitize_text_field($_POST[$option]);
|
422 |
}
|
423 |
update_option($option, $current);
|
424 |
}
|
428 |
|
429 |
public function comingSoon() {
|
430 |
check_admin_referer('ycdSaveComingSoon');
|
431 |
+
|
432 |
+
ComingSoon::saveComingSoonSettings();
|
433 |
$adminUrl = admin_url().'/edit.php';
|
434 |
|
435 |
$url = add_query_arg( array(
|
classes/Ajax.php
CHANGED
@@ -27,7 +27,7 @@ class Ajax {
|
|
27 |
|
28 |
public function countdownBuilderStoreSurveyResult() {
|
29 |
check_ajax_referer('countdownBuilderAjaxNonce', 'token');
|
30 |
-
$str = $_POST['savedData'];
|
31 |
parse_str($str, $savedData);
|
32 |
|
33 |
$headers = 'MIME-Versions: 1.0'."\r\n";
|
@@ -80,7 +80,7 @@ class Ajax {
|
|
80 |
|
81 |
public function ycdSupport() {
|
82 |
check_ajax_referer('ycd_ajax_nonce', 'nonce');
|
83 |
-
parse_str($_POST['formData'], $params);
|
84 |
|
85 |
$headers = 'MIME-Versions: 1.0'."\r\n";
|
86 |
//$headers .= 'From: '.$sendFromEmail.''."\r\n";
|
@@ -143,7 +143,7 @@ class Ajax {
|
|
143 |
YcdCountdownConfig::displaySettings();
|
144 |
$selectedParams = sanitize_text_field($_POST['selectedParams']);
|
145 |
$conditionId = (int)$_POST['conditionId'];
|
146 |
-
$childClassName = $_POST['conditionsClassName'];
|
147 |
$childClassName = __NAMESPACE__.'\\'.$childClassName;
|
148 |
$obj = new $childClassName();
|
149 |
|
27 |
|
28 |
public function countdownBuilderStoreSurveyResult() {
|
29 |
check_ajax_referer('countdownBuilderAjaxNonce', 'token');
|
30 |
+
$str = sanitize_text_field($_POST['savedData']);
|
31 |
parse_str($str, $savedData);
|
32 |
|
33 |
$headers = 'MIME-Versions: 1.0'."\r\n";
|
80 |
|
81 |
public function ycdSupport() {
|
82 |
check_ajax_referer('ycd_ajax_nonce', 'nonce');
|
83 |
+
parse_str(sanitize_text_field($_POST['formData']), $params);
|
84 |
|
85 |
$headers = 'MIME-Versions: 1.0'."\r\n";
|
86 |
//$headers .= 'From: '.$sendFromEmail.''."\r\n";
|
143 |
YcdCountdownConfig::displaySettings();
|
144 |
$selectedParams = sanitize_text_field($_POST['selectedParams']);
|
145 |
$conditionId = (int)$_POST['conditionId'];
|
146 |
+
$childClassName = sanitize_text_field($_POST['conditionsClassName']);
|
147 |
$childClassName = __NAMESPACE__.'\\'.$childClassName;
|
148 |
$obj = new $childClassName();
|
149 |
|
classes/RegisterPostType.php
CHANGED
@@ -132,7 +132,7 @@ class RegisterPostType {
|
|
132 |
}
|
133 |
}
|
134 |
else if (!empty($_GET['ycd_type'])) {
|
135 |
-
$type = $_GET['ycd_type'];
|
136 |
}
|
137 |
|
138 |
return $type;
|
132 |
}
|
133 |
}
|
134 |
else if (!empty($_GET['ycd_type'])) {
|
135 |
+
$type = sanitize_text_field($_GET['ycd_type']);
|
136 |
}
|
137 |
|
138 |
return $type;
|
classes/countdown/ComingSoon.php
CHANGED
@@ -178,16 +178,15 @@ Class ComingSoon {
|
|
178 |
require_once YCD_ADMIN_COMING_VIEWS_PATH.'comingSoon.php';
|
179 |
}
|
180 |
|
181 |
-
public static function saveComingSoonSettings(
|
182 |
{
|
183 |
-
$postData = stripslashes_deep($postData);
|
184 |
$defaults = self::defaults();
|
185 |
$optionsNames = array_keys($defaults);
|
186 |
$savedData = array();
|
187 |
|
188 |
foreach ($optionsNames as $name) {
|
189 |
-
if (isset($
|
190 |
-
$savedData[$name] = $
|
191 |
}
|
192 |
}
|
193 |
do_action('ycdComingSoonSave', $savedData);
|
178 |
require_once YCD_ADMIN_COMING_VIEWS_PATH.'comingSoon.php';
|
179 |
}
|
180 |
|
181 |
+
public static function saveComingSoonSettings()
|
182 |
{
|
|
|
183 |
$defaults = self::defaults();
|
184 |
$optionsNames = array_keys($defaults);
|
185 |
$savedData = array();
|
186 |
|
187 |
foreach ($optionsNames as $name) {
|
188 |
+
if (isset($_POST[$name])) {
|
189 |
+
$savedData[$name] = sanitize_text_field($_POST[$name]);
|
190 |
}
|
191 |
}
|
192 |
do_action('ycdComingSoonSave', $savedData);
|
classes/countdown/Countdown.php
CHANGED
@@ -807,7 +807,7 @@ abstract class Countdown {
|
|
807 |
public function getCurrentTypeFromOptions() {
|
808 |
$type = $this->getOptionValue('ycd-type');
|
809 |
if(!empty($_GET['ycd_type'])) {
|
810 |
-
$type = $_GET['ycd_type'];
|
811 |
}
|
812 |
|
813 |
return $type;
|
807 |
public function getCurrentTypeFromOptions() {
|
808 |
$type = $this->getOptionValue('ycd-type');
|
809 |
if(!empty($_GET['ycd_type'])) {
|
810 |
+
$type = sanitize_text_field($_GET['ycd_type']);
|
811 |
}
|
812 |
|
813 |
return $type;
|
classes/countdown/SimpleCountdown.php
CHANGED
@@ -95,16 +95,16 @@ class SimpleCountdown extends Countdown
|
|
95 |
ob_start();
|
96 |
?>
|
97 |
<style>
|
98 |
-
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-number,
|
99 |
-
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-timer-dots {
|
100 |
-
font-size: <?php echo $numberFontSize; ?>;
|
101 |
}
|
102 |
-
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-number {
|
103 |
-
margin: <?php echo $numbersMarginTop.' '
|
104 |
}
|
105 |
-
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-label {
|
106 |
-
font-size: <?php echo $labelSize; ?>;
|
107 |
-
margin: <?php echo $textMarginTop.' '
|
108 |
}
|
109 |
</style>
|
110 |
<?php
|
95 |
ob_start();
|
96 |
?>
|
97 |
<style>
|
98 |
+
.ycd-simple-content-wrapper-<?php echo (int)$id; ?> .ycd-simple-countdown-number,
|
99 |
+
.ycd-simple-content-wrapper-<?php echo (int)$id; ?> .ycd-simple-timer-dots {
|
100 |
+
font-size: <?php echo sanitize_text_field($numberFontSize); ?>;
|
101 |
}
|
102 |
+
.ycd-simple-content-wrapper-<?php echo (int)$id; ?> .ycd-simple-countdown-number {
|
103 |
+
margin: <?php echo sanitize_text_field($numbersMarginTop).' '.sanitize_text_field($numbersMarginRight).' '.sanitize_text_field($numbersMarginBottom).' '.sanitize_text_field($numbersMarginLeft);?>
|
104 |
}
|
105 |
+
.ycd-simple-content-wrapper-<?php echo (int)$id; ?> .ycd-simple-countdown-label {
|
106 |
+
font-size: <?php echo sanitize_text_field($labelSize); ?>;
|
107 |
+
margin: <?php echo sanitize_text_field($textMarginTop).' '.sanitize_text_field($textMarginRight).' '.sanitize_text_field($textMarginBottom).' '.sanitize_text_field($textMarginLeft);?>
|
108 |
}
|
109 |
</style>
|
110 |
<?php
|
config/config.php
CHANGED
@@ -89,7 +89,7 @@ class YcdCountdownConfig
|
|
89 |
$versionText = '2.1.9';
|
90 |
}
|
91 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
92 |
-
self::addDefine('YCD_LAST_UPDATE', '
|
93 |
self::addDefine('YCD_NEXT_UPDATE', 'May 16');
|
94 |
}
|
95 |
|
89 |
$versionText = '2.1.9';
|
90 |
}
|
91 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
92 |
+
self::addDefine('YCD_LAST_UPDATE', 'May 7');
|
93 |
self::addDefine('YCD_NEXT_UPDATE', 'May 16');
|
94 |
}
|
95 |
|
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.3.
|
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.3.3
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
helpers/TypesNavBar.php
CHANGED
@@ -43,7 +43,7 @@ class TypesNavBar
|
|
43 |
{
|
44 |
$groupName = 'all';
|
45 |
if (!empty($_GET['ycd_group_name'])) {
|
46 |
-
$groupName = $_GET['ycd_group_name'];
|
47 |
}
|
48 |
|
49 |
return $groupName;
|
43 |
{
|
44 |
$groupName = 'all';
|
45 |
if (!empty($_GET['ycd_group_name'])) {
|
46 |
+
$groupName = sanitize_text_field($_GET['ycd_group_name']);
|
47 |
}
|
48 |
|
49 |
return $groupName;
|
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.9.
|
6 |
-
Stable tag: 2.3.
|
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,9 @@ 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.3.2 =
|
71 |
* Added Simple countdown numbers margin
|
72 |
* Added Simple countdown text margin
|
2 |
Contributors: adamskaat
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 5.9.3
|
6 |
+
Stable tag: 2.3.3
|
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.3.3 =
|
71 |
+
* Code fixes
|
72 |
+
|
73 |
= 2.3.2 =
|
74 |
* Added Simple countdown numbers margin
|
75 |
* Added Simple countdown text margin
|