Version Description
- Added ' Print scripts to the page ' option in the Setting section
- WordPress 5.6 version full support
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 1.9.3 |
Comparing to | |
See all releases |
Code changes from version 1.9.2 to 1.9.3
- assets/css/admin.css +6 -1
- assets/views/settings.php +12 -0
- classes/Actions.php +7 -0
- config/config.php +6 -6
- countdown-builder.php +1 -1
- helpers/ScriptsIncluder.php +17 -4
- readme.txt +6 -2
assets/css/admin.css
CHANGED
@@ -224,7 +224,7 @@
|
|
224 |
}
|
225 |
|
226 |
/* Hide default HTML checkbox */
|
227 |
-
.ycd-switch input {display:none;}
|
228 |
|
229 |
/* The slider */
|
230 |
.ycd-slider {
|
@@ -756,4 +756,9 @@ div.ycd-tabs-text-header > div.ycd-toggle-icon-open {
|
|
756 |
.ycd-sub-options-wrapper label {
|
757 |
font-weight: normal;
|
758 |
padding-left: 20px;
|
|
|
|
|
|
|
|
|
|
|
759 |
}
|
224 |
}
|
225 |
|
226 |
/* Hide default HTML checkbox */
|
227 |
+
.ycd-switch input {display:none !important;}
|
228 |
|
229 |
/* The slider */
|
230 |
.ycd-slider {
|
756 |
.ycd-sub-options-wrapper label {
|
757 |
font-weight: normal;
|
758 |
padding-left: 20px;
|
759 |
+
}
|
760 |
+
|
761 |
+
.ycd-bootstrap-wrapper input[type="radio"] {
|
762 |
+
box-shadow: none;
|
763 |
+
outline: none !important;
|
764 |
}
|
assets/views/settings.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
$userSavedRoles = get_option('ycd-user-roles');
|
6 |
$dontDeleteData = (get_option('ycd-delete-data') ? 'checked': '');
|
7 |
$hideComingSoon = (get_option('ycd-hide-coming-soon-menu') ? 'checked': '');
|
|
|
8 |
?>
|
9 |
<?php if(!empty($_GET['saved'])) : ?>
|
10 |
<div id="default-message" class="updated notice notice-success is-dismissible">
|
@@ -44,6 +45,17 @@
|
|
44 |
<span class="ycd-slider ycd-round"></span>
|
45 |
</label>
|
46 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
</div>
|
48 |
<div class="row form-group">
|
49 |
<div class="col-md-5">
|
5 |
$userSavedRoles = get_option('ycd-user-roles');
|
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">
|
45 |
<span class="ycd-slider ycd-round"></span>
|
46 |
</label>
|
47 |
</div>
|
48 |
+
</div>
|
49 |
+
<div class="row form-group">
|
50 |
+
<div class="col-md-5">
|
51 |
+
<label for="ycd-print-scripts-to-page"><?php _e('Print scripts to the page', YCD_TEXT_DOMAIN)?></label>
|
52 |
+
</div>
|
53 |
+
<div class="col-md-4">
|
54 |
+
<label class="ycd-switch">
|
55 |
+
<input type="checkbox" id="ycd-print-scripts-to-page" name="ycd-print-scripts-to-page" class="ycd-accordion-checkbox" <?= $printScripts ?> >
|
56 |
+
<span class="ycd-slider ycd-round"></span>
|
57 |
+
</label>
|
58 |
+
</div>
|
59 |
</div>
|
60 |
<div class="row form-group">
|
61 |
<div class="col-md-5">
|
classes/Actions.php
CHANGED
@@ -403,6 +403,13 @@ class Actions {
|
|
403 |
delete_option('ycd-hide-coming-soon-menu');
|
404 |
}
|
405 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
update_option('ycd-user-roles', $userRoles);
|
407 |
wp_redirect(admin_url().'edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE.'&page='.YCD_COUNTDOWN_SETTINGS.'&saved=1');
|
408 |
}
|
403 |
delete_option('ycd-hide-coming-soon-menu');
|
404 |
}
|
405 |
|
406 |
+
if (isset($post['ycd-print-scripts-to-page'])) {
|
407 |
+
update_option('ycd-print-scripts-to-page', true);
|
408 |
+
}
|
409 |
+
else {
|
410 |
+
delete_option('ycd-print-scripts-to-page');
|
411 |
+
}
|
412 |
+
|
413 |
update_option('ycd-user-roles', $userRoles);
|
414 |
wp_redirect(admin_url().'edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE.'&page='.YCD_COUNTDOWN_SETTINGS.'&saved=1');
|
415 |
}
|
config/config.php
CHANGED
@@ -70,8 +70,8 @@ class YcdCountdownConfig {
|
|
70 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
71 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
72 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
73 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
74 |
-
self::addDefine('YCD_VERSION', 1.
|
75 |
self::addDefine('YCD_FREE_VERSION', 1);
|
76 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
77 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
@@ -79,13 +79,13 @@ class YcdCountdownConfig {
|
|
79 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
80 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
81 |
|
82 |
-
$versionText = '1.9.
|
83 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
84 |
-
$versionText = '1.7.
|
85 |
}
|
86 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
87 |
-
self::addDefine('YCD_LAST_UPDATE', '
|
88 |
-
self::addDefine('YCD_NEXT_UPDATE', 'Dec
|
89 |
}
|
90 |
|
91 |
public static function displaySettings() {
|
70 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
71 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
72 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
73 |
+
self::addDefine('YCD_VERSION_PRO', 1.79);
|
74 |
+
self::addDefine('YCD_VERSION', 1.93);
|
75 |
self::addDefine('YCD_FREE_VERSION', 1);
|
76 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
77 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
79 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
80 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
81 |
|
82 |
+
$versionText = '1.9.3';
|
83 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
84 |
+
$versionText = '1.7.9';
|
85 |
}
|
86 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
87 |
+
self::addDefine('YCD_LAST_UPDATE', 'Dec 12');
|
88 |
+
self::addDefine('YCD_NEXT_UPDATE', 'Dec 23');
|
89 |
}
|
90 |
|
91 |
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: 1.9.
|
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: 1.9.3
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
helpers/ScriptsIncluder.php
CHANGED
@@ -54,8 +54,15 @@ class ScriptsIncluder {
|
|
54 |
if(empty($fileName)) {
|
55 |
return;
|
56 |
}
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
/**
|
@@ -110,8 +117,14 @@ class ScriptsIncluder {
|
|
110 |
if(empty($fileName)) {
|
111 |
return;
|
112 |
}
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
|
117 |
public static function localizeScript($handle, $name, $data) {
|
54 |
if(empty($fileName)) {
|
55 |
return;
|
56 |
}
|
57 |
+
$printScripts = get_option('ycd-print-scripts-to-page');
|
58 |
+
$isAdmin = is_admin();
|
59 |
+
|
60 |
+
if (empty($printScripts) || $isAdmin) {
|
61 |
+
wp_enqueue_style($fileName);
|
62 |
+
}
|
63 |
+
else {
|
64 |
+
wp_print_styles($fileName);
|
65 |
+
}
|
66 |
}
|
67 |
|
68 |
/**
|
117 |
if(empty($fileName)) {
|
118 |
return;
|
119 |
}
|
120 |
+
$printScripts = get_option('ycd-print-scripts-to-page');
|
121 |
+
$isAdmin = is_admin();
|
122 |
+
if (empty($printScripts) || $isAdmin) {
|
123 |
+
wp_enqueue_script($fileName);
|
124 |
+
}
|
125 |
+
else {
|
126 |
+
wp_print_scripts($fileName);
|
127 |
+
}
|
128 |
}
|
129 |
|
130 |
public static function localizeScript($handle, $name, $data) {
|
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.
|
6 |
-
Stable tag: 1.9.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -66,6 +66,10 @@ Yes you can, we have Circle and Flipclock countdown popups.
|
|
66 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
67 |
|
68 |
== Changelog ==
|
|
|
|
|
|
|
|
|
69 |
= 1.9.2 =
|
70 |
* Added possibility close Sticky Countdown
|
71 |
* Added possibility to change Sticky Countdown close text
|
2 |
Contributors: adamskaat
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 5.6.1
|
6 |
+
Stable tag: 1.9.3
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
66 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
67 |
|
68 |
== Changelog ==
|
69 |
+
= 1.9.3 =
|
70 |
+
* Added ' Print scripts to the page ' option in the Setting section
|
71 |
+
* WordPress 5.6 version full support
|
72 |
+
|
73 |
= 1.9.2 =
|
74 |
* Added possibility close Sticky Countdown
|
75 |
* Added possibility to change Sticky Countdown close text
|