Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 2.6 |
Comparing to | |
See all releases |
Code changes from version 2.5.2 to 2.6
- cmp-advanced.php → cmp-coming-soon-maintenance/cmp-advanced.php +0 -0
- cmp-help.php → cmp-coming-soon-maintenance/cmp-help.php +0 -0
- cmp-settings.php → cmp-coming-soon-maintenance/cmp-settings.php +0 -0
- cmp-sidebar.php → cmp-coming-soon-maintenance/cmp-sidebar.php +1 -1
- cmp-subscribers.php → cmp-coming-soon-maintenance/cmp-subscribers.php +0 -0
- cmp-translate.php → cmp-coming-soon-maintenance/cmp-translate.php +0 -0
- cmp-upload.php → cmp-coming-soon-maintenance/cmp-upload.php +0 -0
- {css → cmp-coming-soon-maintenance/css}/animate.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/animate.min.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/cmp-admin-head.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/cmp-settings-style.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/cmp-settings-style.min.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/flatpickr.min.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/font-awesome.min.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/preview-iframe.css +0 -0
- {css → cmp-coming-soon-maintenance/css}/select2.min.css +0 -0
- {fonts → cmp-coming-soon-maintenance/fonts}/FontAwesome.otf +0 -0
- {fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.eot +0 -0
- {fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.svg +0 -0
- {fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.ttf +0 -0
- {fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.woff +0 -0
- {fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.woff2 +0 -0
- {img → cmp-coming-soon-maintenance/img}/alex.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/cmp.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/niteo.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/fabric.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/fabric_1.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/gray_sand.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/green_dust_scratch.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/mirrored_squares.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/noisy.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/photography.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/playstation.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/sakura.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/white_sand.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/patterns/white_texture.png +0 -0
- {img → cmp-coming-soon-maintenance/img}/paul.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/construct/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/construct_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/countdown/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/countdown/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/countdown_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/eclipse/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/eclipse/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/eclipse_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/fifty/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/fifty/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/fifty/screenshot3.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/fifty_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/frame/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/frame_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork/screenshot3.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_premium/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_premium/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_premium_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/orbit/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/orbit/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/orbit/screenshot3.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/orbit_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/postery/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/postery/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/postery_thumbnail.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot1.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot2.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot3.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot4.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot5.jpg +0 -0
- {img → cmp-coming-soon-maintenance/img}/thumbnails/stylo_thumbnail.jpg +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/class-cmp-customizer.php +0 -0
- cmp-coming-soon-maintenance/inc/class-cmp-feedback.php +199 -0
- {inc → cmp-coming-soon-maintenance/inc}/class-cmp-render_html.php +9 -13
- {inc → cmp-coming-soon-maintenance/inc}/class-cmp-render_settings.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/class-cmp-subscribers.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/class-cmp-translate.php +1 -1
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-background.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-background_effects.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-contact_form.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-contact_form_disabled.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-counter.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-counter_disabled.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-footer.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-footer_disabled.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-logo.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-logo_disabled.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-slider.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-slider_disabled.php +0 -0
- cmp-coming-soon-maintenance/inc/settings/settings-subscribe.php +167 -0
- {inc → cmp-coming-soon-maintenance/inc}/settings/settings-subscribe_disabled.php +0 -0
- {inc → cmp-coming-soon-maintenance/inc}/webfonts.php +0 -0
- {js → cmp-coming-soon-maintenance/js}/cmp-admin-head.js +0 -0
- {js → cmp-coming-soon-maintenance/js}/external/anime.min.js +0 -0
- {js → cmp-coming-soon-maintenance/js}/external/imagesloaded.pkgd.min.js +0 -0
- {js → cmp-coming-soon-maintenance/js}/external/uncover.js +0 -0
- {js → cmp-coming-soon-maintenance/js}/flatpickr.min.js +0 -0
- {js → cmp-coming-soon-maintenance/js}/preview-iframe.js +0 -0
- {js → cmp-coming-soon-maintenance/js}/select2.min.js +0 -0
- {js → cmp-coming-soon-maintenance/js}/settings.js +64 -0
- {js → cmp-coming-soon-maintenance/js}/settings.min.js +4 -2
- {js → cmp-coming-soon-maintenance/js}/typography.js +0 -0
- cmp-coming-soon-maintenance/js/typography.min.js +10 -0
- {js → cmp-coming-soon-maintenance/js}/vidim.min.js +0 -0
- {languages → cmp-coming-soon-maintenance/languages}/coming-soon-default.mo +0 -0
- {languages → cmp-coming-soon-maintenance/languages}/coming-soon-default.po +0 -0
- niteo-cmp.php → cmp-coming-soon-maintenance/niteo-cmp.php +185 -47
- readme.txt → cmp-coming-soon-maintenance/readme.txt +8 -1
- {themes → cmp-coming-soon-maintenance/themes}/construct.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/construct/construct-defaults.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/construct/construct-settings.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/construct/construct-theme.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/construct/img/construct_banner_full.jpg +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/construct/img/construct_banner_large.jpg +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/construct/paraxify.min.js +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/construct/style.css +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-defaults.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-settings.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-social_settings.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-theme.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown/img/countdown_banner_full.jpg +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown/img/countdown_banner_large.jpg +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/countdown/style.css +1 -0
- {themes → cmp-coming-soon-maintenance/themes}/eclipse.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/fifty.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/frame.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork/hardwork-defaults.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork/hardwork-settings.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork/hardwork-theme.php +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork/img/hardwork_banner_full.jpg +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork/img/hardwork_banner_large.jpg +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork/style.css +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/hardwork_premium.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/orbit.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/postery.txt +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/postery.zip +0 -0
- {themes → cmp-coming-soon-maintenance/themes}/stylo.txt +0 -0
- inc/settings/settings-subscribe.php +0 -101
- js/typography.min.js +0 -1
cmp-advanced.php → cmp-coming-soon-maintenance/cmp-advanced.php
RENAMED
File without changes
|
cmp-help.php → cmp-coming-soon-maintenance/cmp-help.php
RENAMED
File without changes
|
cmp-settings.php → cmp-coming-soon-maintenance/cmp-settings.php
RENAMED
File without changes
|
cmp-sidebar.php → cmp-coming-soon-maintenance/cmp-sidebar.php
RENAMED
@@ -10,7 +10,7 @@
|
|
10 |
<p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give 5%s feedback by pressing button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-star" aria-hidden="true"></i>');?></p>
|
11 |
<a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/?rate=5#new-post" target="_blank" style="text-decoration:none;">
|
12 |
|
13 |
-
<p class="button button-primary"><?php _e('
|
14 |
<i class="fa fa-star" aria-hidden="true"></i>
|
15 |
<i class="fa fa-star" aria-hidden="true"></i>
|
16 |
<span class="dashicons dashicons-star-filled"></span>
|
10 |
<p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give 5%s feedback by pressing button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-star" aria-hidden="true"></i>');?></p>
|
11 |
<a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/?rate=5#new-post" target="_blank" style="text-decoration:none;">
|
12 |
|
13 |
+
<p class="button button-primary"><?php _e('Leave Feedback', 'cmp-coming-soon-maintenance');?></p>
|
14 |
<i class="fa fa-star" aria-hidden="true"></i>
|
15 |
<i class="fa fa-star" aria-hidden="true"></i>
|
16 |
<span class="dashicons dashicons-star-filled"></span>
|
cmp-subscribers.php → cmp-coming-soon-maintenance/cmp-subscribers.php
RENAMED
File without changes
|
cmp-translate.php → cmp-coming-soon-maintenance/cmp-translate.php
RENAMED
File without changes
|
cmp-upload.php → cmp-coming-soon-maintenance/cmp-upload.php
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/animate.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/animate.min.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/cmp-admin-head.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/cmp-settings-style.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/cmp-settings-style.min.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/flatpickr.min.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/font-awesome.min.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/preview-iframe.css
RENAMED
File without changes
|
{css → cmp-coming-soon-maintenance/css}/select2.min.css
RENAMED
File without changes
|
{fonts → cmp-coming-soon-maintenance/fonts}/FontAwesome.otf
RENAMED
File without changes
|
{fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.eot
RENAMED
File without changes
|
{fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.svg
RENAMED
File without changes
|
{fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.ttf
RENAMED
File without changes
|
{fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.woff
RENAMED
File without changes
|
{fonts → cmp-coming-soon-maintenance/fonts}/fontawesome-webfont.woff2
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/alex.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/cmp.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/niteo.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/fabric.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/fabric_1.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/gray_sand.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/green_dust_scratch.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/mirrored_squares.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/noisy.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/photography.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/playstation.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/sakura.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/white_sand.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/patterns/white_texture.png
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/paul.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/construct/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/construct_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/countdown/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/countdown/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/countdown_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/eclipse/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/eclipse/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/eclipse_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/fifty/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/fifty/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/fifty/screenshot3.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/fifty_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/frame/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/frame_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork/screenshot3.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_premium/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_premium/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_premium_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/hardwork_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/orbit/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/orbit/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/orbit/screenshot3.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/orbit_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/postery/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/postery/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/postery_thumbnail.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot1.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot2.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot3.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot4.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/stylo/screenshot5.jpg
RENAMED
File without changes
|
{img → cmp-coming-soon-maintenance/img}/thumbnails/stylo_thumbnail.jpg
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/class-cmp-customizer.php
RENAMED
File without changes
|
cmp-coming-soon-maintenance/inc/class-cmp-feedback.php
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin review class.
|
4 |
+
* Prompts users to give a review of the plugin on WordPress.org after a period of usage.
|
5 |
+
*
|
6 |
+
* Heavily based on code by Rhys Wynne
|
7 |
+
* https://winwar.co.uk/2014/10/ask-wordpress-plugin-reviews-week/
|
8 |
+
*
|
9 |
+
* @version 1.0
|
10 |
+
* @copyright Copyright (c), Ryan Hellyer
|
11 |
+
* @author Ryan Hellyer <ryanhellyer@gmail.com>
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! class_exists( 'CMP_Feedback' ) ) :
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The feedback.
|
18 |
+
*/
|
19 |
+
class CMP_Feedback {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Private variables.
|
23 |
+
*
|
24 |
+
* These should be customised for each project.
|
25 |
+
*/
|
26 |
+
private $slug; // The plugin slug
|
27 |
+
private $name; // The plugin name
|
28 |
+
private $time_limit; // The time limit at which notice is shown
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Variables.
|
32 |
+
*/
|
33 |
+
public $nobug_option;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Fire the constructor up :)
|
37 |
+
*/
|
38 |
+
public function __construct( $args ) {
|
39 |
+
|
40 |
+
$this->slug = $args['slug'];
|
41 |
+
$this->name = $args['name'];
|
42 |
+
|
43 |
+
if ( isset( $args['time_limit'] ) ) {
|
44 |
+
$this->time_limit = $args['time_limit'];
|
45 |
+
} else {
|
46 |
+
$this->time_limit = WEEK_IN_SECONDS;
|
47 |
+
}
|
48 |
+
|
49 |
+
$this->nobug_option = $this->slug . '-no-bug';
|
50 |
+
|
51 |
+
// Loading main functionality
|
52 |
+
add_action( 'admin_init', array( $this, 'check_installation_date' ) );
|
53 |
+
add_action( 'admin_init', array( $this, 'set_no_bug' ), 5 );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Seconds to words.
|
58 |
+
*/
|
59 |
+
public function seconds_to_words( $seconds ) {
|
60 |
+
|
61 |
+
// Get the years
|
62 |
+
$years = ( intval( $seconds ) / YEAR_IN_SECONDS ) % 100;
|
63 |
+
if ( $years > 1 ) {
|
64 |
+
return sprintf( __( '%s years', $this->slug ), $years );
|
65 |
+
} elseif ( $years > 0) {
|
66 |
+
return __( 'a year', $this->slug );
|
67 |
+
}
|
68 |
+
|
69 |
+
// Get the weeks
|
70 |
+
$weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) % 52;
|
71 |
+
if ( $weeks > 1 ) {
|
72 |
+
return sprintf( __( '%s weeks', $this->slug ), $weeks );
|
73 |
+
} elseif ( $weeks > 0) {
|
74 |
+
return __( 'a week', $this->slug );
|
75 |
+
}
|
76 |
+
|
77 |
+
// Get the days
|
78 |
+
$days = ( intval( $seconds ) / DAY_IN_SECONDS ) % 7;
|
79 |
+
if ( $days > 1 ) {
|
80 |
+
return sprintf( __( '%s days', $this->slug ), $days );
|
81 |
+
} elseif ( $days > 0) {
|
82 |
+
return __( 'a day', $this->slug );
|
83 |
+
}
|
84 |
+
|
85 |
+
// Get the hours
|
86 |
+
$hours = ( intval( $seconds ) / HOUR_IN_SECONDS ) % 24;
|
87 |
+
if ( $hours > 1 ) {
|
88 |
+
return sprintf( __( '%s hours', $this->slug ), $hours );
|
89 |
+
} elseif ( $hours > 0) {
|
90 |
+
return __( 'an hour', $this->slug );
|
91 |
+
}
|
92 |
+
|
93 |
+
// Get the minutes
|
94 |
+
$minutes = ( intval( $seconds ) / MINUTE_IN_SECONDS ) % 60;
|
95 |
+
if ( $minutes > 1 ) {
|
96 |
+
return sprintf( __( '%s minutes', $this->slug ), $minutes );
|
97 |
+
} elseif ( $minutes > 0) {
|
98 |
+
return __( 'a minute', $this->slug );
|
99 |
+
}
|
100 |
+
|
101 |
+
// Get the seconds
|
102 |
+
$seconds = intval( $seconds ) % 60;
|
103 |
+
if ( $seconds > 1 ) {
|
104 |
+
return sprintf( __( '%s seconds', $this->slug ), $seconds );
|
105 |
+
} elseif ( $seconds > 0) {
|
106 |
+
return __( 'a second', $this->slug );
|
107 |
+
}
|
108 |
+
|
109 |
+
return;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Check date on admin initiation and add to admin notice if it was more than the time limit.
|
114 |
+
*/
|
115 |
+
public function check_installation_date() {
|
116 |
+
|
117 |
+
if ( true != get_site_option( $this->nobug_option ) ) {
|
118 |
+
|
119 |
+
// If not installation date set, then add it
|
120 |
+
$install_date = get_site_option( $this->slug . '-activation-date' );
|
121 |
+
if ( '' == $install_date ) {
|
122 |
+
add_site_option( $this->slug . '-activation-date', time() );
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
+
// If difference between install date and now is greater than time limit, then display notice
|
128 |
+
if ( ( time() - $install_date ) > $this->time_limit ) {
|
129 |
+
add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
|
130 |
+
}
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Display Admin Notice, asking for a review.
|
138 |
+
*/
|
139 |
+
public function display_admin_notice() {
|
140 |
+
|
141 |
+
$screen = get_current_screen();
|
142 |
+
if ( isset( $screen->base ) && 'plugins' == $screen->base ) {
|
143 |
+
|
144 |
+
$no_bug_url = wp_nonce_url( admin_url( '?' . $this->nobug_option . '=true' ), 'review-nonce' );
|
145 |
+
$time = $this->seconds_to_words( time() - get_site_option( $this->slug . '-activation-date' ) );
|
146 |
+
?>
|
147 |
+
|
148 |
+
<style>
|
149 |
+
.cmp-feedback.updated {border-left-color: #18a0d2;position: relative;min-height: 90px;}
|
150 |
+
.cmp-notice-icon {float: left;margin-right: 1em;margin-top: 1em;}
|
151 |
+
.cmp-leave-feedback {text-align: right;position: absolute;right: 1em;bottom: 1em;}
|
152 |
+
@media screen and (max-width: 1366px) { .cmp-leave-feedback {position: relative;bottom: initial;margin: 1em 0;} }
|
153 |
+
|
154 |
+
</style>
|
155 |
+
|
156 |
+
<div class="cmp-feedback updated">
|
157 |
+
<div class="cmp-notice-icon">
|
158 |
+
<img src="<?php echo plugins_url('../img/cmp.png', __FILE__);?>" alt="CMP Logo" class="cmp-logo">
|
159 |
+
</div>
|
160 |
+
|
161 |
+
<h3><?php _e('Do you like CMP - Coming soon & Maintenace Plugin?', 'cmp-coming-soon-maintenance');?></h3>
|
162 |
+
<span><?php printf( esc_html__( 'You have been using %1$s plugin for %2$s now! Please leave a quick review or feedback to help us grow our little plugin. Thank you.', 'cmp-coming-soon-maintenance' ), esc_html( $this->name ), esc_html( $time ) ); ?></span>
|
163 |
+
<div class="cmp-leave-feedback">
|
164 |
+
<?php printf( '<a href="%1$s" class="button button-primary cmp-feedback-button" target="_blank">%2$s</a>', esc_url( 'https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/?rate=5#new-post' ), esc_html__( 'Leave feedback', 'cmp-coming-soon-maintenance' ) ); ?>
|
165 |
+
<div><a href="<?php echo esc_url( $no_bug_url ); ?>" class="cmp-dismiss"><?php echo esc_html__( 'Dismiss', 'cmp-coming-soon-maintenance' ); ?></a></div>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
|
169 |
+
<?php
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Set the plugin to no longer bug users if user asks not to be.
|
177 |
+
*/
|
178 |
+
public function set_no_bug() {
|
179 |
+
|
180 |
+
// Bail out if not on correct page
|
181 |
+
if ( ! isset( $_GET['_wpnonce'] ) || ( ! wp_verify_nonce( $_GET['_wpnonce'], 'login-designer-feedback-nounce' ) || ! is_admin() || ! isset( $_GET[ $this->nobug_option ] ) || ! current_user_can( 'manage_options' ) ) ) {
|
182 |
+
return;
|
183 |
+
}
|
184 |
+
|
185 |
+
add_site_option( $this->nobug_option, true );
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
endif;
|
191 |
+
|
192 |
+
/*
|
193 |
+
* Instantiate the CMP_Feedback class.
|
194 |
+
*/
|
195 |
+
new CMP_Feedback( array(
|
196 |
+
'slug' => 'cmp-coming-soon-maintenance',
|
197 |
+
'name' => __( 'CMP - Coming Soon & Maintenance', 'cmp-coming-soon-maintenance' ),
|
198 |
+
'time_limit' => WEEK_IN_SECONDS,
|
199 |
+
) );
|
{inc → cmp-coming-soon-maintenance/inc}/class-cmp-render_html.php
RENAMED
@@ -10,12 +10,11 @@ class cmp_render_html extends niteo_cmp {
|
|
10 |
public function cmp_background( $niteoCS_banner, $themeslug, $overlay = false ) {
|
11 |
$size = $this->isMobile() ? 'large' : 'full';
|
12 |
$html = '';
|
13 |
-
|
14 |
-
// override background if selector preview
|
15 |
if ( isset( $_GET['background'] ) && is_numeric( $_GET['background'] ) ) {
|
16 |
$niteoCS_banner = esc_attr($_GET['background']);
|
17 |
$theme = esc_attr($_GET['theme']);
|
18 |
-
|
19 |
if ( $_GET['background'] == '1' ) {
|
20 |
// override background=1 (unsplash) to theme specific
|
21 |
switch ( $theme ) {
|
@@ -458,13 +457,13 @@ class cmp_render_html extends niteo_cmp {
|
|
458 |
}
|
459 |
|
460 |
// get translation if exists
|
461 |
-
|
462 |
$translation = json_decode( get_option('niteoCS_translation'), true );
|
463 |
-
$placeholder = isset($translation[4]['translation']) ? $translation[4]['translation'] : 'Insert your email address.';
|
464 |
-
$placeholder_firstname = isset($translation[10]['translation']) ? $translation[10]['translation'] : 'First Name';
|
465 |
-
$placeholder_lastname = isset($translation[11]['translation']) ? $translation[11]['translation'] : 'First Name';
|
466 |
-
$submit = isset($translation[8]['translation']) ? $translation[8]['translation'] : 'Submit';
|
467 |
|
|
|
468 |
$placeholder = ( ( $this->cmp_selectedTheme() == 'stylo' && !isset( $_GET['theme'] ) ) || ( isset( $_GET['theme'] ) && $_GET['theme'] == 'stylo' ) ) ? ' '.$placeholder : $placeholder;
|
469 |
$submit = ( ( $this->cmp_selectedTheme() == 'postery' && !isset( $_GET['theme'] ) ) || ( isset( $_GET['theme'] ) && $_GET['theme'] == 'postery' ) ) ? '' : $submit;
|
470 |
|
@@ -533,11 +532,11 @@ class cmp_render_html extends niteo_cmp {
|
|
533 |
|
534 |
httpRequest.open(formMethod, ajaxurl, true);
|
535 |
httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
536 |
-
httpRequest.send('action=niteo_subscribe&check=true&form_honeypot
|
537 |
}
|
538 |
|
539 |
selectButton.onclick = function(){ // If clicked on the button.
|
540 |
-
|
541 |
if ( emailInput.value != '' ) {
|
542 |
XMLhttp();
|
543 |
}
|
@@ -551,10 +550,7 @@ class cmp_render_html extends niteo_cmp {
|
|
551 |
|
552 |
/* Usage */
|
553 |
window.addEventListener("load",function(event) {
|
554 |
-
document.getElementById('submit-subscribe').onclick = function() {
|
555 |
AJAXform( 'subscribe-form', 'submit-subscribe', 'subscribe-response', 'email-subscribe', 'firstname-subscribe', 'lastname-subscribe', 'POST' );
|
556 |
-
}
|
557 |
-
|
558 |
});
|
559 |
|
560 |
</script>
|
10 |
public function cmp_background( $niteoCS_banner, $themeslug, $overlay = false ) {
|
11 |
$size = $this->isMobile() ? 'large' : 'full';
|
12 |
$html = '';
|
13 |
+
// change background to default image, if image preview background is set
|
|
|
14 |
if ( isset( $_GET['background'] ) && is_numeric( $_GET['background'] ) ) {
|
15 |
$niteoCS_banner = esc_attr($_GET['background']);
|
16 |
$theme = esc_attr($_GET['theme']);
|
17 |
+
|
18 |
if ( $_GET['background'] == '1' ) {
|
19 |
// override background=1 (unsplash) to theme specific
|
20 |
switch ( $theme ) {
|
457 |
}
|
458 |
|
459 |
// get translation if exists
|
|
|
460 |
$translation = json_decode( get_option('niteoCS_translation'), true );
|
461 |
+
$placeholder = isset($translation[4]['translation']) ? stripslashes( $translation[4]['translation'] ) : 'Insert your email address.';
|
462 |
+
$placeholder_firstname = isset($translation[10]['translation']) ? stripslashes( $translation[10]['translation'] ) : 'First Name';
|
463 |
+
$placeholder_lastname = isset($translation[11]['translation']) ? stripslashes( $translation[11]['translation'] ) : 'First Name';
|
464 |
+
$submit = isset($translation[8]['translation']) ? stripslashes( $translation[8]['translation'] ) : 'Submit';
|
465 |
|
466 |
+
// overwrite it with theme specific requirements
|
467 |
$placeholder = ( ( $this->cmp_selectedTheme() == 'stylo' && !isset( $_GET['theme'] ) ) || ( isset( $_GET['theme'] ) && $_GET['theme'] == 'stylo' ) ) ? ' '.$placeholder : $placeholder;
|
468 |
$submit = ( ( $this->cmp_selectedTheme() == 'postery' && !isset( $_GET['theme'] ) ) || ( isset( $_GET['theme'] ) && $_GET['theme'] == 'postery' ) ) ? '' : $submit;
|
469 |
|
532 |
|
533 |
httpRequest.open(formMethod, ajaxurl, true);
|
534 |
httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
535 |
+
httpRequest.send('action=niteo_subscribe&check=true&form_honeypot=&email=' + emailInput.value + '&firstname=' + firstname + '&lastname=' + lastname);
|
536 |
}
|
537 |
|
538 |
selectButton.onclick = function(){ // If clicked on the button.
|
539 |
+
console.log(emailInput.value);
|
540 |
if ( emailInput.value != '' ) {
|
541 |
XMLhttp();
|
542 |
}
|
550 |
|
551 |
/* Usage */
|
552 |
window.addEventListener("load",function(event) {
|
|
|
553 |
AJAXform( 'subscribe-form', 'submit-subscribe', 'subscribe-response', 'email-subscribe', 'firstname-subscribe', 'lastname-subscribe', 'POST' );
|
|
|
|
|
554 |
});
|
555 |
|
556 |
</script>
|
{inc → cmp-coming-soon-maintenance/inc}/class-cmp-render_settings.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/class-cmp-subscribers.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/class-cmp-translate.php
RENAMED
@@ -83,7 +83,7 @@ class cmp_translate_table extends WP_List_Table {
|
|
83 |
case 'string':
|
84 |
return $item[ $column_name ];
|
85 |
case 'translation':
|
86 |
-
return '<input type="text" name="niteoCS_translate_'.$item['id'].'" value="'
|
87 |
|
88 |
default:
|
89 |
return print_r( $item, true ) ;
|
83 |
case 'string':
|
84 |
return $item[ $column_name ];
|
85 |
case 'translation':
|
86 |
+
return '<input type="text" name="niteoCS_translate_'.$item['id'].'" value="'.stripslashes( $item[ $column_name ] ).'" class="regular-text code">';
|
87 |
|
88 |
default:
|
89 |
return print_r( $item, true ) ;
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-background.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-background_effects.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-contact_form.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-contact_form_disabled.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-counter.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-counter_disabled.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-footer.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-footer_disabled.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-logo.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-logo_disabled.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-slider.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-slider_disabled.php
RENAMED
File without changes
|
cmp-coming-soon-maintenance/inc/settings/settings-subscribe.php
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
|
4 |
+
|
5 |
+
if (isset($_POST['niteoCS_subscribe_type']) && is_numeric($_POST['niteoCS_subscribe_type'])) {
|
6 |
+
update_option('niteoCS_subscribe_type', sanitize_text_field($_POST['niteoCS_subscribe_type']));
|
7 |
+
}
|
8 |
+
|
9 |
+
if (isset($_POST['niteoCS_subscribe_label'])) {
|
10 |
+
update_option('niteoCS_subscribe_label', sanitize_text_field($_POST['niteoCS_subscribe_label']));
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( isset($_POST['niteoCS_subscribe_code']) ) {
|
14 |
+
$shortcode = str_replace('"', '\'', $_POST['niteoCS_subscribe_code']);
|
15 |
+
update_option('niteoCS_subscribe_code', sanitize_text_field($shortcode));
|
16 |
+
}
|
17 |
+
|
18 |
+
if (isset($_POST['niteoCS_subscribe_method'])) {
|
19 |
+
update_option('niteoCS_subscribe_method', sanitize_text_field($_POST['niteoCS_subscribe_method']));
|
20 |
+
}
|
21 |
+
|
22 |
+
if (isset($_POST['niteoCS_mailchimp_apikey'])) {
|
23 |
+
update_option('niteoCS_mailchimp_apikey', sanitize_text_field($_POST['niteoCS_mailchimp_apikey']));
|
24 |
+
}
|
25 |
+
|
26 |
+
if (isset($_POST['niteoCS_mailchimp_list_selected'])) {
|
27 |
+
update_option('niteoCS_mailchimp_list_selected', sanitize_text_field($_POST['niteoCS_mailchimp_list_selected']));
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
// delete_option('niteoCS_mailchimp_lists');
|
32 |
+
|
33 |
+
// get subscribe settings
|
34 |
+
$niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
|
35 |
+
$niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
|
36 |
+
$niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
|
37 |
+
$niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
|
38 |
+
|
39 |
+
$subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
|
40 |
+
$mailchimp_apikey = get_option('niteoCS_mailchimp_apikey', '');
|
41 |
+
$mailchimp_list_selected = get_option('niteoCS_mailchimp_list_selected');
|
42 |
+
$mailchimp_lists = json_decode(get_option('niteoCS_mailchimp_lists', false), true);
|
43 |
+
|
44 |
+
?>
|
45 |
+
|
46 |
+
<div class="table-wrapper content" id="subscribe-section">
|
47 |
+
<h3><?php _e('Subscribe Form', 'cmp-coming-soon-maintenance');?></h3>
|
48 |
+
<table class="content">
|
49 |
+
<tbody>
|
50 |
+
<tr>
|
51 |
+
<th>
|
52 |
+
<fieldset>
|
53 |
+
<legend class="screen-reader-text">
|
54 |
+
<span><?php _e('Subscribe Form Options', 'cmp-coming-soon-maintenance');?></span>
|
55 |
+
</legend>
|
56 |
+
|
57 |
+
<p>
|
58 |
+
<label title="Niteo Subscribe">
|
59 |
+
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>> <?php _e('Niteo Subscribe', 'cmp-coming-soon-maintenance');?>
|
60 |
+
</label>
|
61 |
+
</p>
|
62 |
+
|
63 |
+
<p>
|
64 |
+
<label title="3rd Party Plugin">
|
65 |
+
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="1"<?php if ( $niteoCS_subscribe_type == 1) { echo ' checked="checked"'; } ?>> <?php _e('3rd Party Plugin', 'cmp-coming-soon-maintenance');?>
|
66 |
+
</label>
|
67 |
+
</p>
|
68 |
+
|
69 |
+
<p>
|
70 |
+
<label title="Disabled">
|
71 |
+
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="0"<?php if ( $niteoCS_subscribe_type == 0) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
72 |
+
</label>
|
73 |
+
</p>
|
74 |
+
|
75 |
+
</fieldset>
|
76 |
+
</th>
|
77 |
+
|
78 |
+
<td id="subscribe-disabled" class="subscribe-switch x0">
|
79 |
+
<p><?php _e('Subscribe Form is disabled.', 'cmp-coming-soon-maintenance');?></p>
|
80 |
+
</td>
|
81 |
+
|
82 |
+
<td id="subscribe-3rdparty" class="subscribe-switch x1">
|
83 |
+
<fieldset>
|
84 |
+
<label class="subscribe" for="niteoCS_subscribe_code">3rd Party Plugin Shortcode
|
85 |
+
<input type="text" name="niteoCS_subscribe_code" id="niteoCS_subscribe_code" value="<?php echo stripslashes( esc_attr($niteoCS_subscribe_code ));?>" class="regular-text code">
|
86 |
+
</label>
|
87 |
+
|
88 |
+
<p><?php _e('You can find Shortode in your Contact Form Plugin settings. Should be something similar to code below: ', 'cmp-coming-soon-maintenance');?><br><code>[contact-form-7 id="8" title='Contact form 1']</code> or <code>[mc4wp_form id='7']</code></p>
|
89 |
+
|
90 |
+
<p><?php _e('Your Subscribe Form should have only one input (type=email) and submit (input=submit). If you have more than one input field, our design will not work and you need to use custom CSS to style your Subscribe form.', 'cmp-coming-soon-maintenance');?></p>
|
91 |
+
<p><?php _e('Example of Subscribe Form code for ', 'cmp-coming-soon-maintenance');?><a href="https://wordpress.org/plugins/mailchimp-for-wp/">MailChimp</a> plugin:</p>
|
92 |
+
<code>
|
93 |
+
<p>
|
94 |
+
<input type="email" name="EMAIL" placeholder="Your email address" required />
|
95 |
+
<input type="submit" value="Sign up" />
|
96 |
+
</p>
|
97 |
+
</code>
|
98 |
+
</fieldset>
|
99 |
+
</td>
|
100 |
+
|
101 |
+
<td id="subscribe-niteo" class="subscribe-switch x2">
|
102 |
+
<fieldset>
|
103 |
+
<p><?php _e('CMP custom subscribe form will be used. It is guaranteed to always match selected Theme\'s style.', 'cmp-coming-soon-maintenance');?></p>
|
104 |
+
|
105 |
+
<label class="subscribe" for="niteoCS_subscribe_label"><?php _e('Subscribe form Label', 'cmp-coming-soon-maintenance');?>
|
106 |
+
<input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr( $niteoCS_subscribe_label );?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
|
107 |
+
</label><br><br>
|
108 |
+
|
109 |
+
<label for="niteoCS_subscribe_method""><?php _e('Select how to store your Subscribers', 'cmp-coming-soon-maintenance');?>
|
110 |
+
<select name="niteoCS_subscribe_method" class="subscribe-method">
|
111 |
+
<option value="cmp" <?php selected( 'cmp', $subscribe_method ); ?>><?php _e('CMP Custom Subscribe List', 'cmp-coming-soon-maintenance');?></option>
|
112 |
+
<option value="mailchimp" <?php selected( 'mailchimp', $subscribe_method ); ?>><?php _e('MailChimp Integration', 'cmp-coming-soon-maintenance');?></option>
|
113 |
+
</select>
|
114 |
+
</label>
|
115 |
+
|
116 |
+
<div class="subscribe-method cmp">
|
117 |
+
<p><?php _e( 'Emails will be stored in custom CMP list with CSV export support. If you ever delete CMP plugin then subscriber list will be purged as well.', 'cmp-coming-soon-maintenance' );?></p>
|
118 |
+
<p><?php _e( 'Total Subscribers: ', 'cmp-coming-soon-maintenance' );?><a href="<?php echo admin_url(); ?>admin.php?page=cmp-subscribers"><?php echo $niteoCS_subscribers_list ? count( $niteoCS_subscribers_list ) : '0';?></a></p>
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<div class="subscribe-method mailchimp">
|
122 |
+
<br>
|
123 |
+
<label for="niteoCS_mailchimp_apikey"><?php _e('MailChimp API key', 'cmp-coming-soon-maintenance');?>
|
124 |
+
<input type="text" name="niteoCS_mailchimp_apikey" value="<?php echo esc_attr( $mailchimp_apikey );?>" class="regular-text code" placeholder="<?php _e('MailChimp API Key', 'cmp-coming-soon-maintenance');?>">
|
125 |
+
</label><br><br>
|
126 |
+
|
127 |
+
<button id="connect-mailchimp" class="button" data-security="<?php echo esc_attr($ajax_nonce);?>"><?php _e('Retrieve Lists', 'cmp-coming-soon-maintenance');?></button>
|
128 |
+
|
129 |
+
<p><?php printf(__('You can find or create new API key in your %s.', 'cmp-coming-soon-maintenance'), '<a href="https://admin.mailchimp.com/account/api/" target="_blank">MailChimp Account</a>'); ?></p>
|
130 |
+
|
131 |
+
|
132 |
+
<label for="niteoCS_mailchimp_list"><?php _e('Select MailChimp List to store emails.', 'cmp-coming-soon-maintenance');?>
|
133 |
+
|
134 |
+
<select name="niteoCS_mailchimp_list_selected" id="mailchimp-lists-select">
|
135 |
+
<?php
|
136 |
+
if ( is_array( $mailchimp_lists ) ) {
|
137 |
+
|
138 |
+
if ( $mailchimp_lists['response'] == 200 ) {
|
139 |
+
foreach ( $mailchimp_lists['lists'] as $list) { ?>
|
140 |
+
<option value="<?php echo esc_attr( $list['id'] );?>" <?php selected( $list['id'], $mailchimp_list_selected ); ?>><?php echo esc_attr( $list['name'] );?></option>
|
141 |
+
<?php
|
142 |
+
}
|
143 |
+
} else { ?>
|
144 |
+
<option value="error"><?php echo esc_attr( $mailchimp_lists['response'] . ': ' . $mailchimp_lists['message']);?></option>
|
145 |
+
<?php
|
146 |
+
}
|
147 |
+
|
148 |
+
} else { ?>
|
149 |
+
<option value="error"><?php _e('Please insert MailChimp API key to retrieve Lists.', 'cmp-coming-soon-maintenance');?></option>
|
150 |
+
<?php
|
151 |
+
} ?>
|
152 |
+
</select>
|
153 |
+
|
154 |
+
</label>
|
155 |
+
|
156 |
+
</div>
|
157 |
+
|
158 |
+
</fieldset>
|
159 |
+
</td>
|
160 |
+
|
161 |
+
</tr>
|
162 |
+
|
163 |
+
<?php echo $this->render_settings->submit(); ?>
|
164 |
+
|
165 |
+
</tbody>
|
166 |
+
</table>
|
167 |
+
</div>
|
{inc → cmp-coming-soon-maintenance/inc}/settings/settings-subscribe_disabled.php
RENAMED
File without changes
|
{inc → cmp-coming-soon-maintenance/inc}/webfonts.php
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/cmp-admin-head.js
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/external/anime.min.js
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/external/imagesloaded.pkgd.min.js
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/external/uncover.js
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/flatpickr.min.js
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/preview-iframe.js
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/select2.min.js
RENAMED
File without changes
|
{js → cmp-coming-soon-maintenance/js}/settings.js
RENAMED
@@ -70,6 +70,8 @@ jQuery(document).ready(function($){
|
|
70 |
toggle_settings( 'background-effect' );
|
71 |
toggle_settings( 'cmp-logo' );
|
72 |
|
|
|
|
|
73 |
|
74 |
// change all selects to select2
|
75 |
jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({
|
@@ -930,6 +932,54 @@ jQuery(document).ready(function($){
|
|
930 |
}
|
931 |
|
932 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
function toggle_settings ( classname ) {
|
934 |
// Logo type inputs
|
935 |
jQuery('.'+classname).change(function() {
|
@@ -946,7 +996,21 @@ jQuery(document).ready(function($){
|
|
946 |
|
947 |
}
|
948 |
|
|
|
|
|
|
|
|
|
|
|
|
|
949 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
950 |
|
951 |
function update_range ( selector ) {
|
952 |
jQuery( selector ).on('input', function () {
|
70 |
toggle_settings( 'background-effect' );
|
71 |
toggle_settings( 'cmp-logo' );
|
72 |
|
73 |
+
toggle_select('subscribe-method');
|
74 |
+
|
75 |
|
76 |
// change all selects to select2
|
77 |
jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({
|
932 |
}
|
933 |
|
934 |
|
935 |
+
// Retrieve Mailchimp lists
|
936 |
+
jQuery('#connect-mailchimp').click(function(e){
|
937 |
+
e.preventDefault();
|
938 |
+
|
939 |
+
var apikey = jQuery('input[name="niteoCS_mailchimp_apikey"]').val(),
|
940 |
+
security = jQuery(this).data('security'),
|
941 |
+
button = jQuery(this);
|
942 |
+
|
943 |
+
if ( apikey != '' ) {
|
944 |
+
|
945 |
+
var params = {apikey: apikey, security: security};
|
946 |
+
|
947 |
+
jQuery(this).prop('disabled', true);
|
948 |
+
|
949 |
+
jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');
|
950 |
+
|
951 |
+
var data = {
|
952 |
+
action: 'cmp_mailchimp_list_ajax',
|
953 |
+
security: security,
|
954 |
+
params: params,
|
955 |
+
};
|
956 |
+
|
957 |
+
$.post(ajaxurl, data, function(response) {
|
958 |
+
var lists = JSON.parse(response);
|
959 |
+
|
960 |
+
if ( lists.response == 200 ) {
|
961 |
+
|
962 |
+
$('#mailchimp-lists-select').empty().prop('disabled', false);
|
963 |
+
$.each(lists.lists, function(i,val) {
|
964 |
+
$('#mailchimp-lists-select').append('<option value="'+val.id+'">'+val.name+'</option>');
|
965 |
+
});
|
966 |
+
|
967 |
+
} else {
|
968 |
+
$('#mailchimp-lists-select').empty().prop('disabled', true).html('<option value="error">'+lists.message+'</option>').trigger('change');
|
969 |
+
}
|
970 |
+
|
971 |
+
button.html('Retrieve Lists');
|
972 |
+
button.prop('disabled', false);
|
973 |
+
|
974 |
+
}).fail(function() {
|
975 |
+
|
976 |
+
button.html('Retrieve Lists');
|
977 |
+
button.prop('disabled', false);
|
978 |
+
});
|
979 |
+
}
|
980 |
+
});
|
981 |
+
|
982 |
+
|
983 |
function toggle_settings ( classname ) {
|
984 |
// Logo type inputs
|
985 |
jQuery('.'+classname).change(function() {
|
996 |
|
997 |
}
|
998 |
|
999 |
+
function toggle_select ( classname ) {
|
1000 |
+
// Logo type inputs
|
1001 |
+
jQuery('.'+classname).change(function() {
|
1002 |
+
var value = jQuery('.'+classname ).val();
|
1003 |
+
|
1004 |
+
value = ( jQuery.isNumeric(value) ) ? 'x'+value : value;
|
1005 |
|
1006 |
+
jQuery('.'+classname+ '.'+value).css('display','block');
|
1007 |
+
jQuery('.'+classname+':not(.'+value+')').css('display','none');
|
1008 |
+
|
1009 |
+
});
|
1010 |
+
|
1011 |
+
jQuery('.'+classname).first().trigger('change');
|
1012 |
+
|
1013 |
+
}
|
1014 |
|
1015 |
function update_range ( selector ) {
|
1016 |
jQuery( selector ).on('input', function () {
|
{js → cmp-coming-soon-maintenance/js}/settings.min.js
RENAMED
@@ -2,7 +2,7 @@ jQuery(document).ready(function($){var formChanged=!1;var tab=document.location.
|
|
2 |
navtab=function(tab){jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');jQuery('.nav-tab-wrapper .'+tab).addClass('nav-tab-active');jQuery('.table-wrapper.'+tab).css('display','block');jQuery('.table-wrapper-css.'+tab).css('display','block');jQuery('.comingsoon.'+tab).css('display','block');jQuery('.table-wrapper:not(.'+tab+')').css('display','none');jQuery('.table-wrapper-css:not(.'+tab).css('display','none');jQuery('.comingsoon:not(.'+tab+')').css('display','none');if(tab=='install'){jQuery('.submit').css('display','none');jQuery('#csoptions').attr('action',action)}else{jQuery('.submit').css('display','block');jQuery('#csoptions').attr('action',action+'#'+tab)}}
|
3 |
if(tab!=''){navtab(tab)}else{jQuery('.table-wrapper-css').css('display','none')}
|
4 |
window.onhashchange=function(){tab=document.location.hash.substring(1);navtab(tab)}
|
5 |
-
$('.nav-tab:not(.theme-preview)').click(function(e){e.preventDefault();tab=$(this).data('tab');document.location.hash=tab});update_range('.blur-range');update_range('.overlay-opacity');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');toggle_settings('analytics');toggle_settings('contact-form');toggle_settings('subscribe');toggle_settings('background-effect');toggle_settings('cmp-logo');jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({width:'100%',minimumResultsForSearch:-1,});jQuery('#cmp-status').click(function(){jQuery('.cmp-status input[type=radio]').prop("disabled",(_,val)=>!val);jQuery('#cmp-status-menubar').prop("checked",(_,val)=>!val)});cmp_status_inputs();function cmp_status_inputs(){jQuery('.cmp-status legend:not(.disabled)').click(function(){if(jQuery('#cmp-status').prop('checked')==!1){return}
|
6 |
var $children=jQuery(this).children('input');$children.prop("checked",!0);jQuery('.cmp-status legend').removeClass('active');jQuery(this).addClass('active');$children.trigger('change');if($children.val()=='3'){jQuery('.redirect-inputs').fadeIn('fast')}else{jQuery('.redirect-inputs').fadeOut('fast')}})}
|
7 |
jQuery('.table-wrapper h3').click(function(){jQuery(this).parent().toggleClass('closed')});jQuery('#test-unsplash').click(function(e){e.preventDefault();var media_wrapper=jQuery('#unsplash-media'),unsplash_feed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),unsp_url='',feat='',custom_str='',security=jQuery(this).data('security');switch(unsplash_feed){case '0':unsp_url=jQuery('#niteoCS-unsplash-0').val();break;case '1':custom_str=jQuery('#niteoCS-unsplash-1').val();break;case '2':unsp_url=jQuery('#niteoCS-unsplash-2').val();break;case '3':unsp_url=jQuery('#niteoCS-unsplash-3').val();if(jQuery('#niteoCS_unsplash_feat').is(':checked')){feat='1'}else{feat='0'}
|
8 |
break;default:break}
|
@@ -32,5 +32,7 @@ $add_button.click(function(e){e.preventDefault();if(media_uploader){media_upload
|
|
32 |
var media_uploader=wp.media({title:'Select '+title,button:{text:'Insert '+title},multiple:multiple,library:{type:[type]},}).on('select',function(){var attachment=media_uploader.state().get('selection').toJSON();if(attachment.length>0){$container.empty();jQuery(attachment).each(function(i){if(attachment[i].sizes&&attachment[i].sizes.large){image=attachment[i].sizes.large.url}else{image=attachment[i].url}
|
33 |
var comma=i===0?'':',';imgID+=(comma+attachment[i].id);if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}else if(name=='video'){$container.append('<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>')}else{$container.append('<img src="'+image+'" alt="" style="max-width:588px"/>')}});$delete_button.css('display','block')}
|
34 |
jQuery('#niteoCS-'+name+'-id').val(imgID).trigger('change')}).open();if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}});$delete_button.click(function(e){jQuery(this).css('display','none');$container.empty();jQuery('#niteoCS-'+name+'-id').val('');jQuery('#niteoCS-'+name+'-id').trigger('change')})}
|
35 |
-
|
|
|
|
|
36 |
function update_range(selector){jQuery(selector).on('input',function(){var value=jQuery(this).val();jQuery(this).parent().find('span').html(value)})}})
|
2 |
navtab=function(tab){jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');jQuery('.nav-tab-wrapper .'+tab).addClass('nav-tab-active');jQuery('.table-wrapper.'+tab).css('display','block');jQuery('.table-wrapper-css.'+tab).css('display','block');jQuery('.comingsoon.'+tab).css('display','block');jQuery('.table-wrapper:not(.'+tab+')').css('display','none');jQuery('.table-wrapper-css:not(.'+tab).css('display','none');jQuery('.comingsoon:not(.'+tab+')').css('display','none');if(tab=='install'){jQuery('.submit').css('display','none');jQuery('#csoptions').attr('action',action)}else{jQuery('.submit').css('display','block');jQuery('#csoptions').attr('action',action+'#'+tab)}}
|
3 |
if(tab!=''){navtab(tab)}else{jQuery('.table-wrapper-css').css('display','none')}
|
4 |
window.onhashchange=function(){tab=document.location.hash.substring(1);navtab(tab)}
|
5 |
+
$('.nav-tab:not(.theme-preview)').click(function(e){e.preventDefault();tab=$(this).data('tab');document.location.hash=tab});update_range('.blur-range');update_range('.overlay-opacity');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');toggle_settings('analytics');toggle_settings('contact-form');toggle_settings('subscribe');toggle_settings('background-effect');toggle_settings('cmp-logo');toggle_select('subscribe-method');jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({width:'100%',minimumResultsForSearch:-1,});jQuery('#cmp-status').click(function(){jQuery('.cmp-status input[type=radio]').prop("disabled",(_,val)=>!val);jQuery('#cmp-status-menubar').prop("checked",(_,val)=>!val)});cmp_status_inputs();function cmp_status_inputs(){jQuery('.cmp-status legend:not(.disabled)').click(function(){if(jQuery('#cmp-status').prop('checked')==!1){return}
|
6 |
var $children=jQuery(this).children('input');$children.prop("checked",!0);jQuery('.cmp-status legend').removeClass('active');jQuery(this).addClass('active');$children.trigger('change');if($children.val()=='3'){jQuery('.redirect-inputs').fadeIn('fast')}else{jQuery('.redirect-inputs').fadeOut('fast')}})}
|
7 |
jQuery('.table-wrapper h3').click(function(){jQuery(this).parent().toggleClass('closed')});jQuery('#test-unsplash').click(function(e){e.preventDefault();var media_wrapper=jQuery('#unsplash-media'),unsplash_feed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),unsp_url='',feat='',custom_str='',security=jQuery(this).data('security');switch(unsplash_feed){case '0':unsp_url=jQuery('#niteoCS-unsplash-0').val();break;case '1':custom_str=jQuery('#niteoCS-unsplash-1').val();break;case '2':unsp_url=jQuery('#niteoCS-unsplash-2').val();break;case '3':unsp_url=jQuery('#niteoCS-unsplash-3').val();if(jQuery('#niteoCS_unsplash_feat').is(':checked')){feat='1'}else{feat='0'}
|
8 |
break;default:break}
|
32 |
var media_uploader=wp.media({title:'Select '+title,button:{text:'Insert '+title},multiple:multiple,library:{type:[type]},}).on('select',function(){var attachment=media_uploader.state().get('selection').toJSON();if(attachment.length>0){$container.empty();jQuery(attachment).each(function(i){if(attachment[i].sizes&&attachment[i].sizes.large){image=attachment[i].sizes.large.url}else{image=attachment[i].url}
|
33 |
var comma=i===0?'':',';imgID+=(comma+attachment[i].id);if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}else if(name=='video'){$container.append('<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>')}else{$container.append('<img src="'+image+'" alt="" style="max-width:588px"/>')}});$delete_button.css('display','block')}
|
34 |
jQuery('#niteoCS-'+name+'-id').val(imgID).trigger('change')}).open();if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}});$delete_button.click(function(e){jQuery(this).css('display','none');$container.empty();jQuery('#niteoCS-'+name+'-id').val('');jQuery('#niteoCS-'+name+'-id').trigger('change')})}
|
35 |
+
jQuery('#connect-mailchimp').click(function(e){e.preventDefault();var apikey=jQuery('input[name="niteoCS_mailchimp_apikey"]').val(),security=jQuery(this).data('security'),button=jQuery(this);if(apikey!=''){var params={apikey:apikey,security:security};jQuery(this).prop('disabled',!0);jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');var data={action:'cmp_mailchimp_list_ajax',security:security,params:params,};$.post(ajaxurl,data,function(response){var lists=JSON.parse(response);if(lists.response==200){$('#mailchimp-lists-select').empty().prop('disabled',!1);$.each(lists.lists,function(i,val){$('#mailchimp-lists-select').append('<option value="'+val.id+'">'+val.name+'</option>')})}else{$('#mailchimp-lists-select').empty().prop('disabled',!0).html('<option value="error">'+lists.message+'</option>').trigger('change')}
|
36 |
+
button.html('Retrieve Lists');button.prop('disabled',!1)}).fail(function(){button.html('Retrieve Lists');button.prop('disabled',!1)})}});function toggle_settings(classname){jQuery('.'+classname).change(function(){var value=jQuery('.'+classname+':checked').val();value=(jQuery.isNumeric(value))?'x'+value:value;jQuery('.'+classname+'-switch.'+value).css('display','block');jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none')});jQuery('.'+classname).first().trigger('change')}
|
37 |
+
function toggle_select(classname){jQuery('.'+classname).change(function(){var value=jQuery('.'+classname).val();value=(jQuery.isNumeric(value))?'x'+value:value;jQuery('.'+classname+'.'+value).css('display','block');jQuery('.'+classname+':not(.'+value+')').css('display','none')});jQuery('.'+classname).first().trigger('change')}
|
38 |
function update_range(selector){jQuery(selector).on('input',function(){var value=jQuery(this).val();jQuery(this).parent().find('span').html(value)})}})
|
{js → cmp-coming-soon-maintenance/js}/typography.js
RENAMED
File without changes
|
cmp-coming-soon-maintenance/js/typography.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($){headingVariant=jQuery('.headings-google-font-variant').val();contentVariant=jQuery('.content-google-font-variant').val();fontVariant=function(variant){switch(variant){case '100':return'Thin 100';break;case '100italic':return'Thin 100 Italic';break;case '200':return'Extra-light 200';break;case '200italic':return'Extra-light 200 Italic';break;case '300':return'Light 300';break;case '300italic':return'Light 300 Italic';break;case '400':return'Regular 400';break;case '400italic':return'Regular 400 Italic';break;case '500':return'Medium 500';break;case '500italic':return'Meidum 500 Italic';break;case '600':return'Semi-Bold 600';break;case '600italic':return'Semi-Bold 600 Italic';break;case '700':return'Bold 700';break;case '700italic':return'Bold 700 Italic';break;case '800':return'Extra-Bold 800';break;case '800italic':return'Extra-Bold Italic';break;case '900':return'Black 900';break;case '900italic':return'Black 900 Italic';break;case 'regular':return'Regular 400';break;case 'italic':return'Regular 400 Italic';break;default:break}}
|
2 |
+
var heading_font=fonts.google.filter(function(element){return element.id===jQuery('.headings-google-font option:selected').val()});var content_font=fonts.google.filter(function(element){return element.id===jQuery('.content-google-font option:selected').val()});if(heading_font.length){var heading_font_variant=jQuery.map(heading_font[0].variants,function(obj){return{id:obj,text:fontVariant(obj)}})}
|
3 |
+
if(content_font.length){var content_font_variant=jQuery.map(content_font[0].variants,function(obj){return{id:obj,text:fontVariant(obj)}})}
|
4 |
+
$HeadingFont=jQuery('.headings-google-font').select2({data:fonts.google,width:'100%',});$contentFont=jQuery('.content-google-font').select2({data:fonts.google,width:'100%',});$HeadingFontVariant=jQuery('.headings-google-font-variant').select2({data:heading_font_variant,})
|
5 |
+
$contentFontVariant=jQuery('.content-google-font-variant').select2({data:content_font_variant,})
|
6 |
+
$HeadingFont.on('select2:select',function(e){var selected=$HeadingFontVariant.select2('data');var heading_font_variant=jQuery.map(e.params.data.variants,function(obj){return{id:obj,text:fontVariant(obj)}});$HeadingFontVariant.empty();$HeadingFontVariant.select2({data:heading_font_variant});if(selected[0].id){if(jQuery.inArray(selected[0].id,e.params.data.variants)=='-1'){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight','400').css('font-style','normal')}else{$HeadingFontVariant.val(selected[0].id).trigger('change.select2')}}
|
7 |
+
WebFont.load({google:{families:[e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){jQuery('#heading-example, #niteoCS-text-logo').css('font-family',e.params.data.text)},})});$HeadingFontVariant.on('select2:select',function(e){headingVariant=e.params.data.id;if(jQuery.isNumeric(headingVariant)){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight',headingVariant).css('font-style','normal')}else if(headingVariant=='regular'){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight','400').css('font-style','normal')}else if(headingVariant=='italic'){jQuery('#heading-example, #niteoCS-text-logo').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(headingVariant,10);jQuery('#heading-example, #niteoCS-text-logo').css('font-weight',fontweight).css('font-style','italic')}});$contentFont.on('select2:select',function(e){var selected=$contentFontVariant.select2('data');var content_font_variant=jQuery.map(e.params.data.variants,function(obj){return{id:obj,text:fontVariant(obj)}});$contentFontVariant.empty();$contentFontVariant.select2({data:content_font_variant});if(selected[0].id){if(jQuery.inArray(selected[0].id,e.params.data.variants)=='-1'){jQuery('#content-example').css('font-weight','400').css('font-style','normal')}else{$contentFontVariant.val(selected[0].id).trigger('change.select2')}}
|
8 |
+
WebFont.load({google:{families:[e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){jQuery('#content-example').css('font-family',e.params.data.text)},})});$contentFontVariant.on('select2:select',function(e){contentVariant=e.params.data.id;if(jQuery.isNumeric(contentVariant)){jQuery('#content-example').css('font-weight',contentVariant).css('font-style','normal')}else if(contentVariant=='regular'){jQuery('#content-example').css('font-weight','400').css('font-style','normal')}else if(contentVariant=='italic'){jQuery('#content-example').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(contentVariant,10);jQuery('#content-example').css('font-weight',fontweight).css('font-style','italic')}});jQuery('.font-selector input[type=range]').on('input',function(){var type=jQuery(this).data('type');var css=jQuery(this).data('css');var value=jQuery(this).val();jQuery(this).parent().find('span').html(value);value=(css=='line-height')?value:value+'px';if(type=='heading'){jQuery('#heading-example').css(css,value)}else{jQuery('#content-example').css(css,value)}});if(heading_font.length&&content_font.length){WebFont.load({google:{families:[heading_font[0].id+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic',content_font[0].id+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){if(jQuery.isNumeric(headingVariant)){jQuery('#heading-example').css('font-weight',headingVariant).css('font-style','normal')}else if(headingVariant=='regular'){jQuery('#heading-example').css('font-weight','400').css('font-style','normal')}else if(headingVariant=='italic'){jQuery('#heading-example').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(headingVariant,10);jQuery('#heading-example').css('font-weight',fontweight).css('font-style','italic')}
|
9 |
+
if(jQuery.isNumeric(contentVariant)){jQuery('#content-example').css('font-weight',contentVariant).css('font-style','normal')}else if(contentVariant=='regular'){jQuery('#content-example').css('font-weight','400').css('font-style','normal')}else if(contentVariant=='italic'){jQuery('#content-example').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(contentVariant,10);jQuery('#content-example').css('font-weight',fontweight).css('font-style','italic')}
|
10 |
+
jQuery('#heading-example, #niteoCS-text-logo').css('font-family',heading_font[0].id);jQuery('#content-example').css('font-family',content_font[0].id)},})}})
|
{js → cmp-coming-soon-maintenance/js}/vidim.min.js
RENAMED
File without changes
|
{languages → cmp-coming-soon-maintenance/languages}/coming-soon-default.mo
RENAMED
File without changes
|
{languages → cmp-coming-soon-maintenance/languages}/coming-soon-default.po
RENAMED
File without changes
|
niteo-cmp.php → cmp-coming-soon-maintenance/niteo-cmp.php
RENAMED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
-
Version: 2.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -18,7 +18,7 @@ class niteo_cmp {
|
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
-
$this->version = '2.
|
22 |
$this->dev = false;
|
23 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
if ( $this->plugins_dir_path == './') {
|
@@ -63,6 +63,7 @@ class niteo_cmp {
|
|
63 |
add_action( 'wp_ajax_cmp_toggle_activation', array($this, 'cmp_toggle_activation') );
|
64 |
add_action( 'wp_ajax_nopriv_niteo_subscribe', array($this, 'niteo_subscribe') );
|
65 |
add_action( 'wp_ajax_niteo_subscribe', array($this, 'niteo_subscribe') );
|
|
|
66 |
add_action( 'plugins_loaded', array($this, 'cmp_textDomain') );
|
67 |
add_action( 'admin_menu', array($this, 'cmp_adminMenu'), 10 );
|
68 |
add_action( 'admin_init', array($this, 'cmp_adminInit') ) ;
|
@@ -78,6 +79,9 @@ class niteo_cmp {
|
|
78 |
add_filter( 'script_loader_src', array($this,'sdt_remove_ver_css_js'), 9999, 2 );
|
79 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this,'add_action_links') );
|
80 |
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
public function cmp_adminInit() {
|
@@ -91,18 +95,18 @@ class niteo_cmp {
|
|
91 |
wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
|
92 |
}
|
93 |
|
94 |
-
wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version);
|
95 |
-
wp_enqueue_style('cmp-style');
|
96 |
wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
|
97 |
wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
|
98 |
wp_register_style( 'animate-css', plugins_url('/css/animate'.$this->minified.'.css', __FILE__) );
|
99 |
wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
|
100 |
|
101 |
-
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
|
102 |
wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
|
103 |
wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
|
104 |
-
wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont', 'select2-js'), $this->version);
|
105 |
-
wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
106 |
}
|
107 |
|
108 |
}
|
@@ -130,22 +134,6 @@ class niteo_cmp {
|
|
130 |
|
131 |
}
|
132 |
|
133 |
-
// enqueue styles and scripts when navigated to CMP Settings page
|
134 |
-
public function cmp_enqueueScripts() {
|
135 |
-
wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
|
136 |
-
wp_enqueue_script('cmp_settings_js');
|
137 |
-
wp_enqueue_script('cmp-typography');
|
138 |
-
wp_enqueue_script( 'wp-color-picker');
|
139 |
-
wp_enqueue_script( 'webfont' );
|
140 |
-
wp_enqueue_script( 'select2-js');
|
141 |
-
wp_enqueue_media();
|
142 |
-
wp_enqueue_style( 'wp-color-picker');
|
143 |
-
wp_enqueue_style( 'select2');
|
144 |
-
wp_enqueue_style( 'font_awesome');
|
145 |
-
if (in_array( $this->cmp_selectedTheme(), $this->premium_installed ) ) {
|
146 |
-
wp_enqueue_style('animate-css');
|
147 |
-
}
|
148 |
-
}
|
149 |
|
150 |
// remove default wp version from handles
|
151 |
public function sdt_remove_ver_css_js( $src, $handle ) {
|
@@ -180,6 +168,22 @@ class niteo_cmp {
|
|
180 |
}
|
181 |
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
public function cmp_settings_page() {
|
185 |
// include default options page
|
@@ -1003,6 +1007,8 @@ class niteo_cmp {
|
|
1003 |
// $check must be true, to avoid duplicated requests after update to 2.1
|
1004 |
public function niteo_subscribe( $check ) {
|
1005 |
|
|
|
|
|
1006 |
$response = '';
|
1007 |
$response_invalid = 'Please insert valid Email address.';
|
1008 |
$ajax = false;
|
@@ -1024,15 +1030,13 @@ class niteo_cmp {
|
|
1024 |
if ( is_email( $_POST['email'] ) ) {
|
1025 |
// email already passed is_email, no need to sanitize
|
1026 |
$email = $_POST['email'];
|
|
|
1027 |
// sanitize all inputs
|
1028 |
$ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
|
1029 |
$firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
|
1030 |
$lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
|
1031 |
$timestamp = time();
|
1032 |
|
1033 |
-
// get subscribe list
|
1034 |
-
$subscribe_list = get_option('niteoCS_subscribers_list');
|
1035 |
-
|
1036 |
// get translation lists
|
1037 |
if ( get_option('niteoCS_translation') ) {
|
1038 |
$translation = json_decode( get_option('niteoCS_translation'), true );
|
@@ -1046,29 +1050,82 @@ class niteo_cmp {
|
|
1046 |
$response_invalid = 'Please insert valid Email address.';
|
1047 |
}
|
1048 |
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
update_option( 'niteoCS_subscribers_list', $new_list );
|
1055 |
-
$response = $response_ok;
|
1056 |
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1065 |
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1072 |
} else {
|
1073 |
$response = $response_invalid;
|
1074 |
}
|
@@ -1638,6 +1695,87 @@ class niteo_cmp {
|
|
1638 |
return $version;
|
1639 |
}
|
1640 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1641 |
}
|
1642 |
|
1643 |
$cmpPlugin = new niteo_cmp();
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
+
Version: 2.6
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
+
$this->version = '2.6';
|
22 |
$this->dev = false;
|
23 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
if ( $this->plugins_dir_path == './') {
|
63 |
add_action( 'wp_ajax_cmp_toggle_activation', array($this, 'cmp_toggle_activation') );
|
64 |
add_action( 'wp_ajax_nopriv_niteo_subscribe', array($this, 'niteo_subscribe') );
|
65 |
add_action( 'wp_ajax_niteo_subscribe', array($this, 'niteo_subscribe') );
|
66 |
+
add_action( 'wp_ajax_cmp_mailchimp_list_ajax', array($this, 'cmp_mailchimp_list_ajax') );
|
67 |
add_action( 'plugins_loaded', array($this, 'cmp_textDomain') );
|
68 |
add_action( 'admin_menu', array($this, 'cmp_adminMenu'), 10 );
|
69 |
add_action( 'admin_init', array($this, 'cmp_adminInit') ) ;
|
79 |
add_filter( 'script_loader_src', array($this,'sdt_remove_ver_css_js'), 9999, 2 );
|
80 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this,'add_action_links') );
|
81 |
|
82 |
+
// include feedback class
|
83 |
+
require_once('inc/class-cmp-feedback.php');
|
84 |
+
|
85 |
}
|
86 |
|
87 |
public function cmp_adminInit() {
|
95 |
wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
|
96 |
}
|
97 |
|
98 |
+
wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version );
|
99 |
+
wp_enqueue_style( 'cmp-style' );
|
100 |
wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
|
101 |
wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
|
102 |
wp_register_style( 'animate-css', plugins_url('/css/animate'.$this->minified.'.css', __FILE__) );
|
103 |
wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
|
104 |
|
105 |
+
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
|
106 |
wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
|
107 |
wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
|
108 |
+
wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont', 'select2-js'), $this->version );
|
109 |
+
wp_register_script( 'countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
110 |
}
|
111 |
|
112 |
}
|
134 |
|
135 |
}
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
// remove default wp version from handles
|
139 |
public function sdt_remove_ver_css_js( $src, $handle ) {
|
168 |
}
|
169 |
|
170 |
|
171 |
+
// enqueue styles and scripts when navigated to CMP Settings page
|
172 |
+
public function cmp_enqueueScripts() {
|
173 |
+
wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
|
174 |
+
wp_enqueue_script('cmp_settings_js');
|
175 |
+
wp_enqueue_script('cmp-typography');
|
176 |
+
wp_enqueue_script( 'wp-color-picker');
|
177 |
+
wp_enqueue_script( 'webfont' );
|
178 |
+
wp_enqueue_script( 'select2-js');
|
179 |
+
wp_enqueue_media();
|
180 |
+
wp_enqueue_style( 'wp-color-picker');
|
181 |
+
wp_enqueue_style( 'select2');
|
182 |
+
wp_enqueue_style( 'font_awesome');
|
183 |
+
if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) ) {
|
184 |
+
wp_enqueue_style('animate-css');
|
185 |
+
}
|
186 |
+
}
|
187 |
|
188 |
public function cmp_settings_page() {
|
189 |
// include default options page
|
1007 |
// $check must be true, to avoid duplicated requests after update to 2.1
|
1008 |
public function niteo_subscribe( $check ) {
|
1009 |
|
1010 |
+
$subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
|
1011 |
+
|
1012 |
$response = '';
|
1013 |
$response_invalid = 'Please insert valid Email address.';
|
1014 |
$ajax = false;
|
1030 |
if ( is_email( $_POST['email'] ) ) {
|
1031 |
// email already passed is_email, no need to sanitize
|
1032 |
$email = $_POST['email'];
|
1033 |
+
|
1034 |
// sanitize all inputs
|
1035 |
$ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
|
1036 |
$firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
|
1037 |
$lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
|
1038 |
$timestamp = time();
|
1039 |
|
|
|
|
|
|
|
1040 |
// get translation lists
|
1041 |
if ( get_option('niteoCS_translation') ) {
|
1042 |
$translation = json_decode( get_option('niteoCS_translation'), true );
|
1050 |
$response_invalid = 'Please insert valid Email address.';
|
1051 |
}
|
1052 |
|
1053 |
+
switch ( $subscribe_method ) {
|
1054 |
+
// default custom CMP method
|
1055 |
+
case 'cmp':
|
1056 |
+
// get subscribe list
|
1057 |
+
$subscribe_list = get_option('niteoCS_subscribers_list');
|
|
|
|
|
1058 |
|
1059 |
+
// if no subscribe list yet, create first item and insert it into DB
|
1060 |
+
if ( !$subscribe_list ) {
|
1061 |
+
$new_list = array();
|
1062 |
+
$new_email = array( 'id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
|
1063 |
+
array_push( $new_list, $new_email );
|
1064 |
+
update_option( 'niteoCS_subscribers_list', $new_list );
|
1065 |
+
$response = $response_ok;
|
1066 |
+
|
1067 |
+
} else {
|
1068 |
+
// check if email don`t already exists
|
1069 |
+
if ( !$this->niteo_in_array_r( $email, $subscribe_list, true ) ) {
|
1070 |
+
$count = count( $subscribe_list );
|
1071 |
+
$new_email = array( 'id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
|
1072 |
+
array_push( $subscribe_list, $new_email );
|
1073 |
+
update_option('niteoCS_subscribers_list', $subscribe_list);
|
1074 |
+
$response = $response_ok;
|
1075 |
+
|
1076 |
+
// if email exists return duplicate response
|
1077 |
+
} else {
|
1078 |
+
$response = $response_duplicate;
|
1079 |
+
}
|
1080 |
+
}
|
1081 |
+
break;
|
1082 |
+
|
1083 |
+
// mailchimp API call
|
1084 |
+
case 'mailchimp':
|
1085 |
+
$api_key = esc_attr( get_option('niteoCS_mailchimp_apikey') );
|
1086 |
+
$list_id = esc_attr( get_option('niteoCS_mailchimp_list') );
|
1087 |
+
$email = $_POST['email'];
|
1088 |
+
$status = 'subscribed'; // subscribed, cleaned, pending
|
1089 |
+
|
1090 |
+
$args = array(
|
1091 |
+
'method' => 'PUT',
|
1092 |
+
'headers' => array(
|
1093 |
+
'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
|
1094 |
+
),
|
1095 |
+
'body' => json_encode(array(
|
1096 |
+
'email_address' => $email,
|
1097 |
+
'status' => $status
|
1098 |
+
))
|
1099 |
+
);
|
1100 |
+
|
1101 |
+
$mailchimp = wp_remote_post( 'https://' . substr($api_key,strpos($api_key,'-')+1) . '.api.mailchimp.com/3.0/lists/'. $list_id .'/members/' . md5(strtolower($email)), $args );
|
1102 |
|
1103 |
+
if ( !is_wp_error( $mailchimp ) ) {
|
1104 |
+
|
1105 |
+
$body = json_decode( $mailchimp['body'] );
|
1106 |
+
|
1107 |
+
if ( $mailchimp['response']['code'] == 200 && $body->status == $status ) {
|
1108 |
+
$response = $response_ok;
|
1109 |
+
|
1110 |
+
} else {
|
1111 |
+
$response = 'Error ' . $mailchimp['response']['code'] . ' ' . $body->title . ': ' . $body->detail;
|
1112 |
+
}
|
1113 |
+
|
1114 |
+
} else {
|
1115 |
+
$response = $mailchimp->get_error_message();
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
|
1119 |
+
|
1120 |
+
|
1121 |
+
|
1122 |
+
break;
|
1123 |
+
|
1124 |
+
default:
|
1125 |
+
break;
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
// if not email, set response invalid
|
1129 |
} else {
|
1130 |
$response = $response_invalid;
|
1131 |
}
|
1695 |
return $version;
|
1696 |
}
|
1697 |
|
1698 |
+
/**
|
1699 |
+
* Connect to Mailchimp via API and retrieve Mailchimp lists
|
1700 |
+
*
|
1701 |
+
* @since 2.6
|
1702 |
+
* @access public
|
1703 |
+
* @return Object
|
1704 |
+
*/
|
1705 |
+
public function cmp_mailchimp_list_ajax( $apikey ) {
|
1706 |
+
|
1707 |
+
// check for ajax
|
1708 |
+
if ( isset( $_POST['params'] ) ) {
|
1709 |
+
// verify nonce
|
1710 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
1711 |
+
// verify user rights
|
1712 |
+
if( !current_user_can('publish_pages') ) {
|
1713 |
+
die('Sorry, but this request is invalid');
|
1714 |
+
}
|
1715 |
+
|
1716 |
+
// sanitize array
|
1717 |
+
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
|
1718 |
+
|
1719 |
+
// check params
|
1720 |
+
if ( !empty( $_POST['params'] ) ) {
|
1721 |
+
$params = $_POST['params'];
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
$api_key = $params['apikey'];
|
1725 |
+
|
1726 |
+
$dc = substr($api_key,strpos($api_key,'-')+1); // datacenter, it is the part of your api key - us5, us8 etc
|
1727 |
+
|
1728 |
+
$args = array(
|
1729 |
+
'headers' => array(
|
1730 |
+
'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
|
1731 |
+
)
|
1732 |
+
);
|
1733 |
+
|
1734 |
+
|
1735 |
+
// retrieve response from mailchimp
|
1736 |
+
$response = wp_remote_get( 'https://'.$dc.'.api.mailchimp.com/3.0/lists/', $args );
|
1737 |
+
|
1738 |
+
// if we have it, create new array with lists id and name, else push error messages into array
|
1739 |
+
if ( !is_wp_error( $response ) ) {
|
1740 |
+
$lists_array = array();
|
1741 |
+
|
1742 |
+
$body = json_decode( $response['body'], true);
|
1743 |
+
|
1744 |
+
if ( $response['response']['code'] == 200 ) {
|
1745 |
+
$lists_array['response'] = 200;
|
1746 |
+
$i = 0;
|
1747 |
+
foreach ( $body['lists'] as $list ) {
|
1748 |
+
$lists_array['lists'][$i]['id'] = $list['id'];
|
1749 |
+
$lists_array['lists'][$i]['name'] = $list['name'];
|
1750 |
+
$i++;
|
1751 |
+
}
|
1752 |
+
|
1753 |
+
} else {
|
1754 |
+
$lists_array['response'] = $response['response']['code'];
|
1755 |
+
$lists_array['message'] = $body['title'] . ': ' . $body['detail'];
|
1756 |
+
}
|
1757 |
+
|
1758 |
+
} else {
|
1759 |
+
$lists_array['response'] = '500';
|
1760 |
+
$lists_array['message'] = $response->get_error_message();
|
1761 |
+
}
|
1762 |
+
|
1763 |
+
// json encode response
|
1764 |
+
$lists_json = json_encode( $lists_array );
|
1765 |
+
|
1766 |
+
// save it
|
1767 |
+
update_option('niteoCS_mailchimp_lists', $lists_json);
|
1768 |
+
|
1769 |
+
// delete selected old mailchimp list because we do not want it
|
1770 |
+
delete_option('niteoCS_mailchimp_list_selected');
|
1771 |
+
|
1772 |
+
// echo ajax result
|
1773 |
+
echo $lists_json;
|
1774 |
+
wp_die();
|
1775 |
+
|
1776 |
+
}
|
1777 |
+
|
1778 |
+
}
|
1779 |
}
|
1780 |
|
1781 |
$cmpPlugin = new niteo_cmp();
|
readme.txt → cmp-coming-soon-maintenance/readme.txt
RENAMED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
|
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -112,6 +112,13 @@ CMP plugin offers premium features for free, no PRO versions! With blazing speed
|
|
112 |
<p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
|
113 |
|
114 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
<h4>CMP 2.5.2 - maintenance update</h4>
|
116 |
<ul>
|
117 |
<li>Fixed background video on Countdown theme - sorry for that guys!</li>
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
112 |
<p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
|
113 |
|
114 |
== Changelog ==
|
115 |
+
<h4>CMP 2.6 - Mailchimp integration and bug fixes!</h4>
|
116 |
+
<ul>
|
117 |
+
<li>CMP default subscribe form can be integrated directly to Mailchimp via their API now. Woot!</li>
|
118 |
+
<li>Resolved Subscriber form double click submit issue.</li>
|
119 |
+
<li>Resolved Subscriber form double click submit issue. - thanks @idoran!</li>
|
120 |
+
</ul>
|
121 |
+
|
122 |
<h4>CMP 2.5.2 - maintenance update</h4>
|
123 |
<ul>
|
124 |
<li>Fixed background video on Countdown theme - sorry for that guys!</li>
|
{themes → cmp-coming-soon-maintenance/themes}/construct.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/construct/construct-defaults.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/construct/construct-settings.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/construct/construct-theme.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/construct/img/construct_banner_full.jpg
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/construct/img/construct_banner_large.jpg
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/construct/paraxify.min.js
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/construct/style.css
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-defaults.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-settings.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-social_settings.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown/countdown-theme.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown/img/countdown_banner_full.jpg
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown/img/countdown_banner_large.jpg
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/countdown/style.css
RENAMED
@@ -321,6 +321,7 @@ h1,h2,h3,h4,h5,h6 {
|
|
321 |
}
|
322 |
|
323 |
|
|
|
324 |
#background-image.pattern {
|
325 |
background-repeat: repeat;
|
326 |
background-size: initial;
|
321 |
}
|
322 |
|
323 |
|
324 |
+
|
325 |
#background-image.pattern {
|
326 |
background-repeat: repeat;
|
327 |
background-size: initial;
|
{themes → cmp-coming-soon-maintenance/themes}/eclipse.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/fifty.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/frame.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork/hardwork-defaults.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork/hardwork-settings.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork/hardwork-theme.php
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork/img/hardwork_banner_full.jpg
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork/img/hardwork_banner_large.jpg
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork/style.css
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/hardwork_premium.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/orbit.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/postery.txt
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/postery.zip
RENAMED
File without changes
|
{themes → cmp-coming-soon-maintenance/themes}/stylo.txt
RENAMED
File without changes
|
inc/settings/settings-subscribe.php
DELETED
@@ -1,101 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
-
|
4 |
-
|
5 |
-
if (isset($_POST['niteoCS_subscribe_type']) && is_numeric($_POST['niteoCS_subscribe_type'])) {
|
6 |
-
update_option('niteoCS_subscribe_type', sanitize_text_field($_POST['niteoCS_subscribe_type']));
|
7 |
-
}
|
8 |
-
|
9 |
-
if (isset($_POST['niteoCS_subscribe_label'])) {
|
10 |
-
update_option('niteoCS_subscribe_label', sanitize_text_field($_POST['niteoCS_subscribe_label']));
|
11 |
-
}
|
12 |
-
|
13 |
-
if ( isset($_POST['niteoCS_subscribe_code']) ) {
|
14 |
-
$shortcode = str_replace('"', '\'', $_POST['niteoCS_subscribe_code']);
|
15 |
-
update_option('niteoCS_subscribe_code', sanitize_text_field($shortcode));
|
16 |
-
}
|
17 |
-
|
18 |
-
// get subscribe settings
|
19 |
-
$niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
|
20 |
-
$niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
|
21 |
-
$niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
|
22 |
-
$niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
|
23 |
-
|
24 |
-
|
25 |
-
?>
|
26 |
-
|
27 |
-
<div class="table-wrapper content" id="subscribe-section">
|
28 |
-
<h3><?php _e('Subscribe Form', 'cmp-coming-soon-maintenance');?></h3>
|
29 |
-
<table class="content">
|
30 |
-
<tbody>
|
31 |
-
<tr>
|
32 |
-
<th>
|
33 |
-
<fieldset>
|
34 |
-
<legend class="screen-reader-text">
|
35 |
-
<span><?php _e('Subscribe Form Options', 'cmp-coming-soon-maintenance');?></span>
|
36 |
-
</legend>
|
37 |
-
|
38 |
-
<p>
|
39 |
-
<label title="Niteo Subscribe">
|
40 |
-
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>> <?php _e('Niteo Subscribe', 'cmp-coming-soon-maintenance');?>
|
41 |
-
</label>
|
42 |
-
</p>
|
43 |
-
|
44 |
-
<p>
|
45 |
-
<label title="3rd Party Plugin">
|
46 |
-
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="1"<?php if ( $niteoCS_subscribe_type == 1) { echo ' checked="checked"'; } ?>> <?php _e('3rd Party Plugin', 'cmp-coming-soon-maintenance');?>
|
47 |
-
</label>
|
48 |
-
</p>
|
49 |
-
|
50 |
-
<p>
|
51 |
-
<label title="Disabled">
|
52 |
-
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="0"<?php if ( $niteoCS_subscribe_type == 0) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
53 |
-
</label>
|
54 |
-
</p>
|
55 |
-
|
56 |
-
</fieldset>
|
57 |
-
</th>
|
58 |
-
|
59 |
-
<td id="subscribe-disabled" class="subscribe-switch x0">
|
60 |
-
<p><?php _e('Subscribe Form is disabled.', 'cmp-coming-soon-maintenance');?></p>
|
61 |
-
</td>
|
62 |
-
|
63 |
-
<td id="subscribe-3rdparty" class="subscribe-switch x1">
|
64 |
-
<fieldset>
|
65 |
-
<label class="subscribe" for="niteoCS_subscribe_code">3rd Party Plugin Shortcode
|
66 |
-
<input type="text" name="niteoCS_subscribe_code" id="niteoCS_subscribe_code" value="<?php echo stripslashes( esc_attr($niteoCS_subscribe_code ));?>" class="regular-text code">
|
67 |
-
</label>
|
68 |
-
|
69 |
-
<p><?php _e('You can find Shortode in your Contact Form Plugin settings. Should be something similar to code below: ', 'cmp-coming-soon-maintenance');?><br><code>[contact-form-7 id="8" title='Contact form 1']</code> or <code>[mc4wp_form id='7']</code></p>
|
70 |
-
|
71 |
-
<p><?php _e('Your Subscribe Form should have only one input (type=email) and submit (input=submit). If you have more than one input field, our design will not work and you need to use custom CSS to style your Subscribe form.', 'cmp-coming-soon-maintenance');?></p>
|
72 |
-
<p><?php _e('Example of Subscribe Form code for ', 'cmp-coming-soon-maintenance');?><a href="https://wordpress.org/plugins/mailchimp-for-wp/">MailChimp</a> plugin:</p>
|
73 |
-
<code>
|
74 |
-
<p>
|
75 |
-
<input type="email" name="EMAIL" placeholder="Your email address" required />
|
76 |
-
<input type="submit" value="Sign up" />
|
77 |
-
</p>
|
78 |
-
</code>
|
79 |
-
</fieldset>
|
80 |
-
</td>
|
81 |
-
|
82 |
-
<td id="subscribe-niteo" class="subscribe-switch x2">
|
83 |
-
<fieldset>
|
84 |
-
<p><?php _e('Default subscribe form will be displayed to visitors. Only export of email addresses to .csv file is supported. Mailing List will be deleted after deletion of CMP plugin.', 'cmp-coming-soon-maintenance');?></p>
|
85 |
-
|
86 |
-
<label class="subscribe" for="niteoCS_subscribe_label">Subscribe form Label
|
87 |
-
<input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr($niteoCS_subscribe_label );?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
|
88 |
-
</label>
|
89 |
-
|
90 |
-
<p><?php _e('Total Subscribers: ', 'cmp-coming-soon-maintenance');?><a href="<?php echo admin_url(); ?>admin.php?page=cmp-subscribers""><?php echo $niteoCS_subscribers_list ? count( $niteoCS_subscribers_list ) : '0';?></a> </p>
|
91 |
-
|
92 |
-
</fieldset>
|
93 |
-
</td>
|
94 |
-
|
95 |
-
</tr>
|
96 |
-
|
97 |
-
<?php echo $this->render_settings->submit(); ?>
|
98 |
-
|
99 |
-
</tbody>
|
100 |
-
</table>
|
101 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/typography.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(t){headingVariant=jQuery(".headings-google-font-variant").val(),contentVariant=jQuery(".content-google-font-variant").val(),fontVariant=function(t){switch(t){case"100":return"Thin 100";case"100italic":return"Thin 100 Italic";case"200":return"Extra-light 200";case"200italic":return"Extra-light 200 Italic";case"300":return"Light 300";case"300italic":return"Light 300 Italic";case"400":return"Regular 400";case"400italic":return"Regular 400 Italic";case"500":return"Medium 500";case"500italic":return"Meidum 500 Italic";case"600":return"Semi-Bold 600";case"600italic":return"Semi-Bold 600 Italic";case"700":return"Bold 700";case"700italic":return"Bold 700 Italic";case"800":return"Extra-Bold 800";case"800italic":return"Extra-Bold Italic";case"900":return"Black 900";case"900italic":return"Black 900 Italic";case"regular":return"Regular 400";case"italic":return"Regular 400 Italic"}};var e=fonts.google.filter(function(t){return t.id===jQuery(".headings-google-font option:selected").val()}),a=fonts.google.filter(function(t){return t.id===jQuery(".content-google-font option:selected").val()});if(e.length)var n=jQuery.map(e[0].variants,function(t){return{id:t,text:fontVariant(t)}});if(a.length)var i=jQuery.map(a[0].variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFont=jQuery(".headings-google-font").select2({data:fonts.google,width:"100%"}),$contentFont=jQuery(".content-google-font").select2({data:fonts.google,width:"100%"}),$HeadingFontVariant=jQuery(".headings-google-font-variant").select2({data:n}),$contentFontVariant=jQuery(".content-google-font-variant").select2({data:i}),$HeadingFont.on("select2:select",function(t){var e=$HeadingFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFontVariant.empty(),$HeadingFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):$HeadingFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#heading-example, #niteoCS-text-logo").css("font-family",t.params.data.text)}})}),$HeadingFontVariant.on("select2:select",function(t){headingVariant=t.params.data.id,jQuery.isNumeric(headingVariant)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",fontweight).css("font-style","italic"))}),$contentFont.on("select2:select",function(t){var e=$contentFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$contentFontVariant.empty(),$contentFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):$contentFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#content-example").css("font-family",t.params.data.text)}})}),$contentFontVariant.on("select2:select",function(t){contentVariant=t.params.data.id,jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic"))}),jQuery(".font-selector input[type=range]").on("input",function(){var t=jQuery(this).data("type"),e=jQuery(this).data("css"),a=jQuery(this).val();jQuery(this).parent().find("span").html(a),a="line-height"==e?a:a+"px","heading"==t?jQuery("#heading-example").css(e,a):jQuery("#content-example").css(e,a)}),e.length&&a.length&&WebFont.load({google:{families:[e[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic",a[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery.isNumeric(headingVariant)?jQuery("#heading-example").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example").css("font-weight",fontweight).css("font-style","italic")),jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic")),jQuery("#heading-example, #niteoCS-text-logo").css("font-family",e[0].id),jQuery("#content-example").css("font-family",a[0].id)}})});
|
|