Version Description
- Countdown Shortcode metabox (new)
- Admin Design improvement
Download this release
Release Info
Developer | adamskaat |
Plugin | ![]() |
Version | 1.6.7 |
Comparing to | |
See all releases |
Code changes from version 1.6.6 to 1.6.7
- assets/js/TimeCircles.js +1 -2
- assets/views/admin/shortcodeMetabox.php +8 -0
- assets/views/countdownButton.php +2 -2
- classes/Actions.php +5 -0
- classes/countdown/CircleCountdown.php +1 -17
- classes/countdown/Countdown.php +16 -0
- config/config.php +2 -2
- countdown-builder.php +1 -1
- helpers/ShowReviewNotice.php +33 -5
- readme.txt +5 -1
assets/js/TimeCircles.js
CHANGED
@@ -202,7 +202,7 @@
|
|
202 |
|
203 |
var greater_unit = null;
|
204 |
var maxUnitName = units[0];
|
205 |
-
|
206 |
for(var i = 0; i < units.length; i++) {
|
207 |
var unit = units[i];
|
208 |
var maxUnits;
|
@@ -413,7 +413,6 @@
|
|
413 |
for (var key in this.data.text_elements) {
|
414 |
if (!this.config.time[key].show)
|
415 |
continue;
|
416 |
-
|
417 |
var textElement = $("<div>");
|
418 |
textElement.addClass('textDiv_' + key);
|
419 |
textElement.css("top", Math.round(0.35 * this.data.attributes.item_size));
|
202 |
|
203 |
var greater_unit = null;
|
204 |
var maxUnitName = units[0];
|
205 |
+
|
206 |
for(var i = 0; i < units.length; i++) {
|
207 |
var unit = units[i];
|
208 |
var maxUnits;
|
413 |
for (var key in this.data.text_elements) {
|
414 |
if (!this.config.time[key].show)
|
415 |
continue;
|
|
|
416 |
var textElement = $("<div>");
|
417 |
textElement.addClass('textDiv_' + key);
|
418 |
textElement.css("top", Math.round(0.35 * this.data.attributes.item_size));
|
assets/views/admin/shortcodeMetabox.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$postId = @$_GET['post'];
|
3 |
+
if (empty($postId)) : ?>
|
4 |
+
<p>Please do save the Countdown, to getting the shortcode.</p>
|
5 |
+
<?php else: ?>
|
6 |
+
<div class="ycd-tooltip">
|
7 |
+
<span class="ycd-tooltiptext" id="ycd-tooltip-<?php echo $postId; ?>">Copy to clipboard</span><input type="text" data-id="<?php echo $postId; ?>" onfocus="this.select();" readonly="" id="ycd-shortcode-input-<?php echo $postId; ?>" value="[ycd_countdown id=<?php echo $postId; ?>]" class="large-text code countdown-shortcode"></div>
|
8 |
+
<?php endif; ?>
|
assets/views/countdownButton.php
CHANGED
@@ -108,7 +108,7 @@ $defaults = AdminHelper::defaultData();
|
|
108 |
<label for="ycd-button-border-width"><?php _e('Font family', YCD_TEXT_DOMAIN)?></label>
|
109 |
</div>
|
110 |
<div class="col-md-7">
|
111 |
-
<?php echo AdminHelper::selectBox(
|
112 |
</div>
|
113 |
</div>
|
114 |
<div class="row form-group">
|
@@ -215,7 +215,7 @@ $defaults = AdminHelper::defaultData();
|
|
215 |
<label for="ycd-button-action-url-tab" class=""><?php _e('Horizontal Align', YCD_TEXT_DOMAIN); ?></label>
|
216 |
</div>
|
217 |
<div class="col-md-7">
|
218 |
-
<?php echo AdminHelper::selectBox(
|
219 |
</div>
|
220 |
</div>
|
221 |
<div class="row form-group">
|
108 |
<label for="ycd-button-border-width"><?php _e('Font family', YCD_TEXT_DOMAIN)?></label>
|
109 |
</div>
|
110 |
<div class="col-md-7">
|
111 |
+
<?php echo AdminHelper::selectBox(array(), esc_attr($typeObj->getOptionValue('ycd-button-font-family')), array('name' => 'ycd-button-font-family', 'class' => 'js-ycd-select js-countdown-font-family')); ?>
|
112 |
</div>
|
113 |
</div>
|
114 |
<div class="row form-group">
|
215 |
<label for="ycd-button-action-url-tab" class=""><?php _e('Horizontal Align', YCD_TEXT_DOMAIN); ?></label>
|
216 |
</div>
|
217 |
<div class="col-md-7">
|
218 |
+
<?php echo AdminHelper::selectBox(array(),$typeObj->getOptionValue('ycd-button-horizontal'), array('class' => 'js-ycd-select', 'name' => 'ycd-button-horizontal')); ?>
|
219 |
</div>
|
220 |
</div>
|
221 |
<div class="row form-group">
|
classes/Actions.php
CHANGED
@@ -256,6 +256,7 @@ class Actions {
|
|
256 |
add_meta_box('ycdUpgrade', __('Upgrade', YCD_TEXT_DOMAIN), array($this, 'upgradeToPro'), YCD_COUNTDOWN_POST_TYPE, 'side', 'high');
|
257 |
}
|
258 |
add_meta_box('ycdSupport', __('Support', YCD_TEXT_DOMAIN), array($this, 'support'), YCD_COUNTDOWN_POST_TYPE, 'side');
|
|
|
259 |
}
|
260 |
|
261 |
public function upgradeToPro() {
|
@@ -265,6 +266,10 @@ class Actions {
|
|
265 |
public function support() {
|
266 |
require_once(YCD_VIEWS_PATH.'supportMetabox.php');
|
267 |
}
|
|
|
|
|
|
|
|
|
268 |
|
269 |
public function saveSettings() {
|
270 |
$post = $_POST;
|
256 |
add_meta_box('ycdUpgrade', __('Upgrade', YCD_TEXT_DOMAIN), array($this, 'upgradeToPro'), YCD_COUNTDOWN_POST_TYPE, 'side', 'high');
|
257 |
}
|
258 |
add_meta_box('ycdSupport', __('Support', YCD_TEXT_DOMAIN), array($this, 'support'), YCD_COUNTDOWN_POST_TYPE, 'side');
|
259 |
+
add_meta_box('ycdShortcodeMetabox', __('Shortcode', YCD_TEXT_DOMAIN), array($this, 'shortcodeMetabox'), YCD_COUNTDOWN_POST_TYPE, 'side');
|
260 |
}
|
261 |
|
262 |
public function upgradeToPro() {
|
266 |
public function support() {
|
267 |
require_once(YCD_VIEWS_PATH.'supportMetabox.php');
|
268 |
}
|
269 |
+
|
270 |
+
public function shortcodeMetabox() {
|
271 |
+
require_once(YCD_ADMIN_VIEWS_PATH.'shortcodeMetabox.php');
|
272 |
+
}
|
273 |
|
274 |
public function saveSettings() {
|
275 |
$post = $_POST;
|
classes/countdown/CircleCountdown.php
CHANGED
@@ -243,23 +243,7 @@ class CircleCountdown extends Countdown {
|
|
243 |
public function addToContent() {
|
244 |
add_filter('the_content', array($this, 'getTheContentFilter'),1, 1);
|
245 |
}
|
246 |
-
|
247 |
-
public function getTheContentFilter($content) {
|
248 |
-
$id = $this->getId();
|
249 |
-
$position = $this->getOptionValue('ycd-position-countdown');
|
250 |
-
$explodedData = explode( '_', $position);
|
251 |
-
$vertical = $explodedData[0];
|
252 |
-
$horizontal = $explodedData[1];
|
253 |
-
|
254 |
-
$countdownContent = $this->getViewContent();
|
255 |
-
$allContent = $content.$countdownContent;
|
256 |
-
if ($vertical == 'top') {
|
257 |
-
$allContent = $countdownContent.$content;
|
258 |
-
}
|
259 |
-
$allContent .= '<style>.ycd-circle-'.$id.'-wrapper {text-align: '.$horizontal.' !important;}</style>';
|
260 |
-
return $allContent;
|
261 |
-
}
|
262 |
-
|
263 |
public function getViewContent() {
|
264 |
$this->includeStyles();
|
265 |
$id = $this->getId();
|
243 |
public function addToContent() {
|
244 |
add_filter('the_content', array($this, 'getTheContentFilter'),1, 1);
|
245 |
}
|
246 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
public function getViewContent() {
|
248 |
$this->includeStyles();
|
249 |
$id = $this->getId();
|
classes/countdown/Countdown.php
CHANGED
@@ -875,6 +875,22 @@ abstract class Countdown {
|
|
875 |
public function addToContent() {
|
876 |
|
877 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
878 |
|
879 |
public function chanegSavedDataFromArgs() {
|
880 |
$args = $this->getShortCodeArgs();
|
875 |
public function addToContent() {
|
876 |
|
877 |
}
|
878 |
+
|
879 |
+
public function getTheContentFilter($content) {
|
880 |
+
$id = $this->getId();
|
881 |
+
$position = $this->getOptionValue('ycd-position-countdown');
|
882 |
+
$explodedData = explode( '_', $position);
|
883 |
+
$vertical = $explodedData[0];
|
884 |
+
$horizontal = $explodedData[1];
|
885 |
+
|
886 |
+
$countdownContent = $this->getViewContent();
|
887 |
+
$allContent = $content.$countdownContent;
|
888 |
+
if ($vertical == 'top') {
|
889 |
+
$allContent = $countdownContent.$content;
|
890 |
+
}
|
891 |
+
$allContent .= '<style>.ycd-circle-'.$id.'-wrapper {text-align: '.$horizontal.' !important;}</style>';
|
892 |
+
return $allContent;
|
893 |
+
}
|
894 |
|
895 |
public function chanegSavedDataFromArgs() {
|
896 |
$args = $this->getShortCodeArgs();
|
config/config.php
CHANGED
@@ -63,8 +63,8 @@ class YcdCountdownConfig {
|
|
63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
66 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
67 |
-
self::addDefine('YCD_VERSION', 1.
|
68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
66 |
+
self::addDefine('YCD_VERSION_PRO', 1.53);
|
67 |
+
self::addDefine('YCD_VERSION', 1.67);
|
68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
countdown-builder.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Countdown builder
|
4 |
* Description: The best countdown plugin
|
5 |
-
* Version: 1.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
|
5 |
+
* Version: 1.6.7
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
helpers/ShowReviewNotice.php
CHANGED
@@ -17,6 +17,7 @@ class YcdShowReviewNotice {
|
|
17 |
|
18 |
private function allowToShowUsageDays() {
|
19 |
$shouldOpen = true;
|
|
|
20 |
$dontShowAgain = get_option('YcdDontShowReviewNotice');
|
21 |
$periodNextTime = get_option('YcdShowNextTime');
|
22 |
|
@@ -115,12 +116,23 @@ class YcdShowReviewNotice {
|
|
115 |
background-color:#9E9E9E;
|
116 |
border:2px solid #9E9E9E;
|
117 |
color: #FFF;
|
|
|
118 |
}
|
|
|
|
|
|
|
|
|
119 |
.ycd-buttons-wrapper .press-lightblue {
|
120 |
-
background-color:#
|
121 |
-
border:2px solid #
|
122 |
color: #FFF;
|
|
|
|
|
123 |
}
|
|
|
|
|
|
|
|
|
124 |
.ycd-review-wrapper{
|
125 |
text-align: center;
|
126 |
padding: 20px;
|
@@ -132,22 +144,38 @@ class YcdShowReviewNotice {
|
|
132 |
font-size: 22px;
|
133 |
font-weight: normal;
|
134 |
line-height: 1.384;
|
|
|
|
|
135 |
}
|
136 |
.ycd-review-h2{
|
137 |
font-size: 20px;
|
138 |
font-weight: normal;
|
139 |
}
|
140 |
:root {
|
141 |
-
--main-bg-color: #
|
142 |
}
|
143 |
.ycd-review-strong{
|
144 |
-
color:
|
145 |
}
|
146 |
.ycd-review-mt20{
|
147 |
-
margin-top:
|
148 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
</style>
|
150 |
<div class="ycd-review-wrapper">
|
|
|
151 |
<div class="ycd-review-description">
|
152 |
<?php echo $firstHeader; ?>
|
153 |
<h2 class="ycd-review-h2">This is really great for your website score.</h2>
|
17 |
|
18 |
private function allowToShowUsageDays() {
|
19 |
$shouldOpen = true;
|
20 |
+
|
21 |
$dontShowAgain = get_option('YcdDontShowReviewNotice');
|
22 |
$periodNextTime = get_option('YcdShowNextTime');
|
23 |
|
116 |
background-color:#9E9E9E;
|
117 |
border:2px solid #9E9E9E;
|
118 |
color: #FFF;
|
119 |
+
font-weight: bold;
|
120 |
}
|
121 |
+
.ycd-buttons-wrapper .press-grey:hover {
|
122 |
+
background-color: #ffffff;
|
123 |
+
color: #9E9E9E;
|
124 |
+
}
|
125 |
.ycd-buttons-wrapper .press-lightblue {
|
126 |
+
background-color:#ff7864;
|
127 |
+
border:2px solid #ff7864;
|
128 |
color: #FFF;
|
129 |
+
font-weight: bold;
|
130 |
+
margin: 0 10px;
|
131 |
}
|
132 |
+
.ycd-buttons-wrapper .press-lightblue:hover {
|
133 |
+
background-color: #ffffff;
|
134 |
+
color: #ff7864;
|
135 |
+
}
|
136 |
.ycd-review-wrapper{
|
137 |
text-align: center;
|
138 |
padding: 20px;
|
144 |
font-size: 22px;
|
145 |
font-weight: normal;
|
146 |
line-height: 1.384;
|
147 |
+
margin-top: 0px;
|
148 |
+
margin-bottom: 5px;
|
149 |
}
|
150 |
.ycd-review-h2{
|
151 |
font-size: 20px;
|
152 |
font-weight: normal;
|
153 |
}
|
154 |
:root {
|
155 |
+
--main-bg-color: #ff7864;
|
156 |
}
|
157 |
.ycd-review-strong{
|
158 |
+
color: #ff7864;
|
159 |
}
|
160 |
.ycd-review-mt20{
|
161 |
+
margin-top: 8px
|
162 |
}
|
163 |
+
.welcome-panel.ycd-review-block {
|
164 |
+
padding-top: 0px;
|
165 |
+
margin-right: 20px;
|
166 |
+
}
|
167 |
+
.ycd-banner-close {
|
168 |
+
position: absolute;
|
169 |
+
top: 8px;
|
170 |
+
right: 15px;
|
171 |
+
font-size: 23px;
|
172 |
+
font-weight: bold;
|
173 |
+
color: #23282d;
|
174 |
+
cursor: pointer;
|
175 |
+
}
|
176 |
</style>
|
177 |
<div class="ycd-review-wrapper">
|
178 |
+
<span class="ycd-banner-close ycd-already-did-review" data-ajaxnonce="<?php echo esc_attr($ajaxNonce); ?>" data-message-type="<?php echo $type; ?>">X</span>
|
179 |
<div class="ycd-review-description">
|
180 |
<?php echo $firstHeader; ?>
|
181 |
<h2 class="ycd-review-h2">This is really great for your website score.</h2>
|
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.2
|
6 |
-
Stable tag: 1.6.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -64,6 +64,10 @@ Yes you can, we have Circle and Flipclock countdown popups.
|
|
64 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
65 |
|
66 |
== Changelog ==
|
|
|
|
|
|
|
|
|
67 |
= 1.6.6 =
|
68 |
* Circle Countdown switch Number And Text (new)
|
69 |
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 5.3.2
|
6 |
+
Stable tag: 1.6.7
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
64 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
65 |
|
66 |
== Changelog ==
|
67 |
+
= 1.6.7 =
|
68 |
+
* Countdown Shortcode metabox (new)
|
69 |
+
* Admin Design improvement
|
70 |
+
|
71 |
= 1.6.6 =
|
72 |
* Circle Countdown switch Number And Text (new)
|
73 |
|