Version Description
- Minor bug fixes
- Uninstall multisite
Download this release
Release Info
Developer | ujimoto |
Plugin | Uji Countdown |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- README.txt +8 -9
- assets/js/admin.js +4 -4
- classes/class-uji-countdown.php +0 -1
- js/uji-countdown.js +117 -1
- ujicountdown.php +3 -4
- uninstall.php +34 -0
README.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: ujimoto
|
3 |
Donate link: http://www.wpmanage.com/uji-countdown
|
4 |
Tags: countdown, counter, html5 countdown, animated countdown, countdown timer, count down, countdown clock, jQuery countdown, clock, timer, recurring timer
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 2.0.
|
8 |
|
9 |
Uji Countdown - HTML5 Customizable Countdown Timer
|
10 |
|
@@ -51,9 +51,13 @@ Please feel free to visit our [demo site](http://wpmanage.com/project/ujicountdo
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
|
|
|
|
|
|
|
|
54 |
= 2.0.4 =
|
55 |
* NEW: Recurring Time
|
56 |
-
* Fixed shortcodes issue.
|
57 |
* Fixed URL redirection after expiry
|
58 |
|
59 |
= 2.0.3 =
|
@@ -70,7 +74,6 @@ Please feel free to visit our [demo site](http://wpmanage.com/project/ujicountdo
|
|
70 |
* Fixed select style option.
|
71 |
|
72 |
= 2.0 =
|
73 |
-
|
74 |
* Complete core rebuilt.
|
75 |
* New:
|
76 |
* --- New Admin Panel
|
@@ -81,22 +84,18 @@ Please feel free to visit our [demo site](http://wpmanage.com/project/ujicountdo
|
|
81 |
* --- Right-To-Left (RTL)
|
82 |
|
83 |
= 1.3 =
|
84 |
-
|
85 |
* Important Fix: WP 3.9 color picker compatibility with jquery 1.10+
|
86 |
|
87 |
= 1.2 =
|
88 |
-
|
89 |
* Important Fix: WP 3.5 links bug fix
|
90 |
* Fixed datapicker
|
91 |
|
92 |
= 1.1 =
|
93 |
-
|
94 |
* Important Fix: Get server time instead of local PC time. See same values on any GMT/UTC time zone
|
95 |
* Fixed p or br tag inclusion on some themes
|
96 |
* Move script to separate file. More cleaner code
|
97 |
|
98 |
= 1.0 =
|
99 |
-
|
100 |
* First version. Stable version.
|
101 |
|
102 |
* SUPPORT *
|
2 |
Contributors: ujimoto
|
3 |
Donate link: http://www.wpmanage.com/uji-countdown
|
4 |
Tags: countdown, counter, html5 countdown, animated countdown, countdown timer, count down, countdown clock, jQuery countdown, clock, timer, recurring timer
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 4.3.1
|
7 |
+
Stable tag: 2.0.5
|
8 |
|
9 |
Uji Countdown - HTML5 Customizable Countdown Timer
|
10 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 2.0.5 =
|
55 |
+
* Minor bug fixes
|
56 |
+
* Uninstall multisite
|
57 |
+
|
58 |
= 2.0.4 =
|
59 |
* NEW: Recurring Time
|
60 |
+
* Fixed shortcodes issue. NEW tinymce 4.x shortcodes generator.
|
61 |
* Fixed URL redirection after expiry
|
62 |
|
63 |
= 2.0.3 =
|
74 |
* Fixed select style option.
|
75 |
|
76 |
= 2.0 =
|
|
|
77 |
* Complete core rebuilt.
|
78 |
* New:
|
79 |
* --- New Admin Panel
|
84 |
* --- Right-To-Left (RTL)
|
85 |
|
86 |
= 1.3 =
|
|
|
87 |
* Important Fix: WP 3.9 color picker compatibility with jquery 1.10+
|
88 |
|
89 |
= 1.2 =
|
|
|
90 |
* Important Fix: WP 3.5 links bug fix
|
91 |
* Fixed datapicker
|
92 |
|
93 |
= 1.1 =
|
|
|
94 |
* Important Fix: Get server time instead of local PC time. See same values on any GMT/UTC time zone
|
95 |
* Fixed p or br tag inclusion on some themes
|
96 |
* Move script to separate file. More cleaner code
|
97 |
|
98 |
= 1.0 =
|
|
|
99 |
* First version. Stable version.
|
100 |
|
101 |
* SUPPORT *
|
assets/js/admin.js
CHANGED
@@ -290,7 +290,7 @@ function ujic_admin_home() {
|
|
290 |
if (val && val != 'none') {
|
291 |
var the_font = val.replace(/\s+/g, '+');
|
292 |
//add reference to google font family
|
293 |
-
$('head').append('<link href="
|
294 |
$('.countdown_amount').css('font-family', val + ', sans-serif');
|
295 |
}
|
296 |
//live change
|
@@ -298,7 +298,7 @@ function ujic_admin_home() {
|
|
298 |
var val = $(this).val();
|
299 |
var the_font = val.replace(/\s+/g, '+');
|
300 |
//add reference to google font family
|
301 |
-
$('head').append('<link href="
|
302 |
$('.countdown_amount').css('font-family', val + ', sans-serif');
|
303 |
|
304 |
});
|
@@ -570,7 +570,7 @@ function change_modern(size, col_txt, col1, col2, thick, col_lab, lab_sz) {
|
|
570 |
if (val && val != 'none') {
|
571 |
var the_font = val.replace(/\s+/g, '+');
|
572 |
//add reference to google font family
|
573 |
-
$('head').append('<link href="
|
574 |
$('.circles-integer').css('font-family', val + ', sans-serif');
|
575 |
}
|
576 |
//live change
|
@@ -578,7 +578,7 @@ function change_modern(size, col_txt, col1, col2, thick, col_lab, lab_sz) {
|
|
578 |
var val = $(this).val();
|
579 |
var the_font = val.replace(/\s+/g, '+');
|
580 |
//add reference to google font family
|
581 |
-
$('head').append('<link href="
|
582 |
$('.circles-integer').css('font-family', val + ', sans-serif');
|
583 |
|
584 |
});
|
290 |
if (val && val != 'none') {
|
291 |
var the_font = val.replace(/\s+/g, '+');
|
292 |
//add reference to google font family
|
293 |
+
$('head').append('<link href="https://fonts.googleapis.com/css?family=' + the_font + '" rel="stylesheet" type="text/css">');
|
294 |
$('.countdown_amount').css('font-family', val + ', sans-serif');
|
295 |
}
|
296 |
//live change
|
298 |
var val = $(this).val();
|
299 |
var the_font = val.replace(/\s+/g, '+');
|
300 |
//add reference to google font family
|
301 |
+
$('head').append('<link href="https://fonts.googleapis.com/css?family=' + the_font + '" rel="stylesheet" type="text/css">');
|
302 |
$('.countdown_amount').css('font-family', val + ', sans-serif');
|
303 |
|
304 |
});
|
570 |
if (val && val != 'none') {
|
571 |
var the_font = val.replace(/\s+/g, '+');
|
572 |
//add reference to google font family
|
573 |
+
$('head').append('<link href="https://fonts.googleapis.com/css?family=' + the_font + '" rel="stylesheet" type="text/css">');
|
574 |
$('.circles-integer').css('font-family', val + ', sans-serif');
|
575 |
}
|
576 |
//live change
|
578 |
var val = $(this).val();
|
579 |
var the_font = val.replace(/\s+/g, '+');
|
580 |
//add reference to google font family
|
581 |
+
$('head').append('<link href="https://fonts.googleapis.com/css?family=' + the_font + '" rel="stylesheet" type="text/css">');
|
582 |
$('.circles-integer').css('font-family', val + ', sans-serif');
|
583 |
|
584 |
});
|
classes/class-uji-countdown.php
CHANGED
@@ -158,7 +158,6 @@ class Uji_Countdown extends Uji_Countdown_Admin
|
|
158 |
add_action('wp_ajax_nopriv_ujiSubscribe', array( $this, 'handleSubscription' ) );
|
159 |
add_action('wp_ajax_ujiSubscribe', array( $this, 'handleSubscription' ) );
|
160 |
|
161 |
-
!self::$isGoodByeCaptchaActivated ? add_action('admin_notices', array($this, 'showAntiSpamAdminNotice')) : null;
|
162 |
}
|
163 |
|
164 |
}
|
158 |
add_action('wp_ajax_nopriv_ujiSubscribe', array( $this, 'handleSubscription' ) );
|
159 |
add_action('wp_ajax_ujiSubscribe', array( $this, 'handleSubscription' ) );
|
160 |
|
|
|
161 |
}
|
162 |
|
163 |
}
|
js/uji-countdown.js
CHANGED
@@ -1 +1,117 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
$(function () {
|
4 |
+
|
5 |
+
var counter_id = window['ujiCount'];
|
6 |
+
|
7 |
+
var style = counter_id.uji_style;
|
8 |
+
|
9 |
+
var uji_plugin = counter_id.uji_plugin;
|
10 |
+
|
11 |
+
var ujic_id = 'ujiCountdown';
|
12 |
+
var expire = counter_id.expire;
|
13 |
+
var exp_days = counter_id.exp_days;
|
14 |
+
|
15 |
+
var Years = counter_id.Years;
|
16 |
+
var Months = counter_id.Months;
|
17 |
+
var Weeks = counter_id.Weeks;
|
18 |
+
var Days = counter_id.Days;
|
19 |
+
var Hours = counter_id.Hours;
|
20 |
+
var Minutes = counter_id.Minutes;
|
21 |
+
var Seconds = counter_id.Seconds;
|
22 |
+
|
23 |
+
var Year = counter_id.Year;
|
24 |
+
var Month = counter_id.Month;
|
25 |
+
var Week = counter_id.Week;
|
26 |
+
var Day = counter_id.Day;
|
27 |
+
var Hour = counter_id.Hour;
|
28 |
+
var Minute = counter_id.Minute;
|
29 |
+
var Second = counter_id.Second;
|
30 |
+
|
31 |
+
var ujic_txt_size = counter_id.ujic_txt_size;
|
32 |
+
var ujic_col_dw = counter_id.ujic_col_dw;
|
33 |
+
var ujic_col_up = counter_id.ujic_col_up;
|
34 |
+
var ujic_col_txt = counter_id.ujic_col_txt;
|
35 |
+
var ujic_col_sw = counter_id.ujic_col_sw;
|
36 |
+
var ujic_col_lab = counter_id.ujic_col_lab;
|
37 |
+
var ujic_lab_sz = counter_id.ujic_lab_sz;
|
38 |
+
|
39 |
+
var ujic_y = counter_id.ujic_y;
|
40 |
+
var ujic_o = counter_id.ujic_o;
|
41 |
+
var ujic_w = counter_id.ujic_w;
|
42 |
+
var ujic_d = counter_id.ujic_d;
|
43 |
+
var ujic_h = counter_id.ujic_h;
|
44 |
+
var ujic_m = counter_id.ujic_m;
|
45 |
+
var ujic_s = counter_id.ujic_s;
|
46 |
+
|
47 |
+
var ujic_thick = counter_id.ujic_thick;
|
48 |
+
var ujic_txt = (counter_id.ujic_txt == "true") ? true : false ;
|
49 |
+
var ujic_ani = (counter_id.ujic_ani == "true") ? true : false ;
|
50 |
+
var ujic_prefix = 'http://';
|
51 |
+
var ujic_url = (counter_id.ujic_url) ? ( (counter_id.ujic_url.substr(0, ujic_prefix.length) !== ujic_prefix) ? ujic_prefix + counter_id.ujic_url : counter_id.ujic_url ) : '';
|
52 |
+
var ujic_expire = (ujic_url != '') ? true : false;
|
53 |
+
var ujic_goof = counter_id.ujic_goof;
|
54 |
+
|
55 |
+
var uji_center = counter_id.uji_center;
|
56 |
+
var uji_time = counter_id.uji_time;
|
57 |
+
|
58 |
+
var ujic_hide = counter_id.uji_hide;
|
59 |
+
var ujic_rtl = (counter_id.ujic_rtl == "true") ? true : false ;
|
60 |
+
|
61 |
+
var austDay = new Date(''+ expire +'');
|
62 |
+
|
63 |
+
var cformat = '';
|
64 |
+
cformat += (ujic_y == 'true') ? 'Y' : '';
|
65 |
+
cformat += (ujic_o == 'true') ? 'O' : '';
|
66 |
+
cformat += (ujic_w == 'true') ? 'W' : '';
|
67 |
+
cformat += (ujic_d == 'true') ? 'D' : '';
|
68 |
+
cformat += (ujic_h == 'true') ? 'H' : '';
|
69 |
+
cformat += (ujic_m == 'true') ? 'M' : '';
|
70 |
+
cformat += (ujic_s == 'true') ? 'S' : '';
|
71 |
+
|
72 |
+
var cids = [];
|
73 |
+
if (ujic_y == 'true') cids.push('uji_year');
|
74 |
+
if (ujic_o == 'true') cids.push('uji_mont');
|
75 |
+
if (ujic_w == 'true') cids.push('uji_week');
|
76 |
+
if (ujic_d == 'true') cids.push('uji_days');
|
77 |
+
if (ujic_h == 'true') cids.push('uji_hour');
|
78 |
+
if (ujic_m == 'true') cids.push('uji_minu');
|
79 |
+
if (ujic_s == 'true') cids.push('uji_secu');
|
80 |
+
|
81 |
+
|
82 |
+
$.countdown.regionalOptions["uji"] = {
|
83 |
+
labels: [''+ Years +'', ''+ Months +'', ''+ Weeks +'', ''+ Days +'', ''+ Hours +'', ''+ Minutes +'', ''+ Seconds +''],
|
84 |
+
labels1: [''+ Year +'', ''+ Month +'', ''+ Week +'', ''+ Day +'', ''+ Hour +'', ''+ Minute +'', ''+ Second +''],
|
85 |
+
compactLabels: ["A", "L", "S", "Z"],
|
86 |
+
format: cformat,
|
87 |
+
whichLabels: null,
|
88 |
+
timeSeparator: ':', isRTL: false};
|
89 |
+
$.countdown.setDefaults($.countdown.regionalOptions["uji"]);
|
90 |
+
|
91 |
+
if(ujic_goof){
|
92 |
+
var the_font = ujic_goof.replace(/\s+/g, '+');
|
93 |
+
//add reference to google font family
|
94 |
+
$( 'head' ).append( '<link href="https://fonts.googleapis.com/css?family='+ the_font +'" rel="stylesheet" type="text/css">' );
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
//******************************************* CLASSIC
|
99 |
+
|
100 |
+
|
101 |
+
$("#"+ujic_id).countdown({until: austDay, ujic_id: ''+ ujic_id +'', serverSync: serverTime, isRTL: ujic_rtl, text_size: ''+ ujic_txt_size +'', color_down: ''+ ujic_col_dw +'', color_up: ''+ ujic_col_up +'', color_txt: ''+ ujic_col_txt +'', color_sw: ''+ ujic_col_sw +'', color_lab: ''+ ujic_col_lab +'', lab_sz: ''+ ujic_lab_sz +'', ujic_txt: ujic_txt, animate_sec: ujic_ani, ujic_hide: ujic_hide, alwaysExpire: ujic_expire, expiryUrl: ujic_url, ujic_goof: ''+ ujic_goof +'' });
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
+
// Get Server Time
|
106 |
+
function serverTime() {
|
107 |
+
var time = null;
|
108 |
+
|
109 |
+
time = new Date(uji_time);
|
110 |
+
var utcTime = new Date(time.getUTCFullYear(), time.getUTCMonth(), time.getUTCDate(), time.getUTCHours(), time.getUTCMinutes(), time.getUTCSeconds());
|
111 |
+
time = utcTime;
|
112 |
+
|
113 |
+
return time;
|
114 |
+
}
|
115 |
+
|
116 |
+
});
|
117 |
+
}(jQuery));
|
ujicountdown.php
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Uji
|
4 |
Plugin URI: http://www.wpmanage.com/uji-countdown
|
5 |
Description: HTML5 Customizable Countdown.
|
6 |
-
Version: 2.0.
|
7 |
Text Domain: uji-countdown
|
8 |
Domain Path: /lang
|
9 |
Author: Wpmanage.com
|
10 |
Author URI: http://wpmanage.com
|
11 |
-
Network: True
|
12 |
License: GPLv2
|
13 |
Copyright 2015 WPmanage (email : info@wpmanage.com)
|
14 |
*/
|
@@ -17,7 +16,7 @@ Copyright 2015 WPmanage (email : info@wpmanage.com)
|
|
17 |
defined( 'WPINC' ) || exit;
|
18 |
|
19 |
define( 'UJIC_NAME', 'Uji Countdown' );
|
20 |
-
define( 'UJIC_VERS', '2.0.
|
21 |
define( 'UJIC_FOLD', 'uji-countdown' );
|
22 |
define( 'UJICOUNTDOWN', trailingslashit( dirname(__FILE__) ) );
|
23 |
define( 'UJICOUNTDOWN_URL', plugin_dir_url( __FILE__ ) );
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: Uji Countdown
|
4 |
Plugin URI: http://www.wpmanage.com/uji-countdown
|
5 |
Description: HTML5 Customizable Countdown.
|
6 |
+
Version: 2.0.5
|
7 |
Text Domain: uji-countdown
|
8 |
Domain Path: /lang
|
9 |
Author: Wpmanage.com
|
10 |
Author URI: http://wpmanage.com
|
|
|
11 |
License: GPLv2
|
12 |
Copyright 2015 WPmanage (email : info@wpmanage.com)
|
13 |
*/
|
16 |
defined( 'WPINC' ) || exit;
|
17 |
|
18 |
define( 'UJIC_NAME', 'Uji Countdown' );
|
19 |
+
define( 'UJIC_VERS', '2.0.5' );
|
20 |
define( 'UJIC_FOLD', 'uji-countdown' );
|
21 |
define( 'UJICOUNTDOWN', trailingslashit( dirname(__FILE__) ) );
|
22 |
define( 'UJICOUNTDOWN_URL', plugin_dir_url( __FILE__ ) );
|
uninstall.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If uninstall not called from WordPress, then exit
|
3 |
+
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
4 |
+
exit();
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Uninstall operations
|
9 |
+
*/
|
10 |
+
function single_uninstall() {
|
11 |
+
// delete subscribers table
|
12 |
+
$GLOBALS['wpdb']->query("DROP TABLE IF EXISTS {$GLOBALS['wpdb']->prefix}uji_counter");
|
13 |
+
$GLOBALS['wpdb']->query("DROP TABLE IF EXISTS {$GLOBALS['wpdb']->prefix}uji_subscriptions");
|
14 |
+
|
15 |
+
// delete options
|
16 |
+
delete_option('ujic_set');
|
17 |
+
}
|
18 |
+
|
19 |
+
// Let's do it!
|
20 |
+
if (is_multisite()) {
|
21 |
+
single_uninstall();
|
22 |
+
|
23 |
+
// delete data foreach blog
|
24 |
+
$blogs_list = $GLOBALS['wpdb']->get_results("SELECT blog_id FROM {$GLOBALS['wpdb']->blogs}", ARRAY_A);
|
25 |
+
if (!empty($blogs_list)) {
|
26 |
+
foreach ($blogs_list as $blog) {
|
27 |
+
switch_to_blog($blog['blog_id']);
|
28 |
+
single_uninstall();
|
29 |
+
restore_current_blog();
|
30 |
+
}
|
31 |
+
}
|
32 |
+
} else {
|
33 |
+
single_uninstall();
|
34 |
+
}
|