Version Description
- Coming Soon add Countdown (new)
- Coming Soon Headline Color (new)
- Coming Soon Message Color (new)
- Coming Soon Font Family (new)
Download this release
Release Info
| Developer | adamskaat |
| Plugin | |
| Version | 1.6.5 |
| Comparing to | |
| See all releases | |
Code changes from version 1.6.4 to 1.6.5
- assets/views/admin/comingSoon.php +3 -135
- assets/views/admin/comingSoonDesign.php +92 -0
- assets/views/admin/comingSoonHeader.php +32 -0
- assets/views/admin/comingSoonSettings.php +86 -0
- assets/views/front/comingSoonTempleate.php +8 -7
- classes/Filters.php +48 -0
- classes/countdown/ComingSoon.php +7 -1
- classes/countdown/Countdown.php +22 -0
- config/config.php +2 -2
- countdown-builder.php +1 -1
- helpers/AdminHelper.php +9 -0
- readme.txt +8 -1
assets/views/admin/comingSoon.php
CHANGED
|
@@ -12,141 +12,9 @@ $defaultData = AdminHelper::defaultData();
|
|
| 12 |
<input type="submit" class="btn btn-primary" value="Save Changes">
|
| 13 |
</div>
|
| 14 |
</div>
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
<?php wp_nonce_field('ycdSaveComingSoon'); ?>
|
| 19 |
-
<div class="row form-group">
|
| 20 |
-
<div class="col-md-6">
|
| 21 |
-
<label for="ycd-enable-coming-soon"><?php _e('Enable'); ?></label>
|
| 22 |
-
</div>
|
| 23 |
-
<div class="col-md-6">
|
| 24 |
-
<label class="ycd-switch">
|
| 25 |
-
<input type="checkbox" id="ycd-enable-coming-soon" name="ycd-enable-coming-soon" class="" <?php echo $this->getOptionValue('ycd-enable-coming-soon'); ?>>
|
| 26 |
-
<span class="ycd-slider ycd-round"></span>
|
| 27 |
-
</label>
|
| 28 |
-
</div>
|
| 29 |
-
</div>
|
| 30 |
-
<div class="row form-group">
|
| 31 |
-
<div class="col-md-6">
|
| 32 |
-
<label><?php _e('Headline'); ?></label>
|
| 33 |
-
</div>
|
| 34 |
-
<div class="col-md-6">
|
| 35 |
-
<input type="text" class="form-control" name="ycd-coming-soon-headline" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-headline'));?>">
|
| 36 |
-
</div>
|
| 37 |
-
</div>
|
| 38 |
-
<div class="row form-group">
|
| 39 |
-
<div class="col-md-6">
|
| 40 |
-
<label><?php _e('Message'); ?></label>
|
| 41 |
-
</div>
|
| 42 |
-
<div class="col-md-12">
|
| 43 |
-
<?php
|
| 44 |
-
$content = $this->getOptionValue('ycd-coming-soon-message');
|
| 45 |
-
$settings = array(
|
| 46 |
-
'wpautop' => false,
|
| 47 |
-
'tinymce' => array(
|
| 48 |
-
'width' => '100%'
|
| 49 |
-
),
|
| 50 |
-
'textarea_rows' => '18',
|
| 51 |
-
'media_buttons' => true
|
| 52 |
-
);
|
| 53 |
-
wp_editor($content, 'ycd-coming-soon-message', $settings);
|
| 54 |
-
?>
|
| 55 |
-
</div>
|
| 56 |
-
</div>
|
| 57 |
-
</div>
|
| 58 |
-
</div>
|
| 59 |
-
<div class="panel panel-default">
|
| 60 |
-
<div class="panel-heading"><?php _e('Header Settings', YCD_TEXT_DOMAIN)?></div>
|
| 61 |
-
<div class="panel-body">
|
| 62 |
-
<div class="row form-group">
|
| 63 |
-
<div class="col-md-6">
|
| 64 |
-
<label for="ycd-coming-soon-title"><?php _e('Title', YCD_TEXT_DOMAIN); ?></label>
|
| 65 |
-
</div>
|
| 66 |
-
<div class="col-md-6">
|
| 67 |
-
<input type="text" class="form-control" name="ycd-coming-soon-title" id="ycd-coming-soon-title" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-title'));?>">
|
| 68 |
-
</div>
|
| 69 |
-
</div>
|
| 70 |
-
<div class="row form-group">
|
| 71 |
-
<div class="col-md-6">
|
| 72 |
-
<label for="ycd-coming-soon-seo-description"><?php _e('SEO Meta Description', YCD_TEXT_DOMAIN); ?></label>
|
| 73 |
-
</div>
|
| 74 |
-
<div class="col-md-6">
|
| 75 |
-
<textarea name="ycd-coming-soon-seo-description" id="ycd-coming-soon-seo-description" class="form-control"><?php echo esc_attr($this->getOptionValue('ycd-coming-soon-seo-description'));?></textarea>
|
| 76 |
-
</div>
|
| 77 |
-
</div>
|
| 78 |
-
<div class="row form-group">
|
| 79 |
-
<div class="col-md-6">
|
| 80 |
-
<label for="ycd-coming-soon-favicon"><?php _e('Favicon', YCD_TEXT_DOMAIN); ?></label>
|
| 81 |
-
</div>
|
| 82 |
-
<div class="col-md-4">
|
| 83 |
-
<input type="text" class="form-control" name="ycd-coming-soon-favicon" id="ycd-coming-soon-favicon" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-favicon'));?>">
|
| 84 |
-
</div>
|
| 85 |
-
<div class="col-md-2">
|
| 86 |
-
<button class="js-ycd-image-btn btn btn-primary" data-src-id="ycd-coming-soon-favicon"><?php _e('Select Image', YCD_TEXT_DOMAIN); ?></button>
|
| 87 |
-
</div>
|
| 88 |
-
</div>
|
| 89 |
-
</div>
|
| 90 |
-
</div>
|
| 91 |
-
<div class="panel panel-default">
|
| 92 |
-
<div class="panel-heading"><?php _e('Design', YCD_TEXT_DOMAIN)?></div>
|
| 93 |
-
<div class="panel-body ycd-bootstrap-wrapper">
|
| 94 |
-
<div class="row form-group">
|
| 95 |
-
<div class="col-md-6">
|
| 96 |
-
<label for="ycd-coming-soon-title"><?php _e('Background Color', YCD_TEXT_DOMAIN); ?></label>
|
| 97 |
-
</div>
|
| 98 |
-
<div class="col-md-6">
|
| 99 |
-
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
| 100 |
-
<input type="text" id="ycd-coming-soon-background-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-coming-soon-background-color" class="minicolors-input form-control ycd-coming-soon-color" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-background-color')); ?>">
|
| 101 |
-
</div>
|
| 102 |
-
</div>
|
| 103 |
-
</div>
|
| 104 |
-
<div class="row form-group">
|
| 105 |
-
<div class="col-md-6">
|
| 106 |
-
<label for="ycd-coming-soon-bg-image" class="ycd-label-of-switch"><?php _e('Background Image', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
| 107 |
-
</div>
|
| 108 |
-
<div class="col-md-6 ycd-circles-width-wrapper ycd-option-wrapper<?php echo $isPro; ?>">
|
| 109 |
-
<label class="ycd-switch">
|
| 110 |
-
<input type="checkbox" id="ycd-coming-soon-bg-image" name="ycd-coming-soon-bg-image" class="ycd-accordion-checkbox js-ycd-bg-image" <?php echo $this->getOptionValue('ycd-coming-soon-bg-image'); ?>>
|
| 111 |
-
<span class="ycd-slider ycd-round"></span>
|
| 112 |
-
</label>
|
| 113 |
-
</div>
|
| 114 |
-
</div>
|
| 115 |
-
<div class="ycd-accordion-content ycd-hide-content">
|
| 116 |
-
<div class="row form-group">
|
| 117 |
-
<div class="col-md-6">
|
| 118 |
-
<label for="" class="ycd-label-of-select"><?php _e('Background Size', YCD_TEXT_DOMAIN); ?></label>
|
| 119 |
-
</div>
|
| 120 |
-
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 121 |
-
<?php echo AdminHelper::selectBox($defaultData['bg-image-size'], esc_attr($this->getOPtionValue('ycd-coming-soon-image-size')), array('name' => 'ycd-coming-soon-image-size', 'class' => 'js-ycd-select js-ycd-bg-size')); ?>
|
| 122 |
-
</div>
|
| 123 |
-
</div>
|
| 124 |
-
<div class="row form-group">
|
| 125 |
-
<div class="col-md-6">
|
| 126 |
-
<label for="" class="ycd-label-of-select"><?php _e('Background Repeat', YCD_TEXT_DOMAIN); ?></label>
|
| 127 |
-
</div>
|
| 128 |
-
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 129 |
-
<?php echo AdminHelper::selectBox($defaultData['bg-image-repeat'], esc_attr($this->getOPtionValue('ycd-coming-soon-bg-image-repeat')), array('name' => 'ycd-coming-soon-bg-image-repeat', 'class' => 'js-ycd-select js-bg-image-repeat')); ?>
|
| 130 |
-
</div>
|
| 131 |
-
</div>
|
| 132 |
-
<div class="row form-group">
|
| 133 |
-
<div class="col-md-6">
|
| 134 |
-
<input id="js-coming-soon-upload-image-button" class="js-ycd-image-btn btn btn-primary" data-src-id="ycd-coming-soon-bg-image-url" type="button" value="<?php _e('Select Image', YCD_TEXT_DOMAIN)?>">
|
| 135 |
-
</div>
|
| 136 |
-
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 137 |
-
<input type="url" name="ycd-coming-soon-bg-image-url" id="ycd-coming-soon-bg-image-url" class="form-control" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-bg-image-url')); ?>">
|
| 138 |
-
</div>
|
| 139 |
-
</div>
|
| 140 |
-
</div>
|
| 141 |
-
<?php if(YCD_PKG_VERSION == YCD_FREE_VERSION): ?>
|
| 142 |
-
<a href="<?= YCD_COUNTDOWN_PRO_URL; ?>" target="_blank">
|
| 143 |
-
<div class="ycd-pro ycd-pro-options-div">
|
| 144 |
-
<p class="ycd-pro-options-title">PRO Features</p>
|
| 145 |
-
</div>
|
| 146 |
-
</a>
|
| 147 |
-
<?php endif;?>
|
| 148 |
-
</div>
|
| 149 |
-
</div>
|
| 150 |
</div>
|
| 151 |
<div class="col-lg-6">
|
| 152 |
</div>
|
| 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>
|
assets/views/admin/comingSoonDesign.php
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
use ycd\AdminHelper;
|
| 3 |
+
$defaultData = AdminHelper::defaultData();
|
| 4 |
+
$proSpan = '';
|
| 5 |
+
?>
|
| 6 |
+
<div class="panel panel-default">
|
| 7 |
+
<div class="panel-heading"><?php _e('Design', YCD_TEXT_DOMAIN)?></div>
|
| 8 |
+
<div class="panel-body ycd-bootstrap-wrapper">
|
| 9 |
+
<div class="row form-group">
|
| 10 |
+
<div class="col-md-6">
|
| 11 |
+
<label for="ycd-coming-soon-title"><?php _e('Background Color', YCD_TEXT_DOMAIN); ?></label>
|
| 12 |
+
</div>
|
| 13 |
+
<div class="col-md-6">
|
| 14 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
| 15 |
+
<input type="text" id="ycd-coming-soon-background-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-coming-soon-background-color" class="minicolors-input form-control ycd-coming-soon-color" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-background-color')); ?>">
|
| 16 |
+
</div>
|
| 17 |
+
</div>
|
| 18 |
+
</div>
|
| 19 |
+
<div class="row form-group">
|
| 20 |
+
<div class="col-md-6">
|
| 21 |
+
<label for="ycd-coming-headline-color"><?php _e('Headline Color', YCD_TEXT_DOMAIN); ?></label>
|
| 22 |
+
</div>
|
| 23 |
+
<div class="col-md-6">
|
| 24 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
| 25 |
+
<input type="text" id="ycd-coming-headline-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-coming-headline-color" class="minicolors-input form-control ycd-coming-soon-color" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-headline-color')); ?>">
|
| 26 |
+
</div>
|
| 27 |
+
</div>
|
| 28 |
+
</div>
|
| 29 |
+
<div class="row form-group">
|
| 30 |
+
<div class="col-md-6">
|
| 31 |
+
<label for="ycd-coming-headline-color"><?php _e('Message Color', YCD_TEXT_DOMAIN); ?></label>
|
| 32 |
+
</div>
|
| 33 |
+
<div class="col-md-6">
|
| 34 |
+
<div class="minicolors minicolors-theme-default minicolors-position-bottom minicolors-position-left">
|
| 35 |
+
<input type="text" id="ycd-coming-message-color" placeholder="<?php _e('Select color', YCD_TEXT_DOMAIN)?>" name="ycd-coming-message-color" class="minicolors-input form-control ycd-coming-soon-color" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-message-color')); ?>">
|
| 36 |
+
</div>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
<div class="row form-group">
|
| 40 |
+
<div class="col-md-6">
|
| 41 |
+
<label for="ycd-coming-headline-color"><?php _e('Font Family', YCD_TEXT_DOMAIN); ?></label>
|
| 42 |
+
</div>
|
| 43 |
+
<div class="col-md-6">
|
| 44 |
+
<?php echo AdminHelper::selectBox($defaultData['font-family'], esc_attr($this->getOptionValue('ycd-coming-soon-page-font-family')), array('name' => 'ycd-coming-soon-page-font-family', 'class' => 'js-ycd-select js-countdown-font-family')); ?>
|
| 45 |
+
</div>
|
| 46 |
+
</div>
|
| 47 |
+
<div class="row form-group">
|
| 48 |
+
<div class="col-md-6">
|
| 49 |
+
<label for="ycd-coming-soon-bg-image" class="ycd-label-of-switch"><?php _e('Background Image', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
| 50 |
+
</div>
|
| 51 |
+
<div class="col-md-6 ycd-circles-width-wrapper ycd-option-wrapper<?php echo $isPro; ?>">
|
| 52 |
+
<label class="ycd-switch">
|
| 53 |
+
<input type="checkbox" id="ycd-coming-soon-bg-image" name="ycd-coming-soon-bg-image" class="ycd-accordion-checkbox js-ycd-bg-image" <?php echo $this->getOptionValue('ycd-coming-soon-bg-image'); ?>>
|
| 54 |
+
<span class="ycd-slider ycd-round"></span>
|
| 55 |
+
</label>
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
<div class="ycd-accordion-content ycd-hide-content">
|
| 59 |
+
<div class="row form-group">
|
| 60 |
+
<div class="col-md-6">
|
| 61 |
+
<label for="" class="ycd-label-of-select"><?php _e('Background Size', YCD_TEXT_DOMAIN); ?></label>
|
| 62 |
+
</div>
|
| 63 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 64 |
+
<?php echo AdminHelper::selectBox($defaultData['bg-image-size'], esc_attr($this->getOPtionValue('ycd-coming-soon-image-size')), array('name' => 'ycd-coming-soon-image-size', 'class' => 'js-ycd-select js-ycd-bg-size')); ?>
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
<div class="row form-group">
|
| 68 |
+
<div class="col-md-6">
|
| 69 |
+
<label for="" class="ycd-label-of-select"><?php _e('Background Repeat', YCD_TEXT_DOMAIN); ?></label>
|
| 70 |
+
</div>
|
| 71 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 72 |
+
<?php echo AdminHelper::selectBox($defaultData['bg-image-repeat'], esc_attr($this->getOPtionValue('ycd-coming-soon-bg-image-repeat')), array('name' => 'ycd-coming-soon-bg-image-repeat', 'class' => 'js-ycd-select js-bg-image-repeat')); ?>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
<div class="row form-group">
|
| 76 |
+
<div class="col-md-6">
|
| 77 |
+
<input id="js-coming-soon-upload-image-button" class="js-ycd-image-btn btn btn-primary" data-src-id="ycd-coming-soon-bg-image-url" type="button" value="<?php _e('Select Image', YCD_TEXT_DOMAIN)?>">
|
| 78 |
+
</div>
|
| 79 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 80 |
+
<input type="url" name="ycd-coming-soon-bg-image-url" id="ycd-coming-soon-bg-image-url" class="form-control" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-bg-image-url')); ?>">
|
| 81 |
+
</div>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
<?php if(YCD_PKG_VERSION == YCD_FREE_VERSION): ?>
|
| 85 |
+
<a href="<?= YCD_COUNTDOWN_PRO_URL; ?>" target="_blank">
|
| 86 |
+
<div class="ycd-pro ycd-pro-options-div">
|
| 87 |
+
<p class="ycd-pro-options-title">PRO Features</p>
|
| 88 |
+
</div>
|
| 89 |
+
</a>
|
| 90 |
+
<?php endif;?>
|
| 91 |
+
</div>
|
| 92 |
+
</div>
|
assets/views/admin/comingSoonHeader.php
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div class="panel panel-default">
|
| 2 |
+
<div class="panel-heading"><?php _e('Header Settings', YCD_TEXT_DOMAIN)?></div>
|
| 3 |
+
<div class="panel-body">
|
| 4 |
+
<div class="row form-group">
|
| 5 |
+
<div class="col-md-6">
|
| 6 |
+
<label for="ycd-coming-soon-title"><?php _e('Title', YCD_TEXT_DOMAIN); ?></label>
|
| 7 |
+
</div>
|
| 8 |
+
<div class="col-md-6">
|
| 9 |
+
<input type="text" class="form-control" name="ycd-coming-soon-title" id="ycd-coming-soon-title" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-title'));?>">
|
| 10 |
+
</div>
|
| 11 |
+
</div>
|
| 12 |
+
<div class="row form-group">
|
| 13 |
+
<div class="col-md-6">
|
| 14 |
+
<label for="ycd-coming-soon-seo-description"><?php _e('SEO Meta Description', YCD_TEXT_DOMAIN); ?></label>
|
| 15 |
+
</div>
|
| 16 |
+
<div class="col-md-6">
|
| 17 |
+
<textarea name="ycd-coming-soon-seo-description" id="ycd-coming-soon-seo-description" class="form-control"><?php echo esc_attr($this->getOptionValue('ycd-coming-soon-seo-description'));?></textarea>
|
| 18 |
+
</div>
|
| 19 |
+
</div>
|
| 20 |
+
<div class="row form-group">
|
| 21 |
+
<div class="col-md-6">
|
| 22 |
+
<label for="ycd-coming-soon-favicon"><?php _e('Favicon', YCD_TEXT_DOMAIN); ?></label>
|
| 23 |
+
</div>
|
| 24 |
+
<div class="col-md-4">
|
| 25 |
+
<input type="text" class="form-control" name="ycd-coming-soon-favicon" id="ycd-coming-soon-favicon" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-favicon'));?>">
|
| 26 |
+
</div>
|
| 27 |
+
<div class="col-md-2">
|
| 28 |
+
<button class="js-ycd-image-btn btn btn-primary" data-src-id="ycd-coming-soon-favicon"><?php _e('Select Image', YCD_TEXT_DOMAIN); ?></button>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
</div>
|
| 32 |
+
</div>
|
assets/views/admin/comingSoonSettings.php
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
use ycd\AdminHelper;
|
| 3 |
+
$defaultData = AdminHelper::defaultData();
|
| 4 |
+
$createCountdown = YCD_COUNTDOWN_ADMIN_URL.'edit.php?post_type='.YCD_COUNTDOWN_POST_TYPE.'&page='.YCD_COUNTDOWN_POST_TYPE;
|
| 5 |
+
$countdownsIdAndTitle = \ycd\Countdown::getCountdownsIdAndTitle();
|
| 6 |
+
?>
|
| 7 |
+
<div class="panel panel-default">
|
| 8 |
+
<div class="panel-heading"><?php _e('Settings', YCD_TEXT_DOMAIN)?></div>
|
| 9 |
+
<div class="panel-body">
|
| 10 |
+
<?php wp_nonce_field('ycdSaveComingSoon'); ?>
|
| 11 |
+
<div class="row form-group">
|
| 12 |
+
<div class="col-md-6">
|
| 13 |
+
<label for="ycd-enable-coming-soon"><?php _e('Enable'); ?></label>
|
| 14 |
+
</div>
|
| 15 |
+
<div class="col-md-6">
|
| 16 |
+
<label class="ycd-switch">
|
| 17 |
+
<input type="checkbox" id="ycd-enable-coming-soon" name="ycd-enable-coming-soon" class="" <?php echo $this->getOptionValue('ycd-enable-coming-soon'); ?>>
|
| 18 |
+
<span class="ycd-slider ycd-round"></span>
|
| 19 |
+
</label>
|
| 20 |
+
</div>
|
| 21 |
+
</div>
|
| 22 |
+
<div class="row form-group">
|
| 23 |
+
<div class="col-md-6">
|
| 24 |
+
<label><?php _e('Headline'); ?></label>
|
| 25 |
+
</div>
|
| 26 |
+
<div class="col-md-6">
|
| 27 |
+
<input type="text" class="form-control" name="ycd-coming-soon-headline" value="<?php echo esc_attr($this->getOptionValue('ycd-coming-soon-headline'));?>">
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
<div class="row form-group">
|
| 31 |
+
<div class="col-md-6">
|
| 32 |
+
<label><?php _e('Message'); ?></label>
|
| 33 |
+
</div>
|
| 34 |
+
<div class="col-md-12">
|
| 35 |
+
<?php
|
| 36 |
+
$content = $this->getOptionValue('ycd-coming-soon-message');
|
| 37 |
+
$settings = array(
|
| 38 |
+
'wpautop' => false,
|
| 39 |
+
'tinymce' => array(
|
| 40 |
+
'width' => '100%'
|
| 41 |
+
),
|
| 42 |
+
'textarea_rows' => '18',
|
| 43 |
+
'media_buttons' => true
|
| 44 |
+
);
|
| 45 |
+
wp_editor($content, 'ycd-coming-soon-message', $settings);
|
| 46 |
+
?>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
<div class="row form-group">
|
| 50 |
+
<div class="col-md-6">
|
| 51 |
+
<label for="ycd-coming-soon-bg-image" class="ycd-label-of-switch"><?php _e('Add Countdown', YCD_TEXT_DOMAIN); echo $proSpan; ?></label>
|
| 52 |
+
</div>
|
| 53 |
+
<div class="col-md-6 ycd-circles-width-wrapper ycd-option-wrapper<?php echo $isPro; ?>">
|
| 54 |
+
<label class="ycd-switch">
|
| 55 |
+
<input type="checkbox" id="ycd-coming-soon-add-countdown" name="ycd-coming-soon-add-countdown" class="ycd-accordion-checkbox" <?php echo $this->getOptionValue('ycd-coming-soon-add-countdown'); ?>>
|
| 56 |
+
<span class="ycd-slider ycd-round"></span>
|
| 57 |
+
</label>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
+
<div class="ycd-accordion-content ycd-hide-content">
|
| 61 |
+
<div class="row form-group">
|
| 62 |
+
<div class="col-md-6">
|
| 63 |
+
<label for="" class="ycd-label-of-select"><?php _e('Select Countdown', YCD_TEXT_DOMAIN); ?></label>
|
| 64 |
+
</div>
|
| 65 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 66 |
+
<?php
|
| 67 |
+
if (count(array_keys($countdownsIdAndTitle)) <= 1) {
|
| 68 |
+
echo '<a href="'.$createCountdown.'">Create Countdown</a>';
|
| 69 |
+
}
|
| 70 |
+
else {
|
| 71 |
+
echo AdminHelper::selectBox($countdownsIdAndTitle, esc_attr($this->getOptionValue('ycd-coming-soon-countdown')), array('name' => 'ycd-coming-soon-countdown', 'class' => 'js-ycd-select'));
|
| 72 |
+
}
|
| 73 |
+
?>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
<div class="row form-group">
|
| 77 |
+
<div class="col-md-6">
|
| 78 |
+
<label for="" class="ycd-label-of-select"><?php _e('Position', YCD_TEXT_DOMAIN); ?></label>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="col-md-6 ycd-circles-width-wrapper">
|
| 81 |
+
<?php echo AdminHelper::selectBox($defaultData['coming-soon-countdown-position'], esc_attr($this->getOPtionValue('ycd-coming-soon-countdown-position')), array('name' => 'ycd-coming-soon-countdown-position', 'class' => 'js-ycd-select')); ?>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
assets/views/front/comingSoonTempleate.php
CHANGED
|
@@ -8,12 +8,13 @@
|
|
| 8 |
</head>
|
| 9 |
<body class="ycd-body">
|
| 10 |
<div style="text-align: center">
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
</div>
|
|
|
|
| 18 |
</body>
|
| 19 |
-
</html>
|
| 8 |
</head>
|
| 9 |
<body class="ycd-body">
|
| 10 |
<div style="text-align: center">
|
| 11 |
+
<div class="ycd-coming-soon-before-header"><?php echo apply_filters('YcdComingSoonPageBeforeHeader', '', $comingSoonThis); ?></div>
|
| 12 |
+
<div class="ycd-coming-soon-header"><?php echo apply_filters('YcdComingSoonPageHeader', '', $comingSoonThis); ?></div>
|
| 13 |
+
<div class="ycd-coming-soon-after-header"><?php echo apply_filters('YcdComingSoonPageAfterHeader', '', $comingSoonThis); ?></div>
|
| 14 |
+
<div class="ycd-coming-soon-before-message"><?php echo apply_filters('YcdComingSoonPageBeforeMessage', '', $comingSoonThis); ?></div>
|
| 15 |
+
<div class="ycd-coming-soon-message"><?php echo apply_filters('YcdComingSoonPageMessage', '', $comingSoonThis); ?></div>
|
| 16 |
+
<div class="ycd-coming-soon-after-message"><?php echo apply_filters('YcdComingSoonPageAfterMessage', '', $comingSoonThis); ?></div>
|
| 17 |
</div>
|
| 18 |
+
<?php wp_footer(); ?>
|
| 19 |
</body>
|
| 20 |
+
</html>
|
classes/Filters.php
CHANGED
|
@@ -18,7 +18,55 @@ class Filters {
|
|
| 18 |
add_filter('ycdConditionsDisplayKeys', array($this, 'addTargetParams'), 1, 1);
|
| 19 |
add_filter('ycdConditionsDisplayAttributes', array($this, 'attrsDisplaySettings'), 1, 1);
|
| 20 |
add_action( 'template_redirect', array(&$this,'theContent'),9);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
public function theContent() {
|
| 24 |
$comingSoon = new ComingSoon();
|
| 18 |
add_filter('ycdConditionsDisplayKeys', array($this, 'addTargetParams'), 1, 1);
|
| 19 |
add_filter('ycdConditionsDisplayAttributes', array($this, 'attrsDisplaySettings'), 1, 1);
|
| 20 |
add_action( 'template_redirect', array(&$this,'theContent'),9);
|
| 21 |
+
|
| 22 |
+
add_filter('YcdComingSoonPageBeforeHeader', array($this, 'beforeHeader'), 10, 2);
|
| 23 |
+
add_filter('YcdComingSoonPageHeader', array($this, 'pageHeader'), 10, 2);
|
| 24 |
+
add_filter('YcdComingSoonPageAfterHeader', array($this, 'afterPageHeader'), 10, 2);
|
| 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;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
public function pageHeader($content, $obj) {
|
| 36 |
+
$content .= $this->comingSoonCountdown($obj, 'YcdComingSoonPageHeader');
|
| 37 |
+
return $content;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public function afterPageHeader($content, $obj) {
|
| 41 |
+
$content .= $this->comingSoonCountdown($obj, 'YcdComingSoonPageAfterHeader');
|
| 42 |
+
return $content;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
public function beforeMessage($content, $obj) {
|
| 46 |
+
$content .= $this->comingSoonCountdown($obj, 'YcdComingSoonPageBeforeMessage');
|
| 47 |
+
return $content;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
public function pageMessage($content, $obj) {
|
| 51 |
+
$content .= $this->comingSoonCountdown($obj, 'YcdComingSoonPageMessage');
|
| 52 |
+
return $content;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
public function afterPageMessage($content, $obj) {
|
| 56 |
+
$content .= $this->comingSoonCountdown($obj, 'YcdComingSoonPageAfterMessage');
|
| 57 |
+
return $content;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
private function comingSoonCountdown($obj, $filterName) {
|
| 61 |
+
$enable = $obj->getOptionValue('ycd-coming-soon-add-countdown');
|
| 62 |
+
$id = $obj->getOptionValue('ycd-coming-soon-countdown');
|
| 63 |
+
$position = $obj->getOptionValue('ycd-coming-soon-countdown-position');
|
| 64 |
+
if ($enable && $position == $filterName) {
|
| 65 |
+
return do_shortcode('[ycd_countdown id='.$id.']');
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
return '';
|
| 69 |
+
}
|
| 70 |
|
| 71 |
public function theContent() {
|
| 72 |
$comingSoon = new ComingSoon();
|
classes/countdown/ComingSoon.php
CHANGED
|
@@ -66,7 +66,13 @@ Class ComingSoon {
|
|
| 66 |
$defaults['ycd-coming-soon-bg-image-repeat'] = '';
|
| 67 |
$defaults['ycd-coming-soon-bg-image-url'] = '';
|
| 68 |
$defaults['ycd-coming-soon-background-color'] = '';
|
| 69 |
-
$defaults['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
return apply_filters('ycdComingSoonDefaults', $defaults);
|
| 72 |
}
|
| 66 |
$defaults['ycd-coming-soon-bg-image-repeat'] = '';
|
| 67 |
$defaults['ycd-coming-soon-bg-image-url'] = '';
|
| 68 |
$defaults['ycd-coming-soon-background-color'] = '';
|
| 69 |
+
$defaults['ycd-coming-soon-add-countdown'] = '';
|
| 70 |
+
$defaults['ycd-coming-soon-countdown'] = '';
|
| 71 |
+
$defaults['ycd-coming-soon-countdown-position'] = '';
|
| 72 |
+
$defaults['ycd-coming-headline-color'] = '#000000';
|
| 73 |
+
$defaults['ycd-coming-message-color'] = '#000000';
|
| 74 |
+
$defaults['ycd-coming-soon-page-font-family'] = '';
|
| 75 |
+
$defaults['checkboxes'] = array('ycd-enable-coming-soon', 'ycd-coming-soon-bg-image', 'ycd-coming-soon-add-countdown');
|
| 76 |
|
| 77 |
return apply_filters('ycdComingSoonDefaults', $defaults);
|
| 78 |
}
|
classes/countdown/Countdown.php
CHANGED
|
@@ -884,4 +884,26 @@ abstract class Countdown {
|
|
| 884 |
}
|
| 885 |
$this->setSavedData($savedData);
|
| 886 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 887 |
}
|
| 884 |
}
|
| 885 |
$this->setSavedData($savedData);
|
| 886 |
}
|
| 887 |
+
|
| 888 |
+
public static function getCountdownsIdAndTitle() {
|
| 889 |
+
$allCountdowns = self::getCountdownsObj();
|
| 890 |
+
$allowedTypes = array('circle');
|
| 891 |
+
$idTitles = array('' => 'Select Countdown');
|
| 892 |
+
|
| 893 |
+
foreach ($allCountdowns as $countdown) {
|
| 894 |
+
$type = $countdown->getType();
|
| 895 |
+
if (!in_array($type, $allowedTypes)) {
|
| 896 |
+
continue;
|
| 897 |
+
}
|
| 898 |
+
$id = $countdown->getId();
|
| 899 |
+
$title = $countdown->getTitle();
|
| 900 |
+
|
| 901 |
+
if (empty($title)) {
|
| 902 |
+
$title = '(no title)';
|
| 903 |
+
}
|
| 904 |
+
$idTitles[$id] = $title;
|
| 905 |
+
}
|
| 906 |
+
|
| 907 |
+
return $idTitles;
|
| 908 |
+
}
|
| 909 |
}
|
config/config.php
CHANGED
|
@@ -63,8 +63,8 @@ class YcdCountdownConfig {
|
|
| 63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 66 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
| 67 |
-
self::addDefine('YCD_VERSION', 1.
|
| 68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
| 63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 66 |
+
self::addDefine('YCD_VERSION_PRO', 1.51);
|
| 67 |
+
self::addDefine('YCD_VERSION', 1.65);
|
| 68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
countdown-builder.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/**
|
| 3 |
* Plugin Name: Countdown builder
|
| 4 |
* Description: The best countdown plugin
|
| 5 |
-
* Version: 1.6.
|
| 6 |
* Author: Adam Skaat
|
| 7 |
* Author URI: https://edmonsoft.com/countdown
|
| 8 |
* License: GPLv2
|
| 2 |
/**
|
| 3 |
* Plugin Name: Countdown builder
|
| 4 |
* Description: The best countdown plugin
|
| 5 |
+
* Version: 1.6.5
|
| 6 |
* Author: Adam Skaat
|
| 7 |
* Author URI: https://edmonsoft.com/countdown
|
| 8 |
* License: GPLv2
|
helpers/AdminHelper.php
CHANGED
|
@@ -587,6 +587,15 @@ class AdminHelper {
|
|
| 587 |
'is' => __('Is', YCD_TEXT_DOMAIN),
|
| 588 |
'isNot' => __('Is not', YCD_TEXT_DOMAIN),
|
| 589 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 590 |
|
| 591 |
return apply_filters('ycdDefaults', $data);
|
| 592 |
}
|
| 587 |
'is' => __('Is', YCD_TEXT_DOMAIN),
|
| 588 |
'isNot' => __('Is not', YCD_TEXT_DOMAIN),
|
| 589 |
);
|
| 590 |
+
|
| 591 |
+
$data['coming-soon-countdown-position'] = array(
|
| 592 |
+
'YcdComingSoonPageBeforeHeader' => 'Before Header',
|
| 593 |
+
'YcdComingSoonPageHeader' => 'Header',
|
| 594 |
+
'YcdComingSoonPageAfterHeader' => 'After Header',
|
| 595 |
+
'YcdComingSoonPageBeforeMessage' => 'Before Message',
|
| 596 |
+
'YcdComingSoonPageMessage' => 'Message',
|
| 597 |
+
'YcdComingSoonPageAfterMessage' => 'After Message',
|
| 598 |
+
);
|
| 599 |
|
| 600 |
return apply_filters('ycdDefaults', $data);
|
| 601 |
}
|
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
|
| 6 |
-
Stable tag: 1.6.
|
| 7 |
Requires PHP: 5.3
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
@@ -64,6 +64,13 @@ 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.4 =
|
| 68 |
* Coming Soon new menu type(new)
|
| 69 |
* Coming Soon background color(new)
|
| 3 |
Tags: countdown, timer, countdown timer
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 5.3
|
| 6 |
+
Stable tag: 1.6.5
|
| 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 |
+
|
| 68 |
+
= 1.6.5 =
|
| 69 |
+
* Coming Soon add Countdown (new)
|
| 70 |
+
* Coming Soon Headline Color (new)
|
| 71 |
+
* Coming Soon Message Color (new)
|
| 72 |
+
* Coming Soon Font Family (new)
|
| 73 |
+
|
| 74 |
= 1.6.4 =
|
| 75 |
* Coming Soon new menu type(new)
|
| 76 |
* Coming Soon background color(new)
|
