Version Description
- Save Duration For Each User (new)
- Admin Side Is Expired Bug Fixed
- Circle Countdown Popup Saving Issue Fixed
- Bug Fixed Related To Schedule Countdown
Download this release
Release Info
| Developer | adamskaat |
| Plugin | |
| Version | 1.7.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.6.9 to 1.7.0
- CountdownInit.php +28 -0
- assets/css/Css.php +6 -0
- assets/css/admin.css +6 -2
- assets/img/countdownButton.png +0 -0
- assets/js/Countdown.js +9 -1
- assets/views/generalOptions.php +20 -1
- classes/Actions.php +4 -0
- classes/Filters.php +16 -0
- classes/countdown/CircleCountdown.php +1 -1
- classes/countdown/Countdown.php +23 -28
- config/config.php +5 -2
- config/optionsConfig.php +1 -0
- config/proOptionsConfig.php +0 -108
- countdown-builder.php +1 -1
- helpers/AdminHelper.php +35 -0
- readme.txt +7 -1
CountdownInit.php
CHANGED
|
@@ -23,6 +23,7 @@ class CountdownInit {
|
|
| 23 |
|
| 24 |
public function init() {
|
| 25 |
register_activation_hook(YCD_PREFIX, array($this, 'activate'));
|
|
|
|
| 26 |
$this->includeData();
|
| 27 |
$this->actions();
|
| 28 |
$this->filters();
|
|
@@ -33,6 +34,7 @@ class CountdownInit {
|
|
| 33 |
require_once YCD_HELPERS_PATH.'AdminHelperPro.php';
|
| 34 |
require_once YCD_HELPERS_PATH.'CheckerPro.php';
|
| 35 |
require_once YCD_BLOCKS_PATH.'ProgressBar.php';
|
|
|
|
| 36 |
}
|
| 37 |
require_once(YCD_HELPERS_PATH.'ShowReviewNotice.php');
|
| 38 |
require_once YCD_HELPERS_PATH.'HelperFunctions.php';
|
|
@@ -58,10 +60,12 @@ class CountdownInit {
|
|
| 58 |
require_once YCD_CLASSES_PATH.'Installer.php';
|
| 59 |
require_once YCD_COUNTDOWNS_PATH.'ComingSoon.php';
|
| 60 |
if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
|
|
|
|
| 61 |
require_once YCD_CLASSES_PATH.'Subscription.php';
|
| 62 |
require_once YCD_CLASSES_PATH.'AjaxPro.php';
|
| 63 |
require_once YCD_CLASSES_PATH.'ActionsPro.php';
|
| 64 |
require_once YCD_CLASSES_PATH.'FiltersPro.php';
|
|
|
|
| 65 |
}
|
| 66 |
}
|
| 67 |
|
|
@@ -74,8 +78,32 @@ class CountdownInit {
|
|
| 74 |
}
|
| 75 |
|
| 76 |
public function activate() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
Installer::install();
|
| 78 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
}
|
| 80 |
|
| 81 |
CountdownInit::getInstance();
|
| 23 |
|
| 24 |
public function init() {
|
| 25 |
register_activation_hook(YCD_PREFIX, array($this, 'activate'));
|
| 26 |
+
register_deactivation_hook(YCD_PREFIX, array($this, 'deactivate'));
|
| 27 |
$this->includeData();
|
| 28 |
$this->actions();
|
| 29 |
$this->filters();
|
| 34 |
require_once YCD_HELPERS_PATH.'AdminHelperPro.php';
|
| 35 |
require_once YCD_HELPERS_PATH.'CheckerPro.php';
|
| 36 |
require_once YCD_BLOCKS_PATH.'ProgressBar.php';
|
| 37 |
+
require_once(YCD_HELPERS_PATH.'ExtensionRegister.php');
|
| 38 |
}
|
| 39 |
require_once(YCD_HELPERS_PATH.'ShowReviewNotice.php');
|
| 40 |
require_once YCD_HELPERS_PATH.'HelperFunctions.php';
|
| 60 |
require_once YCD_CLASSES_PATH.'Installer.php';
|
| 61 |
require_once YCD_COUNTDOWNS_PATH.'ComingSoon.php';
|
| 62 |
if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
|
| 63 |
+
require_once YCD_CLASSES_PATH.'Updates.php';
|
| 64 |
require_once YCD_CLASSES_PATH.'Subscription.php';
|
| 65 |
require_once YCD_CLASSES_PATH.'AjaxPro.php';
|
| 66 |
require_once YCD_CLASSES_PATH.'ActionsPro.php';
|
| 67 |
require_once YCD_CLASSES_PATH.'FiltersPro.php';
|
| 68 |
+
require_once(YCD_HELPERS_PATH.'ExtensionRegister.php');
|
| 69 |
}
|
| 70 |
}
|
| 71 |
|
| 78 |
}
|
| 79 |
|
| 80 |
public function activate() {
|
| 81 |
+
|
| 82 |
+
if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
|
| 83 |
+
$pluginName = YCD_FILE_NAME;
|
| 84 |
+
|
| 85 |
+
$options = array(
|
| 86 |
+
'licence' => array(
|
| 87 |
+
'key' => YCD_PRO_KEY,
|
| 88 |
+
'storeURL' => YCD_STORE_URL,
|
| 89 |
+
'file' => YCD_FILE_NAME,
|
| 90 |
+
'itemId' => YCD_VERSION_ITEM_ID,
|
| 91 |
+
'itemName' => __(YCD_COUNTDOWN_ITEM_LABEL, YCD_TEXT_DOMAIN),
|
| 92 |
+
'author' => 'Adam',
|
| 93 |
+
'boxLabel' => __('Countdown pro version license', YCD_TEXT_DOMAIN)
|
| 94 |
+
)
|
| 95 |
+
);
|
| 96 |
+
ExtensionRegister::register($pluginName, $options);
|
| 97 |
+
}
|
| 98 |
Installer::install();
|
| 99 |
}
|
| 100 |
+
|
| 101 |
+
public function deactivate() {
|
| 102 |
+
if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
|
| 103 |
+
$pluginName = YCD_FILE_NAME;
|
| 104 |
+
ExtensionRegister::remove($pluginName);
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
}
|
| 108 |
|
| 109 |
CountdownInit::getInstance();
|
assets/css/Css.php
CHANGED
|
@@ -39,6 +39,10 @@ class Css {
|
|
| 39 |
public function getNewsletterPageKey() {
|
| 40 |
return YCD_COUNTDOWN_POST_TYPE.'_page_'.YCD_COUNTDOWN_NEWSLETTER;
|
| 41 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
public function enqueueStyles($hook) {
|
| 44 |
|
|
@@ -56,6 +60,7 @@ class Css {
|
|
| 56 |
$morePlugins = $this->getMorePluginsPage();
|
| 57 |
$comingSoonPage = $this->getComingSoonPage();
|
| 58 |
$comingSoonMenuPage = $this->getComingSoonMenuPage();
|
|
|
|
| 59 |
$allowedPages = array(
|
| 60 |
$settingsKey,
|
| 61 |
$supportKey,
|
|
@@ -64,6 +69,7 @@ class Css {
|
|
| 64 |
$morePlugins,
|
| 65 |
$comingSoonPage,
|
| 66 |
$comingSoonMenuPage,
|
|
|
|
| 67 |
'ycdcountdown_page_ycdcountdown',
|
| 68 |
);
|
| 69 |
if(in_array($hook, $allowedPages) || get_post_type(@$_GET['post']) == YCD_COUNTDOWN_POST_TYPE) {
|
| 39 |
public function getNewsletterPageKey() {
|
| 40 |
return YCD_COUNTDOWN_POST_TYPE.'_page_'.YCD_COUNTDOWN_NEWSLETTER;
|
| 41 |
}
|
| 42 |
+
|
| 43 |
+
public function getLicensePageKey() {
|
| 44 |
+
return YCD_COUNTDOWN_POST_TYPE.'_page_'.YCD_COUNTDOWN_LICENSE;
|
| 45 |
+
}
|
| 46 |
|
| 47 |
public function enqueueStyles($hook) {
|
| 48 |
|
| 60 |
$morePlugins = $this->getMorePluginsPage();
|
| 61 |
$comingSoonPage = $this->getComingSoonPage();
|
| 62 |
$comingSoonMenuPage = $this->getComingSoonMenuPage();
|
| 63 |
+
$licensePageKey = $this->getLicensePageKey();
|
| 64 |
$allowedPages = array(
|
| 65 |
$settingsKey,
|
| 66 |
$supportKey,
|
| 69 |
$morePlugins,
|
| 70 |
$comingSoonPage,
|
| 71 |
$comingSoonMenuPage,
|
| 72 |
+
$licensePageKey,
|
| 73 |
'ycdcountdown_page_ycdcountdown',
|
| 74 |
);
|
| 75 |
if(in_array($hook, $allowedPages) || get_post_type(@$_GET['post']) == YCD_COUNTDOWN_POST_TYPE) {
|
assets/css/admin.css
CHANGED
|
@@ -148,8 +148,8 @@
|
|
| 148 |
-ms-transform: rotate(7deg);
|
| 149 |
/* -webkit-transform: rotate(7deg); */
|
| 150 |
transform: rotate(36deg);
|
| 151 |
-
top:
|
| 152 |
-
right: -
|
| 153 |
position: absolute;
|
| 154 |
}
|
| 155 |
|
|
@@ -704,4 +704,8 @@ div.ycd-tabs-text-header > div.ycd-toggle-icon-open {
|
|
| 704 |
|
| 705 |
.savae-changes-label {
|
| 706 |
padding-top: 6px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 707 |
}
|
| 148 |
-ms-transform: rotate(7deg);
|
| 149 |
/* -webkit-transform: rotate(7deg); */
|
| 150 |
transform: rotate(36deg);
|
| 151 |
+
top: 32px;
|
| 152 |
+
right: -14px;
|
| 153 |
position: absolute;
|
| 154 |
}
|
| 155 |
|
| 704 |
|
| 705 |
.savae-changes-label {
|
| 706 |
padding-top: 6px;
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
.ycd-postbox-container {
|
| 710 |
+
width: 100%;
|
| 711 |
}
|
assets/img/countdownButton.png
DELETED
|
Binary file
|
assets/js/Countdown.js
CHANGED
|
@@ -771,7 +771,15 @@ YcdCountdown.prototype.addTimeToClock = function(options, countDown) {
|
|
| 771 |
var seconds = hours*60*60 + minutes*60 + secondsSaved;
|
| 772 |
|
| 773 |
if (options['ycd-countdown-save-duration']) {
|
| 774 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 775 |
}
|
| 776 |
}
|
| 777 |
countDown.data('expired', false);
|
| 771 |
var seconds = hours*60*60 + minutes*60 + secondsSaved;
|
| 772 |
|
| 773 |
if (options['ycd-countdown-save-duration']) {
|
| 774 |
+
|
| 775 |
+
if (options['ycd-countdown-save-duration-each-user']) {
|
| 776 |
+
var allOptions = jQuery(countDown).data('all-options');
|
| 777 |
+
var id = allOptions['id'];
|
| 778 |
+
seconds = YcdCountdownProFunctionality.durationSeconds(seconds, options, id);
|
| 779 |
+
}
|
| 780 |
+
else {
|
| 781 |
+
seconds = countDown.data('timer');
|
| 782 |
+
}
|
| 783 |
}
|
| 784 |
}
|
| 785 |
countDown.data('expired', false);
|
assets/views/generalOptions.php
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
<?php
|
| 2 |
use ycd\MultipleChoiceButton;
|
| 3 |
use ycd\AdminHelper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
$defaultData = AdminHelper::defaultData();
|
| 5 |
$dueDate = $this->getOptionValue('ycd-date-time-picker');
|
| 6 |
?>
|
|
@@ -38,11 +44,24 @@ $dueDate = $this->getOptionValue('ycd-date-time-picker');
|
|
| 38 |
</div>
|
| 39 |
<div class="col-md-6">
|
| 40 |
<label class="ycd-switch">
|
| 41 |
-
<input type="checkbox" id="ycd-countdown-save-duration" name="ycd-countdown-save-duration" <?php echo $this->getOptionValue('ycd-countdown-save-duration'); ?>>
|
| 42 |
<span class="ycd-slider ycd-round"></span>
|
| 43 |
</label>
|
| 44 |
</div>
|
| 45 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
<div class="row form-group">
|
| 47 |
<div class="col-md-6">
|
| 48 |
</div>
|
| 1 |
<?php
|
| 2 |
use ycd\MultipleChoiceButton;
|
| 3 |
use ycd\AdminHelper;
|
| 4 |
+
$proSpan = '';
|
| 5 |
+
$isPro = '';
|
| 6 |
+
if(YCD_PKG_VERSION == YCD_FREE_VERSION) {
|
| 7 |
+
$isPro = '-pro';
|
| 8 |
+
$proSpan = '<span class="ycd-pro-span">'.__('pro', YCD_TEXT_DOMAIN).'</span>';
|
| 9 |
+
}
|
| 10 |
$defaultData = AdminHelper::defaultData();
|
| 11 |
$dueDate = $this->getOptionValue('ycd-date-time-picker');
|
| 12 |
?>
|
| 44 |
</div>
|
| 45 |
<div class="col-md-6">
|
| 46 |
<label class="ycd-switch">
|
| 47 |
+
<input type="checkbox" id="ycd-countdown-save-duration" class="ycd-accordion-checkbox" name="ycd-countdown-save-duration" <?php echo $this->getOptionValue('ycd-countdown-save-duration'); ?>>
|
| 48 |
<span class="ycd-slider ycd-round"></span>
|
| 49 |
</label>
|
| 50 |
</div>
|
| 51 |
</div>
|
| 52 |
+
<div class="ycd-accordion-content ycd-hide-content">
|
| 53 |
+
<div class="row">
|
| 54 |
+
<div class="col-md-6">
|
| 55 |
+
<label for="ycd-countdown-save-duration-each-user" class="ycd-label-of-switch"><?php _e('Save For Each User', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
| 56 |
+
</div>
|
| 57 |
+
<div class="col-md-6 ycd-option-wrapper<?php echo $isPro; ?>">
|
| 58 |
+
<label class="ycd-switch">
|
| 59 |
+
<input type="checkbox" id="ycd-countdown-save-duration-each-user" class="ycd-accordion-checkbox" name="ycd-countdown-save-duration-each-user" <?php echo $this->getOptionValue('ycd-countdown-save-duration-each-user'); ?>>
|
| 60 |
+
<span class="ycd-slider ycd-round"></span>
|
| 61 |
+
</label>
|
| 62 |
+
</div>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
<div class="row form-group">
|
| 66 |
<div class="col-md-6">
|
| 67 |
</div>
|
classes/Actions.php
CHANGED
|
@@ -125,6 +125,10 @@ class Actions {
|
|
| 125 |
if ($currentPostType == YCD_COUNTDOWN_POST_TYPE) {
|
| 126 |
YcdCountdownConfig::displaySettings();
|
| 127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
}
|
| 129 |
|
| 130 |
private function revieNotice() {
|
| 125 |
if ($currentPostType == YCD_COUNTDOWN_POST_TYPE) {
|
| 126 |
YcdCountdownConfig::displaySettings();
|
| 127 |
}
|
| 128 |
+
|
| 129 |
+
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
| 130 |
+
new Updates();
|
| 131 |
+
}
|
| 132 |
}
|
| 133 |
|
| 134 |
private function revieNotice() {
|
classes/Filters.php
CHANGED
|
@@ -25,8 +25,24 @@ class Filters {
|
|
| 25 |
add_filter('YcdComingSoonPageBeforeMessage', array($this, 'beforeMessage'), 10, 2);
|
| 26 |
add_filter('YcdComingSoonPageMessage', array($this, 'pageMessage'), 10, 2);
|
| 27 |
add_filter('YcdComingSoonPageAfterMessage', array($this, 'afterPageMessage'), 10, 2);
|
|
|
|
| 28 |
}
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
public function beforeHeader($content, $obj) {
|
| 31 |
$content .= $this->comingSoonCountdown($obj, 'YcdComingSoonPageBeforeHeader');
|
| 32 |
return $content;
|
| 25 |
add_filter('YcdComingSoonPageBeforeMessage', array($this, 'beforeMessage'), 10, 2);
|
| 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)
|
| 32 |
+
{
|
| 33 |
+
if (strpos($package, YCD_STORE_URL) !== false) {
|
| 34 |
+
add_filter('wp_unique_filename', array($this, 'shortenEddFilename'), 100, 2);
|
| 35 |
+
}
|
| 36 |
+
return $return;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
public function shortenEddFilename($filename, $ext)
|
| 40 |
+
{
|
| 41 |
+
$filename = substr($filename, 0, 20).$ext;
|
| 42 |
+
remove_filter('wp_unique_filename', array($this, 'shortenEddFilename'), 10);
|
| 43 |
+
return $filename;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
public function beforeHeader($content, $obj) {
|
| 47 |
$content .= $this->comingSoonCountdown($obj, 'YcdComingSoonPageBeforeHeader');
|
| 48 |
return $content;
|
classes/countdown/CircleCountdown.php
CHANGED
|
@@ -172,7 +172,7 @@ class CircleCountdown extends Countdown {
|
|
| 172 |
}
|
| 173 |
|
| 174 |
public function addToContent() {
|
| 175 |
-
add_filter('the_content', array($this, 'getTheContentFilter'),
|
| 176 |
}
|
| 177 |
|
| 178 |
public function getViewContent() {
|
| 172 |
}
|
| 173 |
|
| 174 |
public function addToContent() {
|
| 175 |
+
add_filter('the_content', array($this, 'getTheContentFilter'),99999999, 1);
|
| 176 |
}
|
| 177 |
|
| 178 |
public function getViewContent() {
|
classes/countdown/Countdown.php
CHANGED
|
@@ -779,21 +779,10 @@ abstract class Countdown {
|
|
| 779 |
}
|
| 780 |
|
| 781 |
public function isExpired() {
|
| 782 |
-
$
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
$
|
| 786 |
-
$dueDate .= ':00';
|
| 787 |
-
$timeDate = new DateTime('now', new DateTimeZone($timezone));
|
| 788 |
-
$timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
|
| 789 |
-
$seconds = strtotime($dueDate)-$timeNow;
|
| 790 |
-
|
| 791 |
-
if($dateType == 'schedule') {
|
| 792 |
-
$seconds = $this->getCircleSeconds();
|
| 793 |
-
return !$seconds->expireSeconds;
|
| 794 |
-
}
|
| 795 |
-
|
| 796 |
-
return ($seconds < 0);
|
| 797 |
}
|
| 798 |
|
| 799 |
public function getExpireDate() {
|
|
@@ -801,20 +790,13 @@ abstract class Countdown {
|
|
| 801 |
|
| 802 |
$timezone = $this->getOptionValue('ycd-circle-time-zone');
|
| 803 |
$current = new DateTime('now', new \DateTimeZone($timezone));
|
| 804 |
-
$dueDate = $this->getOptionValue('ycd-date-time-picker');
|
| 805 |
$currentDate = $current->format('Y-m-d H:i:s');
|
| 806 |
-
|
| 807 |
-
|
| 808 |
-
|
| 809 |
-
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
$endTo = $this->getOptionValue('ycd-schedule-end-day');
|
| 813 |
-
$endTimeClock = $this->getOptionValue('ycd-schedule-end-to');
|
| 814 |
-
$endDateObj = AdminHelperPro::getSheduleDate($endTo, $endTimeClock, $timezone);
|
| 815 |
-
$dueDate = $endDateObj->format('Y-m-d H:i:s');
|
| 816 |
-
}
|
| 817 |
-
$dateString = human_time_diff(strtotime($dueDate), strtotime($currentDate));
|
| 818 |
|
| 819 |
return $dateString;
|
| 820 |
}
|
|
@@ -824,6 +806,13 @@ abstract class Countdown {
|
|
| 824 |
|
| 825 |
return $isAllow;
|
| 826 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 827 |
|
| 828 |
public function getCircleSeconds() {
|
| 829 |
$seconds = 0;
|
|
@@ -959,6 +948,7 @@ abstract class Countdown {
|
|
| 959 |
$options['ycd-countdown-duration-minutes'] = $this->getOptionValue('ycd-countdown-duration-minutes');
|
| 960 |
$options['ycd-countdown-duration-seconds'] = $this->getOptionValue('ycd-countdown-duration-seconds');
|
| 961 |
$options['ycd-countdown-save-duration'] = $this->getOptionValue('ycd-countdown-save-duration');
|
|
|
|
| 962 |
|
| 963 |
return $options;
|
| 964 |
}
|
|
@@ -966,6 +956,7 @@ abstract class Countdown {
|
|
| 966 |
public function getFlipClockOptionsData() {
|
| 967 |
$options = array();
|
| 968 |
|
|
|
|
| 969 |
$options['id'] = $this->getId();
|
| 970 |
$modifiedObj = $this->getCircleSeconds();
|
| 971 |
$modifiedSavedData = $modifiedObj->datesNumber;
|
|
@@ -974,6 +965,7 @@ abstract class Countdown {
|
|
| 974 |
|
| 975 |
$options += $this->generalOptionsData();
|
| 976 |
|
|
|
|
| 977 |
$options['ycd-flip-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
|
| 978 |
$options['ycd-flip-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
| 979 |
$options['output-format'] = $this->getOutputFormats();
|
|
@@ -1013,6 +1005,8 @@ abstract class Countdown {
|
|
| 1013 |
|
| 1014 |
public function getCircleOptionsData() {
|
| 1015 |
$options = array();
|
|
|
|
|
|
|
| 1016 |
$modifiedObj = $this->getCircleSeconds();
|
| 1017 |
$modifiedSavedData = $modifiedObj->datesNumber;
|
| 1018 |
$options['ycd-seconds'] = $modifiedObj->expireSeconds;
|
|
@@ -1020,6 +1014,7 @@ abstract class Countdown {
|
|
| 1020 |
|
| 1021 |
$options += $this->generalOptionsData();
|
| 1022 |
|
|
|
|
| 1023 |
$options['animation'] = $this->getOptionValue('ycd-circle-animation');
|
| 1024 |
$options['direction'] = $this->getOptionValue('ycd-countdown-direction');
|
| 1025 |
$options['fg_width'] = $this->getOptionValue('ycd-circle-width');
|
| 779 |
}
|
| 780 |
|
| 781 |
public function isExpired() {
|
| 782 |
+
$obj = $this->getCircleSeconds();
|
| 783 |
+
$seconds = $obj->expireSeconds;
|
| 784 |
+
|
| 785 |
+
return ($seconds <= 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 786 |
}
|
| 787 |
|
| 788 |
public function getExpireDate() {
|
| 790 |
|
| 791 |
$timezone = $this->getOptionValue('ycd-circle-time-zone');
|
| 792 |
$current = new DateTime('now', new \DateTimeZone($timezone));
|
|
|
|
| 793 |
$currentDate = $current->format('Y-m-d H:i:s');
|
| 794 |
+
|
| 795 |
+
$obj = $this->getCircleSeconds();
|
| 796 |
+
$seconds = $obj->expireSeconds;
|
| 797 |
+
$date = strtotime("+$seconds seconds", strtotime($currentDate));
|
| 798 |
+
|
| 799 |
+
$dateString = human_time_diff($date, strtotime($currentDate));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 800 |
|
| 801 |
return $dateString;
|
| 802 |
}
|
| 806 |
|
| 807 |
return $isAllow;
|
| 808 |
}
|
| 809 |
+
|
| 810 |
+
public function getSecondsFromObj() {
|
| 811 |
+
$secondsObj = $this->getCircleSeconds();
|
| 812 |
+
$seconds = $secondsObj->expireSeconds;
|
| 813 |
+
|
| 814 |
+
return $seconds;
|
| 815 |
+
}
|
| 816 |
|
| 817 |
public function getCircleSeconds() {
|
| 818 |
$seconds = 0;
|
| 948 |
$options['ycd-countdown-duration-minutes'] = $this->getOptionValue('ycd-countdown-duration-minutes');
|
| 949 |
$options['ycd-countdown-duration-seconds'] = $this->getOptionValue('ycd-countdown-duration-seconds');
|
| 950 |
$options['ycd-countdown-save-duration'] = $this->getOptionValue('ycd-countdown-save-duration');
|
| 951 |
+
$options['ycd-countdown-save-duration-each-user'] = $this->getOptionValue('ycd-countdown-save-duration-each-user');
|
| 952 |
|
| 953 |
return $options;
|
| 954 |
}
|
| 956 |
public function getFlipClockOptionsData() {
|
| 957 |
$options = array();
|
| 958 |
|
| 959 |
+
$isExpired = $this->isExpired();
|
| 960 |
$options['id'] = $this->getId();
|
| 961 |
$modifiedObj = $this->getCircleSeconds();
|
| 962 |
$modifiedSavedData = $modifiedObj->datesNumber;
|
| 965 |
|
| 966 |
$options += $this->generalOptionsData();
|
| 967 |
|
| 968 |
+
$options['isExpired'] = $isExpired;
|
| 969 |
$options['ycd-flip-date-time-picker'] = $this->getOptionValue('ycd-date-time-picker');
|
| 970 |
$options['ycd-flip-time-zone'] = $this->getOptionValue('ycd-circle-time-zone');
|
| 971 |
$options['output-format'] = $this->getOutputFormats();
|
| 1005 |
|
| 1006 |
public function getCircleOptionsData() {
|
| 1007 |
$options = array();
|
| 1008 |
+
$isExpired = $this->isExpired();
|
| 1009 |
+
|
| 1010 |
$modifiedObj = $this->getCircleSeconds();
|
| 1011 |
$modifiedSavedData = $modifiedObj->datesNumber;
|
| 1012 |
$options['ycd-seconds'] = $modifiedObj->expireSeconds;
|
| 1014 |
|
| 1015 |
$options += $this->generalOptionsData();
|
| 1016 |
|
| 1017 |
+
$options['isExpired'] = $isExpired;
|
| 1018 |
$options['animation'] = $this->getOptionValue('ycd-circle-animation');
|
| 1019 |
$options['direction'] = $this->getOptionValue('ycd-countdown-direction');
|
| 1020 |
$options['fg_width'] = $this->getOptionValue('ycd-circle-width');
|
config/config.php
CHANGED
|
@@ -46,10 +46,13 @@ class YcdCountdownConfig {
|
|
| 46 |
self::addDefine('YCD_COUNTDOWN_TUTORIALS', 'ycdTutorials');
|
| 47 |
self::addDefine('YCD_COUNTDOWN_NEWSLETTER', 'ycdNewsletter');
|
| 48 |
self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS', 'ycdSubscribers');
|
|
|
|
| 49 |
self::addDefine('YCD_POSTS_TABLE_NAME', 'posts');
|
| 50 |
self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS_TABLE', 'ycd_subscribers');
|
| 51 |
self::addDefine('YCD_COUNTDOWN_WIDGET', 'ycd_countdown_widget');
|
| 52 |
self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
|
|
|
|
|
|
|
| 53 |
self::addDefine('YCD_COUNTDOWN_PRO_URL', 'https://edmonsoft.com/countdown');
|
| 54 |
self::addDefine('YCD_COUNTDOWN_BUTTON_URL', 'https://edmonsoft.com/countdown/#yrm-analytics');
|
| 55 |
self::addDefine('YCD_COUNTDOWN_REVIEW_URL', 'https://wordpress.org/support/plugin/countdown-builder/reviews/?filter=5');
|
|
@@ -63,8 +66,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);
|
| 46 |
self::addDefine('YCD_COUNTDOWN_TUTORIALS', 'ycdTutorials');
|
| 47 |
self::addDefine('YCD_COUNTDOWN_NEWSLETTER', 'ycdNewsletter');
|
| 48 |
self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS', 'ycdSubscribers');
|
| 49 |
+
self::addDefine('YCD_COUNTDOWN_LICENSE', 'ycdLicense');
|
| 50 |
self::addDefine('YCD_POSTS_TABLE_NAME', 'posts');
|
| 51 |
self::addDefine('YCD_COUNTDOWN_SUBSCRIBERS_TABLE', 'ycd_subscribers');
|
| 52 |
self::addDefine('YCD_COUNTDOWN_WIDGET', 'ycd_countdown_widget');
|
| 53 |
self::addDefine('YCD_TEXT_DOMAIN', 'ycdCountdown');
|
| 54 |
+
self::addDefine('YCD_STORE_URL', 'https://edmonsoft.com/countdown/');
|
| 55 |
+
self::addDefine('YCD_PRO_KEY', 'ycdProVersion');
|
| 56 |
self::addDefine('YCD_COUNTDOWN_PRO_URL', 'https://edmonsoft.com/countdown');
|
| 57 |
self::addDefine('YCD_COUNTDOWN_BUTTON_URL', 'https://edmonsoft.com/countdown/#yrm-analytics');
|
| 58 |
self::addDefine('YCD_COUNTDOWN_REVIEW_URL', 'https://wordpress.org/support/plugin/countdown-builder/reviews/?filter=5');
|
| 66 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 67 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 68 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 69 |
+
self::addDefine('YCD_VERSION_PRO', 1.56);
|
| 70 |
+
self::addDefine('YCD_VERSION', 1.70);
|
| 71 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 72 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 73 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
config/optionsConfig.php
CHANGED
|
@@ -163,6 +163,7 @@ class YcdCountdownOptionsConfig {
|
|
| 163 |
|
| 164 |
// timer clock
|
| 165 |
$options[] = array('name' => 'ycd-countdown-save-duration', 'type' => 'checkbox', 'defaultValue' => '');
|
|
|
|
| 166 |
$options[] = array('name' => 'ycd-timer-hours', 'type' => 'number', 'defaultValue' => 0);
|
| 167 |
$options[] = array('name' => 'ycd-timer-minutes', 'type' => 'number', 'defaultValue' => 0);
|
| 168 |
$options[] = array('name' => 'ycd-timer-seconds', 'type' => 'number', 'defaultValue' => 30);
|
| 163 |
|
| 164 |
// timer clock
|
| 165 |
$options[] = array('name' => 'ycd-countdown-save-duration', 'type' => 'checkbox', 'defaultValue' => '');
|
| 166 |
+
$options[] = array('name' => 'ycd-countdown-save-duration-each-user', 'type' => 'checkbox', 'defaultValue' => '');
|
| 167 |
$options[] = array('name' => 'ycd-timer-hours', 'type' => 'number', 'defaultValue' => 0);
|
| 168 |
$options[] = array('name' => 'ycd-timer-minutes', 'type' => 'number', 'defaultValue' => 0);
|
| 169 |
$options[] = array('name' => 'ycd-timer-seconds', 'type' => 'number', 'defaultValue' => 30);
|
config/proOptionsConfig.php
DELETED
|
@@ -1,108 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class proOptionsConfig {
|
| 4 |
-
public function __construct() {
|
| 5 |
-
add_filter('ycdCountdownDefaultOptions', array($this, 'defaultOptions'), 1, 1);
|
| 6 |
-
}
|
| 7 |
-
|
| 8 |
-
public function defaultOptions($defaults) {
|
| 9 |
-
// flip clock
|
| 10 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-alignment', 'type' => 'text', 'defaultValue' => 'left');
|
| 11 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-year', 'type' => 'checkbox', 'defaultValue' => '');
|
| 12 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-year-text', 'type' => 'text', 'defaultValue' => __('YEARS', YCD_TEXT_DOMAIN));
|
| 13 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-week', 'type' => 'checkbox', 'defaultValue' => '');
|
| 14 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-week-text', 'type' => 'text', 'defaultValue' => __('WEEKS', YCD_TEXT_DOMAIN));
|
| 15 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-days', 'type' => 'checkbox', 'defaultValue' => 'on');
|
| 16 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-days-text', 'type' => 'text', 'defaultValue' => __('DAYS', YCD_TEXT_DOMAIN));
|
| 17 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-hours', 'type' => 'checkbox', 'defaultValue' => 'on');
|
| 18 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-hours-text', 'type' => 'text', 'defaultValue' => __('HOURS', YCD_TEXT_DOMAIN));
|
| 19 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-minutes', 'type' => 'checkbox', 'defaultValue' => 'on');
|
| 20 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-minutes-text', 'type' => 'text', 'defaultValue' => __('MINUTES', YCD_TEXT_DOMAIN));
|
| 21 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-seconds', 'type' => 'checkbox', 'defaultValue' => 'on');
|
| 22 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-seconds-text', 'type' => 'text', 'defaultValue' => __('SECONDS', YCD_TEXT_DOMAIN));
|
| 23 |
-
$defaults[] = array('name' => 'ycd-flip-countdown-expire-behavior', 'type' => 'text', 'defaultValue' => 'hideCountdown');
|
| 24 |
-
$defaults[] = array('name' => 'ycd-flip-expire-text', 'type' => 'html', 'defaultValue' => '');
|
| 25 |
-
$defaults[] = array('name' => 'ycd-flipclock-column-size', 'type' => 'html', 'defaultValue' => '1');
|
| 26 |
-
|
| 27 |
-
$defaults[] = array('name' => 'ycd-woo-countdown-position', 'type' => 'text', 'defaultValue' => 'woocommerce_single_product_summary');
|
| 28 |
-
$defaults[] = array('name' => 'ycd-woo-countdown-text-color', 'type' => 'text', 'defaultValue' => '#ffffff');
|
| 29 |
-
$defaults[] = array('name' => 'ycd-woo-countdown-font-size', 'type' => 'text', 'defaultValue' => '25');
|
| 30 |
-
$defaults[] = array('name' => 'ycd-woo-show-products', 'type' => 'text', 'defaultValue' => 'showOnAll');
|
| 31 |
-
$defaults[] = array('name' => 'ycd-woo-enable-to-products', 'type' => 'checkbox', 'defaultValue' => '');
|
| 32 |
-
$defaults[] = array('name' => 'ycd-woo-selected-products', 'type' => 'html', 'defaultValue' => '');
|
| 33 |
-
$defaults[] = array('name' => 'ycd-woo-countdown-after-countdown', 'type' => 'html', 'defaultValue' => '');
|
| 34 |
-
$defaults[] = array('name' => 'ycd-woo-countdown-before-countdown', 'type' => 'html', 'defaultValue' => '');
|
| 35 |
-
|
| 36 |
-
$defaults[] = array('name' => 'ycd-schedule-start-from', 'type' => 'html', 'defaultValue' => '10:00');
|
| 37 |
-
$defaults[] = array('name' => 'ycd-schedule-end-to', 'type' => 'html', 'defaultValue' => '18:00');
|
| 38 |
-
$defaults[] = array('name' => 'ycd-schedule-time-zone', 'type' => 'html', 'defaultValue' => 'Europe/London');
|
| 39 |
-
|
| 40 |
-
$defaults[] = array('name' => 'ycd-progress-main-color', 'type' => 'html', 'defaultValue' => '#0A5F44');
|
| 41 |
-
$defaults[] = array('name' => 'ycd-progress-color', 'type' => 'html', 'defaultValue' => '#CBEA00');
|
| 42 |
-
$defaults[] = array('name' => 'ycd-progress-text-color', 'type' => 'html', 'defaultValue' => '#ffffff');
|
| 43 |
-
$defaults[] = array('name' => 'ycd-progress-width', 'type' => 'html', 'defaultValue' => '90%');
|
| 44 |
-
$defaults[] = array('name' => 'ycd-progress-height', 'type' => 'html', 'defaultValue' => '22px');
|
| 45 |
-
$defaults[] = array('name' => 'ycd-progress-height', 'type' => 'html', 'defaultValue' => '22px');
|
| 46 |
-
|
| 47 |
-
$defaults[] = array('name' => 'ycd-clock-mode', 'type' => 'html', 'defaultValue' => '24');
|
| 48 |
-
$defaults[] = array('name' => 'ycd-clock1-indicate-color', 'type' => 'html', 'defaultValue' => '#222');
|
| 49 |
-
$defaults[] = array('name' => 'ycd-clock1-dial1-color', 'type' => 'html', 'defaultValue' => '#666600');
|
| 50 |
-
$defaults[] = array('name' => 'ycd-clock1-dial2-color', 'type' => 'html', 'defaultValue' => '#81812e');
|
| 51 |
-
$defaults[] = array('name' => 'ycd-clock1-dial3-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 52 |
-
$defaults[] = array('name' => 'ycd-clock1-date-color', 'type' => 'html', 'defaultValue' => '#999');
|
| 53 |
-
$defaults[] = array('name' => 'ycd-clock1-time-color', 'type' => 'html', 'defaultValue' => '#333');
|
| 54 |
-
|
| 55 |
-
$defaults[] = array('name' => 'ycd-clock2-indicate-color', 'type' => 'html', 'defaultValue' => '#222');
|
| 56 |
-
$defaults[] = array('name' => 'ycd-clock2-dial1-color', 'type' => 'html', 'defaultValue' => '#666600');
|
| 57 |
-
$defaults[] = array('name' => 'ycd-clock2-dial2-color', 'type' => 'html', 'defaultValue' => '#81812e');
|
| 58 |
-
$defaults[] = array('name' => 'ycd-clock2-dial3-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 59 |
-
$defaults[] = array('name' => 'ycd-clock2-date-color', 'type' => 'html', 'defaultValue' => '#999');
|
| 60 |
-
$defaults[] = array('name' => 'ycd-clock2-time-color', 'type' => 'html', 'defaultValue' => '#333');
|
| 61 |
-
|
| 62 |
-
$defaults[] = array('name' => 'ycd-clock3-indicate-color', 'type' => 'html', 'defaultValue' => '#222');
|
| 63 |
-
$defaults[] = array('name' => 'ycd-clock3-dial1-color', 'type' => 'html', 'defaultValue' => '#666600');
|
| 64 |
-
$defaults[] = array('name' => 'ycd-clock3-dial2-color', 'type' => 'html', 'defaultValue' => '#81812e');
|
| 65 |
-
$defaults[] = array('name' => 'ycd-clock3-dial3-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 66 |
-
$defaults[] = array('name' => 'ycd-clock3-date-color', 'type' => 'html', 'defaultValue' => '#999');
|
| 67 |
-
$defaults[] = array('name' => 'ycd-clock3-time-color', 'type' => 'html', 'defaultValue' => '#333');
|
| 68 |
-
|
| 69 |
-
$defaults[] = array('name' => 'ycd-clock4-indicate-color', 'type' => 'html', 'defaultValue' => '#222');
|
| 70 |
-
$defaults[] = array('name' => 'ycd-clock4-dial1-color', 'type' => 'html', 'defaultValue' => '#666600');
|
| 71 |
-
$defaults[] = array('name' => 'ycd-clock4-dial2-color', 'type' => 'html', 'defaultValue' => '#81812e');
|
| 72 |
-
$defaults[] = array('name' => 'ycd-clock4-dial4-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 73 |
-
$defaults[] = array('name' => 'ycd-clock4-date-color', 'type' => 'html', 'defaultValue' => '#999');
|
| 74 |
-
$defaults[] = array('name' => 'ycd-clock4-time-color', 'type' => 'html', 'defaultValue' => '#333');
|
| 75 |
-
|
| 76 |
-
$defaults[] = array('name' => 'ycd-clock5-indicate-color', 'type' => 'html', 'defaultValue' => '#222');
|
| 77 |
-
$defaults[] = array('name' => 'ycd-clock5-dial1-color', 'type' => 'html', 'defaultValue' => '#666600');
|
| 78 |
-
$defaults[] = array('name' => 'ycd-clock5-dial2-color', 'type' => 'html', 'defaultValue' => '#81812e');
|
| 79 |
-
$defaults[] = array('name' => 'ycd-clock5-dial3-color', 'type' => 'html', 'defaultValue' => '#333333');
|
| 80 |
-
$defaults[] = array('name' => 'ycd-clock5-dial4-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 81 |
-
$defaults[] = array('name' => 'ycd-clock5-date-color', 'type' => 'html', 'defaultValue' => '#999');
|
| 82 |
-
$defaults[] = array('name' => 'ycd-clock5-time-color', 'type' => 'html', 'defaultValue' => '#ccc');
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
$defaults[] = array('name' => 'ycd-clock6-indicate-color', 'type' => 'html', 'defaultValue' => '#222');
|
| 86 |
-
$defaults[] = array('name' => 'ycd-clock6-dial1-color', 'type' => 'html', 'defaultValue' => '#666600');
|
| 87 |
-
$defaults[] = array('name' => 'ycd-clock6-dial2-color', 'type' => 'html', 'defaultValue' => '#81812e');
|
| 88 |
-
$defaults[] = array('name' => 'ycd-clock6-dial3-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 89 |
-
$defaults[] = array('name' => 'ycd-clock6-dial4-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 90 |
-
$defaults[] = array('name' => 'ycd-clock6-date-color', 'type' => 'html', 'defaultValue' => '#999');
|
| 91 |
-
$defaults[] = array('name' => 'ycd-clock6-time-color', 'type' => 'html', 'defaultValue' => '#ccc');
|
| 92 |
-
|
| 93 |
-
$defaults[] = array('name' => 'ycd-clock7-indicate-color', 'type' => 'html', 'defaultValue' => '#222');
|
| 94 |
-
$defaults[] = array('name' => 'ycd-clock7-dial1-color', 'type' => 'html', 'defaultValue' => '#666600');
|
| 95 |
-
$defaults[] = array('name' => 'ycd-clock7-dial2-color', 'type' => 'html', 'defaultValue' => '#81812e');
|
| 96 |
-
$defaults[] = array('name' => 'ycd-clock7-dial3-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 97 |
-
$defaults[] = array('name' => 'ycd-clock7-dial4-color', 'type' => 'html', 'defaultValue' => '#9d9d5c');
|
| 98 |
-
$defaults[] = array('name' => 'ycd-clock7-date-color', 'type' => 'html', 'defaultValue' => '#999');
|
| 99 |
-
$defaults[] = array('name' => 'ycd-clock7-time-color', 'type' => 'html', 'defaultValue' => '#ccc');
|
| 100 |
-
|
| 101 |
-
$defaults[] = array('name' => 'ycd-countdown-enable-progress', 'type' => 'checkbox', 'defaultValue' => '');
|
| 102 |
-
$defaults[] = array('name' => 'ycd-countdown-bg-video', 'type' => 'checkbox', 'defaultValue' => '');
|
| 103 |
-
|
| 104 |
-
return $defaults;
|
| 105 |
-
}
|
| 106 |
-
}
|
| 107 |
-
|
| 108 |
-
new proOptionsConfig();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
countdown-builder.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/**
|
| 3 |
* Plugin Name: Countdown builder
|
| 4 |
* Description: The best countdown plugin
|
| 5 |
-
* Version: 1.
|
| 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.7.0
|
| 6 |
* Author: Adam Skaat
|
| 7 |
* Author URI: https://edmonsoft.com/countdown
|
| 8 |
* License: GPLv2
|
helpers/AdminHelper.php
CHANGED
|
@@ -1265,4 +1265,39 @@ class AdminHelper {
|
|
| 1265 |
}
|
| 1266 |
return 'https://www.youtube.com/embed/' . $youtube_id ;
|
| 1267 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1268 |
}
|
| 1265 |
}
|
| 1266 |
return 'https://www.youtube.com/embed/' . $youtube_id ;
|
| 1267 |
}
|
| 1268 |
+
|
| 1269 |
+
/**
|
| 1270 |
+
* Update options
|
| 1271 |
+
*
|
| 1272 |
+
* @since 1.6.9
|
| 1273 |
+
*
|
| 1274 |
+
* @return void
|
| 1275 |
+
*/
|
| 1276 |
+
public static function updateOption($optionKey, $optionValue)
|
| 1277 |
+
{
|
| 1278 |
+
if (is_multisite()) {
|
| 1279 |
+
update_site_option($optionKey, $optionValue);
|
| 1280 |
+
}
|
| 1281 |
+
else {
|
| 1282 |
+
update_option($optionKey, $optionValue);
|
| 1283 |
+
}
|
| 1284 |
+
}
|
| 1285 |
+
|
| 1286 |
+
public static function getOption($optionKey)
|
| 1287 |
+
{
|
| 1288 |
+
if (is_multisite()) {
|
| 1289 |
+
return get_site_option($optionKey);
|
| 1290 |
+
}
|
| 1291 |
+
return get_option($optionKey);
|
| 1292 |
+
}
|
| 1293 |
+
|
| 1294 |
+
public static function deleteOption($optionKey)
|
| 1295 |
+
{
|
| 1296 |
+
if (is_multisite()) {
|
| 1297 |
+
delete_site_option($optionKey);
|
| 1298 |
+
}
|
| 1299 |
+
else {
|
| 1300 |
+
delete_option($optionKey);
|
| 1301 |
+
}
|
| 1302 |
+
}
|
| 1303 |
}
|
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.
|
| 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,12 @@ 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.9 =
|
| 68 |
* Save Duration (new)
|
| 69 |
* Code optimization
|
| 3 |
Tags: countdown, timer, countdown timer
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 5.3.2
|
| 6 |
+
Stable tag: 1.7.0
|
| 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.7.0 =
|
| 68 |
+
* Save Duration For Each User (new)
|
| 69 |
+
* Admin Side Is Expired Bug Fixed
|
| 70 |
+
* Circle Countdown Popup Saving Issue Fixed
|
| 71 |
+
* Bug Fixed Related To Schedule Countdown
|
| 72 |
+
|
| 73 |
= 1.6.9 =
|
| 74 |
* Save Duration (new)
|
| 75 |
* Code optimization
|
