Version Description
- Circle Countdown type text Font Style (new option)
- Bug fixed
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 1.2.8 |
Comparing to | |
See all releases |
Code changes from version 1.2.7 to 1.2.8
- assets/js/Countdown.js +17 -1
- assets/views/cricleMainView.php +9 -0
- classes/Actions.php +5 -1
- classes/YcdWidget.php +1 -1
- classes/countdown/CircleCountdown.php +18 -16
- config/config.php +3 -3
- config/optionsConfig.php +1 -0
- countdown-builder.php +1 -2
- helpers/AdminHelper.php +7 -1
- readme.txt +5 -2
assets/js/Countdown.js
CHANGED
@@ -147,6 +147,7 @@ YcdCountdown.prototype.livePreview = function() {
|
|
147 |
this.circleBgColor();
|
148 |
this.changeFontSize();
|
149 |
this.changeFontWeight();
|
|
|
150 |
this.changeFontFamily();
|
151 |
this.changeTextColor();
|
152 |
this.changePadding();
|
@@ -222,6 +223,19 @@ YcdCountdown.prototype.changeFontWeight = function() {
|
|
222 |
});
|
223 |
};
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
YcdCountdown.prototype.changeFontSize = function() {
|
226 |
var fontSize = jQuery('.js-countdown-font-size');
|
227 |
|
@@ -240,12 +254,14 @@ YcdCountdown.prototype.changeTextStyles = function() {
|
|
240 |
var fontSize = jQuery('.js-countdown-font-size').val()+'px';
|
241 |
var fontWeight = jQuery('.js-countdown-font-weight').val();
|
242 |
var fontFamily = jQuery('.js-countdown-font-family').val();
|
|
|
243 |
|
244 |
circle.find('h4').each(function() {
|
245 |
jQuery(this).attr('style',
|
246 |
'font-size: ' + fontSize+' !important;' +
|
247 |
'font-weight: ' + fontWeight+' !important;' +
|
248 |
-
'font-family:' + fontFamily + '!important'
|
|
|
249 |
);
|
250 |
})
|
251 |
};
|
147 |
this.circleBgColor();
|
148 |
this.changeFontSize();
|
149 |
this.changeFontWeight();
|
150 |
+
this.changeFontStyle();
|
151 |
this.changeFontFamily();
|
152 |
this.changeTextColor();
|
153 |
this.changePadding();
|
223 |
});
|
224 |
};
|
225 |
|
226 |
+
YcdCountdown.prototype.changeFontStyle = function() {
|
227 |
+
var fontStyle = jQuery('.js-countdown-font-style');
|
228 |
+
|
229 |
+
if(!fontStyle.length) {
|
230 |
+
return false
|
231 |
+
}
|
232 |
+
var that = this;
|
233 |
+
|
234 |
+
fontStyle.bind('change', function() {
|
235 |
+
that.changeTextStyles();
|
236 |
+
});
|
237 |
+
};
|
238 |
+
|
239 |
YcdCountdown.prototype.changeFontSize = function() {
|
240 |
var fontSize = jQuery('.js-countdown-font-size');
|
241 |
|
254 |
var fontSize = jQuery('.js-countdown-font-size').val()+'px';
|
255 |
var fontWeight = jQuery('.js-countdown-font-weight').val();
|
256 |
var fontFamily = jQuery('.js-countdown-font-family').val();
|
257 |
+
var fontStyle = jQuery('.js-countdown-font-style').val();
|
258 |
|
259 |
circle.find('h4').each(function() {
|
260 |
jQuery(this).attr('style',
|
261 |
'font-size: ' + fontSize+' !important;' +
|
262 |
'font-weight: ' + fontWeight+' !important;' +
|
263 |
+
'font-family:' + fontFamily + '!important;'+
|
264 |
+
'font-style:' + fontStyle + '!important'
|
265 |
);
|
266 |
})
|
267 |
};
|
assets/views/cricleMainView.php
CHANGED
@@ -39,6 +39,7 @@ $bgImageUrl = $typeObj->getOptionValue('ycd-bg-image-url');
|
|
39 |
$countdownBgCircleColor = $typeObj->getOptionValue('ycd-countdown-bg-circle-color');
|
40 |
$textFontSize = $typeObj->getOptionValue('ycd-text-font-size');
|
41 |
$countdownFontWeight = $typeObj->getOptionValue('ycd-countdown-font-weight');
|
|
|
42 |
$textFontFamily = $typeObj->getOptionValue('ycd-text-font-family');
|
43 |
$countdownPadding = (int)$typeObj->getOptionValue('ycd-countdown-padding');
|
44 |
if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
|
@@ -82,6 +83,14 @@ if(empty($type)) {
|
|
82 |
<?php echo AdminHelper::selectBox($defaultData['font-weight'], esc_attr($countdownFontWeight), array('name' => 'ycd-countdown-font-weight', 'class' => 'js-ycd-select js-countdown-font-weight')); ?>
|
83 |
</div>
|
84 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
<div class="row form-group">
|
86 |
<div class="col-md-5">
|
87 |
<label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Font Family', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
39 |
$countdownBgCircleColor = $typeObj->getOptionValue('ycd-countdown-bg-circle-color');
|
40 |
$textFontSize = $typeObj->getOptionValue('ycd-text-font-size');
|
41 |
$countdownFontWeight = $typeObj->getOptionValue('ycd-countdown-font-weight');
|
42 |
+
$countdownFontStyle = $typeObj->getOptionValue('ycd-countdown-font-style');
|
43 |
$textFontFamily = $typeObj->getOptionValue('ycd-text-font-family');
|
44 |
$countdownPadding = (int)$typeObj->getOptionValue('ycd-countdown-padding');
|
45 |
if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
|
83 |
<?php echo AdminHelper::selectBox($defaultData['font-weight'], esc_attr($countdownFontWeight), array('name' => 'ycd-countdown-font-weight', 'class' => 'js-ycd-select js-countdown-font-weight')); ?>
|
84 |
</div>
|
85 |
</div>
|
86 |
+
<div class="row form-group">
|
87 |
+
<div class="col-md-5">
|
88 |
+
<label for="ycd-countdown-font-style" class="ycd-label-of-select"><?php _e('Font Style', YCD_TEXT_DOMAIN); ?></label>
|
89 |
+
</div>
|
90 |
+
<div class="col-md-7">
|
91 |
+
<?php echo AdminHelper::selectBox($defaultData['font-style'], esc_attr($countdownFontStyle), array('name' => 'ycd-countdown-font-style', 'class' => 'js-ycd-select js-countdown-font-style')); ?>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
<div class="row form-group">
|
95 |
<div class="col-md-5">
|
96 |
<label for="ycd-countdown-text-size" class="ycd-label-of-select"><?php _e('Font Family', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
classes/Actions.php
CHANGED
@@ -139,7 +139,11 @@ class Actions {
|
|
139 |
echo '<input type="text" onfocus="this.select();" readonly value="[ycd_countdown id='.$postId.']" class="large-text code">';
|
140 |
}
|
141 |
if ($column == 'type') {
|
142 |
-
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
if ($column == 'onof') {
|
145 |
$checked = '';
|
139 |
echo '<input type="text" onfocus="this.select();" readonly value="[ycd_countdown id='.$postId.']" class="large-text code">';
|
140 |
}
|
141 |
if ($column == 'type') {
|
142 |
+
$title = '';
|
143 |
+
if (!empty($contdownObj)) {
|
144 |
+
$title = $contdownObj->getTypeTitle();
|
145 |
+
}
|
146 |
+
echo $title;
|
147 |
}
|
148 |
if ($column == 'onof') {
|
149 |
$checked = '';
|
classes/YcdWidget.php
CHANGED
@@ -38,7 +38,7 @@ class ycd_countdown_widget extends WP_Widget {
|
|
38 |
|
39 |
// Updating widget replacing old instances with new
|
40 |
public function update( $new_instance, $old_instance ) {
|
41 |
-
|
42 |
$instance = array();
|
43 |
$instance['ycdOption'] = $new_instance['ycdOption'];
|
44 |
return $instance;
|
38 |
|
39 |
// Updating widget replacing old instances with new
|
40 |
public function update( $new_instance, $old_instance ) {
|
41 |
+
|
42 |
$instance = array();
|
43 |
$instance['ycdOption'] = $new_instance['ycdOption'];
|
44 |
return $instance;
|
classes/countdown/CircleCountdown.php
CHANGED
@@ -108,6 +108,7 @@ class CircleCountdown extends Countdown {
|
|
108 |
$id = $this->getId();
|
109 |
$fontSize = $this->getOptionValue('ycd-text-font-size');
|
110 |
$fontWeight = $this->getOptionValue('ycd-countdown-font-weight');
|
|
|
111 |
$fontFamily = $this->getOptionValue('ycd-text-font-family');
|
112 |
$daysTextColor = $this->getOptionValue('ycd-countdown-days-text-color');
|
113 |
$hoursTextColor = $this->getOptionValue('ycd-countdown-hours-text-color');
|
@@ -119,37 +120,38 @@ class CircleCountdown extends Countdown {
|
|
119 |
ob_start();
|
120 |
?>
|
121 |
<style type="text/css">
|
122 |
-
#ycd-circle
|
123 |
-
padding:
|
124 |
box-sizing: border-box;
|
125 |
display: inline-block;
|
126 |
}
|
127 |
-
#ycd-circle
|
128 |
-
font-size:
|
129 |
-
font-weight:
|
130 |
-
font-
|
|
|
131 |
}
|
132 |
-
#ycd-circle
|
133 |
-
color:
|
134 |
}
|
135 |
|
136 |
-
#ycd-circle
|
137 |
-
color:
|
138 |
}
|
139 |
|
140 |
-
#ycd-circle
|
141 |
-
color:
|
142 |
}
|
143 |
|
144 |
-
#ycd-circle
|
145 |
-
color:
|
146 |
}
|
147 |
|
148 |
.ycd-time-circle {
|
149 |
max-width: 100% !important;
|
150 |
}
|
151 |
|
152 |
-
.ycd-circle
|
153 |
text-align: <?= $circleAlignment; ?>;
|
154 |
}
|
155 |
</style>
|
@@ -170,7 +172,7 @@ class CircleCountdown extends Countdown {
|
|
170 |
$timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
|
171 |
$seconds = strtotime($dueDate)-$timeNow;
|
172 |
$bgImageStyleStr = $this->getBgImageStyleStr();
|
173 |
-
$bgImageStyleStr
|
174 |
$allDataOptions = $this->getDataAllOptions();
|
175 |
$allDataOptions = json_encode($allDataOptions, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT);
|
176 |
$prepareOptions = $this->prepareOptions();
|
108 |
$id = $this->getId();
|
109 |
$fontSize = $this->getOptionValue('ycd-text-font-size');
|
110 |
$fontWeight = $this->getOptionValue('ycd-countdown-font-weight');
|
111 |
+
$fontStyle = $this->getOptionValue('ycd-countdown-font-style');
|
112 |
$fontFamily = $this->getOptionValue('ycd-text-font-family');
|
113 |
$daysTextColor = $this->getOptionValue('ycd-countdown-days-text-color');
|
114 |
$hoursTextColor = $this->getOptionValue('ycd-countdown-hours-text-color');
|
120 |
ob_start();
|
121 |
?>
|
122 |
<style type="text/css">
|
123 |
+
#ycd-circle-<?php echo $id; ?> {
|
124 |
+
padding: <?php echo $padding; ?>;
|
125 |
box-sizing: border-box;
|
126 |
display: inline-block;
|
127 |
}
|
128 |
+
#ycd-circle-<?php echo $id; ?> h4 {
|
129 |
+
font-size: <?php echo $fontSize; ?>px !important;
|
130 |
+
font-weight: <?php echo $fontWeight; ?> !important;
|
131 |
+
font-style: <?php echo $fontStyle; ?> !important;
|
132 |
+
font-family: <?php $fontFamily; ?> !important;
|
133 |
}
|
134 |
+
#ycd-circle-<?php echo $id; ?> .textDiv_Days {
|
135 |
+
color: <?php echo $daysTextColor; ?>
|
136 |
}
|
137 |
|
138 |
+
#ycd-circle-<?php echo $id; ?> .textDiv_Hours {
|
139 |
+
color: <?php echo $hoursTextColor; ?>
|
140 |
}
|
141 |
|
142 |
+
#ycd-circle-<?php echo $id; ?> .textDiv_Minutes {
|
143 |
+
color: <?php echo $minutesTextColor; ?>
|
144 |
}
|
145 |
|
146 |
+
#ycd-circle-<?php echo $id; ?> .textDiv_Seconds {
|
147 |
+
color: <?php echo $secondsTextColor; ?>
|
148 |
}
|
149 |
|
150 |
.ycd-time-circle {
|
151 |
max-width: 100% !important;
|
152 |
}
|
153 |
|
154 |
+
.ycd-circle-<?php echo $id; ?>-wrapper {
|
155 |
text-align: <?= $circleAlignment; ?>;
|
156 |
}
|
157 |
</style>
|
172 |
$timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
|
173 |
$seconds = strtotime($dueDate)-$timeNow;
|
174 |
$bgImageStyleStr = $this->getBgImageStyleStr();
|
175 |
+
$bgImageStyleStr .= $this->renderStyles();
|
176 |
$allDataOptions = $this->getDataAllOptions();
|
177 |
$allDataOptions = json_encode($allDataOptions, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT);
|
178 |
$prepareOptions = $this->prepareOptions();
|
config/config.php
CHANGED
@@ -39,10 +39,10 @@ class YcdCountdownConfig {
|
|
39 |
self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS_TABLE', 'ycd_subscribers');
|
40 |
self::addDefine('YCD_COUNTDOWN_WIDGET', 'ycd_countdown_widget');
|
41 |
self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
|
42 |
-
self::addDefine('YCD_COUNTDOWN_PRO_URL', '
|
43 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
44 |
-
self::addDefine('YCD_VERSION', 1.
|
45 |
-
self::addDefine('YCD_VERSION_PRO',
|
46 |
self::addDefine('YCD_FREE_VERSION', 1);
|
47 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
48 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
39 |
self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS_TABLE', 'ycd_subscribers');
|
40 |
self::addDefine('YCD_COUNTDOWN_WIDGET', 'ycd_countdown_widget');
|
41 |
self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
|
42 |
+
self::addDefine('YCD_COUNTDOWN_PRO_URL', 'https://edmonsoft.com/countdown');
|
43 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
44 |
+
self::addDefine('YCD_VERSION', 1.28);
|
45 |
+
self::addDefine('YCD_VERSION_PRO', 1.16);
|
46 |
self::addDefine('YCD_FREE_VERSION', 1);
|
47 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
48 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
config/optionsConfig.php
CHANGED
@@ -75,6 +75,7 @@ class YcdCountdownOptionsConfig {
|
|
75 |
$options[] = array('name' => 'ycd-countdown-bg-circle-color', 'type' => 'text', 'defaultValue' => '#60686F', 'ver' => YCD_SILVER_VERSION);
|
76 |
$options[] = array('name' => 'ycd-text-font-size', 'type' => 'text', 'defaultValue' => '9');
|
77 |
$options[] = array('name' => 'ycd-countdown-font-weight', 'type' => 'text', 'defaultValue' => 'normal');
|
|
|
78 |
$options[] = array('name' => 'ycd-text-font-family', 'type' => 'text', 'defaultValue' => 'Century Gothic', 'ver' => YCD_SILVER_VERSION);
|
79 |
$options[] = array('name' => 'ycd-countdown-padding', 'type' => 'text', 'defaultValue' => 0);
|
80 |
$options[] = array('name' => 'ycd-flip-time-zone', 'type' => 'text', 'defaultValue' => self::getDefaultTimezone());
|
75 |
$options[] = array('name' => 'ycd-countdown-bg-circle-color', 'type' => 'text', 'defaultValue' => '#60686F', 'ver' => YCD_SILVER_VERSION);
|
76 |
$options[] = array('name' => 'ycd-text-font-size', 'type' => 'text', 'defaultValue' => '9');
|
77 |
$options[] = array('name' => 'ycd-countdown-font-weight', 'type' => 'text', 'defaultValue' => 'normal');
|
78 |
+
$options[] = array('name' => 'ycd-countdown-font-style', 'type' => 'text', 'defaultValue' => 'initial');
|
79 |
$options[] = array('name' => 'ycd-text-font-family', 'type' => 'text', 'defaultValue' => 'Century Gothic', 'ver' => YCD_SILVER_VERSION);
|
80 |
$options[] = array('name' => 'ycd-countdown-padding', 'type' => 'text', 'defaultValue' => 0);
|
81 |
$options[] = array('name' => 'ycd-flip-time-zone', 'type' => 'text', 'defaultValue' => self::getDefaultTimezone());
|
countdown-builder.php
CHANGED
@@ -2,13 +2,12 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Countdown builder
|
4 |
* Description: The best countdown plugin
|
5 |
-
* Version: 1.2.
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI:
|
8 |
* License: GPLv2
|
9 |
*/
|
10 |
|
11 |
-
|
12 |
/*If this file is called directly, abort.*/
|
13 |
if(!defined('WPINC')) {
|
14 |
wp_die();
|
2 |
/**
|
3 |
* Plugin Name: Countdown builder
|
4 |
* Description: The best countdown plugin
|
5 |
+
* Version: 1.2.8
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI:
|
8 |
* License: GPLv2
|
9 |
*/
|
10 |
|
|
|
11 |
/*If this file is called directly, abort.*/
|
12 |
if(!defined('WPINC')) {
|
13 |
wp_die();
|
helpers/AdminHelper.php
CHANGED
@@ -118,7 +118,13 @@ class AdminHelper {
|
|
118 |
'initial' => __('Initial', YCD_TEXT_DOMAIN),
|
119 |
'inherit' => __('Inherit', YCD_TEXT_DOMAIN)
|
120 |
);
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
$data['font-family'] = array(
|
123 |
'Century Gothic' => 'Century Gothic',
|
124 |
'Diplomata SC' => 'Diplomata SC',
|
118 |
'initial' => __('Initial', YCD_TEXT_DOMAIN),
|
119 |
'inherit' => __('Inherit', YCD_TEXT_DOMAIN)
|
120 |
);
|
121 |
+
|
122 |
+
$data['font-style'] = array(
|
123 |
+
'normal' => __('Normal', YCD_TEXT_DOMAIN),
|
124 |
+
'italic' => __('Italic', YCD_TEXT_DOMAIN),
|
125 |
+
'initial' => __('Initial', YCD_TEXT_DOMAIN)
|
126 |
+
);
|
127 |
+
|
128 |
$data['font-family'] = array(
|
129 |
'Century Gothic' => 'Century Gothic',
|
130 |
'Diplomata SC' => 'Diplomata SC',
|
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: 4.9.8
|
6 |
-
Stable tag: 1.2.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -29,9 +29,12 @@ Coming soon
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
|
|
|
|
|
|
32 |
= 1.2.7 =
|
33 |
* New Digital countdown type
|
34 |
-
* UX improvement
|
35 |
* Bug fixed
|
36 |
* Code improvement
|
37 |
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.9.8
|
6 |
+
Stable tag: 1.2.8
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
= 1.2.8 =
|
33 |
+
* Circle Countdown type text Font Style (new option)
|
34 |
+
* Bug fixed
|
35 |
+
|
36 |
= 1.2.7 =
|
37 |
* New Digital countdown type
|
|
|
38 |
* Bug fixed
|
39 |
* Code improvement
|
40 |
|