Version Description
- Countdown Clone (new)
- Coming Soon Custom JS (new)
- Coming Soon Custom CSS (new)
- Circle Timer (coming soon)
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 1.7.6 |
Comparing to | |
See all releases |
Code changes from version 1.7.5 to 1.7.6
- assets/css/admin.css +11 -0
- assets/img/circleTimer.png +0 -0
- assets/js/ycdGoogleFonts.js +1 -0
- assets/views/admin/comingSoon.php +23 -0
- assets/views/admin/comingSoon/comingSoonSettings.php +16 -0
- assets/views/admin/comingSoon/comingSoonSupport.php +1 -1
- assets/views/supportMetabox.php +1 -1
- assets/views/types.php +4 -2
- classes/Actions.php +94 -0
- classes/CountdownType.php +9 -0
- classes/Filters.php +8 -0
- classes/countdown/ComingSoon.php +10 -0
- classes/countdown/Countdown.php +11 -1
- config/config.php +3 -2
- config/optionsConfig.php +8 -7
- countdown-builder.php +1 -1
- helpers/AdminHelper.php +6 -2
- readme.txt +7 -1
assets/css/admin.css
CHANGED
@@ -124,6 +124,12 @@
|
|
124 |
background-size: 100% 100%;
|
125 |
}
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
.circlePopup-countdown:hover,
|
128 |
.circlePopup-countdown-pro:hover {
|
129 |
background-color: black;
|
@@ -153,6 +159,11 @@
|
|
153 |
position: absolute;
|
154 |
}
|
155 |
|
|
|
|
|
|
|
|
|
|
|
156 |
.ycd-promotion-video {
|
157 |
z-index: 99999999999999999;
|
158 |
}
|
124 |
background-size: 100% 100%;
|
125 |
}
|
126 |
|
127 |
+
.circleTimer-countdown,
|
128 |
+
.circleTimer-countdown-pro {
|
129 |
+
background-image: url("../img/circleTimer.png");
|
130 |
+
background-size: 100% 100%;
|
131 |
+
}
|
132 |
+
|
133 |
.circlePopup-countdown:hover,
|
134 |
.circlePopup-countdown-pro:hover {
|
135 |
background-color: black;
|
159 |
position: absolute;
|
160 |
}
|
161 |
|
162 |
+
.ycd-coming-soon-type {
|
163 |
+
color: #fe6300;
|
164 |
+
top: 26px;
|
165 |
+
}
|
166 |
+
|
167 |
.ycd-promotion-video {
|
168 |
z-index: 99999999999999999;
|
169 |
}
|
assets/img/circleTimer.png
ADDED
Binary file
|
assets/js/ycdGoogleFonts.js
CHANGED
@@ -33,6 +33,7 @@ Y.prototype.load=function(a){function b(){if(e["__mti_fntLst"+c]){var d=e["__mti
|
|
33 |
WebFont.load({
|
34 |
google: {
|
35 |
families: [
|
|
|
36 |
'Droid Sans',
|
37 |
'Droid Serif',
|
38 |
'Chewy',
|
33 |
WebFont.load({
|
34 |
google: {
|
35 |
families: [
|
36 |
+
'Assistant',
|
37 |
'Droid Sans',
|
38 |
'Droid Serif',
|
39 |
'Chewy',
|
assets/views/admin/comingSoon.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
use ycd\AdminHelper;
|
3 |
+
$defaultData = AdminHelper::defaultData();
|
4 |
+
?>
|
5 |
+
<div class="ycd-bootstrap-wrapper ycd-settings-wrapper">
|
6 |
+
<form method="POST" action="<?php echo admin_url().'admin-post.php?action=ycdComingSoon'?>">
|
7 |
+
<div class="row">
|
8 |
+
<div class="col-lg-8">
|
9 |
+
<div class="row form-group">
|
10 |
+
<label class="savae-changes-label"><?php _e('Change settings'); ?></label>
|
11 |
+
<div class="pull-right">
|
12 |
+
<input type="submit" class="btn btn-primary" value="Save Changes">
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
<?php require_once YCD_ADMIN_VIEWS_PATH.'comingSoonSettings.php'; ?>
|
16 |
+
<?php require_once YCD_ADMIN_VIEWS_PATH.'comingSoonHeader.php'; ?>
|
17 |
+
<?php require_once YCD_ADMIN_VIEWS_PATH.'comingSoonDesign.php'; ?>
|
18 |
+
</div>
|
19 |
+
<div class="col-lg-6">
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
</form>
|
23 |
+
</div>
|
assets/views/admin/comingSoon/comingSoonSettings.php
CHANGED
@@ -96,5 +96,21 @@ $countdownsIdAndTitle = \ycd\Countdown::getCountdownsIdAndTitle();
|
|
96 |
</div>
|
97 |
</div>
|
98 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
</div>
|
100 |
</div>
|
96 |
</div>
|
97 |
</div>
|
98 |
</div>
|
99 |
+
<div class="row">
|
100 |
+
<div class="col-md-12">
|
101 |
+
<div>
|
102 |
+
<label for="ycd-edtitor-css" class="ycd-label-of-switch"><?php _e('Custom CSS', YCD_TEXT_DOMAIN); ?></label>
|
103 |
+
</div>
|
104 |
+
<textarea id="ycd-edtitor-css" rows="5" name="ycd-coming-soon-countdown-custom-css" class="widefat textarea"><?php echo esc_attr($this->getOptionValue('ycd-coming-soon-countdown-custom-css')); ?></textarea>
|
105 |
+
</div>
|
106 |
+
</div>
|
107 |
+
<div class="row">
|
108 |
+
<div class="col-md-12">
|
109 |
+
<div>
|
110 |
+
<label for="ycd-edtitor-js" class="ycd-label-of-switch"><?php _e('Custom JS', YCD_TEXT_DOMAIN); ?></label>
|
111 |
+
</div>
|
112 |
+
<textarea id="ycd-edtitor-js" id="ycd-edtitor-js" rows="5" name="ycd-coming-soon-countdown-custom-js" class="widefat textarea"><?php echo esc_attr($this->getOptionValue('ycd-coming-soon-countdown-custom-js')); ?></textarea>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
</div>
|
116 |
</div>
|
assets/views/admin/comingSoon/comingSoonSupport.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<div class="panel panel-default"style="margin-top: 48px;">
|
2 |
<div class="panel-heading"><?php _e('Support', YCD_TEXT_DOMAIN)?></div>
|
3 |
<div class="panel-body">
|
4 |
-
<h3 style="margin-top: 0;"><?php _e('Support', YCD_TEXT_DOMAIN)
|
5 |
<p style="text-align: center">
|
6 |
We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just pressing here
|
7 |
<br>
|
1 |
<div class="panel panel-default"style="margin-top: 48px;">
|
2 |
<div class="panel-heading"><?php _e('Support', YCD_TEXT_DOMAIN)?></div>
|
3 |
<div class="panel-body">
|
4 |
+
<h3 style="margin-top: 0;"><?php _e('Support', YCD_TEXT_DOMAIN)?> <span class="dashicons dashicons-megaphone"></span></h3>
|
5 |
<p style="text-align: center">
|
6 |
We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just pressing here
|
7 |
<br>
|
assets/views/supportMetabox.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div class="ycf-bootstrap-wrapper ycd-support-metabox">
|
2 |
-
<h3>Support
|
3 |
<p style="text-align: center">
|
4 |
We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just pressing here
|
5 |
<br>
|
1 |
<div class="ycf-bootstrap-wrapper ycd-support-metabox">
|
2 |
+
<h3>Support <span class="dashicons dashicons-megaphone"></span></h3>
|
3 |
<p style="text-align: center">
|
4 |
We love our plugin and do the best to improve all features for You. But sometimes issues happened, or you can't find required feature that you need. Don't worry, just pressing here
|
5 |
<br>
|
assets/views/types.php
CHANGED
@@ -21,8 +21,10 @@ $extensionsResult = AdminHelper::separateToActiveAndNotActive($currentExtensions
|
|
21 |
<?php echo AdminHelper::getCountdownThumbText($type); ?>
|
22 |
<div class="ycd-type-view-footer">
|
23 |
<span class="ycd-promotion-video"><?php echo AdminHelper::getCountdownDisplayName($type); ?></span>
|
24 |
-
<?php
|
25 |
-
|
|
|
|
|
26 |
<?php endif; ?>
|
27 |
</div>
|
28 |
</div>
|
21 |
<?php echo AdminHelper::getCountdownThumbText($type); ?>
|
22 |
<div class="ycd-type-view-footer">
|
23 |
<span class="ycd-promotion-video"><?php echo AdminHelper::getCountdownDisplayName($type); ?></span>
|
24 |
+
<?php
|
25 |
+
$videoUrl = AdminHelper::getCountdownYoutubeUrl($type);
|
26 |
+
if(!$type->isAvailable() && !empty($videoUrl)): ?>
|
27 |
+
<span class="ycd-play-promotion-video" data-href="<?php echo $videoUrl; ?>"></span>
|
28 |
<?php endif; ?>
|
29 |
</div>
|
30 |
</div>
|
classes/Actions.php
CHANGED
@@ -37,7 +37,101 @@ class Actions {
|
|
37 |
add_action('wp_enqueue_scripts', array($this, 'enqueueScripts'));
|
38 |
add_filter('mce_external_plugins', array($this, 'editorButton'));
|
39 |
add_action("admin_menu", array($this, 'adminMenu'));
|
|
|
40 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
public function adminMenu() {
|
43 |
add_menu_page(__('Coming Soon', YCD_TEXT_DOMAIN), __('Coming Soon', YCD_TEXT_DOMAIN), 'manage_options', 'ycdComingSoon', array($this, 'comingSoonMenu'), 'dashicons-clock', 11);
|
37 |
add_action('wp_enqueue_scripts', array($this, 'enqueueScripts'));
|
38 |
add_filter('mce_external_plugins', array($this, 'editorButton'));
|
39 |
add_action("admin_menu", array($this, 'adminMenu'));
|
40 |
+
add_action('admin_action_ycd_duplicate_post_as_draft', array($this, 'duplicatePostSave'));
|
41 |
}
|
42 |
+
|
43 |
+
public function duplicatePostSave() {
|
44 |
+
|
45 |
+
global $wpdb;
|
46 |
+
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) {
|
47 |
+
wp_die('No post to duplicate has been supplied!');
|
48 |
+
}
|
49 |
+
/*
|
50 |
+
* Nonce verification
|
51 |
+
*/
|
52 |
+
if ( !isset( $_GET['duplicate_nonce'] ) || !wp_verify_nonce( $_GET['duplicate_nonce'], YCD_COUNTDOWN_POST_TYPE ) )
|
53 |
+
return;
|
54 |
+
|
55 |
+
/*
|
56 |
+
* get the original post id
|
57 |
+
*/
|
58 |
+
$post_id = (isset($_GET['post']) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) );
|
59 |
+
/*
|
60 |
+
* and all the original post data then
|
61 |
+
*/
|
62 |
+
$post = get_post( $post_id );
|
63 |
+
|
64 |
+
/*
|
65 |
+
* if you don't want current user to be the new post author,
|
66 |
+
* then change next couple of lines to this: $new_post_author = $post->post_author;
|
67 |
+
*/
|
68 |
+
$current_user = wp_get_current_user();
|
69 |
+
$new_post_author = $current_user->ID;
|
70 |
+
|
71 |
+
/*
|
72 |
+
* if post data exists, create the post duplicate
|
73 |
+
*/
|
74 |
+
if (isset( $post ) && $post != null) {
|
75 |
+
|
76 |
+
/*
|
77 |
+
* new post data array
|
78 |
+
*/
|
79 |
+
$args = array(
|
80 |
+
'comment_status' => $post->comment_status,
|
81 |
+
'ping_status' => $post->ping_status,
|
82 |
+
'post_author' => $new_post_author,
|
83 |
+
'post_content' => $post->post_content,
|
84 |
+
'post_excerpt' => $post->post_excerpt,
|
85 |
+
'post_name' => $post->post_name,
|
86 |
+
'post_parent' => $post->post_parent,
|
87 |
+
'post_password' => $post->post_password,
|
88 |
+
'post_status' => 'publish',
|
89 |
+
'post_title' => $post->post_title.'(clone)',
|
90 |
+
'post_type' => $post->post_type,
|
91 |
+
'to_ping' => $post->to_ping,
|
92 |
+
'menu_order' => $post->menu_order
|
93 |
+
);
|
94 |
+
|
95 |
+
/*
|
96 |
+
* insert the post by wp_insert_post() function
|
97 |
+
*/
|
98 |
+
$new_post_id = wp_insert_post( $args );
|
99 |
+
|
100 |
+
/*
|
101 |
+
* get all current post terms ad set them to the new post draft
|
102 |
+
*/
|
103 |
+
$taxonomies = get_object_taxonomies($post->post_type); // returns array of taxonomy names for post type, ex array("category", "post_tag");
|
104 |
+
foreach ($taxonomies as $taxonomy) {
|
105 |
+
$post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));
|
106 |
+
wp_set_object_terms($new_post_id, $post_terms, $taxonomy, false);
|
107 |
+
}
|
108 |
+
|
109 |
+
/*
|
110 |
+
* duplicate all post meta just in two SQL queries
|
111 |
+
*/
|
112 |
+
$post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id");
|
113 |
+
if (count($post_meta_infos)!=0) {
|
114 |
+
$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
|
115 |
+
foreach ($post_meta_infos as $meta_info) {
|
116 |
+
$meta_key = $meta_info->meta_key;
|
117 |
+
if( $meta_key == '_wp_old_slug' ) continue;
|
118 |
+
$meta_value = addslashes($meta_info->meta_value);
|
119 |
+
$sql_query_sel[]= "SELECT $new_post_id, '$meta_key', '$meta_value'";
|
120 |
+
}
|
121 |
+
$sql_query.= implode(" UNION ALL ", $sql_query_sel);
|
122 |
+
$wpdb->query($sql_query);
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
/*
|
127 |
+
* finally, redirect to the edit post screen for the new draft
|
128 |
+
*/
|
129 |
+
wp_redirect(admin_url('edit.php?post_type=' . YCD_COUNTDOWN_POST_TYPE));
|
130 |
+
exit;
|
131 |
+
} else {
|
132 |
+
wp_die('Post creation failed, could not find original post: ' . $post_id);
|
133 |
+
}
|
134 |
+
}
|
135 |
|
136 |
public function adminMenu() {
|
137 |
add_menu_page(__('Coming Soon', YCD_TEXT_DOMAIN), __('Coming Soon', YCD_TEXT_DOMAIN), 'manage_options', 'ycdComingSoon', array($this, 'comingSoonMenu'), 'dashicons-clock', 11);
|
classes/CountdownType.php
CHANGED
@@ -3,6 +3,7 @@ namespace ycd;
|
|
3 |
|
4 |
class CountdownType {
|
5 |
private $available = false;
|
|
|
6 |
private $name = '';
|
7 |
private $accessLevel = YCD_FREE_VERSION;
|
8 |
|
@@ -28,4 +29,12 @@ class CountdownType {
|
|
28 |
public function getAccessLevel() {
|
29 |
return $this->accessLevel;
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
3 |
|
4 |
class CountdownType {
|
5 |
private $available = false;
|
6 |
+
private $isComingSoon = false;
|
7 |
private $name = '';
|
8 |
private $accessLevel = YCD_FREE_VERSION;
|
9 |
|
29 |
public function getAccessLevel() {
|
30 |
return $this->accessLevel;
|
31 |
}
|
32 |
+
|
33 |
+
public function setIsComingSoon($isComingSoon) {
|
34 |
+
$this->isComingSoon = $isComingSoon;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getIsComingSoon() {
|
38 |
+
return $this->isComingSoon;
|
39 |
+
}
|
40 |
}
|
classes/Filters.php
CHANGED
@@ -26,6 +26,14 @@ class Filters {
|
|
26 |
add_filter('YcdComingSoonPageMessage', array($this, 'pageMessage'), 10, 2);
|
27 |
add_filter('YcdComingSoonPageAfterMessage', array($this, 'afterPageMessage'), 10, 2);
|
28 |
add_filter('upgrader_pre_download', array($this, 'ycdShortenEddFilename'), 10, 4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
public function ycdShortenEddFilename($return, $package)
|
26 |
add_filter('YcdComingSoonPageMessage', array($this, 'pageMessage'), 10, 2);
|
27 |
add_filter('YcdComingSoonPageAfterMessage', array($this, 'afterPageMessage'), 10, 2);
|
28 |
add_filter('upgrader_pre_download', array($this, 'ycdShortenEddFilename'), 10, 4);
|
29 |
+
add_filter( 'post_row_actions', array($this, 'duplicatePost'), 10, 2 );
|
30 |
+
}
|
31 |
+
|
32 |
+
public function duplicatePost($actions, $post) {
|
33 |
+
if (current_user_can('edit_posts') && $post->post_type == YCD_COUNTDOWN_POST_TYPE) {
|
34 |
+
$actions['duplicate'] = '<a href="' . wp_nonce_url('admin.php?action=ycd_duplicate_post_as_draft&post=' . $post->ID, YCD_COUNTDOWN_POST_TYPE, 'duplicate_nonce' ) . '" title="Duplicate this item" rel="permalink">Clone</a>';
|
35 |
+
}
|
36 |
+
return $actions;
|
37 |
}
|
38 |
|
39 |
public function ycdShortenEddFilename($return, $package)
|
classes/countdown/ComingSoon.php
CHANGED
@@ -14,9 +14,17 @@ Class ComingSoon {
|
|
14 |
public function YcdComingSoonPageHeaderContent($content) {
|
15 |
$description = $this->getOptionValue('ycd-coming-soon-seo-description');
|
16 |
$favicon = $this->getOptionValue('ycd-coming-soon-favicon');
|
|
|
|
|
17 |
|
18 |
$content .= '<meta name="description" content="'.esc_attr($description).'">';
|
19 |
$content .= '<link href="'.esc_attr($favicon).'" rel="shortcut icon" type="image/x-icon" >';
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
return $content;
|
22 |
}
|
@@ -83,6 +91,8 @@ Class ComingSoon {
|
|
83 |
$defaults['ycd-coming-soon-bg-video'] = '';
|
84 |
$defaults['ycd-coming-soon-bg-video-url'] = '';
|
85 |
$defaults['ycd-coming-soon-mode'] = 'comingSoonMode';
|
|
|
|
|
86 |
$defaults['checkboxes'] = array(
|
87 |
'ycd-enable-coming-soon',
|
88 |
'ycd-coming-soon-bg-image',
|
14 |
public function YcdComingSoonPageHeaderContent($content) {
|
15 |
$description = $this->getOptionValue('ycd-coming-soon-seo-description');
|
16 |
$favicon = $this->getOptionValue('ycd-coming-soon-favicon');
|
17 |
+
$customJs = $this->getOptionValue('ycd-coming-soon-countdown-custom-js');
|
18 |
+
$customCSS = $this->getOptionValue('ycd-coming-soon-countdown-custom-css');
|
19 |
|
20 |
$content .= '<meta name="description" content="'.esc_attr($description).'">';
|
21 |
$content .= '<link href="'.esc_attr($favicon).'" rel="shortcut icon" type="image/x-icon" >';
|
22 |
+
if (!empty($customJs)) {
|
23 |
+
$content .= "<script>$customJs</script>";
|
24 |
+
}
|
25 |
+
if (!empty($customCSS)) {
|
26 |
+
$content .= "<style>$customCSS</style>";
|
27 |
+
}
|
28 |
|
29 |
return $content;
|
30 |
}
|
91 |
$defaults['ycd-coming-soon-bg-video'] = '';
|
92 |
$defaults['ycd-coming-soon-bg-video-url'] = '';
|
93 |
$defaults['ycd-coming-soon-mode'] = 'comingSoonMode';
|
94 |
+
$defaults['ycd-coming-soon-countdown-custom-css'] = '';
|
95 |
+
$defaults['ycd-coming-soon-countdown-custom-js'] = '';
|
96 |
$defaults['checkboxes'] = array(
|
97 |
'ycd-enable-coming-soon',
|
98 |
'ycd-coming-soon-bg-image',
|
classes/countdown/Countdown.php
CHANGED
@@ -424,13 +424,23 @@ abstract class Countdown {
|
|
424 |
if(empty($level)) {
|
425 |
$level = YCD_FREE_VERSION;
|
426 |
}
|
|
|
|
|
427 |
$typeObj = new CountdownType();
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
$typeObj->setName($type);
|
429 |
$typeObj->setAccessLevel($level);
|
430 |
|
431 |
if(YCD_PKG_VERSION >= $level) {
|
432 |
-
$
|
433 |
}
|
|
|
|
|
434 |
$countdownTypesObj[] = $typeObj;
|
435 |
}
|
436 |
|
424 |
if(empty($level)) {
|
425 |
$level = YCD_FREE_VERSION;
|
426 |
}
|
427 |
+
|
428 |
+
$isAvailable = false;
|
429 |
$typeObj = new CountdownType();
|
430 |
+
|
431 |
+
if ($level == 'comingSoon') {
|
432 |
+
$level = YCD_EXTENSION_VERSION;
|
433 |
+
$typeObj->setIsComingSoon(1);
|
434 |
+
}
|
435 |
+
|
436 |
$typeObj->setName($type);
|
437 |
$typeObj->setAccessLevel($level);
|
438 |
|
439 |
if(YCD_PKG_VERSION >= $level) {
|
440 |
+
$isAvailable = true;
|
441 |
}
|
442 |
+
$isAvailable = apply_filters('ycd'.$type.'ExtensionAvailable', $isAvailable);
|
443 |
+
$typeObj->setAvailable($isAvailable);
|
444 |
$countdownTypesObj[] = $typeObj;
|
445 |
}
|
446 |
|
config/config.php
CHANGED
@@ -68,12 +68,13 @@ class YcdCountdownConfig {
|
|
68 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
69 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
70 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
71 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
72 |
-
self::addDefine('YCD_VERSION', 1.
|
73 |
self::addDefine('YCD_FREE_VERSION', 1);
|
74 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
75 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
76 |
self::addDefine('YCD_PLATINUM_VERSION', 4);
|
|
|
77 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
78 |
}
|
79 |
|
68 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
69 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
70 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
71 |
+
self::addDefine('YCD_VERSION_PRO', 1.62);
|
72 |
+
self::addDefine('YCD_VERSION', 1.76);
|
73 |
self::addDefine('YCD_FREE_VERSION', 1);
|
74 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
75 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
76 |
self::addDefine('YCD_PLATINUM_VERSION', 4);
|
77 |
+
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
78 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
79 |
}
|
80 |
|
config/optionsConfig.php
CHANGED
@@ -19,7 +19,8 @@ class YcdCountdownOptionsConfig {
|
|
19 |
'woo' => YCD_GOLD_VERSION,
|
20 |
'circlePopup' => YCD_GOLD_VERSION,
|
21 |
'flipClock' => YCD_SILVER_VERSION,
|
22 |
-
'flipClockPopup' => YCD_GOLD_VERSION
|
|
|
23 |
));
|
24 |
|
25 |
$YCD_TYPES['typePath'] = apply_filters('ycdTypePaths', array(
|
@@ -49,11 +50,12 @@ class YcdCountdownOptionsConfig {
|
|
49 |
'clock5' => __('Clock 5', YCD_TEXT_DOMAIN),
|
50 |
'clock6' => __('Clock 6', YCD_TEXT_DOMAIN),
|
51 |
'clock7' => __('Clock 7', YCD_TEXT_DOMAIN),
|
52 |
-
'sticky' => __('Sticky
|
53 |
-
'woo' => __('WooCommerce
|
54 |
'circlePopup' => __('Circle Popup', YCD_TEXT_DOMAIN),
|
55 |
'flipClock' => __('Flip Clock', YCD_TEXT_DOMAIN),
|
56 |
-
'flipClockPopup' => __('Flip Clock Popup', YCD_TEXT_DOMAIN)
|
|
|
57 |
));
|
58 |
|
59 |
$YCD_TYPES['youtubeUrls'] = apply_filters('ycdYoutubeUrls', array(
|
@@ -81,10 +83,9 @@ class YcdCountdownOptionsConfig {
|
|
81 |
'flipClock' => __('How to create FlipClock Countdown', YCD_TEXT_DOMAIN),
|
82 |
'flipClockPopup' => __('How to create FlipClock Popup Countdown', YCD_TEXT_DOMAIN),
|
83 |
'countdownButton' => __('Countdown Button Extension', YCD_TEXT_DOMAIN),
|
84 |
-
'analytics' => __('Countdown Analytic Extension', YCD_TEXT_DOMAIN)
|
|
|
85 |
));
|
86 |
-
|
87 |
-
|
88 |
}
|
89 |
|
90 |
public static function optionsValues() {
|
19 |
'woo' => YCD_GOLD_VERSION,
|
20 |
'circlePopup' => YCD_GOLD_VERSION,
|
21 |
'flipClock' => YCD_SILVER_VERSION,
|
22 |
+
'flipClockPopup' => YCD_GOLD_VERSION,
|
23 |
+
'circleTimer' => 'comingSoon'
|
24 |
));
|
25 |
|
26 |
$YCD_TYPES['typePath'] = apply_filters('ycdTypePaths', array(
|
50 |
'clock5' => __('Clock 5', YCD_TEXT_DOMAIN),
|
51 |
'clock6' => __('Clock 6', YCD_TEXT_DOMAIN),
|
52 |
'clock7' => __('Clock 7', YCD_TEXT_DOMAIN),
|
53 |
+
'sticky' => __('Sticky Countdown', YCD_TEXT_DOMAIN),
|
54 |
+
'woo' => __('WooCommerce Countdown', YCD_TEXT_DOMAIN),
|
55 |
'circlePopup' => __('Circle Popup', YCD_TEXT_DOMAIN),
|
56 |
'flipClock' => __('Flip Clock', YCD_TEXT_DOMAIN),
|
57 |
+
'flipClockPopup' => __('Flip Clock Popup', YCD_TEXT_DOMAIN),
|
58 |
+
'circleTimer' => __('Circle Timer', YCD_TEXT_DOMAIN)
|
59 |
));
|
60 |
|
61 |
$YCD_TYPES['youtubeUrls'] = apply_filters('ycdYoutubeUrls', array(
|
83 |
'flipClock' => __('How to create FlipClock Countdown', YCD_TEXT_DOMAIN),
|
84 |
'flipClockPopup' => __('How to create FlipClock Popup Countdown', YCD_TEXT_DOMAIN),
|
85 |
'countdownButton' => __('Countdown Button Extension', YCD_TEXT_DOMAIN),
|
86 |
+
'analytics' => __('Countdown Analytic Extension', YCD_TEXT_DOMAIN),
|
87 |
+
'circleTimer' => __('Circle Timer Extension', YCD_TEXT_DOMAIN)
|
88 |
));
|
|
|
|
|
89 |
}
|
90 |
|
91 |
public static function optionsValues() {
|
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.7.
|
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.7.6
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
helpers/AdminHelper.php
CHANGED
@@ -49,7 +49,7 @@ class AdminHelper {
|
|
49 |
$titles = $YCD_TYPES['titles'];
|
50 |
$name = $type->getName();
|
51 |
|
52 |
-
return
|
53 |
}
|
54 |
|
55 |
public static function getCountdownYoutubeUrl($type) {
|
@@ -67,6 +67,10 @@ class AdminHelper {
|
|
67 |
$content = '';
|
68 |
|
69 |
if (!$isAvailable) {
|
|
|
|
|
|
|
|
|
70 |
$content = '<p class="ycd-type-title-pro">'.__('PRO Features', YCD_TEXT_DOMAIN).'</p>';
|
71 |
}
|
72 |
|
@@ -237,7 +241,7 @@ class AdminHelper {
|
|
237 |
'value' => 'redirect'
|
238 |
),
|
239 |
'label' => array(
|
240 |
-
'name' => __('
|
241 |
)
|
242 |
),
|
243 |
array(
|
49 |
$titles = $YCD_TYPES['titles'];
|
50 |
$name = $type->getName();
|
51 |
|
52 |
+
return @$titles[$name];
|
53 |
}
|
54 |
|
55 |
public static function getCountdownYoutubeUrl($type) {
|
67 |
$content = '';
|
68 |
|
69 |
if (!$isAvailable) {
|
70 |
+
if ($type->getIsComingSoon()) {
|
71 |
+
$content = '<p class="ycd-type-title-pro ycd-coming-soon-type">'.__('Coming Soon', YCD_TEXT_DOMAIN).'</p>';
|
72 |
+
return $content;
|
73 |
+
}
|
74 |
$content = '<p class="ycd-type-title-pro">'.__('PRO Features', YCD_TEXT_DOMAIN).'</p>';
|
75 |
}
|
76 |
|
241 |
'value' => 'redirect'
|
242 |
),
|
243 |
'label' => array(
|
244 |
+
'name' => __('Redirect', YCD_TEXT_DOMAIN)
|
245 |
)
|
246 |
),
|
247 |
array(
|
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.4
|
6 |
-
Stable tag: 1.7.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -65,6 +65,12 @@ Yes you can, we have Circle and Flipclock countdown popups.
|
|
65 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
66 |
|
67 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
= 1.7.5 =
|
69 |
* New Maintenance mode (new)
|
70 |
* Timer days option (new)
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 5.4
|
6 |
+
Stable tag: 1.7.6
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
65 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
66 |
|
67 |
== Changelog ==
|
68 |
+
= 1.7.6 =
|
69 |
+
* Countdown Clone (new)
|
70 |
+
* Coming Soon Custom JS (new)
|
71 |
+
* Coming Soon Custom CSS (new)
|
72 |
+
* Circle Timer (coming soon)
|
73 |
+
|
74 |
= 1.7.5 =
|
75 |
* New Maintenance mode (new)
|
76 |
* Timer days option (new)
|