Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 2.8.1 |
Comparing to | |
See all releases |
Code changes from version 2.8 to 2.8.1
- cmp-settings.php +13 -13
- cmp-sidebar.php +3 -1
- css/animate.min.css +2 -183
- inc/class-cmp-render_html.php +12 -8
- inc/settings/settings-subscribe-disabled.php +2 -2
- inc/settings/settings-subscribe.php +31 -19
- js/cmp-admin-head.js +2 -1
- languages/coming-soon-default.mo +0 -0
- languages/coming-soon-default.po +1191 -248
- niteo-cmp.php +1600 -1453
- readme.txt +9 -1
- themes/construct/construct-theme.php +1 -1
- themes/countdown/countdown-theme.php +1 -1
- themes/hardwork/hardwork-theme.php +1 -1
- themes/hardwork/style.css +3 -1
cmp-settings.php
CHANGED
@@ -9,7 +9,7 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
|
9 |
|
10 |
}
|
11 |
|
12 |
-
if ( isset($_POST['niteoCS_select_theme']) && in_array($_POST['niteoCS_select_theme'], $this->
|
13 |
update_option('niteoCS_theme', sanitize_text_field($_POST['niteoCS_select_theme']));
|
14 |
}
|
15 |
|
@@ -256,7 +256,7 @@ $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
|
|
256 |
// get Content Settings
|
257 |
$niteoCS_body_title = stripslashes(get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!'));
|
258 |
$niteoCS_body = stripslashes(get_option('niteoCS_body'));
|
259 |
-
$niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', '
|
260 |
$niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
|
261 |
|
262 |
|
@@ -380,7 +380,7 @@ if( isset($_POST['submit_theme']) ) {
|
|
380 |
// Handle Theme update
|
381 |
if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
|
382 |
$slug = sanitize_text_field($_GET['theme']);
|
383 |
-
$theme_url =
|
384 |
$update = array(
|
385 |
'name' => $slug,
|
386 |
'tmp_name' => '',
|
@@ -499,29 +499,29 @@ add_thickbox();
|
|
499 |
</legend>
|
500 |
<?php
|
501 |
// move active theme to beginning
|
502 |
-
$key = array_search ($this->cmp_selectedTheme(), $this->
|
503 |
if ( $key ) {
|
504 |
-
$active = $this->
|
505 |
-
unset($this->
|
506 |
-
array_unshift($this->
|
507 |
}
|
508 |
|
509 |
// define what attribute we want from style.css header
|
510 |
$headers = array('Version');
|
511 |
-
|
512 |
-
foreach ( $this->
|
513 |
$version = $this->cmp_theme_version( $theme_slug );
|
514 |
$type = 'standard';
|
515 |
|
516 |
// if premium get theme version
|
517 |
-
if ( in_array( $theme_slug, $this->
|
518 |
$type = 'premium';
|
519 |
}
|
520 |
|
521 |
// get thumbnail
|
522 |
$thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
|
523 |
|
524 |
-
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url(
|
525 |
<div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
|
526 |
|
527 |
<div class="buttons-wrapper">
|
@@ -840,7 +840,7 @@ add_thickbox();
|
|
840 |
}
|
841 |
|
842 |
// special effects for premium themes
|
843 |
-
if ( in_array( $this->cmp_selectedTheme(), $this->
|
844 |
|
845 |
// get background effects settings
|
846 |
if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-special_effects.php' ) ) {
|
@@ -1083,7 +1083,7 @@ add_thickbox();
|
|
1083 |
</p>
|
1084 |
|
1085 |
<p class="analytics-switch other">
|
1086 |
-
<label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code', 'cmp-coming-soon-maintenance');?></label><br>
|
1087 |
<textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo stripslashes( esc_js( $niteoCS_analytics_other ) ); ?></textarea>
|
1088 |
</p>
|
1089 |
</fieldset>
|
9 |
|
10 |
}
|
11 |
|
12 |
+
if ( isset($_POST['niteoCS_select_theme']) && in_array($_POST['niteoCS_select_theme'], $this->cmp_themes_available)) {
|
13 |
update_option('niteoCS_theme', sanitize_text_field($_POST['niteoCS_select_theme']));
|
14 |
}
|
15 |
|
256 |
// get Content Settings
|
257 |
$niteoCS_body_title = stripslashes(get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!'));
|
258 |
$niteoCS_body = stripslashes(get_option('niteoCS_body'));
|
259 |
+
$niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.'));
|
260 |
$niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
|
261 |
|
262 |
|
380 |
// Handle Theme update
|
381 |
if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
|
382 |
$slug = sanitize_text_field($_GET['theme']);
|
383 |
+
$theme_url = CMP_UPDATE_URL.'?action=download&slug='.$slug;
|
384 |
$update = array(
|
385 |
'name' => $slug,
|
386 |
'tmp_name' => '',
|
499 |
</legend>
|
500 |
<?php
|
501 |
// move active theme to beginning
|
502 |
+
$key = array_search ( $this->cmp_selectedTheme(), $this->cmp_themes_available );
|
503 |
if ( $key ) {
|
504 |
+
$active = $this->cmp_themes_available[$key];
|
505 |
+
unset( $this->cmp_themes_available[$key] );
|
506 |
+
array_unshift( $this->cmp_themes_available, $active );
|
507 |
}
|
508 |
|
509 |
// define what attribute we want from style.css header
|
510 |
$headers = array('Version');
|
511 |
+
|
512 |
+
foreach ( $this->cmp_themes_available as $theme_slug ) {
|
513 |
$version = $this->cmp_theme_version( $theme_slug );
|
514 |
$type = 'standard';
|
515 |
|
516 |
// if premium get theme version
|
517 |
+
if ( in_array( $theme_slug, $this->cmp_themes_premium_installed ) ) {
|
518 |
$type = 'premium';
|
519 |
}
|
520 |
|
521 |
// get thumbnail
|
522 |
$thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
|
523 |
|
524 |
+
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url(CMP_UPDATE_URL);?>">
|
525 |
<div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
|
526 |
|
527 |
<div class="buttons-wrapper">
|
840 |
}
|
841 |
|
842 |
// special effects for premium themes
|
843 |
+
if ( in_array( $this->cmp_selectedTheme(), $this->cmp_themes_premium_installed ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
|
844 |
|
845 |
// get background effects settings
|
846 |
if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-special_effects.php' ) ) {
|
1083 |
</p>
|
1084 |
|
1085 |
<p class="analytics-switch other">
|
1086 |
+
<label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code. Script tags will be stripped.', 'cmp-coming-soon-maintenance');?></label><br>
|
1087 |
<textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo stripslashes( esc_js( $niteoCS_analytics_other ) ); ?></textarea>
|
1088 |
</p>
|
1089 |
</fieldset>
|
cmp-sidebar.php
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
<div class="cmp-sidebar-wrapper">
|
2 |
|
3 |
<div class="selected-theme widget">
|
4 |
-
<h3 class="title"><?php _e('
|
|
|
|
|
5 |
|
6 |
</div>
|
7 |
|
1 |
<div class="cmp-sidebar-wrapper">
|
2 |
|
3 |
<div class="selected-theme widget">
|
4 |
+
<h3 class="title"><?php _e('Selected CMP Theme', 'cmp-coming-soon-maintenance');?>: <?php echo ucwords( esc_html( str_replace( '_', ' ', $this->cmp_selectedTheme() ) ) );?></h3>
|
5 |
+
|
6 |
+
<img src="<?php echo esc_url( plugins_url('/img/thumbnails/'. $this->cmp_selectedTheme() . '_thumbnail.jpg', __FILE__) );?>" style="max-width:100%" alt="">
|
7 |
|
8 |
</div>
|
9 |
|
css/animate.min.css
CHANGED
@@ -1,188 +1,7 @@
|
|
1 |
-
@charset "UTF-8"
|
2 |
-
|
3 |
-
/*!
|
4 |
* animate.css -http://daneden.me/animate
|
5 |
* Version - 3.5.2
|
6 |
* Licensed under the MIT license - http://opensource.org/licenses/MIT
|
7 |
*
|
8 |
* Copyright (c) 2017 Daniel Eden
|
9 |
-
|
10 |
-
|
11 |
-
.animated {
|
12 |
-
-webkit-animation-duration: 1s;
|
13 |
-
animation-duration: 1s;
|
14 |
-
-webkit-animation-fill-mode: both;
|
15 |
-
animation-fill-mode: both;
|
16 |
-
}
|
17 |
-
|
18 |
-
.animated-fast {
|
19 |
-
-webkit-animation-duration: 300ms;
|
20 |
-
animation-duration: 300ms;
|
21 |
-
-webkit-animation-fill-mode: both;
|
22 |
-
animation-fill-mode: both;
|
23 |
-
}
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
@-webkit-keyframes fadeInDown {
|
28 |
-
from {
|
29 |
-
opacity: 0;
|
30 |
-
-webkit-transform: translate3d(0, -50px, 0);
|
31 |
-
transform: translate3d(0, -50px, 0);
|
32 |
-
}
|
33 |
-
|
34 |
-
to {
|
35 |
-
opacity: 1;
|
36 |
-
-webkit-transform: none;
|
37 |
-
transform: none;
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
@keyframes fadeInDown {
|
42 |
-
from {
|
43 |
-
opacity: 0;
|
44 |
-
-webkit-transform: translate3d(0, -50px, 0);
|
45 |
-
transform: translate3d(0, -50px, 0);
|
46 |
-
}
|
47 |
-
|
48 |
-
to {
|
49 |
-
opacity: 1;
|
50 |
-
-webkit-transform: none;
|
51 |
-
transform: none;
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
.fadeInDown {
|
56 |
-
-webkit-animation-name: fadeInDown;
|
57 |
-
animation-name: fadeInDown;
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
@-webkit-keyframes fadeInLeft {
|
62 |
-
from {
|
63 |
-
opacity: 0;
|
64 |
-
-webkit-transform: translate3d(-50px, 0, 0);
|
65 |
-
transform: translate3d(-50px, 0, 0);
|
66 |
-
}
|
67 |
-
|
68 |
-
to {
|
69 |
-
opacity: 1;
|
70 |
-
-webkit-transform: none;
|
71 |
-
transform: none;
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
@keyframes fadeInLeft {
|
76 |
-
from {
|
77 |
-
opacity: 0;
|
78 |
-
-webkit-transform: translate3d(-50px, 0, 0);
|
79 |
-
transform: translate3d(-50px, 0, 0);
|
80 |
-
}
|
81 |
-
|
82 |
-
to {
|
83 |
-
opacity: 1;
|
84 |
-
-webkit-transform: none;
|
85 |
-
transform: none;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
.fadeInLeft {
|
90 |
-
-webkit-animation-name: fadeInLeft;
|
91 |
-
animation-name: fadeInLeft;
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
@-webkit-keyframes fadeInRight {
|
96 |
-
from {
|
97 |
-
opacity: 0;
|
98 |
-
-webkit-transform: translate3d(50px, 0, 0);
|
99 |
-
transform: translate3d(50px, 0, 0);
|
100 |
-
}
|
101 |
-
|
102 |
-
to {
|
103 |
-
opacity: 1;
|
104 |
-
-webkit-transform: none;
|
105 |
-
transform: none;
|
106 |
-
}
|
107 |
-
}
|
108 |
-
|
109 |
-
@keyframes fadeInRight {
|
110 |
-
from {
|
111 |
-
opacity: 0;
|
112 |
-
-webkit-transform: translate3d(50px, 0, 0);
|
113 |
-
transform: translate3d(50px, 0, 0);
|
114 |
-
}
|
115 |
-
|
116 |
-
to {
|
117 |
-
opacity: 1;
|
118 |
-
-webkit-transform: none;
|
119 |
-
transform: none;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
.fadeInRight {
|
124 |
-
-webkit-animation-name: fadeInRight;
|
125 |
-
animation-name: fadeInRight;
|
126 |
-
}
|
127 |
-
|
128 |
-
@-webkit-keyframes fadeInUp {
|
129 |
-
from {
|
130 |
-
opacity: 0;
|
131 |
-
-webkit-transform: translate3d(0, 50px, 0);
|
132 |
-
transform: translate3d(0, 50px, 0);
|
133 |
-
}
|
134 |
-
|
135 |
-
to {
|
136 |
-
opacity: 1;
|
137 |
-
-webkit-transform: none;
|
138 |
-
transform: none;
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
@keyframes fadeInUp {
|
143 |
-
from {
|
144 |
-
opacity: 0;
|
145 |
-
-webkit-transform: translate3d(0, 50px, 0);
|
146 |
-
transform: translate3d(0, 50px, 0);
|
147 |
-
}
|
148 |
-
|
149 |
-
to {
|
150 |
-
opacity: 1;
|
151 |
-
-webkit-transform: none;
|
152 |
-
transform: none;
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
.fadeInUp {
|
157 |
-
-webkit-animation-name: fadeInUp;
|
158 |
-
animation-name: fadeInUp;
|
159 |
-
}
|
160 |
-
|
161 |
-
@-webkit-keyframes zoomIn {
|
162 |
-
from {
|
163 |
-
opacity: 0;
|
164 |
-
-webkit-transform: scale3d(0.3, 0.3, 0.3);
|
165 |
-
transform: scale3d(0.3, 0.3, 0.3);
|
166 |
-
}
|
167 |
-
|
168 |
-
50% {
|
169 |
-
opacity: 1;
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
@keyframes zoomIn {
|
174 |
-
from {
|
175 |
-
opacity: 0;
|
176 |
-
-webkit-transform: scale3d(0.3, 0.3, 0.3);
|
177 |
-
transform: scale3d(0.3, 0.3, 0.3);
|
178 |
-
}
|
179 |
-
|
180 |
-
50% {
|
181 |
-
opacity: 1;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
.zoomIn {
|
186 |
-
-webkit-animation-name: zoomIn;
|
187 |
-
animation-name: zoomIn;
|
188 |
-
}
|
1 |
+
@charset "UTF-8";/*!
|
|
|
|
|
2 |
* animate.css -http://daneden.me/animate
|
3 |
* Version - 3.5.2
|
4 |
* Licensed under the MIT license - http://opensource.org/licenses/MIT
|
5 |
*
|
6 |
* Copyright (c) 2017 Daniel Eden
|
7 |
+
*/.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-50px,0,0);transform:translate3d(-50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-50px,0,0);transform:translate3d(-50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(50px,0,0);transform:translate3d(50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(50px,0,0);transform:translate3d(50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-cmp-render_html.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
|
4 |
/**
|
5 |
-
* Create a new
|
6 |
*/
|
7 |
-
class
|
8 |
|
9 |
// Render Background
|
10 |
public function cmp_background( $niteoCS_banner, $themeslug ) {
|
@@ -494,9 +494,9 @@ class cmp_render_html extends niteo_cmp {
|
|
494 |
if ( $logo_id != '' ) {
|
495 |
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
496 |
}
|
|
|
497 |
if ( isset($logo_url[0]) ) {
|
498 |
$html = '<div class="logo-wrapper image"><img src="'.esc_url( $logo_url[0] ).'" class="graphic-logo" alt="logo"></div>';
|
499 |
-
|
500 |
}
|
501 |
break;
|
502 |
|
@@ -504,10 +504,12 @@ class cmp_render_html extends niteo_cmp {
|
|
504 |
$text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));
|
505 |
$html = '<div class="text-logo-wrapper"><h1 class="text-logo">'.esc_html( $text_logo ).'</h1></div>';
|
506 |
break;
|
|
|
507 |
case 'disabled':
|
508 |
default:
|
509 |
break;
|
510 |
}
|
|
|
511 |
return $html;
|
512 |
}
|
513 |
|
@@ -885,8 +887,10 @@ class cmp_render_html extends niteo_cmp {
|
|
885 |
</style>
|
886 |
|
887 |
<?php
|
|
|
888 |
// check for premium themes special effects
|
889 |
-
|
|
|
890 |
|
891 |
$effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
|
892 |
|
@@ -930,8 +934,8 @@ class cmp_render_html extends niteo_cmp {
|
|
930 |
* @return HTML
|
931 |
**/
|
932 |
public function cmp_get_copyright() {
|
933 |
-
if ( get_option('niteoCS_copyright', '
|
934 |
-
$copyright = stripslashes(get_option('niteoCS_copyright', '
|
935 |
$allowed_html = array(
|
936 |
'a' => array(
|
937 |
'href' => array(),
|
@@ -942,7 +946,7 @@ class cmp_render_html extends niteo_cmp {
|
|
942 |
'strong' => array(),
|
943 |
);
|
944 |
|
945 |
-
return '<p class="copyright">'.wp_kses( $copyright, $allowed_html ).'</p>';
|
946 |
|
947 |
}
|
948 |
|
@@ -1173,7 +1177,7 @@ class cmp_render_html extends niteo_cmp {
|
|
1173 |
|
1174 |
|
1175 |
// special effects
|
1176 |
-
if ( in_array( $this->cmp_selectedTheme(), $this->
|
1177 |
$effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
|
1178 |
|
1179 |
switch ( $effect ) {
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
|
4 |
/**
|
5 |
+
* Create a new cmp_render_html class that will extend the CMP_Coming_Soon_and_Maintenance
|
6 |
*/
|
7 |
+
class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Maintenance {
|
8 |
|
9 |
// Render Background
|
10 |
public function cmp_background( $niteoCS_banner, $themeslug ) {
|
494 |
if ( $logo_id != '' ) {
|
495 |
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
496 |
}
|
497 |
+
|
498 |
if ( isset($logo_url[0]) ) {
|
499 |
$html = '<div class="logo-wrapper image"><img src="'.esc_url( $logo_url[0] ).'" class="graphic-logo" alt="logo"></div>';
|
|
|
500 |
}
|
501 |
break;
|
502 |
|
504 |
$text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));
|
505 |
$html = '<div class="text-logo-wrapper"><h1 class="text-logo">'.esc_html( $text_logo ).'</h1></div>';
|
506 |
break;
|
507 |
+
|
508 |
case 'disabled':
|
509 |
default:
|
510 |
break;
|
511 |
}
|
512 |
+
|
513 |
return $html;
|
514 |
}
|
515 |
|
887 |
</style>
|
888 |
|
889 |
<?php
|
890 |
+
|
891 |
// check for premium themes special effects
|
892 |
+
|
893 |
+
if ( in_array( $this->cmp_selectedTheme(), $this->cmp_themes_premium_installed ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
|
894 |
|
895 |
$effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
|
896 |
|
934 |
* @return HTML
|
935 |
**/
|
936 |
public function cmp_get_copyright() {
|
937 |
+
if ( get_option( 'niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.' ) !== '' ) {
|
938 |
+
$copyright = stripslashes( get_option('niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.') );
|
939 |
$allowed_html = array(
|
940 |
'a' => array(
|
941 |
'href' => array(),
|
946 |
'strong' => array(),
|
947 |
);
|
948 |
|
949 |
+
return '<p class="copyright">' . wp_kses( $copyright, $allowed_html ) . '</p>';
|
950 |
|
951 |
}
|
952 |
|
1177 |
|
1178 |
|
1179 |
// special effects
|
1180 |
+
if ( in_array( $this->cmp_selectedTheme(), $this->cmp_themes_premium_installed ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
|
1181 |
$effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
|
1182 |
|
1183 |
switch ( $effect ) {
|
inc/settings/settings-subscribe-disabled.php
CHANGED
@@ -14,8 +14,8 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
14 |
</legend>
|
15 |
|
16 |
<p>
|
17 |
-
<label title="
|
18 |
-
<input disabled type="radio" name="niteoCS_subscribe_type" value="2"> <?php _e('
|
19 |
</label>
|
20 |
</p>
|
21 |
|
14 |
</legend>
|
15 |
|
16 |
<p>
|
17 |
+
<label title="CMP Subscribe Form">
|
18 |
+
<input disabled type="radio" name="niteoCS_subscribe_type" value="2"> <?php _e('CMP Subscribe Form', 'cmp-coming-soon-maintenance');?>
|
19 |
</label>
|
20 |
</p>
|
21 |
|
inc/settings/settings-subscribe.php
CHANGED
@@ -27,6 +27,15 @@ 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 |
|
@@ -55,8 +64,8 @@ $mailchimp_lists = json_decode(get_option('niteoCS_mailchimp_lists', false),
|
|
55 |
</legend>
|
56 |
|
57 |
<p>
|
58 |
-
<label title="
|
59 |
-
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>> <?php _e('
|
60 |
</label>
|
61 |
</p>
|
62 |
|
@@ -121,30 +130,33 @@ $mailchimp_lists = json_decode(get_option('niteoCS_mailchimp_lists', false),
|
|
121 |
|
122 |
<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>
|
123 |
|
|
|
124 |
|
125 |
-
<
|
|
|
|
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
if ( $mailchimp_lists['response'] == 200 ) {
|
132 |
-
foreach ( $mailchimp_lists['lists'] as $list) { ?>
|
133 |
-
<option value="<?php echo esc_attr( $list['id'] );?>" <?php selected( $list['id'], $mailchimp_list_selected ); ?>><?php echo esc_attr( $list['name'] );?></option>
|
134 |
-
<?php
|
135 |
-
}
|
136 |
-
} else { ?>
|
137 |
-
<option value="error"><?php echo esc_attr( $mailchimp_lists['response'] . ': ' . $mailchimp_lists['message']);?></option>
|
138 |
<?php
|
139 |
}
|
140 |
-
|
141 |
} else { ?>
|
142 |
-
<option value="error"><?php
|
143 |
<?php
|
144 |
-
}
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
-
|
148 |
|
149 |
</div>
|
150 |
|
27 |
update_option('niteoCS_mailchimp_list_selected', sanitize_text_field($_POST['niteoCS_mailchimp_list_selected']));
|
28 |
}
|
29 |
|
30 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
31 |
+
|
32 |
+
if ( isset($_POST['niteoCS_mailchimp_double_opt']) ) {
|
33 |
+
update_option('niteoCS_mailchimp[double-opt]', $this->sanitize_checkbox($_POST['niteoCS_mailchimp_double_opt']));
|
34 |
+
} else {
|
35 |
+
update_option('niteoCS_mailchimp[double-opt]', false);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
|
40 |
// delete_option('niteoCS_mailchimp_lists');
|
41 |
|
64 |
</legend>
|
65 |
|
66 |
<p>
|
67 |
+
<label title="CMP Subscribe Form">
|
68 |
+
<input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>> <?php _e('CMP Subscribe Form', 'cmp-coming-soon-maintenance');?>
|
69 |
</label>
|
70 |
</p>
|
71 |
|
130 |
|
131 |
<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>
|
132 |
|
133 |
+
<label for="niteoCS_mailchimp_list"><?php _e('Select MailChimp List to store emails.', 'cmp-coming-soon-maintenance');?>
|
134 |
|
135 |
+
<select name="niteoCS_mailchimp_list_selected" id="mailchimp-lists-select">
|
136 |
+
<?php
|
137 |
+
if ( is_array( $mailchimp_lists ) ) {
|
138 |
|
139 |
+
if ( $mailchimp_lists['response'] == 200 ) {
|
140 |
+
foreach ( $mailchimp_lists['lists'] as $list) { ?>
|
141 |
+
<option value="<?php echo esc_attr( $list['id'] );?>" <?php selected( $list['id'], $mailchimp_list_selected ); ?>><?php echo esc_attr( $list['name'] );?></option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
<?php
|
143 |
}
|
|
|
144 |
} else { ?>
|
145 |
+
<option value="error"><?php echo esc_attr( $mailchimp_lists['response'] . ': ' . $mailchimp_lists['message']);?></option>
|
146 |
<?php
|
147 |
+
}
|
148 |
+
|
149 |
+
} else { ?>
|
150 |
+
<option value="error"><?php _e('Please insert MailChimp API key to retrieve Lists.', 'cmp-coming-soon-maintenance');?></option>
|
151 |
+
<?php
|
152 |
+
} ?>
|
153 |
+
</select>
|
154 |
+
|
155 |
+
</label>
|
156 |
+
|
157 |
+
<br><br>
|
158 |
|
159 |
+
<label><input type="checkbox" name="niteoCS_mailchimp_double_opt" value="1" <?php checked( '1', get_option( 'niteoCS_mailchimp[double-opt]', '0' ) ); ?> class="regular-text code"><?php _e('Enable MailChimp Double Opt In', 'cmp-coming-soon-maintenance');?></label>
|
160 |
|
161 |
</div>
|
162 |
|
js/cmp-admin-head.js
CHANGED
@@ -10,7 +10,8 @@ jQuery(document).ready(function($){
|
|
10 |
};
|
11 |
|
12 |
|
13 |
-
$.post(
|
|
|
14 |
if (response == 'success') {
|
15 |
jQuery('.cmp-status input[type=radio]').prop('disabled', function (_, val) { return ! val; });
|
16 |
jQuery('#cmp-status').prop('checked', function (_, val) { return ! val; });
|
10 |
};
|
11 |
|
12 |
|
13 |
+
$.post(cmp_ajax.ajax_url, data, function(response) {
|
14 |
+
|
15 |
if (response == 'success') {
|
16 |
jQuery('.cmp-status input[type=radio]').prop('disabled', function (_, val) { return ! val; });
|
17 |
jQuery('#cmp-status').prop('checked', function (_, val) { return ! val; });
|
languages/coming-soon-default.mo
CHANGED
Binary file
|
languages/coming-soon-default.po
CHANGED
@@ -1,481 +1,1424 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: cmp\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
-
"Language-Team:
|
8 |
"Language: en\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit
|
13 |
-
"X-Poedit-Basepath:
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: _e;__\n"
|
16 |
-
"X-Poedit-
|
17 |
-
"X-Poedit-SearchPath-
|
18 |
|
19 |
-
#: cmp-
|
20 |
-
msgid "
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: cmp-
|
24 |
-
msgid "
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: cmp-
|
28 |
-
msgid "
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: cmp-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
msgid ""
|
33 |
"JavaScript appears to be disabled in your browser. For this plugin to work "
|
34 |
"correctly, please enable JavaScript or switch to a more modern browser."
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: cmp-
|
38 |
msgid "Settings"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: cmp-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: cmp-
|
47 |
msgid "SEO"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: cmp-
|
51 |
msgid "Custom CSS"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: cmp-
|
55 |
msgid "Preview"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: cmp-
|
59 |
-
msgid "Install New Theme"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:327
|
63 |
msgid "General Settings"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: cmp-
|
67 |
-
#: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:334
|
68 |
msgid "Status"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: cmp-
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: cmp-
|
77 |
msgid ""
|
78 |
-
"
|
79 |
-
"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: cmp-
|
83 |
msgid "Maintanance Mode"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: cmp-
|
87 |
msgid ""
|
88 |
"Returns 503 HTTP Service unavailable code to indexing robots. Set this "
|
89 |
"option if your site is down due to maintanance and you want to display "
|
90 |
"Maintanance page."
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: cmp-
|
94 |
-
msgid "
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: cmp-
|
98 |
msgid ""
|
99 |
-
"
|
100 |
-
|
|
|
|
|
|
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: cmp-
|
104 |
-
msgid "
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: cmp-
|
108 |
-
#: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:361
|
109 |
msgid "Free Themes"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: cmp-
|
113 |
-
|
114 |
-
msgid "Premium Themes"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: cmp-
|
118 |
-
msgid "
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: cmp-
|
122 |
-
msgid "
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: cmp-
|
126 |
-
msgid "
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: cmp-
|
130 |
-
msgid "
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: cmp-
|
134 |
-
msgid "
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: cmp-
|
138 |
-
msgid "
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: cmp-
|
142 |
-
msgid "
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: cmp-
|
146 |
-
msgid ""
|
147 |
-
"Pro Tip! You can select multiple Media from your library by holding CTRL"
|
148 |
-
"+click (Command+click if you sit on MacOS) while selecting photos."
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: cmp-
|
152 |
-
|
|
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: cmp-
|
156 |
-
msgid "
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: cmp-
|
160 |
-
msgid "
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: cmp-
|
164 |
-
msgid "
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: cmp-
|
168 |
-
msgid "
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: cmp-
|
172 |
-
msgid "
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: cmp-
|
176 |
-
msgid "
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: cmp-
|
180 |
-
msgid "
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: cmp-
|
184 |
-
msgid "
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: cmp-
|
188 |
-
msgid "
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: cmp-
|
192 |
-
msgid "
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: cmp-
|
196 |
-
msgid "
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: cmp-
|
200 |
-
msgid "
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: cmp-
|
204 |
-
msgid "
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: cmp-
|
208 |
-
msgid ""
|
209 |
-
"Enter Unsplash Collection URL or Collection ID. Doesn`t work for Curated "
|
210 |
-
"Collections."
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: cmp-
|
214 |
-
msgid "
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: cmp-
|
218 |
-
msgid "
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: cmp-
|
222 |
-
msgid "
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: cmp-
|
226 |
-
msgid "
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: cmp-
|
230 |
-
|
231 |
-
msgid "Select from predefined Google Fonts or insert Custom font"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: cmp-
|
235 |
-
msgid "
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: cmp-
|
239 |
-
|
240 |
-
msgid "Enter name of "
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: cmp-
|
|
|
|
|
|
|
|
|
244 |
msgid "Content Font"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: cmp-
|
248 |
-
msgid "
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: cmp-
|
252 |
-
msgid "
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: cmp-
|
256 |
-
msgid "
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: cmp-
|
260 |
-
msgid "
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: cmp-
|
264 |
-
msgid "
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: cmp-
|
268 |
-
msgid "
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: cmp-
|
272 |
-
msgid "
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: cmp-
|
276 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: cmp-
|
280 |
msgid ""
|
281 |
-
"
|
282 |
-
"
|
|
|
|
|
|
|
|
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: cmp-
|
|
|
286 |
msgid ""
|
287 |
-
"
|
288 |
-
"
|
289 |
-
"work and you need to use custom CSS to style your Subscribe form."
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: cmp-
|
293 |
-
msgid "
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: cmp-
|
297 |
msgid ""
|
298 |
-
"
|
299 |
-
"
|
300 |
-
"deletion of CMP plugin."
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: cmp-
|
304 |
-
msgid "
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: cmp-
|
308 |
-
msgid "
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: cmp-
|
312 |
-
|
|
|
|
|
|
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: cmp-
|
316 |
-
msgid "
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: cmp-
|
320 |
-
msgid "
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: cmp-
|
324 |
-
msgid "
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: cmp-
|
328 |
-
|
|
|
|
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: cmp-
|
332 |
-
msgid "
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: cmp-
|
336 |
-
msgid "
|
337 |
msgstr ""
|
338 |
|
339 |
-
#:
|
340 |
-
|
|
|
341 |
msgstr ""
|
342 |
|
343 |
-
#:
|
344 |
-
msgid "
|
345 |
msgstr ""
|
346 |
|
347 |
-
#:
|
348 |
-
|
|
|
349 |
msgstr ""
|
350 |
|
351 |
-
#:
|
352 |
-
msgid "
|
353 |
msgstr ""
|
354 |
|
355 |
-
#:
|
356 |
-
|
|
|
357 |
msgstr ""
|
358 |
|
359 |
-
#:
|
360 |
-
msgid "
|
361 |
msgstr ""
|
362 |
|
363 |
-
#:
|
364 |
-
|
|
|
365 |
msgstr ""
|
366 |
|
367 |
-
#:
|
368 |
-
msgid "
|
369 |
msgstr ""
|
370 |
|
371 |
-
#:
|
372 |
-
|
|
|
373 |
msgstr ""
|
374 |
|
375 |
-
#:
|
376 |
-
msgid "
|
377 |
msgstr ""
|
378 |
|
379 |
-
#:
|
380 |
-
|
|
|
381 |
msgstr ""
|
382 |
|
383 |
-
#:
|
384 |
-
|
385 |
-
msgid "Thank you, your sign-up request was successful!"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#:
|
389 |
-
msgid "
|
390 |
msgstr ""
|
391 |
|
392 |
-
#:
|
393 |
-
msgid "
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: cmp-
|
397 |
-
|
398 |
-
#: cmp-premium-themes/fifty/fifty-settings.php:33
|
399 |
-
#: cmp-premium-themes/frame/frame-settings.php:48
|
400 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:36
|
401 |
-
msgid "Customize Colors"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: cmp-
|
405 |
-
|
406 |
-
#: cmp-premium-themes/frame/frame-settings.php:51
|
407 |
-
msgid "Active Color"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: cmp-
|
411 |
-
msgid "
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: cmp-
|
415 |
-
|
416 |
-
#: cmp-premium-themes/fifty/fifty-settings.php:37
|
417 |
-
#: cmp-premium-themes/frame/frame-settings.php:61
|
418 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:40
|
419 |
-
msgid "Font Color"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: cmp-
|
423 |
-
|
424 |
-
msgid "Background Color"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: cmp-
|
428 |
-
|
429 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:48
|
430 |
-
msgid "Overlay Color"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: cmp-
|
434 |
-
msgid "
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: cmp-
|
438 |
-
|
439 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:53
|
440 |
-
msgid "Overlay Opacity"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: cmp-
|
444 |
-
|
445 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:62
|
446 |
-
msgid "Save All Changes"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: cmp-
|
450 |
-
msgid "
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: cmp-
|
454 |
-
msgid "
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: cmp-
|
458 |
-
msgid "
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: cmp-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
"
|
467 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
msgstr ""
|
469 |
|
470 |
-
#:
|
471 |
-
|
472 |
-
|
473 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
msgid ""
|
475 |
-
"
|
476 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
477 |
msgstr ""
|
478 |
|
479 |
-
#:
|
480 |
-
msgid "
|
481 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: cmp-coming-soon-maintenance\n"
|
4 |
+
"POT-Creation-Date: 2018-08-03 11:48+0200\n"
|
5 |
+
"PO-Revision-Date: 2018-08-03 11:48+0200\n"
|
6 |
"Last-Translator: \n"
|
7 |
+
"Language-Team: Niteothemes <info@niteothemes.com>\n"
|
8 |
"Language: en\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.12\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: _e;__\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
+
#: cmp-advanced.php:156
|
20 |
+
msgid "CMP Page Whitelist and Blacklist Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: cmp-advanced.php:164 cmp-advanced.php:333
|
24 |
+
msgid "Whitelist Settings"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: cmp-advanced.php:169
|
28 |
+
msgid "Page Whitelist"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: cmp-advanced.php:175
|
32 |
+
msgid "Page Blacklist"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: cmp-advanced.php:181 cmp-advanced.php:344 cmp-settings.php:1054
|
36 |
+
#: cmp-settings.php:1055 inc/settings/settings-background.php:391
|
37 |
+
#: inc/settings/settings-contact_form-disabled.php:24
|
38 |
+
#: inc/settings/settings-contact_form.php:46
|
39 |
+
#: inc/settings/settings-counter-disabled.php:19
|
40 |
+
#: inc/settings/settings-counter.php:68
|
41 |
+
#: inc/settings/settings-footer-disabled.php:6
|
42 |
+
#: inc/settings/settings-logo-disabled.php:28
|
43 |
+
#: inc/settings/settings-logo-disabled.php:29 inc/settings/settings-logo.php:28
|
44 |
+
#: inc/settings/settings-logo.php:29
|
45 |
+
#: inc/settings/settings-slider-disabled.php:22
|
46 |
+
#: inc/settings/settings-slider.php:59
|
47 |
+
#: inc/settings/settings-special_effects-disabled.php:24
|
48 |
+
#: inc/settings/settings-special_effects.php:36
|
49 |
+
#: inc/settings/settings-special_effects.php:45
|
50 |
+
#: inc/settings/settings-subscribe-disabled.php:30
|
51 |
+
#: inc/settings/settings-subscribe.php:80
|
52 |
+
msgid "Disabled"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: cmp-advanced.php:190
|
56 |
+
msgid ""
|
57 |
+
"CMP Whitelist - Select the specific page(s) to display CMP Landing Page."
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: cmp-advanced.php:192 cmp-advanced.php:207
|
61 |
+
msgid "Homepage"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: cmp-advanced.php:200
|
65 |
+
msgid ""
|
66 |
+
"By default CMP is enabled on all pages. Leave this field empty to use "
|
67 |
+
"default settings."
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: cmp-advanced.php:205
|
71 |
+
msgid "CMP Blacklist - Select the pages to NOT display CMP landing page."
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: cmp-advanced.php:215
|
75 |
+
msgid "If you want to exclude some pages from CMP you can select them here."
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: cmp-advanced.php:219
|
79 |
+
msgid ""
|
80 |
+
"CMP landing page is displayed on all pages by default. You can enable Page "
|
81 |
+
"Whitelist to display CMP only on specific page(s) or Page Blacklist to "
|
82 |
+
"exclude CMP landing page on specific page(s) by enabling Page Whitelist or "
|
83 |
+
"Page Blacklist here."
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: cmp-advanced.php:233
|
87 |
+
msgid "CMP User Roles Settings"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: cmp-advanced.php:240
|
91 |
+
msgid "User Roles Settings"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: cmp-advanced.php:244
|
95 |
+
msgid "Bypass User Roles"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: cmp-advanced.php:252
|
99 |
+
msgid "Select User Roles to bypass CMP landing page."
|
100 |
+
msgstr ""
|
101 |
+
|
102 |
+
#: cmp-advanced.php:271
|
103 |
+
msgid "Administrator role always bypass CMP by default."
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: cmp-advanced.php:282 cmp-advanced.php:286
|
107 |
+
msgid "Top Bar Switch Access"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: cmp-advanced.php:294
|
111 |
+
msgid "Select User Roles which can access Top Bar CMP switch mode."
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: cmp-advanced.php:311
|
115 |
+
msgid "Administrator role can always access Top Bar Switch."
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: cmp-advanced.php:325
|
119 |
+
msgid "CMP Bypass URL"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: cmp-advanced.php:338 inc/settings/settings-counter-disabled.php:13
|
123 |
+
#: inc/settings/settings-counter.php:62
|
124 |
+
#: inc/settings/settings-slider-disabled.php:16
|
125 |
+
#: inc/settings/settings-slider.php:53
|
126 |
+
msgid "Enabled"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: cmp-advanced.php:355
|
130 |
+
msgid "Bypass URL"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: cmp-advanced.php:358
|
134 |
+
msgid ""
|
135 |
+
"You can use this URL to bypass CMP maintenance page. Once you access your "
|
136 |
+
"website with this URL, CMP Cookie will be set with default expiration of 2 "
|
137 |
+
"days. If the cookie expires, you need to access your website again with this "
|
138 |
+
"URL."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: cmp-advanced.php:360
|
142 |
+
msgid "Set Bypass Passphrase"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: cmp-advanced.php:363
|
146 |
+
msgid ""
|
147 |
+
"You can use passphrase which contains letters, numbers, underscores or "
|
148 |
+
"dashes only."
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: cmp-advanced.php:365
|
152 |
+
msgid "Set bypass cookie Expiration Time in seconds"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: cmp-advanced.php:368
|
156 |
+
msgid ""
|
157 |
+
"You can set custom Bypass CMP Cookie expiration time in seconds (1hour = "
|
158 |
+
"3600). Default expiration time is 2 days (172800)."
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: cmp-advanced.php:370
|
162 |
+
msgid ""
|
163 |
+
"Please note this solution is using browser cookies which might not work "
|
164 |
+
"correctly if you are using caching plugins."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: cmp-advanced.php:374
|
168 |
+
msgid ""
|
169 |
+
"You can Enable CMP Bypass where you can set custom URL parameter to bypass "
|
170 |
+
"CMP page. You can send this URL to anyone who would like to sneak peak into "
|
171 |
+
"your Website while it is under development or maintanence."
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: cmp-help.php:12
|
175 |
+
msgid ""
|
176 |
+
"Thank you for using our CMP - Coming Soon, Maintenance & Landing Page "
|
177 |
+
"NiteoThemes`s plugin for Wordpress"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: cmp-help.php:13
|
181 |
+
msgid ""
|
182 |
+
"If you have any question or issue feel free to ask Wordpress Community or "
|
183 |
+
"for our expert support on Wordpress Support Forum!"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: cmp-help.php:15
|
187 |
+
msgid "GET SUPPORT!"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: cmp-settings.php:400
|
191 |
msgid ""
|
192 |
"JavaScript appears to be disabled in your browser. For this plugin to work "
|
193 |
"correctly, please enable JavaScript or switch to a more modern browser."
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: cmp-settings.php:419
|
197 |
msgid "Settings"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: cmp-settings.php:421
|
201 |
+
msgid "Global Content"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: cmp-settings.php:423
|
205 |
+
msgid "Theme Setup"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: cmp-settings.php:425
|
209 |
msgid "SEO"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: cmp-settings.php:427
|
213 |
msgid "Custom CSS"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: cmp-settings.php:429
|
217 |
msgid "Preview"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: cmp-settings.php:438
|
|
|
|
|
|
|
|
|
221 |
msgid "General Settings"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: cmp-settings.php:442
|
|
|
225 |
msgid "Status"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: cmp-settings.php:456
|
229 |
+
msgid "Mode"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: cmp-settings.php:461
|
233 |
+
msgid "Coming Soon & Landing Page"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: cmp-settings.php:462
|
237 |
msgid ""
|
238 |
+
"Returns standard 200 HTTP OK response code to indexing robots. Set this "
|
239 |
+
"option if you want to use our plugin as \"Coming Soon\" page."
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: cmp-settings.php:466
|
243 |
msgid "Maintanance Mode"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: cmp-settings.php:467
|
247 |
msgid ""
|
248 |
"Returns 503 HTTP Service unavailable code to indexing robots. Set this "
|
249 |
"option if your site is down due to maintanance and you want to display "
|
250 |
"Maintanance page."
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: cmp-settings.php:471
|
254 |
+
msgid "Redirect Mode"
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: cmp-settings.php:472
|
258 |
msgid ""
|
259 |
+
"Choose Redirect Mode if you want to redirect your website to another URL."
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: cmp-settings.php:475
|
263 |
+
msgid "Delay Time in Seconds"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: cmp-settings.php:492
|
267 |
+
msgid "Available Themes"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: cmp-settings.php:498
|
|
|
271 |
msgid "Free Themes"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: cmp-settings.php:531 cmp-settings.php:543 cmp-settings.php:742
|
275 |
+
msgid "Active"
|
|
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: cmp-settings.php:531
|
279 |
+
msgid "Select"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: cmp-settings.php:534 cmp-settings.php:591
|
283 |
+
msgid "PREVIEW"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: cmp-settings.php:536 cmp-settings.php:593
|
287 |
+
msgid "DETAILS"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: cmp-settings.php:567
|
291 |
+
msgid "Download more CMP Themes"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: cmp-settings.php:574
|
295 |
+
msgid "Premium Themes"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: cmp-settings.php:589
|
299 |
+
msgid "Get Theme"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: cmp-settings.php:619 inc/settings/settings-footer.php:67
|
303 |
+
msgid "Content"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: cmp-settings.php:623
|
307 |
+
msgid "Title"
|
|
|
|
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: cmp-settings.php:626 inc/settings/settings-contact_form.php:62
|
311 |
+
#: inc/settings/settings-subscribe.php:108
|
312 |
+
msgid "Leave empty to disable"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: cmp-settings.php:632
|
316 |
+
msgid "Message"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: cmp-settings.php:688
|
320 |
+
msgid "Social Media"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: cmp-settings.php:692
|
324 |
+
msgid "Social Section Title"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: cmp-settings.php:701
|
328 |
+
msgid "Social Media Icons"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: cmp-settings.php:703
|
332 |
+
msgid "Click on Social Icons below to enable Social Media settings."
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: cmp-settings.php:721 cmp-settings.php:752
|
336 |
+
msgid "Email Address"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: cmp-settings.php:724 cmp-settings.php:727 cmp-settings.php:764
|
340 |
+
msgid "Phone Number"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: cmp-settings.php:742
|
344 |
+
msgid "Position"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: cmp-settings.php:742
|
348 |
+
msgid "Website URL"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: cmp-settings.php:768
|
352 |
+
msgid "Whatsapp Phone Number"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: cmp-settings.php:876
|
356 |
+
msgid "Customize Fonts"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: cmp-settings.php:880
|
360 |
+
msgid "Headings Font"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: cmp-settings.php:883
|
364 |
+
msgid "Font Family from "
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: cmp-settings.php:890 cmp-settings.php:939
|
368 |
+
msgid "Variant"
|
|
|
|
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: cmp-settings.php:897 cmp-settings.php:946
|
372 |
+
msgid "Font Size"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: cmp-settings.php:902 cmp-settings.php:951
|
376 |
+
msgid "Letter Spacing"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: cmp-settings.php:911
|
380 |
+
msgid "Animation"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: cmp-settings.php:913 cmp-settings.php:966
|
384 |
+
msgid "No animation"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: cmp-settings.php:914 cmp-settings.php:967
|
388 |
+
msgid "Fade In Down"
|
|
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: cmp-settings.php:915 cmp-settings.php:968
|
392 |
+
msgid "Fade In Up"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: cmp-settings.php:916 cmp-settings.php:969
|
396 |
+
msgid "Fade In Left"
|
|
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: cmp-settings.php:917 cmp-settings.php:970
|
400 |
+
msgid "Fade In Right"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: cmp-settings.php:927
|
404 |
msgid "Content Font"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: cmp-settings.php:931
|
408 |
+
msgid "Select Font Family from "
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: cmp-settings.php:956
|
412 |
+
msgid "Line Height"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: cmp-settings.php:964
|
416 |
+
msgid "Select Animation"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: cmp-settings.php:976
|
420 |
+
msgid "Fonts preview"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: cmp-settings.php:994
|
424 |
+
msgid "SEO Settings"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: cmp-settings.php:999
|
428 |
+
msgid "Favicon"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: cmp-settings.php:1018
|
432 |
+
msgid "Header Title"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: cmp-settings.php:1027
|
436 |
+
msgid "Description"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: cmp-settings.php:1042
|
440 |
+
msgid "Website Analytics"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: cmp-settings.php:1050
|
444 |
+
msgid "Analytics"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: cmp-settings.php:1060 cmp-settings.php:1061
|
448 |
+
msgid "Google Analytics"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: cmp-settings.php:1066 cmp-settings.php:1067
|
452 |
+
msgid "Other"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: cmp-settings.php:1076
|
456 |
+
msgid "Analytics is disabled"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: cmp-settings.php:1079
|
460 |
+
msgid "Insert Google Analytics Tracking ID"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: cmp-settings.php:1086
|
464 |
+
msgid "Insert your Analytics Javascript code. Script tags will be stripped."
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: cmp-settings.php:1104
|
468 |
+
msgid "Enter Custom CSS"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: cmp-sidebar.php:4
|
472 |
+
msgid "Selected CMP Theme"
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: cmp-sidebar.php:19
|
476 |
msgid ""
|
477 |
+
"If you really love our CMP plugin you can also donate few bucks by clicking "
|
478 |
+
"Donate button below."
|
479 |
+
msgstr ""
|
480 |
+
|
481 |
+
#: cmp-sidebar.php:32
|
482 |
+
msgid "Thank you for rating us with five stars!"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: cmp-sidebar.php:33
|
486 |
+
#, php-format
|
487 |
msgid ""
|
488 |
+
"If you find our CMP plugin useful, please show us some love and give 5%s "
|
489 |
+
"feedback by pressing button below."
|
|
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: cmp-sidebar.php:36
|
493 |
+
msgid "Leave Feedback"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: cmp-sidebar.php:43
|
497 |
msgid ""
|
498 |
+
"Also don`t forget you can ask Wordpress Community or our NiteoThemes expert "
|
499 |
+
"support. For a help simply visit link below."
|
|
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: cmp-sidebar.php:43
|
503 |
+
msgid "Wordpress Support Forum"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: cmp-sidebar.php:50
|
507 |
+
msgid "Request new features"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: cmp-sidebar.php:51
|
511 |
+
#, php-format
|
512 |
+
msgid ""
|
513 |
+
"Do you miss some feature or do you have idea how to improve CMP plugin? You "
|
514 |
+
"can %s on official Wordpress Support Forum."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: cmp-subscribers.php:24
|
518 |
+
msgid "View / Edit Subscribers"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: cmp-subscribers.php:29
|
522 |
+
msgid "Export All Subscribers"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: cmp-translate.php:68
|
526 |
+
msgid "Edit Translation Variables"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: cmp-translate.php:73 inc/class-cmp-render_settings.php:36
|
530 |
+
#: themes/countdown/countdown-settings.php:38
|
531 |
+
#: themes/hardwork/hardwork-settings.php:42
|
532 |
+
msgid "Save All Changes"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: cmp-upload.php:17
|
536 |
+
msgid "Install New CMP Coming Soon & Maintenance Theme"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: cmp-upload.php:22
|
540 |
+
msgid "Select Theme ZIP file to upload"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: inc/class-cmp-feedback.php:65
|
544 |
+
#, php-format
|
545 |
+
msgid "%s years"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: inc/class-cmp-feedback.php:67
|
549 |
+
msgid "a year"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: inc/class-cmp-feedback.php:73
|
553 |
+
#, php-format
|
554 |
+
msgid "%s weeks"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: inc/class-cmp-feedback.php:75
|
558 |
+
msgid "a week"
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: inc/class-cmp-feedback.php:81
|
562 |
+
#, php-format
|
563 |
+
msgid "%s days"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: inc/class-cmp-feedback.php:83
|
567 |
+
msgid "a day"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: inc/class-cmp-feedback.php:89
|
571 |
+
#, php-format
|
572 |
+
msgid "%s hours"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: inc/class-cmp-feedback.php:91
|
576 |
+
msgid "an hour"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: inc/class-cmp-feedback.php:97
|
580 |
+
#, php-format
|
581 |
+
msgid "%s minutes"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: inc/class-cmp-feedback.php:99
|
585 |
+
msgid "a minute"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: inc/class-cmp-feedback.php:105
|
589 |
+
#, php-format
|
590 |
+
msgid "%s seconds"
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: inc/class-cmp-feedback.php:107
|
594 |
+
msgid "a second"
|
|
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: inc/class-cmp-feedback.php:161
|
598 |
+
msgid "Do you like CMP - Coming soon & Maintenace Plugin?"
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: inc/class-cmp-feedback.php:196
|
602 |
+
msgid "CMP - Coming Soon & Maintenance"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: inc/class-cmp-render_html.php:457
|
606 |
+
msgid "Phone"
|
|
|
|
|
|
|
|
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: inc/class-cmp-subscribers.php:15
|
610 |
+
msgid "subscriber"
|
|
|
|
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: inc/class-cmp-subscribers.php:16
|
614 |
+
msgid "subscribers"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: inc/class-cmp-subscribers.php:65
|
618 |
+
msgid "Delete Selected"
|
|
|
|
|
|
|
|
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: inc/class-cmp-subscribers.php:80
|
622 |
+
msgid "Delete"
|
|
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: inc/class-cmp-subscribers.php:169
|
626 |
+
msgid "ID"
|
|
|
|
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: inc/class-cmp-subscribers.php:170
|
630 |
+
msgid "First Name"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: inc/class-cmp-subscribers.php:171
|
634 |
+
msgid "Last Name"
|
|
|
|
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: inc/class-cmp-subscribers.php:172 niteo-cmp.php:1305
|
638 |
+
msgid "Email"
|
|
|
|
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: inc/class-cmp-subscribers.php:173
|
642 |
+
msgid "Time"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: inc/class-cmp-subscribers.php:174
|
646 |
+
msgid "IP Address"
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: inc/class-cmp-subscribers.php:258
|
650 |
+
msgid "No subscribers yet!"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: inc/class-cmp-translate.php:19
|
654 |
+
msgid "Translation string"
|
655 |
+
msgstr ""
|
656 |
+
|
657 |
+
#: inc/class-cmp-translate.php:20
|
658 |
+
msgid "Tranlation String"
|
659 |
+
msgstr ""
|
660 |
+
|
661 |
+
#: inc/class-cmp-translate.php:48
|
662 |
+
msgid "String"
|
663 |
+
msgstr ""
|
664 |
+
|
665 |
+
#: inc/class-cmp-translate.php:49 niteo-cmp.php:262
|
666 |
+
msgid "Translation"
|
667 |
+
msgstr ""
|
668 |
+
|
669 |
+
#: inc/class-cmp-translate.php:94
|
670 |
+
msgid "No Translation Variables!"
|
671 |
+
msgstr ""
|
672 |
+
|
673 |
+
#: inc/settings/settings-background.php:43
|
674 |
+
msgid "Blury Beach"
|
675 |
+
msgstr ""
|
676 |
+
|
677 |
+
#: inc/settings/settings-background.php:44
|
678 |
+
msgid "Miaka"
|
679 |
+
msgstr ""
|
680 |
+
|
681 |
+
#: inc/settings/settings-background.php:45
|
682 |
+
msgid "Influenza"
|
683 |
+
msgstr ""
|
684 |
+
|
685 |
+
#: inc/settings/settings-background.php:46
|
686 |
+
msgid "Calm Darya"
|
687 |
+
msgstr ""
|
688 |
+
|
689 |
+
#: inc/settings/settings-background.php:47
|
690 |
+
msgid "Shroom Haze"
|
691 |
+
msgstr ""
|
692 |
+
|
693 |
+
#: inc/settings/settings-background.php:48
|
694 |
+
msgid "Purlple Paradise"
|
695 |
+
msgstr ""
|
696 |
+
|
697 |
+
#: inc/settings/settings-background.php:49
|
698 |
+
msgid "Aqua Marine"
|
699 |
+
msgstr ""
|
700 |
+
|
701 |
+
#: inc/settings/settings-background.php:50
|
702 |
+
msgid "Bloody Mary"
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: inc/settings/settings-background.php:51
|
706 |
+
msgid "Rose Water"
|
707 |
+
msgstr ""
|
708 |
+
|
709 |
+
#: inc/settings/settings-background.php:52
|
710 |
+
msgid "Horizon"
|
711 |
+
msgstr ""
|
712 |
+
|
713 |
+
#: inc/settings/settings-background.php:53
|
714 |
+
msgid "Youtube"
|
715 |
+
msgstr ""
|
716 |
+
|
717 |
+
#: inc/settings/settings-background.php:54
|
718 |
+
msgid "Sublime Vivid"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
+
#: inc/settings/settings-background.php:55
|
722 |
+
msgid "Red"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: inc/settings/settings-background.php:56
|
726 |
+
msgid "Orange"
|
727 |
+
msgstr ""
|
728 |
+
|
729 |
+
#: inc/settings/settings-background.php:57
|
730 |
+
msgid "Yellow"
|
731 |
+
msgstr ""
|
732 |
+
|
733 |
+
#: inc/settings/settings-background.php:58
|
734 |
+
msgid "Green"
|
735 |
+
msgstr ""
|
736 |
+
|
737 |
+
#: inc/settings/settings-background.php:59
|
738 |
+
msgid "Green Pastel"
|
739 |
+
msgstr ""
|
740 |
+
|
741 |
+
#: inc/settings/settings-background.php:60
|
742 |
+
msgid "Sky blue"
|
743 |
+
msgstr ""
|
744 |
+
|
745 |
+
#: inc/settings/settings-background.php:61
|
746 |
+
msgid "Purple"
|
747 |
+
msgstr ""
|
748 |
+
|
749 |
+
#: inc/settings/settings-background.php:62
|
750 |
+
msgid "Violet"
|
751 |
+
msgstr ""
|
752 |
+
|
753 |
+
#: inc/settings/settings-background.php:63
|
754 |
+
msgid "Light grey"
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: inc/settings/settings-background.php:64
|
758 |
+
msgid "Grey"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: inc/settings/settings-background.php:65
|
762 |
+
msgid "Dark grey"
|
763 |
+
msgstr ""
|
764 |
+
|
765 |
+
#: inc/settings/settings-background.php:71
|
766 |
+
msgid "Graphic Background"
|
767 |
+
msgstr ""
|
768 |
+
|
769 |
+
#: inc/settings/settings-background.php:78
|
770 |
+
msgid "Banner Settings"
|
771 |
+
msgstr ""
|
772 |
+
|
773 |
+
#: inc/settings/settings-background.php:83
|
774 |
+
msgid "Default Media"
|
775 |
+
msgstr ""
|
776 |
+
|
777 |
+
#: inc/settings/settings-background.php:89
|
778 |
+
msgid "Custom Images"
|
779 |
+
msgstr ""
|
780 |
+
|
781 |
+
#: inc/settings/settings-background.php:95
|
782 |
+
msgid "Unsplash library"
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: inc/settings/settings-background.php:100
|
786 |
+
msgid "Video"
|
787 |
+
msgstr ""
|
788 |
+
|
789 |
+
#: inc/settings/settings-background.php:105
|
790 |
+
msgid "Graphic Pattern"
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: inc/settings/settings-background.php:110
|
794 |
+
#: inc/settings/settings-background.php:387
|
795 |
+
msgid "Solid Color"
|
796 |
+
msgstr ""
|
797 |
+
|
798 |
+
#: inc/settings/settings-background.php:115
|
799 |
+
msgid "Gradient Color"
|
800 |
+
msgstr ""
|
801 |
+
|
802 |
+
#: inc/settings/settings-background.php:139
|
803 |
msgid ""
|
804 |
+
"Pro Tip! You can select multiple Media from your library by holding CTRL"
|
805 |
+
"+click (Command+click if you sit on MacOS) while selecting photos."
|
806 |
+
msgstr ""
|
807 |
+
|
808 |
+
#: inc/settings/settings-background.php:187
|
809 |
+
msgid "Delete Images"
|
810 |
+
msgstr ""
|
811 |
+
|
812 |
+
#: inc/settings/settings-background.php:194
|
813 |
+
msgid "Choose Unsplash Feed"
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: inc/settings/settings-background.php:197
|
817 |
+
msgid "Random Photo"
|
818 |
+
msgstr ""
|
819 |
+
|
820 |
+
#: inc/settings/settings-background.php:199
|
821 |
+
msgid "Specific Photo"
|
822 |
+
msgstr ""
|
823 |
+
|
824 |
+
#: inc/settings/settings-background.php:201
|
825 |
+
msgid "Random from Collection"
|
826 |
+
msgstr ""
|
827 |
+
|
828 |
+
#: inc/settings/settings-background.php:203
|
829 |
+
msgid "Random from User"
|
830 |
+
msgstr ""
|
831 |
+
|
832 |
+
#: inc/settings/settings-background.php:208
|
833 |
+
msgid "Enter Unsplash Photo URL or Unsplash Photo ID"
|
834 |
+
msgstr ""
|
835 |
+
|
836 |
+
#: inc/settings/settings-background.php:213
|
837 |
+
#, php-format
|
838 |
+
msgid "Enter <a href=\"%s\">Unsplash Collection</a> URL or Collection ID."
|
839 |
+
msgstr ""
|
840 |
+
|
841 |
+
#: inc/settings/settings-background.php:218
|
842 |
+
msgid "Limit photos to specific keyword (fashion, nature, technology..)"
|
843 |
+
msgstr ""
|
844 |
+
|
845 |
+
#: inc/settings/settings-background.php:223
|
846 |
+
msgid "Only Unsplash Featured Photos"
|
847 |
+
msgstr ""
|
848 |
+
|
849 |
+
#: inc/settings/settings-background.php:227
|
850 |
+
msgid "Enter Unsplash User ID"
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: inc/settings/settings-background.php:231
|
854 |
+
msgid "Display Unsplash Photo"
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: inc/settings/settings-background.php:240
|
858 |
+
msgid ""
|
859 |
+
"is a world leading source for free to use high quality stock images. All of "
|
860 |
+
"the images that are submitted and published on Unsplash fall under under the "
|
861 |
+
"<a href=\"https://unsplash.com/license\"> Unsplash license</a>, which means "
|
862 |
+
"you can use the image for any personal or commercial use."
|
863 |
+
msgstr ""
|
864 |
+
|
865 |
+
#: inc/settings/settings-background.php:247
|
866 |
+
msgid "Select Video Source"
|
867 |
+
msgstr ""
|
868 |
+
|
869 |
+
#: inc/settings/settings-background.php:250
|
870 |
+
msgid "YouTube"
|
871 |
+
msgstr ""
|
872 |
+
|
873 |
+
#: inc/settings/settings-background.php:251
|
874 |
+
msgid "Custom Video File"
|
875 |
+
msgstr ""
|
876 |
+
|
877 |
+
#: inc/settings/settings-background.php:252
|
878 |
+
msgid "Vimeo (coming soon...)"
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: inc/settings/settings-background.php:257
|
882 |
+
msgid "Enter Youtube URL"
|
883 |
+
msgstr ""
|
884 |
+
|
885 |
+
#: inc/settings/settings-background.php:263
|
886 |
+
msgid "Enter Vimeo URL"
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: inc/settings/settings-background.php:268
|
890 |
+
msgid "Select or Upload custom Video file"
|
891 |
+
msgstr ""
|
892 |
+
|
893 |
+
#: inc/settings/settings-background.php:297
|
894 |
+
msgid ""
|
895 |
+
"Video backgrounds doesn`t work on mobile devices therefore only thumbnail "
|
896 |
+
"video image will be displayed on mobile devices. Upload custom thumbnail "
|
897 |
+
"image by pressing button below. "
|
898 |
+
msgstr ""
|
899 |
+
|
900 |
+
#: inc/settings/settings-background.php:299
|
901 |
+
msgid "Media Library"
|
902 |
+
msgstr ""
|
903 |
+
|
904 |
+
#: inc/settings/settings-background.php:321
|
905 |
+
msgid "Select Pattern"
|
906 |
+
msgstr ""
|
907 |
+
|
908 |
+
#: inc/settings/settings-background.php:328
|
909 |
+
msgid "Custom Pattern..."
|
910 |
+
msgstr ""
|
911 |
+
|
912 |
+
#: inc/settings/settings-background.php:342
|
913 |
+
msgid "Select Color"
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#: inc/settings/settings-background.php:350
|
917 |
+
msgid "Select Gradient Background"
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#: inc/settings/settings-background.php:360
|
921 |
+
#: inc/settings/settings-background.php:417
|
922 |
+
msgid "Custom Gradient"
|
923 |
+
msgstr ""
|
924 |
+
|
925 |
+
#: inc/settings/settings-background.php:365
|
926 |
+
#: inc/settings/settings-background.php:423
|
927 |
+
msgid "Select first gradient color:"
|
928 |
+
msgstr ""
|
929 |
+
|
930 |
+
#: inc/settings/settings-background.php:367
|
931 |
+
#: inc/settings/settings-background.php:427
|
932 |
+
msgid "Select second gradient color:"
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: inc/settings/settings-background.php:380
|
936 |
+
msgid "Background Overlay"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: inc/settings/settings-background.php:383
|
940 |
+
msgid "Select Background Overlay"
|
941 |
+
msgstr ""
|
942 |
+
|
943 |
+
#: inc/settings/settings-background.php:389
|
944 |
+
msgid "Gradient"
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
+
#: inc/settings/settings-background.php:400
|
948 |
+
msgid "Background Overlay Color"
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: inc/settings/settings-background.php:407
|
952 |
+
msgid "Select Gradient Overlay"
|
953 |
+
msgstr ""
|
954 |
+
|
955 |
+
#: inc/settings/settings-background.php:437
|
956 |
+
msgid "Background Overlay Opacity"
|
957 |
+
msgstr ""
|
958 |
+
|
959 |
+
#: inc/settings/settings-background.php:444
|
960 |
+
msgid "Background Blur Amount"
|
961 |
+
msgstr ""
|
962 |
+
|
963 |
+
#: inc/settings/settings-contact_form-disabled.php:6
|
964 |
+
#: inc/settings/settings-contact_form.php:27
|
965 |
+
msgid "Contact Form"
|
966 |
+
msgstr ""
|
967 |
+
|
968 |
+
#: inc/settings/settings-contact_form-disabled.php:13
|
969 |
+
#: inc/settings/settings-contact_form.php:35
|
970 |
+
msgid "Contact Form Options"
|
971 |
+
msgstr ""
|
972 |
+
|
973 |
+
#: inc/settings/settings-contact_form-disabled.php:18
|
974 |
+
#: inc/settings/settings-contact_form.php:40
|
975 |
+
msgid "3rd Party"
|
976 |
+
msgstr ""
|
977 |
+
|
978 |
+
#: inc/settings/settings-contact_form-disabled.php:32
|
979 |
+
msgid "Contact Form is disabled or is not supported by selected Theme."
|
980 |
+
msgstr ""
|
981 |
+
|
982 |
+
#: inc/settings/settings-contact_form.php:55
|
983 |
+
#: inc/settings/settings-subscribe.php:88
|
984 |
+
msgid "Subscribe Form is disabled."
|
985 |
+
msgstr ""
|
986 |
+
|
987 |
+
#: inc/settings/settings-contact_form.php:61
|
988 |
+
msgid "Contact Form label"
|
989 |
+
msgstr ""
|
990 |
+
|
991 |
+
#: inc/settings/settings-contact_form.php:66
|
992 |
+
msgid "Select your contact form"
|
993 |
+
msgstr ""
|
994 |
+
|
995 |
+
#: inc/settings/settings-contact_form.php:81
|
996 |
+
msgid "No contact forms detected. Please create a new Contact Form 7."
|
997 |
+
msgstr ""
|
998 |
+
|
999 |
+
#: inc/settings/settings-contact_form.php:85
|
1000 |
+
msgid "Please install Contact Form 7 plugin to select contact form."
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: inc/settings/settings-contact_form.php:107
|
1004 |
+
#, php-format
|
1005 |
+
msgid ""
|
1006 |
+
"If the list is empty, please make sure you have installed %s plugin and you "
|
1007 |
+
"have created a Contact Form. If not, you can create new Contact Form in %s > "
|
1008 |
+
"Contact > New"
|
1009 |
+
msgstr ""
|
1010 |
+
|
1011 |
+
#: inc/settings/settings-counter-disabled.php:2
|
1012 |
+
#: inc/settings/settings-counter.php:51
|
1013 |
+
msgid "Countdown Timer Setup"
|
1014 |
+
msgstr ""
|
1015 |
+
|
1016 |
+
#: inc/settings/settings-counter-disabled.php:8
|
1017 |
+
#: inc/settings/settings-counter.php:57 inc/settings/settings-counter.php:94
|
1018 |
+
msgid "Counter setup"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: inc/settings/settings-counter-disabled.php:27
|
1022 |
+
msgid "Countdown Timer is disabled or is not supported by selected Theme."
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#: inc/settings/settings-counter.php:76
|
1026 |
+
msgid "Countdown Timer is disabled."
|
1027 |
+
msgstr ""
|
1028 |
+
|
1029 |
+
#: inc/settings/settings-counter.php:84
|
1030 |
+
msgid "Counter Heading"
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
+
#: inc/settings/settings-counter.php:90
|
1034 |
+
msgid "Click on date input and set a date & time for a Countdown timer."
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: inc/settings/settings-counter.php:97
|
1038 |
+
msgid "Select Date.."
|
1039 |
+
msgstr ""
|
1040 |
+
|
1041 |
+
#: inc/settings/settings-counter.php:99
|
1042 |
+
msgid "Countdown action:"
|
1043 |
+
msgstr ""
|
1044 |
+
|
1045 |
+
#: inc/settings/settings-counter.php:103
|
1046 |
+
msgid "No action"
|
1047 |
+
msgstr ""
|
1048 |
+
|
1049 |
+
#: inc/settings/settings-counter.php:104
|
1050 |
+
msgid "Disable CMP Plugin Page"
|
1051 |
+
msgstr ""
|
1052 |
+
|
1053 |
+
#: inc/settings/settings-counter.php:105
|
1054 |
+
msgid "URL redirect"
|
1055 |
+
msgstr ""
|
1056 |
+
|
1057 |
+
#: inc/settings/settings-counter.php:109
|
1058 |
+
msgid "Enter custom text"
|
1059 |
+
msgstr ""
|
1060 |
+
|
1061 |
+
#: inc/settings/settings-counter.php:113
|
1062 |
+
msgid "Enter redirect URL"
|
1063 |
+
msgstr ""
|
1064 |
+
|
1065 |
+
#: inc/settings/settings-footer-disabled.php:2
|
1066 |
+
#: inc/settings/settings-footer.php:12
|
1067 |
+
msgid "Footer Content"
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: inc/settings/settings-footer-disabled.php:8
|
1071 |
+
msgid "Footer is not supported by selected Theme."
|
1072 |
+
msgstr ""
|
1073 |
+
|
1074 |
+
#: inc/settings/settings-footer.php:16
|
1075 |
+
msgid "Copyright"
|
1076 |
+
msgstr ""
|
1077 |
+
|
1078 |
+
#: inc/settings/settings-footer.php:26 inc/settings/settings-footer.php:85
|
1079 |
+
msgid "Contact Email"
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
+
#: inc/settings/settings-footer.php:63
|
1083 |
+
msgid "Extended Footer Content"
|
1084 |
+
msgstr ""
|
1085 |
+
|
1086 |
+
#: inc/settings/settings-footer.php:76
|
1087 |
+
msgid "Contacts Title"
|
1088 |
+
msgstr ""
|
1089 |
+
|
1090 |
+
#: inc/settings/settings-footer.php:94
|
1091 |
+
msgid "Contact Phone"
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: inc/settings/settings-logo-disabled.php:5 inc/settings/settings-logo.php:5
|
1095 |
+
msgid "Logo Setup"
|
1096 |
+
msgstr ""
|
1097 |
+
|
1098 |
+
#: inc/settings/settings-logo-disabled.php:12 inc/settings/settings-logo.php:12
|
1099 |
+
msgid "Logo setup"
|
1100 |
+
msgstr ""
|
1101 |
+
|
1102 |
+
#: inc/settings/settings-logo-disabled.php:16
|
1103 |
+
#: inc/settings/settings-logo-disabled.php:17 inc/settings/settings-logo.php:16
|
1104 |
+
#: inc/settings/settings-logo.php:17
|
1105 |
+
msgid "Text Logo"
|
1106 |
+
msgstr ""
|
1107 |
+
|
1108 |
+
#: inc/settings/settings-logo-disabled.php:22
|
1109 |
+
#: inc/settings/settings-logo-disabled.php:23 inc/settings/settings-logo.php:22
|
1110 |
+
#: inc/settings/settings-logo.php:23
|
1111 |
+
msgid "Graphic Logo"
|
1112 |
+
msgstr ""
|
1113 |
+
|
1114 |
+
#: inc/settings/settings-logo-disabled.php:36
|
1115 |
+
msgid "Logo settings is disabled or is not supported by selected Theme."
|
1116 |
+
msgstr ""
|
1117 |
+
|
1118 |
+
#: inc/settings/settings-logo.php:39
|
1119 |
+
msgid "Click to set.."
|
1120 |
+
msgstr ""
|
1121 |
+
|
1122 |
+
#: inc/settings/settings-logo.php:58
|
1123 |
+
msgid "Logo is disabled"
|
1124 |
+
msgstr ""
|
1125 |
+
|
1126 |
+
#: inc/settings/settings-slider-disabled.php:5
|
1127 |
+
#: inc/settings/settings-slider.php:42
|
1128 |
+
msgid "Image Slider Setup"
|
1129 |
+
msgstr ""
|
1130 |
+
|
1131 |
+
#: inc/settings/settings-slider-disabled.php:11
|
1132 |
+
#: inc/settings/settings-slider.php:48 inc/settings/settings-slider.php:74
|
1133 |
+
msgid "Slider setup"
|
1134 |
+
msgstr ""
|
1135 |
+
|
1136 |
+
#: inc/settings/settings-slider-disabled.php:30
|
1137 |
+
msgid "Slider settings is disabled or is not supported by selected Theme."
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: inc/settings/settings-slider.php:67
|
1141 |
+
msgid "Slider is disabled."
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: inc/settings/settings-slider.php:71
|
1145 |
+
msgid ""
|
1146 |
+
"To display Slider on CMP Landing page make sure you inserted two or more "
|
1147 |
+
"Custom Photos from Media Library. Slider is also disabled when Specific "
|
1148 |
+
"Unsplash photo or Default Media is selected."
|
1149 |
+
msgstr ""
|
1150 |
+
|
1151 |
+
#: inc/settings/settings-slider.php:79
|
1152 |
+
msgid "Slide"
|
1153 |
+
msgstr ""
|
1154 |
+
|
1155 |
+
#: inc/settings/settings-slider.php:83
|
1156 |
+
msgid "Fade"
|
1157 |
+
msgstr ""
|
1158 |
+
|
1159 |
+
#: inc/settings/settings-slider.php:90
|
1160 |
+
msgid "Slice"
|
1161 |
+
msgstr ""
|
1162 |
+
|
1163 |
+
#: inc/settings/settings-slider.php:98
|
1164 |
+
msgid "Slider Autostart"
|
1165 |
+
msgstr ""
|
1166 |
+
|
1167 |
+
#: inc/settings/settings-slider.php:101
|
1168 |
+
msgid "Number of Unplash media Slides (applies only for Unsplash photos)"
|
1169 |
+
msgstr ""
|
1170 |
+
|
1171 |
+
#: inc/settings/settings-special_effects-disabled.php:6
|
1172 |
+
#: inc/settings/settings-special_effects-disabled.php:13
|
1173 |
+
#: inc/settings/settings-special_effects.php:18
|
1174 |
+
#: inc/settings/settings-special_effects.php:25
|
1175 |
+
msgid "Special Effects"
|
1176 |
+
msgstr ""
|
1177 |
+
|
1178 |
+
#: inc/settings/settings-special_effects-disabled.php:18
|
1179 |
+
#: inc/settings/settings-special_effects.php:30
|
1180 |
+
msgid "Constellation"
|
1181 |
+
msgstr ""
|
1182 |
+
|
1183 |
+
#: inc/settings/settings-special_effects-disabled.php:33
|
1184 |
+
msgid ""
|
1185 |
+
"Special Effects are disabled or they are not supported by selected Theme."
|
1186 |
+
msgstr ""
|
1187 |
+
|
1188 |
+
#: inc/settings/settings-special_effects.php:50
|
1189 |
+
msgid "Constellation color"
|
1190 |
+
msgstr ""
|
1191 |
+
|
1192 |
+
#: inc/settings/settings-subscribe-disabled.php:6
|
1193 |
+
#: inc/settings/settings-subscribe.php:56
|
1194 |
+
msgid "Subscribe Form"
|
1195 |
+
msgstr ""
|
1196 |
+
|
1197 |
+
#: inc/settings/settings-subscribe-disabled.php:13
|
1198 |
+
#: inc/settings/settings-subscribe.php:63
|
1199 |
+
msgid "Subscribe Form Options"
|
1200 |
+
msgstr ""
|
1201 |
+
|
1202 |
+
#: inc/settings/settings-subscribe-disabled.php:18
|
1203 |
+
#: inc/settings/settings-subscribe.php:68
|
1204 |
+
msgid "CMP Subscribe Form"
|
1205 |
+
msgstr ""
|
1206 |
+
|
1207 |
+
#: inc/settings/settings-subscribe-disabled.php:24
|
1208 |
+
#: inc/settings/settings-subscribe.php:74
|
1209 |
+
msgid "3rd Party Plugin"
|
1210 |
+
msgstr ""
|
1211 |
+
|
1212 |
+
#: inc/settings/settings-subscribe-disabled.php:38
|
1213 |
+
msgid "Subscribe Form is disabled or is not supported by selected Theme."
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: inc/settings/settings-subscribe.php:97
|
1217 |
+
msgid ""
|
1218 |
+
"You can find Shortode in your Contact Form Plugin settings. Should be "
|
1219 |
+
"something similar to code below: "
|
1220 |
+
msgstr ""
|
1221 |
+
|
1222 |
+
#: inc/settings/settings-subscribe.php:99
|
1223 |
+
msgid ""
|
1224 |
+
"If you use 3rd party shortcode for subscribe or contact form, you might need "
|
1225 |
+
"to apply custom CSS to style the form correctly."
|
1226 |
+
msgstr ""
|
1227 |
+
|
1228 |
+
#: inc/settings/settings-subscribe.php:105
|
1229 |
+
msgid ""
|
1230 |
+
"CMP custom subscribe form will be used. It is guaranteed to always match "
|
1231 |
+
"selected Theme's style."
|
1232 |
+
msgstr ""
|
1233 |
+
|
1234 |
+
#: inc/settings/settings-subscribe.php:107
|
1235 |
+
msgid "Subscribe form Label"
|
1236 |
+
msgstr ""
|
1237 |
+
|
1238 |
+
#: inc/settings/settings-subscribe.php:111
|
1239 |
+
msgid "Select how to store your Subscribers"
|
1240 |
+
msgstr ""
|
1241 |
+
|
1242 |
+
#: inc/settings/settings-subscribe.php:113
|
1243 |
+
msgid "CMP Custom Subscribe List"
|
1244 |
+
msgstr ""
|
1245 |
+
|
1246 |
+
#: inc/settings/settings-subscribe.php:114
|
1247 |
+
msgid "MailChimp Integration"
|
1248 |
+
msgstr ""
|
1249 |
+
|
1250 |
+
#: inc/settings/settings-subscribe.php:119
|
1251 |
+
msgid ""
|
1252 |
+
"Emails will be stored in custom CMP list with CSV export support. If you "
|
1253 |
+
"ever delete CMP plugin then subscriber list will be purged as well."
|
1254 |
+
msgstr ""
|
1255 |
+
|
1256 |
+
#: inc/settings/settings-subscribe.php:120
|
1257 |
+
msgid "Total Subscribers: "
|
1258 |
+
msgstr ""
|
1259 |
+
|
1260 |
+
#: inc/settings/settings-subscribe.php:125
|
1261 |
+
msgid "MailChimp API key"
|
1262 |
+
msgstr ""
|
1263 |
+
|
1264 |
+
#: inc/settings/settings-subscribe.php:126
|
1265 |
+
msgid "MailChimp API Key"
|
1266 |
+
msgstr ""
|
1267 |
+
|
1268 |
+
#: inc/settings/settings-subscribe.php:129
|
1269 |
+
msgid "Retrieve Lists"
|
1270 |
+
msgstr ""
|
1271 |
+
|
1272 |
+
#: inc/settings/settings-subscribe.php:131
|
1273 |
+
#, php-format
|
1274 |
+
msgid "You can find or create new API key in your %s."
|
1275 |
+
msgstr ""
|
1276 |
+
|
1277 |
+
#: inc/settings/settings-subscribe.php:133
|
1278 |
+
msgid "Select MailChimp List to store emails."
|
1279 |
+
msgstr ""
|
1280 |
+
|
1281 |
+
#: inc/settings/settings-subscribe.php:150
|
1282 |
+
msgid "Please insert MailChimp API key to retrieve Lists."
|
1283 |
+
msgstr ""
|
1284 |
+
|
1285 |
+
#: inc/settings/settings-subscribe.php:159
|
1286 |
+
msgid "Enable MailChimp Double Opt In"
|
1287 |
+
msgstr ""
|
1288 |
+
|
1289 |
+
#: niteo-cmp.php:254 niteo-cmp.php:673
|
1290 |
+
msgid "CMP Settings"
|
1291 |
+
msgstr ""
|
1292 |
+
|
1293 |
+
#: niteo-cmp.php:256
|
1294 |
+
msgid "Content Settings"
|
1295 |
+
msgstr ""
|
1296 |
+
|
1297 |
+
#: niteo-cmp.php:260
|
1298 |
+
msgid "Subscribers"
|
1299 |
+
msgstr ""
|
1300 |
+
|
1301 |
+
#: niteo-cmp.php:264
|
1302 |
+
msgid "Upload New Theme"
|
1303 |
+
msgstr ""
|
1304 |
+
|
1305 |
+
#: niteo-cmp.php:266
|
1306 |
+
msgid "Help"
|
1307 |
+
msgstr ""
|
1308 |
+
|
1309 |
+
#: niteo-cmp.php:637
|
1310 |
+
msgid "Maintenance Mode:"
|
1311 |
+
msgstr ""
|
1312 |
+
|
1313 |
+
#: niteo-cmp.php:641
|
1314 |
+
msgid "Coming Soon Mode:"
|
1315 |
+
msgstr ""
|
1316 |
+
|
1317 |
+
#: niteo-cmp.php:645
|
1318 |
+
msgid "Redirect Mode:"
|
1319 |
+
msgstr ""
|
1320 |
+
|
1321 |
+
#: niteo-cmp.php:681
|
1322 |
+
msgid "CMP Preview"
|
1323 |
+
msgstr ""
|
1324 |
+
|
1325 |
+
#: niteo-cmp.php:821
|
1326 |
+
#, php-format
|
1327 |
+
msgid "There is a <b>recommended</b> update of <b>CMP Theme %s</b> available:"
|
1328 |
+
msgstr ""
|
1329 |
+
|
1330 |
+
#: niteo-cmp.php:821
|
1331 |
+
msgid " update now"
|
1332 |
+
msgstr ""
|
1333 |
+
|
1334 |
+
#: niteo-cmp.php:821
|
1335 |
+
#, php-format
|
1336 |
+
msgid "view update %s notes."
|
1337 |
+
msgstr ""
|
1338 |
+
|
1339 |
+
#: niteo-cmp.php:880
|
1340 |
+
msgid " theme was successfully installed!"
|
1341 |
+
msgstr ""
|
1342 |
+
|
1343 |
+
#: niteo-cmp.php:884 niteo-cmp.php:968
|
1344 |
+
msgid "There was an error unzipping the file!"
|
1345 |
+
msgstr ""
|
1346 |
+
|
1347 |
+
#: niteo-cmp.php:889 niteo-cmp.php:977
|
1348 |
+
msgid "Error creating Theme subdirectory!"
|
1349 |
+
msgstr ""
|
1350 |
+
|
1351 |
+
#: niteo-cmp.php:902
|
1352 |
+
msgid "Unable to upload new Theme file ."
|
1353 |
+
msgstr ""
|
1354 |
+
|
1355 |
+
#: niteo-cmp.php:902
|
1356 |
+
msgid ""
|
1357 |
+
" file extension is not supported. Please upload ZIP file containing CMP "
|
1358 |
+
"Theme."
|
1359 |
+
msgstr ""
|
1360 |
+
|
1361 |
+
#: niteo-cmp.php:985
|
1362 |
+
msgid "Error during updating Theme files:"
|
1363 |
+
msgstr ""
|
1364 |
+
|
1365 |
+
#: niteo-cmp.php:993
|
1366 |
+
msgid "General Error during updating Theme files."
|
1367 |
+
msgstr ""
|
1368 |
+
|
1369 |
+
#: niteo-cmp.php:1305
|
1370 |
+
msgid "Date"
|
1371 |
+
msgstr ""
|
1372 |
+
|
1373 |
+
#: niteo-cmp.php:1349
|
1374 |
+
msgid "CMP Settings Saved"
|
1375 |
+
msgstr ""
|
1376 |
+
|
1377 |
+
#: themes/construct/construct-settings.php:6
|
1378 |
+
#: themes/countdown/countdown-settings.php:13
|
1379 |
+
#: themes/hardwork/hardwork-settings.php:11
|
1380 |
+
msgid "Customize Colors"
|
1381 |
+
msgstr ""
|
1382 |
+
|
1383 |
+
#: themes/construct/construct-settings.php:9
|
1384 |
+
#: themes/countdown/countdown-settings.php:16
|
1385 |
+
msgid "Active Color"
|
1386 |
+
msgstr ""
|
1387 |
+
|
1388 |
+
#: themes/construct/construct-settings.php:13
|
1389 |
+
msgid "Headings and active elements color (buttons, hover links, etc)."
|
1390 |
+
msgstr ""
|
1391 |
+
|
1392 |
+
#: themes/construct/construct-settings.php:19
|
1393 |
+
#: themes/countdown/countdown-settings.php:26
|
1394 |
+
#: themes/hardwork/hardwork-settings.php:15
|
1395 |
+
msgid "Font Color"
|
1396 |
+
msgstr ""
|
1397 |
+
|
1398 |
+
#: themes/construct/construct-settings.php:28
|
1399 |
+
msgid "Background Color"
|
1400 |
+
msgstr ""
|
1401 |
+
|
1402 |
+
#: themes/construct/construct-settings.php:37
|
1403 |
+
msgid "Social Background Color"
|
1404 |
+
msgstr ""
|
1405 |
+
|
1406 |
+
#: themes/countdown/countdown-social_settings.php:6
|
1407 |
+
msgid "Social Icons Location"
|
1408 |
+
msgstr ""
|
1409 |
+
|
1410 |
+
#: themes/countdown/countdown-social_settings.php:10
|
1411 |
+
msgid "Below Content (big icons)"
|
1412 |
+
msgstr ""
|
1413 |
+
|
1414 |
+
#: themes/countdown/countdown-social_settings.php:11
|
1415 |
+
msgid "Footer (small icons)"
|
1416 |
+
msgstr ""
|
1417 |
+
|
1418 |
+
#: themes/hardwork/hardwork-settings.php:24
|
1419 |
+
msgid "Footer Background Color"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
+
#: themes/hardwork/hardwork-settings.php:31
|
1423 |
+
msgid "Footer Background Opacity"
|
1424 |
msgstr ""
|
niteo-cmp.php
CHANGED
@@ -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.8
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -13,1826 +13,1973 @@
|
|
13 |
*/
|
14 |
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
$this->author_homepage = 'https://niteothemes.com';
|
21 |
-
$this->version = '2.8';
|
22 |
-
$this->dev = false;
|
23 |
-
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
-
if ( $this->plugins_dir_path == './') {
|
25 |
-
$this->plugins_dir_path = WP_PLUGIN_DIR . '/';
|
26 |
-
}
|
27 |
-
$this->premium_installed = array();
|
28 |
-
|
29 |
-
// set array of themes supporting countdown
|
30 |
-
$this->countdown_themes = array('frame', 'countdown', 'postery', 'countdown2', 'stylo', 'element');
|
31 |
|
32 |
-
|
33 |
-
$this->fontanimation_themes = array('hardwork_premium', 'fifty', 'orbit', 'stylo');
|
34 |
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
-
|
39 |
-
if ( file_exists( $this->plugins_dir_path . 'cmp-premium-themes/' ) ) {
|
40 |
-
$this->premium_installed = array_map( 'basename', glob( $this->plugins_dir_path . 'cmp-premium-themes/*', GLOB_ONLYDIR ) );
|
41 |
-
$this->theme_array = array_merge( $this->themes_standard, $this->premium_installed );
|
42 |
-
} else {
|
43 |
-
$this->theme_array = $this->themes_standard;
|
44 |
}
|
45 |
|
46 |
-
// set remote server URL for updates
|
47 |
-
$this->remoteServer = ( $this->dev == true ) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
|
48 |
-
$this->minified = ( $this->dev == true ) ? '' : '.min';
|
49 |
|
50 |
-
|
51 |
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
}
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
add_action( 'template_redirect', array($this, 'cmp_displayPage') );
|
61 |
-
add_action( 'wp_login', array($this, 'cmp_admin_override') );
|
62 |
-
add_action( 'wp_before_admin_bar_render',array( $this, 'cmp_admin_bar' ));
|
63 |
-
add_action( 'wp_ajax_niteo_themeinfo', array($this, 'niteo_themeinfo') );
|
64 |
-
add_action( 'wp_ajax_niteo_unsplash', array($this, 'niteo_unsplash') );
|
65 |
-
add_action( 'wp_ajax_niteo_export_csv', array($this, 'niteo_export_csv') );
|
66 |
-
add_action( 'wp_ajax_cmp_theme_update_install', array($this, 'cmp_theme_update_install') );
|
67 |
-
add_action( 'wp_ajax_cmp_toggle_activation', array($this, 'cmp_toggle_activation') );
|
68 |
-
add_action( 'wp_ajax_nopriv_niteo_subscribe', array($this, 'niteo_subscribe') );
|
69 |
-
add_action( 'wp_ajax_niteo_subscribe', array($this, 'niteo_subscribe') );
|
70 |
-
add_action( 'wp_ajax_cmp_mailchimp_list_ajax', array($this, 'cmp_mailchimp_list_ajax') );
|
71 |
-
add_action( 'plugins_loaded', array($this, 'cmp_textDomain') );
|
72 |
-
add_action( 'admin_menu', array($this, 'cmp_adminMenu'), 10 );
|
73 |
-
add_action( 'admin_init', array($this, 'cmp_adminInit') ) ;
|
74 |
-
add_action( 'admin_init', array($this, 'cmp_admin_override') );
|
75 |
-
add_action( 'admin_enqueue_scripts', array($this,'cmp_add_admin_style') );
|
76 |
-
add_action( 'wp_enqueue_scripts', array($this,'cmp_add_admin_style') );
|
77 |
-
add_action( 'upgrader_process_complete', array($this, 'cmp_plugin_update' ), 10, 2 );
|
78 |
-
|
79 |
-
register_activation_hook( __FILE__, array($this, 'cmp_activate') );
|
80 |
-
register_deactivation_hook( __FILE__, array($this, 'cmp_deactivate') );
|
81 |
-
|
82 |
-
add_filter( 'style_loader_src', array($this,'sdt_remove_ver_css_js'), 9999, 2 );
|
83 |
-
add_filter( 'script_loader_src', array($this,'sdt_remove_ver_css_js'), 9999, 2 );
|
84 |
-
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this,'add_action_links') );
|
85 |
-
|
86 |
-
// include feedback class
|
87 |
-
require_once('inc/class-cmp-feedback.php');
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
require_once('inc/class-cmp-render_settings.php');
|
96 |
-
$this->render_settings = new cmp_render_settings();
|
97 |
|
98 |
-
|
99 |
-
|
|
|
100 |
}
|
101 |
-
|
102 |
-
wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version );
|
103 |
-
wp_enqueue_style( 'cmp-style' );
|
104 |
-
wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
|
105 |
-
wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
|
106 |
-
wp_register_style( 'animate-css', plugins_url('/css/animate'.$this->minified.'.css', __FILE__) );
|
107 |
-
wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
|
108 |
-
|
109 |
-
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
|
110 |
-
wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
|
111 |
-
wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
|
112 |
-
wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont', 'select2-js'), $this->version );
|
113 |
-
wp_register_script( 'countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
114 |
}
|
115 |
-
|
116 |
-
}
|
117 |
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
-
|
127 |
-
|
|
|
|
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
if ( in_array( $role, $roles_topbar ) ) {
|
134 |
-
wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', $this->version);
|
135 |
-
wp_enqueue_style( 'cmp_admin_style' );
|
136 |
-
wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), $this->version);
|
137 |
-
wp_enqueue_script( 'cmp_admin_script' );
|
138 |
-
break;
|
139 |
-
}
|
140 |
-
};
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
|
150 |
-
|
151 |
-
|
|
|
|
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
if ( in_array( $handle, $handles_remove_ver, true ) && strpos( $src, 'ver=' ) )
|
157 |
-
$src = remove_query_arg( 'ver', $src );
|
158 |
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
-
|
164 |
-
public function cmp_adminMenu() {
|
165 |
-
/* Register our plugin page */
|
166 |
-
$page = add_menu_page('CMP Settings', __('CMP Settings', 'cmp-coming-soon-maintenance'), 'activate_plugins', 'cmp-settings', array($this, 'cmp_settings_page'), plugins_url('/img/cmp.png', __FILE__));
|
167 |
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
-
|
|
|
|
|
|
|
|
|
171 |
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
173 |
|
174 |
-
add_submenu_page('cmp-settings', 'Translation', __('Translation', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-translate', array($this, 'cmp_translate_page') );
|
175 |
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
-
|
179 |
|
180 |
-
|
181 |
-
add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
|
182 |
|
183 |
-
|
184 |
|
|
|
185 |
|
186 |
-
|
187 |
-
public function cmp_enqueueScripts() {
|
188 |
-
wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
|
189 |
-
wp_enqueue_script('cmp_settings_js');
|
190 |
-
wp_enqueue_script('cmp-typography');
|
191 |
-
wp_enqueue_script( 'wp-color-picker');
|
192 |
-
wp_enqueue_script( 'webfont' );
|
193 |
-
wp_enqueue_script( 'select2-js');
|
194 |
-
wp_enqueue_media();
|
195 |
-
wp_enqueue_style( 'wp-color-picker');
|
196 |
-
wp_enqueue_style( 'select2');
|
197 |
-
wp_enqueue_style( 'font_awesome');
|
198 |
-
if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) ) {
|
199 |
-
wp_enqueue_style('animate-css');
|
200 |
-
}
|
201 |
-
}
|
202 |
|
203 |
-
|
204 |
-
// include default options page
|
205 |
-
// check for them updates, not sure where else this to put
|
206 |
-
$this->cmp_check_update( $this->cmp_selectedTheme() );
|
207 |
-
require_once ('cmp-settings.php');
|
208 |
-
}
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
wp_enqueue_style('select2');
|
213 |
-
require_once ('cmp-advanced.php');
|
214 |
-
}
|
215 |
|
216 |
-
|
217 |
-
require_once ('cmp-subscribers.php');
|
218 |
-
}
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
-
|
225 |
-
|
226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
|
238 |
-
|
239 |
-
|
|
|
|
|
|
|
|
|
240 |
|
241 |
-
|
242 |
-
|
243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
}
|
245 |
|
246 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
|
|
253 |
}
|
254 |
}
|
255 |
-
}
|
256 |
|
257 |
-
|
258 |
-
|
259 |
|
260 |
-
|
261 |
-
|
262 |
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
|
284 |
-
|
285 |
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
|
291 |
-
require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
|
292 |
die();
|
293 |
}
|
294 |
-
|
295 |
-
}
|
296 |
-
|
297 |
-
// finally render theme preview cmp_preview=true
|
298 |
-
if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
|
299 |
-
require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
|
300 |
-
die();
|
301 |
}
|
302 |
-
}
|
303 |
-
|
304 |
-
// bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
|
305 |
-
if ( isset($_GET['cmp_bypass']) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
|
306 |
-
nocache_headers();
|
307 |
-
header('Cache-Control: max-age=0; private');
|
308 |
-
setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
|
309 |
-
return;
|
310 |
-
}
|
311 |
-
|
312 |
-
// if bypass Cookie is set, return
|
313 |
-
if ( isset($_COOKIE['cmp_bypass']) && $_COOKIE['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() ) ) && get_option('niteoCS_bypass', '0') == '1' ) {
|
314 |
-
return;
|
315 |
-
}
|
316 |
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
|
|
|
|
322 |
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
// if themes with countdown timer
|
328 |
-
if ( in_array($this->cmp_selectedTheme(), $this->countdown_themes) ){
|
329 |
-
// if counter is enabled
|
330 |
-
if ( get_option('niteoCS_counter', '1') == '1' ) {
|
331 |
-
// if countdown date is set
|
332 |
-
if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
|
333 |
-
// if timer < timestamp do set action
|
334 |
-
if ( get_option('niteoCS_counter_date' ) < time() ) {
|
335 |
-
// if action set to disable cmp
|
336 |
-
if ( get_option('niteoCS_countdown_action') == 'disable-cmp' ) {
|
337 |
-
update_option('niteoCS_activation', '0');
|
338 |
-
}
|
339 |
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
}
|
346 |
}
|
347 |
}
|
348 |
}
|
349 |
-
}
|
350 |
-
|
351 |
-
// if maintanance mode send correct 503 headers
|
352 |
-
if ( $this->cmp_status() == '1' ){
|
353 |
-
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
354 |
-
header('Status: 503 Service Temporarily Unavailable');
|
355 |
-
header('Retry-After: 86400'); // retry in a day
|
356 |
-
}
|
357 |
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
}
|
363 |
}
|
364 |
-
}
|
365 |
|
366 |
-
|
367 |
-
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
|
|
374 |
}
|
375 |
}
|
376 |
-
}
|
377 |
|
378 |
|
379 |
-
|
380 |
-
|
381 |
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
|
387 |
-
|
388 |
-
|
|
|
389 |
}
|
390 |
-
}
|
391 |
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
// verify nonce
|
397 |
-
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
398 |
-
// verify user rights
|
399 |
-
if( !current_user_can('publish_pages') ) {
|
400 |
-
die('Sorry, but this request is invalid');
|
401 |
-
}
|
402 |
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
|
|
408 |
|
409 |
-
|
410 |
-
|
411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
}
|
413 |
-
}
|
414 |
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
|
420 |
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
|
426 |
-
|
427 |
-
|
|
|
428 |
}
|
429 |
-
}
|
430 |
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
|
436 |
-
|
437 |
-
|
438 |
-
|
|
|
439 |
}
|
440 |
-
}
|
441 |
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
|
448 |
-
|
449 |
-
|
|
|
450 |
}
|
451 |
-
}
|
452 |
|
453 |
-
|
454 |
-
|
455 |
|
456 |
-
|
457 |
-
|
458 |
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
if ( isset($_POST['cmp_status']) ) {
|
469 |
-
update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
|
470 |
-
} else {
|
471 |
-
|
472 |
-
update_option('niteoCS_status', false);
|
473 |
-
}
|
474 |
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
}
|
479 |
|
480 |
-
|
481 |
-
|
482 |
-
}
|
483 |
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
|
493 |
-
|
494 |
-
|
495 |
-
|
|
|
496 |
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
|
501 |
-
|
|
|
|
|
502 |
|
|
|
|
|
|
|
503 |
|
504 |
-
|
505 |
-
require_once(ABSPATH . 'wp-admin/includes/screen.php');
|
506 |
|
507 |
-
$roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
|
508 |
|
509 |
-
|
510 |
-
|
511 |
|
512 |
-
|
513 |
|
514 |
-
|
515 |
-
|
516 |
|
517 |
-
|
518 |
-
return false;
|
519 |
-
}
|
520 |
-
};
|
521 |
-
|
522 |
-
global $wp_admin_bar;
|
523 |
-
|
524 |
-
$class = '';
|
525 |
-
$msg= '';
|
526 |
-
|
527 |
-
switch ( get_option( 'niteoCS_activation', '2' ) ) {
|
528 |
-
case '1':
|
529 |
-
$msg = __('Maintenance Mode:','cmp-coming-soon-maintenance');
|
530 |
-
$class = ' maintenance';
|
531 |
-
break;
|
532 |
-
case '2':
|
533 |
-
$msg = __('Coming Soon Mode:','cmp-coming-soon-maintenance');
|
534 |
-
$class = ' coming-soon';
|
535 |
-
break;
|
536 |
-
case '3':
|
537 |
-
$msg = __('Redirect Mode:','cmp-coming-soon-maintenance');
|
538 |
-
$class = ' redirect';
|
539 |
-
break;
|
540 |
-
default:
|
541 |
-
break;
|
542 |
-
}
|
543 |
-
|
544 |
-
$ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
|
545 |
-
|
546 |
-
$msg = '<img src="'.plugins_url('/img/cmp.png', __FILE__).'" alt="CMP Logo" class="cmp-logo"><span class="cmp-status-msg">'.$msg.'</span>';
|
547 |
-
$msg .='<div class="toggle-wrapper">
|
548 |
-
<input type="checkbox" id="cmp-status-menubar" class="toggle-checkbox"'.checked( '1', get_option('niteoCS_status', false), false ).' name="cmp_status_menu" data-security="'. esc_attr($ajax_nonce).'">
|
549 |
-
<label for="cmp-status-menubar" class="toggle"><span class="toggle_handler"></span></label>
|
550 |
-
</div>';
|
551 |
-
|
552 |
-
//Add the main siteadmin menu item
|
553 |
-
$wp_admin_bar->add_menu( array(
|
554 |
-
'id' => 'cmp-admin-notice',
|
555 |
-
'href' => admin_url().'admin.php?page=cmp-settings',
|
556 |
-
'parent' => 'top-secondary',
|
557 |
-
'title' => $msg,
|
558 |
-
'meta' => array( 'class' => 'cmp-notice'.$class ),
|
559 |
-
) );
|
560 |
-
|
561 |
-
// Display CMP Settings in topbar only for administrator
|
562 |
-
if ( user_can( $current_user, 'administrator' ) ) {
|
563 |
-
$wp_admin_bar->add_node( array(
|
564 |
-
'id' => 'cmp-settings',
|
565 |
-
'title' => __('CMP Settings', 'cmp-coming-soon-maintenancee'),
|
566 |
-
'href' => admin_url('admin.php?page=cmp-settings'),
|
567 |
-
'parent' => 'cmp-admin-notice'
|
568 |
-
));
|
569 |
-
}
|
570 |
|
571 |
-
|
572 |
-
|
573 |
-
'title' => __('CMP Preview', 'cmp-coming-soon-maintenancee'),
|
574 |
-
'href' => get_site_url().'/?cmp_preview=true',
|
575 |
-
'parent'=> 'cmp-admin-notice',
|
576 |
-
'meta' => array('target' => '_blank' )
|
577 |
-
));
|
578 |
|
579 |
-
|
|
|
|
|
|
|
580 |
|
581 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
582 |
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
}
|
590 |
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
|
|
|
|
|
|
595 |
|
596 |
-
|
597 |
-
public function cmp_deactivate() {
|
598 |
-
//get all the options. store them in an array
|
599 |
-
$options = array();
|
600 |
-
|
601 |
-
global $wpdb;
|
602 |
-
$saved_options = $wpdb->get_results( "SELECT * FROM $wpdb->options WHERE option_name LIKE 'niteoCS_%'", OBJECT );
|
603 |
-
$i = 0;
|
604 |
-
foreach ($saved_options as $option) {
|
605 |
-
$options[$i] = array('name' => $option->option_name, 'value' => get_option( $option->option_name) );
|
606 |
-
$i++;
|
607 |
-
}
|
608 |
|
609 |
-
|
610 |
-
update_option('niteoCS_archive', $options);
|
611 |
|
612 |
-
|
613 |
-
|
614 |
-
|
|
|
|
|
|
|
|
|
615 |
|
|
|
|
|
|
|
616 |
}
|
617 |
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
$premium_themes = array();
|
629 |
-
array_push( $premium_themes, array('name' => 'element', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=element', 'price' => '10') );
|
630 |
|
631 |
-
|
|
|
|
|
632 |
|
633 |
-
|
634 |
|
635 |
-
|
636 |
|
637 |
-
|
|
|
|
|
|
|
638 |
|
639 |
-
|
|
|
|
|
|
|
|
|
640 |
|
641 |
-
|
642 |
|
643 |
-
|
644 |
-
|
645 |
-
// array_push( $premium_themes, array('name' => 'coder', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=coder', 'price' => '0') );
|
646 |
|
647 |
-
|
648 |
-
}
|
649 |
|
650 |
-
|
651 |
-
* Difference between Premium Themes installed and Premium Themes available sets in cmp_premium_themes() function.
|
652 |
-
*
|
653 |
-
* @since 2.2
|
654 |
-
* @access public
|
655 |
-
* @return array
|
656 |
-
*/
|
657 |
-
public function cmp_downloadable_themes() {
|
658 |
-
$downloadable_themes = array();
|
659 |
|
660 |
-
|
661 |
-
if ( !in_array($premium['name'], $this->premium_installed) ) {
|
662 |
-
array_push( $downloadable_themes, $premium );
|
663 |
-
}
|
664 |
-
}
|
665 |
|
666 |
-
|
667 |
-
}
|
668 |
|
669 |
-
|
670 |
-
|
|
|
671 |
|
672 |
-
|
673 |
-
return;
|
674 |
}
|
675 |
|
676 |
-
|
677 |
-
|
678 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
679 |
|
680 |
-
|
681 |
-
delete_transient( $theme_slug.'_updatecheck' );
|
682 |
}
|
683 |
|
684 |
-
//
|
685 |
-
|
686 |
-
|
687 |
-
$current_version = $this->cmp_theme_version($theme_slug);
|
688 |
-
// get remote version from remote server
|
689 |
-
$request = wp_remote_post( $this->remoteServer.'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')) );
|
690 |
-
|
691 |
-
// if no error, retrivee body
|
692 |
-
if ( !is_wp_error( $request ) ) {
|
693 |
-
|
694 |
-
// decode to json
|
695 |
-
$remote_version = json_decode( $request['body'], true );
|
696 |
-
|
697 |
-
// get remove version key
|
698 |
-
if ( isset($remote_version['version']) ) {
|
699 |
-
|
700 |
-
$remote_version = $remote_version['version'];
|
701 |
|
702 |
-
|
703 |
-
|
|
|
704 |
|
705 |
-
|
|
|
|
|
706 |
|
707 |
-
|
708 |
-
|
|
|
709 |
|
710 |
-
|
711 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
|
713 |
-
|
|
|
714 |
|
715 |
-
|
716 |
-
|
717 |
|
718 |
-
|
719 |
-
}
|
720 |
|
721 |
-
|
722 |
-
|
723 |
-
set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
|
724 |
-
}
|
725 |
|
726 |
-
|
727 |
-
}
|
728 |
|
729 |
-
|
730 |
-
|
731 |
-
}
|
732 |
|
733 |
-
|
734 |
-
|
735 |
|
736 |
-
|
737 |
-
// allow zip file to upload
|
738 |
-
add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
|
739 |
|
740 |
-
|
741 |
-
|
742 |
-
require_once realpath('../../../wp-admin/includes/file.php');
|
743 |
-
}
|
744 |
|
745 |
-
|
746 |
-
|
747 |
-
/* You can use wp_check_filetype() public function to check the
|
748 |
-
file type and go on wit the upload or stop it.*/
|
749 |
-
$filetype = wp_check_filetype( $filename );
|
750 |
-
|
751 |
-
if ( $filetype['ext'] == 'zip' ) {
|
752 |
-
// Upload file
|
753 |
-
$movefile = wp_handle_upload( $uploadedfile, array('test_form' => FALSE) );
|
754 |
-
|
755 |
-
if ( $movefile && !isset( $movefile['error'] ) ) {
|
756 |
-
|
757 |
-
WP_Filesystem();
|
758 |
-
$source_path = $movefile['file'];
|
759 |
-
$theme_name = str_replace('.zip', '', $filename);
|
760 |
-
$destination_path = $this->plugins_dir_path . 'cmp-premium-themes/';
|
761 |
-
|
762 |
-
// create new theme DIR
|
763 |
-
if ( wp_mkdir_p( $destination_path ) ) {
|
764 |
-
// Unzip FILE into that DIR
|
765 |
-
$unzipfile = unzip_file( $source_path, $destination_path);
|
766 |
-
|
767 |
-
if ( $unzipfile ) {
|
768 |
-
// delete FILE
|
769 |
-
wp_delete_file( $source_path );
|
770 |
-
$this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
|
771 |
-
$this->theme_array = array_merge( $this->themes_standard, $this->premium_installed );
|
772 |
-
echo '<div class="notice notice-success is-dismissible"><p class="message">'.ucwords(str_replace('_', ' ', $theme_name)).' '.__(' theme was successfully installed!', 'cmp-coming-soon-maintenance').'</p></div>';
|
773 |
-
return;
|
774 |
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
|
780 |
-
|
781 |
-
|
782 |
-
return;
|
783 |
-
}
|
784 |
|
785 |
-
} else {
|
786 |
-
|
787 |
-
* Error generated by _wp_handle_upload()
|
788 |
-
* @see _wp_handle_upload() in wp-admin/includes/file.php
|
789 |
-
*/
|
790 |
-
echo '<div class="notice notice-error is-dismissible"><p>'.$movefile['error'].'</p></div>';
|
791 |
-
return;
|
792 |
}
|
793 |
-
|
794 |
-
echo '<div class="notice notice-error is-dismissible"><p>'.__('Unable to upload new Theme file .', 'cmp-coming-soon-maintenance'). strtoupper($filetype['ext']) .__(' file extension is not supported. Please upload ZIP file containing CMP Theme.', 'cmp-coming-soon-maintenance').'</p></div>';
|
795 |
return;
|
796 |
}
|
797 |
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
public function cmp_theme_update_install( $file ) {
|
803 |
-
$ajax = false;
|
804 |
-
// check for ajax
|
805 |
-
if ( isset( $_POST['file'] ) ) {
|
806 |
-
// verify nonce
|
807 |
-
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
808 |
-
// verify user rights
|
809 |
-
if( !current_user_can('publish_pages') ) {
|
810 |
-
die('Sorry, but this request is invalid');
|
811 |
-
}
|
812 |
-
|
813 |
-
// sanitize array
|
814 |
-
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
|
815 |
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
}
|
820 |
-
}
|
821 |
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
if (
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
// set transient no update available with 24 hours expire
|
851 |
-
set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
|
852 |
-
// die
|
853 |
-
if ( $ajax ) {
|
854 |
-
wp_die('success');
|
855 |
-
return;
|
856 |
-
} else {
|
857 |
-
echo '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp-coming-soon-maintenance').'</p></div>';
|
858 |
return;
|
859 |
-
}
|
860 |
-
|
861 |
-
} else {
|
862 |
-
echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
|
863 |
-
if ( $ajax ) {
|
864 |
-
wp_die();
|
865 |
-
return;
|
866 |
-
} else {
|
867 |
-
return;
|
868 |
-
}
|
869 |
-
}
|
870 |
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
} else {
|
|
|
877 |
return;
|
878 |
}
|
879 |
-
}
|
880 |
|
881 |
-
} else {
|
882 |
-
echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp-coming-soon-maintenance').' '.$file['tmp_name']->get_error_message().'</p></div>';
|
883 |
-
if ( $ajax === true ) {
|
884 |
-
wp_die();
|
885 |
} else {
|
886 |
-
|
|
|
|
|
|
|
|
|
|
|
887 |
}
|
888 |
-
}
|
889 |
-
} else {
|
890 |
-
|
891 |
-
echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
|
892 |
-
if ( $ajax === true ) {
|
893 |
-
wp_die();
|
894 |
} else {
|
|
|
895 |
return;
|
896 |
}
|
|
|
|
|
|
|
897 |
}
|
898 |
-
}
|
899 |
|
900 |
-
|
901 |
-
|
902 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
903 |
|
904 |
-
|
905 |
-
|
906 |
|
907 |
-
|
908 |
-
|
909 |
-
|
|
|
|
|
910 |
|
911 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
|
913 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
914 |
|
915 |
-
|
916 |
-
|
|
|
|
|
|
|
917 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
918 |
} else {
|
919 |
-
|
|
|
|
|
|
|
|
|
|
|
920 |
}
|
921 |
|
922 |
-
|
923 |
-
$data = array( 'response' => '500', 'body' => 'You have neither cUrl installed nor allow_url_fopen activated. Ask your server hosting provider to allow on of those options.' );
|
924 |
}
|
925 |
|
926 |
-
|
927 |
-
|
|
|
928 |
|
929 |
-
|
930 |
-
|
931 |
-
$ajax = false;
|
932 |
-
|
933 |
-
// check for ajax
|
934 |
-
if ( isset( $_POST['params'] ) ) {
|
935 |
-
// verify nonce
|
936 |
-
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
937 |
-
// verify user rights
|
938 |
-
if( !current_user_can('publish_pages') ) {
|
939 |
-
die('Sorry, but this request is invalid');
|
940 |
-
}
|
941 |
|
942 |
-
|
943 |
-
|
|
|
944 |
|
945 |
-
|
946 |
-
$params = $_POST['params'];
|
947 |
-
$ajax = true;
|
948 |
-
}
|
949 |
-
}
|
950 |
|
951 |
-
|
952 |
-
array_key_exists ('url', $params) ? $url = $params['url'] : $url = '';
|
953 |
-
array_key_exists ('feat', $params) ? $feat = $params['feat'] : $feat = '';
|
954 |
-
array_key_exists ('custom_str', $params) ? $custom_str = $params['custom_str'] : $custom_str = '';
|
955 |
-
array_key_exists ('count', $params) ? $count = $params['count'] : $count = '1';
|
956 |
-
|
957 |
-
switch ( $feed ) {
|
958 |
-
// specific unsplash photo by url/id
|
959 |
-
case '0':
|
960 |
-
$id = '';
|
961 |
-
// check if $query contains unsplash.com url
|
962 |
-
if ( strpos( $url, 'unsplash.com' ) !== false ) {
|
963 |
-
$parts = parse_url( $url );
|
964 |
-
// check for photo parameter in URL
|
965 |
-
if ( isset($parts['query'])) {
|
966 |
-
parse_str($parts['query'], $query);
|
967 |
-
$id = $query['photo'];
|
968 |
-
}
|
969 |
-
// if no ID found, get last part of URL containing ID
|
970 |
-
if ( $id == '' ) {
|
971 |
|
972 |
-
|
973 |
-
|
974 |
-
}
|
975 |
|
976 |
-
// $query is ID
|
977 |
} else {
|
978 |
-
$
|
979 |
}
|
980 |
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
|
985 |
-
|
986 |
-
|
987 |
|
988 |
-
|
989 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
990 |
}
|
991 |
|
992 |
-
//
|
993 |
-
$
|
994 |
-
break;
|
995 |
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
$collection = $url;
|
1000 |
-
} else {
|
1001 |
-
$collection = filter_var($url, FILTER_SANITIZE_NUMBER_INT);
|
1002 |
-
$collection = str_replace('-', '', $collection );
|
1003 |
}
|
|
|
1004 |
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1008 |
|
1009 |
-
|
1010 |
-
|
|
|
1011 |
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
$featured = 'true';
|
1017 |
-
}
|
1018 |
|
1019 |
-
|
1020 |
-
|
|
|
1021 |
|
1022 |
-
|
1023 |
-
|
1024 |
-
}
|
1025 |
-
// prepare query for random photo
|
1026 |
-
$api_query = 'photos/random/?orientation=landscape&featured='.$featured.'&'.$search.'count='.$count;
|
1027 |
-
break;
|
1028 |
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
}
|
1033 |
|
1034 |
-
|
|
|
|
|
1035 |
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
|
|
|
|
|
|
|
|
|
|
1039 |
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
// check value in multidimensional array
|
1046 |
-
public function niteo_in_array_r($needle, $haystack, $strict = false) {
|
1047 |
-
foreach ( $haystack as $item ) {
|
1048 |
-
if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
|
1049 |
-
return true;
|
1050 |
-
}
|
1051 |
-
}
|
1052 |
|
1053 |
-
|
1054 |
-
|
1055 |
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
$response = '';
|
1063 |
-
// get translation lists
|
1064 |
-
if ( get_option('niteoCS_translation') ) {
|
1065 |
-
$translation = json_decode( get_option('niteoCS_translation'), true );
|
1066 |
-
$response_ok = $translation[7]['translation'];
|
1067 |
-
$response_duplicate = $translation[5]['translation'];
|
1068 |
-
$response_invalid = $translation[6]['translation'];
|
1069 |
-
|
1070 |
-
} else {
|
1071 |
-
$response_ok = 'Thank you, your sign-up request was successful!';
|
1072 |
-
$response_duplicate = 'This Email address has already been on our subscriber list.';
|
1073 |
-
$response_invalid = 'Please insert valid Email address.';
|
1074 |
-
}
|
1075 |
-
|
1076 |
-
$ajax = false;
|
1077 |
-
|
1078 |
-
// check for ajax request
|
1079 |
-
if ( isset( $_POST['check'] ) && $_POST['check'] == true ) {
|
1080 |
-
$check = true;
|
1081 |
-
$ajax = true;
|
1082 |
-
}
|
1083 |
|
1084 |
-
|
|
|
1085 |
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
|
|
1091 |
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
|
|
1095 |
|
1096 |
-
|
1097 |
-
$ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
|
1098 |
-
$firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
|
1099 |
-
$lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
|
1100 |
-
$timestamp = time();
|
1101 |
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
// get subscribe list
|
1106 |
-
$subscribe_list = get_option('niteoCS_subscribers_list');
|
1107 |
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
$response = array( 'status' => '1', 'message' => $response_ok);
|
1124 |
-
|
1125 |
-
// if email exists return duplicate response
|
1126 |
-
} else {
|
1127 |
-
$response = array( 'status' => '0', 'message' => $response_duplicate);
|
1128 |
-
}
|
1129 |
-
}
|
1130 |
-
break;
|
1131 |
-
|
1132 |
-
// mailchimp API call
|
1133 |
-
case 'mailchimp':
|
1134 |
-
$api_key = esc_attr( get_option('niteoCS_mailchimp_apikey') );
|
1135 |
-
$list_id = esc_attr( get_option('niteoCS_mailchimp_list_selected') );
|
1136 |
-
$email = $_POST['email'];
|
1137 |
-
$status = 'subscribed'; // subscribed, cleaned, pending
|
1138 |
-
|
1139 |
-
$args = array(
|
1140 |
-
'method' => 'PUT',
|
1141 |
-
'headers' => array(
|
1142 |
-
'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
|
1143 |
-
),
|
1144 |
-
'body' => json_encode(array(
|
1145 |
-
'email_address' => $email,
|
1146 |
-
'status' => $status
|
1147 |
-
))
|
1148 |
-
);
|
1149 |
-
|
1150 |
-
$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 );
|
1151 |
-
|
1152 |
-
if ( !is_wp_error( $mailchimp ) ) {
|
1153 |
|
1154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1155 |
|
1156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1157 |
$response = array( 'status' => '1', 'message' => $response_ok);
|
1158 |
|
1159 |
} else {
|
1160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1161 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1162 |
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
|
1168 |
-
|
1169 |
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
|
1180 |
-
|
1181 |
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
|
1186 |
-
|
1187 |
-
|
|
|
|
|
1188 |
}
|
1189 |
-
|
1190 |
-
}
|
1191 |
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1208 |
}
|
1209 |
|
1210 |
-
|
1211 |
-
$
|
1212 |
-
$subscribers[$key]['timestamp'] = date_i18n($format, $subscribers[$key]['timestamp']);
|
1213 |
}
|
|
|
1214 |
}
|
|
|
|
|
1215 |
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
|
|
|
|
1220 |
}
|
1221 |
-
die();
|
1222 |
-
}
|
1223 |
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
public function niteo_remove_zip_mime( $existing_mimes = array() ) {
|
1233 |
-
// remove zip mime
|
1234 |
-
unset ($existing_mimes['zip']);
|
1235 |
-
|
1236 |
-
// return amended array
|
1237 |
-
return $existing_mimes;
|
1238 |
-
}
|
1239 |
|
1240 |
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
|
1247 |
-
|
|
|
1248 |
}
|
1249 |
-
|
1250 |
-
|
1251 |
-
}
|
1252 |
-
|
1253 |
-
// convert hex to rgba
|
1254 |
-
public function hex2rgba ( $hex, $opacity ) {
|
1255 |
-
list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
|
1256 |
-
|
1257 |
-
$rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
|
1258 |
|
1259 |
-
|
1260 |
-
|
|
|
1261 |
|
1262 |
-
|
1263 |
-
public function hex2hsl( $hex, $opacity ) {
|
1264 |
|
1265 |
-
if ( $hex[0] != '#' ) {
|
1266 |
-
$rgba = explode( ',', $hex);
|
1267 |
-
$rgba[3] = str_replace(')', '', $rgba[3]);
|
1268 |
-
$rgba[3] = $rgba[3] - ( $opacity / 100 );
|
1269 |
-
$rgba = $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')';
|
1270 |
return $rgba;
|
1271 |
}
|
1272 |
|
1273 |
-
|
1274 |
-
|
1275 |
-
$r = $red / 255.0;
|
1276 |
-
$g = $green / 255.0;
|
1277 |
-
$b = $blue / 255.0;
|
1278 |
-
$H = 0;
|
1279 |
-
$S = 0;
|
1280 |
-
$V = 0;
|
1281 |
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
|
|
|
|
|
|
|
|
1285 |
|
1286 |
-
|
1287 |
|
1288 |
-
|
|
|
|
|
1289 |
$H = 0;
|
1290 |
$S = 0;
|
1291 |
-
|
1292 |
-
$S = $L > 0.5 ? $delta / ( 2 - $max - $min ) : $delta / ( $max + $min );
|
1293 |
-
|
1294 |
-
$dR = ( ( ( $max - $r ) / 6) + ( $delta / 2 ) ) / $delta;
|
1295 |
-
$dG = ( ( ( $max - $g ) / 6) + ( $delta / 2 ) ) / $delta;
|
1296 |
-
$dB = ( ( ( $max - $b ) / 6) + ( $delta / 2 ) ) / $delta;
|
1297 |
-
|
1298 |
-
if ( $r == $max )
|
1299 |
-
$H = $dB - $dG;
|
1300 |
-
else if( $g == $max )
|
1301 |
-
$H = ( 1/3 ) + $dR - $dB;
|
1302 |
-
else
|
1303 |
-
$H = ( 2/3 ) + $dG - $dR;
|
1304 |
-
|
1305 |
-
if ( $H < 0 )
|
1306 |
-
$H += 1;
|
1307 |
-
if ( $H > 1 )
|
1308 |
-
$H -= 1;
|
1309 |
-
}
|
1310 |
|
1311 |
-
|
|
|
|
|
1312 |
|
1313 |
-
|
1314 |
-
if ( $HSL['hue'] == 0 && $HSL['saturation'] == 0) {
|
1315 |
-
$requested_lumi = $HSL['luminosity'] + $opacity;
|
1316 |
-
} else {
|
1317 |
-
$requested_lumi = $HSL['luminosity'] - $opacity;
|
1318 |
-
}
|
1319 |
-
|
1320 |
-
$requested_lumi = (int)round($requested_lumi);
|
1321 |
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1326 |
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1330 |
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
|
1336 |
-
|
1337 |
-
return
|
1338 |
}
|
1339 |
-
}
|
1340 |
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
|
1346 |
-
|
1347 |
-
|
|
|
|
|
1348 |
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
|
1354 |
-
|
1355 |
-
|
1356 |
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
if( $a['order'] == $b['order'] ) {
|
1361 |
-
return 0;
|
1362 |
}
|
1363 |
-
return $a['order'] < $b['order'] ? -1 : 1;
|
1364 |
-
} else {
|
1365 |
-
return $a['hidden'] > $b['hidden'] ? 1 : -1;
|
1366 |
-
}
|
1367 |
-
}
|
1368 |
|
1369 |
-
|
1370 |
-
|
1371 |
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
|
|
|
|
|
|
1380 |
|
1381 |
-
|
1382 |
-
|
1383 |
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
|
|
|
|
|
|
|
|
1387 |
}
|
1388 |
-
}
|
1389 |
-
|
1390 |
-
public function cmp_get_pages() {
|
1391 |
-
$page_titles = array();
|
1392 |
-
$pages = array();
|
1393 |
-
$page_ids = get_all_page_ids();
|
1394 |
|
1395 |
-
|
1396 |
-
|
1397 |
-
}
|
1398 |
|
1399 |
-
|
1400 |
-
|
|
|
|
|
1401 |
}
|
1402 |
|
1403 |
-
|
1404 |
-
|
|
|
|
|
1405 |
|
1406 |
-
|
1407 |
-
|
|
|
1408 |
|
1409 |
-
|
1410 |
-
|
1411 |
-
// verify nonce
|
1412 |
-
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
1413 |
-
// verify user rights
|
1414 |
-
if( !current_user_can('publish_pages') ) {
|
1415 |
-
die('Sorry, but this request is invalid');
|
1416 |
}
|
1417 |
|
|
|
|
|
1418 |
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
if (
|
1424 |
-
|
1425 |
-
|
|
|
|
|
|
|
|
|
1426 |
|
1427 |
-
|
|
|
|
|
|
|
1428 |
|
1429 |
-
|
1430 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1431 |
}
|
1432 |
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
|
1438 |
-
|
1439 |
-
|
|
|
1440 |
}
|
1441 |
-
}
|
1442 |
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
// returns array of google fonts from /inc/webfonts.php
|
1449 |
-
public function cmp_get_google_fonts() {
|
1450 |
-
$fonts = include_once wp_normalize_path( dirname( __FILE__ ) . '/inc/webfonts.php' );
|
1451 |
-
$google_fonts = json_decode( $fonts, true);
|
1452 |
-
|
1453 |
-
return $google_fonts;
|
1454 |
-
}
|
1455 |
-
|
1456 |
-
public function cmp_google_variant_title( $variant ) {
|
1457 |
-
|
1458 |
-
switch( $variant ) {
|
1459 |
-
case '100':
|
1460 |
-
return 'Thin 100';
|
1461 |
-
break;
|
1462 |
-
case '100italic':
|
1463 |
-
return 'Thin 100 Italic';
|
1464 |
-
break;
|
1465 |
-
case '200':
|
1466 |
-
return 'Extra-light 200';
|
1467 |
-
break;
|
1468 |
-
case '200italic':
|
1469 |
-
return 'Extra-light 200 Italic';
|
1470 |
-
break;
|
1471 |
-
case '300':
|
1472 |
-
return 'Light 300';
|
1473 |
-
break;
|
1474 |
-
case '300italic':
|
1475 |
-
return 'Light 300 Italic';
|
1476 |
-
break;
|
1477 |
-
case '400':
|
1478 |
-
return 'Regular 400';
|
1479 |
-
break;
|
1480 |
-
case '400italic':
|
1481 |
-
return 'Regular 400 Italic';
|
1482 |
-
break;
|
1483 |
-
case '500':
|
1484 |
-
return 'Medium 500';
|
1485 |
-
break;
|
1486 |
-
case '500italic':
|
1487 |
-
return 'Meidum 500 Italic';
|
1488 |
-
break;
|
1489 |
-
case '600':
|
1490 |
-
return 'Semi-Bold 600';
|
1491 |
-
break;
|
1492 |
-
case '600italic':
|
1493 |
-
return 'Semi-Bold 600 Italic';
|
1494 |
-
break;
|
1495 |
-
case '700':
|
1496 |
-
return 'Bold 700';
|
1497 |
-
break;
|
1498 |
-
case '700italic':
|
1499 |
-
return 'Bold 700 Italic';
|
1500 |
-
break;
|
1501 |
-
case '800':
|
1502 |
-
return 'Extra-Bold 800';
|
1503 |
-
break;
|
1504 |
-
case '800italic':
|
1505 |
-
return 'Extra-Bold Italic';
|
1506 |
-
break;
|
1507 |
-
case '900':
|
1508 |
-
return 'Black 900';
|
1509 |
-
break;
|
1510 |
-
case '900italic':
|
1511 |
-
return 'Black 900 Italic';
|
1512 |
-
break;
|
1513 |
-
case 'regular':
|
1514 |
-
return 'Regular 400';
|
1515 |
-
break;
|
1516 |
-
case 'italic':
|
1517 |
-
return 'Regular 400 Italic';
|
1518 |
-
break;
|
1519 |
-
default:
|
1520 |
-
break;
|
1521 |
-
}
|
1522 |
-
}
|
1523 |
|
1524 |
-
|
1525 |
-
|
1526 |
-
public function cmp_page_filter() {
|
1527 |
-
$page_id = get_the_ID();
|
1528 |
|
1529 |
-
|
1530 |
-
|
1531 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1532 |
}
|
1533 |
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1539 |
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
|
1545 |
return true;
|
|
|
1546 |
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
break;
|
1551 |
|
1552 |
-
|
1553 |
-
|
1554 |
-
$page_list = json_decode( get_option('niteoCS_page_blacklist', '[]'), true );
|
1555 |
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
|
|
1559 |
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
|
1564 |
-
|
|
|
1565 |
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
}
|
1570 |
|
1571 |
-
|
1572 |
-
}
|
1573 |
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
// push WP administrator to roles array, since it is default
|
1579 |
-
array_push( $roles, 'administrator' );
|
1580 |
|
1581 |
-
|
|
|
1582 |
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
|
|
1588 |
|
1589 |
-
|
1590 |
-
}
|
1591 |
|
|
|
|
|
|
|
|
|
|
|
1592 |
|
1593 |
-
|
1594 |
-
|
1595 |
-
if ( $hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins']) ) {
|
1596 |
-
$this_plugin = plugin_basename(__FILE__);
|
1597 |
-
foreach ( $hook_extra['plugins'] as $key => $plugin ) {
|
1598 |
-
if ( $this_plugin == $plugin ) {
|
1599 |
-
$this_plugin_updated = true;
|
1600 |
-
break;
|
1601 |
-
}
|
1602 |
-
}// endforeach;
|
1603 |
-
unset( $key, $plugin, $this_plugin );
|
1604 |
|
1605 |
-
if ( isset( $this_plugin_updated ) && $this_plugin_updated === true ) {
|
1606 |
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1611 |
|
1612 |
-
|
1613 |
-
if ( get_option('niteoCS_socialmedia') ) {
|
1614 |
-
$niteoCS_socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
|
1615 |
-
$socialmedia = json_decode( $niteoCS_socialmedia, true );
|
1616 |
-
$update = false;
|
1617 |
-
|
1618 |
-
// add soundcloud and phone social media in 2.2 update
|
1619 |
-
if ( !$this->niteo_in_array_r( 'soundcloud', $socialmedia, true ) ) {
|
1620 |
-
$soundcloud = array(
|
1621 |
-
'name' => 'soundcloud',
|
1622 |
-
'url' => '',
|
1623 |
-
'active' => '1',
|
1624 |
-
'hidden' => '1',
|
1625 |
-
'order' => '17',
|
1626 |
-
);
|
1627 |
-
array_push( $socialmedia, $soundcloud );
|
1628 |
-
$update = true;
|
1629 |
-
}
|
1630 |
|
1631 |
-
//
|
1632 |
-
if (
|
1633 |
-
|
1634 |
-
'name' => 'whatsapp',
|
1635 |
-
'url' => '',
|
1636 |
-
'active' => '1',
|
1637 |
-
'hidden' => '1',
|
1638 |
-
'order' => '18',
|
1639 |
-
);
|
1640 |
-
array_push( $socialmedia, $whatsapp );
|
1641 |
-
|
1642 |
-
$phone = array(
|
1643 |
-
'name' => 'phone',
|
1644 |
-
'url' => '',
|
1645 |
-
'active' => '1',
|
1646 |
-
'hidden' => '1',
|
1647 |
-
'order' => '19',
|
1648 |
-
);
|
1649 |
-
array_push( $socialmedia, $phone );
|
1650 |
-
$update = true;
|
1651 |
}
|
1652 |
|
1653 |
-
// add
|
1654 |
-
if (
|
1655 |
-
$
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1664 |
}
|
1665 |
|
1666 |
-
|
1667 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1668 |
}
|
1669 |
-
}
|
1670 |
|
1671 |
-
// migrate overlay color and opacity settings after update 2.8
|
1672 |
-
$current_theme = get_option('niteoCS_theme');
|
1673 |
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1681 |
}
|
1682 |
|
1683 |
-
|
1684 |
-
|
|
|
1685 |
}
|
1686 |
-
|
1687 |
-
delete_option('niteoCS_overlay_color['.$current_theme.']');
|
1688 |
-
delete_option('niteoCS_overlay_opacity['.$current_theme.']');
|
1689 |
|
1690 |
-
|
|
|
|
|
1691 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1692 |
|
1693 |
-
|
1694 |
-
|
1695 |
-
$subscribe_list = get_option('niteoCS_subscribers_list');
|
1696 |
-
|
1697 |
-
if ( is_array( $subscribe_list ) && count( $subscribe_list ) > 0 && !array_key_exists ('id', $subscribe_list[0]) ) {
|
1698 |
-
$i = 1;
|
1699 |
-
foreach( $subscribe_list as &$sub ){
|
1700 |
-
$sub['id'] = $i;
|
1701 |
-
$sub = array('id' => $sub['id']) + $sub;
|
1702 |
-
// check if ip address is set
|
1703 |
-
if (!array_key_exists('ip_address', $sub)) {
|
1704 |
-
$sub['ip_address'] = 'nodata';
|
1705 |
-
}
|
1706 |
-
$i++;
|
1707 |
}
|
1708 |
-
|
|
|
|
|
|
|
1709 |
}
|
1710 |
-
}
|
1711 |
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
|
1717 |
-
}// endif; $this_plugin_updated
|
1718 |
-
}// endif update plugin and plugins not empty.
|
1719 |
-
}// endif; $hook_extra
|
1720 |
-
}// updatePlugin
|
1721 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1722 |
|
1723 |
-
public function add_action_links ( $links ) {
|
1724 |
-
$settings = array(
|
1725 |
-
'<a href="' . admin_url( 'admin.php?page=cmp-settings' ) . '">CMP Settings</a>',
|
1726 |
-
);
|
1727 |
-
return array_merge( $settings, $links );
|
1728 |
-
}
|
1729 |
|
|
|
|
|
|
|
1730 |
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
|
|
1734 |
|
1735 |
-
|
1736 |
-
|
1737 |
-
$version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', array('Version'), '' );
|
1738 |
}
|
1739 |
|
1740 |
-
|
1741 |
-
$version
|
1742 |
-
|
|
|
1743 |
|
1744 |
-
|
1745 |
-
if ( is_array( $version ) ) {
|
1746 |
-
$version = $version[0];
|
1747 |
}
|
1748 |
|
1749 |
-
|
1750 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1751 |
|
1752 |
-
|
1753 |
-
|
1754 |
-
*
|
1755 |
-
* @since 2.6
|
1756 |
-
* @access public
|
1757 |
-
* @return Object
|
1758 |
-
*/
|
1759 |
-
public function cmp_mailchimp_list_ajax( $apikey ) {
|
1760 |
-
|
1761 |
-
// check for ajax
|
1762 |
-
if ( isset( $_POST['params'] ) ) {
|
1763 |
-
// verify nonce
|
1764 |
-
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
1765 |
-
// verify user rights
|
1766 |
-
if( !current_user_can('publish_pages') ) {
|
1767 |
-
die('Sorry, but this request is invalid');
|
1768 |
-
}
|
1769 |
|
1770 |
-
|
1771 |
-
|
|
|
|
|
1772 |
|
1773 |
-
|
1774 |
-
if ( !empty( $_POST['params'] ) ) {
|
1775 |
-
$params = $_POST['params'];
|
1776 |
-
}
|
1777 |
|
1778 |
-
|
1779 |
|
1780 |
-
|
|
|
|
|
|
|
|
|
1781 |
|
1782 |
-
$args = array(
|
1783 |
-
'headers' => array(
|
1784 |
-
'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
|
1785 |
-
)
|
1786 |
-
);
|
1787 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1788 |
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
// if we have it, create new array with lists id and name, else push error messages into array
|
1793 |
-
if ( !is_wp_error( $response ) ) {
|
1794 |
-
$lists_array = array();
|
1795 |
-
|
1796 |
-
$body = json_decode( $response['body'], true);
|
1797 |
-
|
1798 |
-
if ( $response['response']['code'] == 200 ) {
|
1799 |
-
$lists_array['response'] = 200;
|
1800 |
-
$i = 0;
|
1801 |
-
foreach ( $body['lists'] as $list ) {
|
1802 |
-
$lists_array['lists'][$i]['id'] = $list['id'];
|
1803 |
-
$lists_array['lists'][$i]['name'] = $list['name'];
|
1804 |
-
$i++;
|
1805 |
}
|
1806 |
|
1807 |
} else {
|
1808 |
-
$lists_array['response'] =
|
1809 |
-
$lists_array['message'] = $
|
1810 |
}
|
1811 |
|
1812 |
-
|
1813 |
-
$
|
1814 |
-
$lists_array['message'] = $response->get_error_message();
|
1815 |
-
}
|
1816 |
|
1817 |
-
|
1818 |
-
|
1819 |
|
1820 |
-
|
1821 |
-
|
1822 |
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
// echo ajax result
|
1827 |
-
echo $lists_json;
|
1828 |
-
wp_die();
|
1829 |
|
1830 |
-
|
1831 |
|
|
|
1832 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1833 |
}
|
1834 |
|
1835 |
-
|
|
|
|
|
1836 |
|
1837 |
register_uninstall_hook( __FILE__, array('niteo_cmp', 'cmp_plugin_delete') );
|
1838 |
|
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.8.1
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
13 |
*/
|
14 |
|
15 |
|
16 |
+
// Exit if accessed directly.
|
17 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
|
22 |
|
23 |
+
/**
|
24 |
+
* Main CMP Coming Soon and Maintenance class.
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*/
|
28 |
+
class CMP_Coming_Soon_and_Maintenance {
|
29 |
+
|
30 |
+
/**
|
31 |
+
* CMP_Coming_Soon_and_Maintenance The one true CMP_Coming_Soon_and_Maintenance
|
32 |
+
*
|
33 |
+
* @var string $instance
|
34 |
+
*/
|
35 |
+
private static $instance;
|
36 |
+
|
37 |
+
public $cmp_themes_bundled = array();
|
38 |
+
|
39 |
+
public $cmp_themes_premium_installed = array();
|
40 |
+
|
41 |
+
public $cmp_themes_available = array();
|
42 |
+
|
43 |
+
public $countdown_themes = array();
|
44 |
+
|
45 |
+
public $fontanimation_themes = array();
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Main CMP_Coming_Soon_and_Maintenance Instance.
|
50 |
+
*
|
51 |
+
* Insures that only one instance of CMP_Coming_Soon_and_Maintenance exists in memory at any one
|
52 |
+
* time. Also prevents needing to define globals all over the place.
|
53 |
+
*
|
54 |
+
* Thanks Rich Tabor for teaching things about Singleton
|
55 |
+
* @since 1.0.0
|
56 |
+
* @static
|
57 |
+
* @static var array $instance
|
58 |
+
* @uses CMP_Coming_Soon_and_Maintenance::init() Initiate actions and filters.
|
59 |
+
* @uses CMP_Coming_Soon_and_Maintenance::cmp_assets_suffix() Include .min version based on CMP_DEBUG
|
60 |
+
* @uses CMP_Coming_Soon_and_Maintenance::load_textdomain() load the language files.
|
61 |
+
* @return object|CMP_Coming_Soon_and_Maintenance
|
62 |
+
*/
|
63 |
+
public static function instance() {
|
64 |
+
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof CMP_Coming_Soon_and_Maintenance ) ) {
|
65 |
+
self::$instance = new CMP_Coming_Soon_and_Maintenance();
|
66 |
+
self::$instance->constants();
|
67 |
+
self::$instance->init();
|
68 |
+
self::$instance->cmp_assets_suffix();
|
69 |
+
self::$instance->load_textdomain();
|
70 |
+
}
|
71 |
|
72 |
+
return self::$instance;
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
|
|
|
|
|
|
|
75 |
|
76 |
+
private function constants() {
|
77 |
|
78 |
+
// define constants
|
79 |
+
$this->define( 'CMP_VERSION', '2.8.1' );
|
80 |
+
$this->define( 'CMP_DEBUG', FALSE );
|
81 |
+
$this->define( 'CMP_AUTHOR', 'NiteoThemes' );
|
82 |
+
$this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
|
83 |
+
$this->define( 'CMP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
84 |
+
$this->define( 'CMP_PREMIUM_THEMES_DIR', plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/' );
|
85 |
+
$this->define( 'CMP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
86 |
+
$this->define( 'CMP_PLUGIN_FILE', __FILE__ );
|
87 |
+
( CMP_DEBUG === TRUE ) ? $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates-test/' ) : $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates/' );
|
88 |
|
89 |
+
// define array with bundled CMP themes
|
90 |
+
$this->cmp_themes_bundled = array('construct', 'countdown', 'hardwork');
|
|
|
91 |
|
92 |
+
// define array with themes using counter
|
93 |
+
$this->countdown_themes = array( 'frame', 'countdown', 'postery', 'countdown2', 'stylo', 'element' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
+
// define array with themes using font animation
|
96 |
+
$this->fontanimation_themes = array( 'hardwork_premium', 'fifty', 'orbit', 'stylo' );
|
97 |
+
|
98 |
+
// check for Premium themes DIR, and put them to array
|
99 |
+
if ( file_exists( CMP_PREMIUM_THEMES_DIR ) ) {
|
100 |
+
$this->cmp_themes_premium_installed = array_map( 'basename', glob( CMP_PREMIUM_THEMES_DIR . '*', GLOB_ONLYDIR ) );
|
101 |
+
}
|
102 |
|
103 |
+
// merge bundled and premium installed themes into new array with all available themes
|
104 |
+
$this->cmp_themes_available = array_merge( $this->cmp_themes_bundled, $this->cmp_themes_premium_installed );
|
|
|
|
|
105 |
|
106 |
+
// set option for plugin update process
|
107 |
+
if ( !get_option( 'niteoCS_version' ) ) {
|
108 |
+
update_option( 'niteoCS_version', CMP_VERSION );
|
109 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
|
|
|
|
111 |
|
112 |
+
/**
|
113 |
+
* Inits and hooks
|
114 |
+
*/
|
115 |
+
public function init() {
|
116 |
+
add_action( 'admin_notices', array( $this, 'cmp_admin_notice' ) );
|
117 |
+
add_action( 'template_redirect', array( $this, 'cmp_displayPage' ) );
|
118 |
+
add_action( 'wp_login', array( $this, 'cmp_admin_override' ) );
|
119 |
+
add_action( 'wp_before_admin_bar_render', array( $this, 'cmp_admin_bar' ) );
|
120 |
+
add_action( 'wp_ajax_niteo_themeinfo', array( $this, 'niteo_themeinfo' ) );
|
121 |
+
add_action( 'wp_ajax_niteo_unsplash', array( $this, 'niteo_unsplash' ) );
|
122 |
+
add_action( 'wp_ajax_niteo_export_csv', array( $this, 'niteo_export_csv' ) );
|
123 |
+
add_action( 'wp_ajax_cmp_theme_update_install', array( $this, 'cmp_theme_update_install' ) );
|
124 |
+
add_action( 'wp_ajax_cmp_toggle_activation', array( $this, 'cmp_toggle_activation') );
|
125 |
+
add_action( 'wp_ajax_nopriv_niteo_subscribe', array( $this, 'niteo_subscribe' ) );
|
126 |
+
add_action( 'wp_ajax_niteo_subscribe', array( $this, 'niteo_subscribe' ) );
|
127 |
+
add_action( 'wp_ajax_cmp_mailchimp_list_ajax', array( $this, 'cmp_mailchimp_list_ajax' ) );
|
128 |
+
add_action( 'admin_menu', array( $this, 'cmp_adminMenu' ), 10 );
|
129 |
+
add_action( 'admin_init', array( $this, 'cmp_adminInit' ) ) ;
|
130 |
+
add_action( 'admin_init', array( $this, 'cmp_admin_override' ) );
|
131 |
+
add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
|
132 |
+
add_action( 'wp_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
|
133 |
+
add_action( 'upgrader_process_complete', array( $this, 'cmp_plugin_update' ), 10, 2 );
|
134 |
+
|
135 |
+
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this,'add_action_links' ) );
|
136 |
+
|
137 |
+
register_activation_hook( __FILE__, array( $this, 'cmp_activate' ) );
|
138 |
+
register_deactivation_hook( __FILE__, array( $this, 'cmp_deactivate' ) );
|
139 |
+
|
140 |
+
// include feedback class
|
141 |
+
require_once( 'inc/class-cmp-feedback.php' );
|
142 |
|
143 |
+
}
|
144 |
|
145 |
+
/**
|
146 |
+
* Define constant if not already set.
|
147 |
+
*
|
148 |
+
* @param string|string $name Name of the definition.
|
149 |
+
* @param string|bool $value Default value.
|
150 |
+
*/
|
151 |
+
private function define( $name, $value ) {
|
152 |
+
if ( ! defined( $name ) ) {
|
153 |
+
define( $name, $value );
|
154 |
+
}
|
155 |
+
}
|
156 |
|
157 |
+
/**
|
158 |
+
* Admin Init - register and enqueue scripts nad styles
|
159 |
+
*/
|
160 |
+
public function cmp_adminInit() {
|
161 |
|
162 |
+
if ( current_user_can('administrator') ) {
|
163 |
+
// ini render-settings class
|
164 |
+
require_once('inc/class-cmp-render_settings.php');
|
165 |
+
$this->render_settings = new cmp_render_settings();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
+
if ( function_exists( 'wp_enqueue_code_editor' ) ) {
|
168 |
+
wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
|
169 |
+
}
|
170 |
+
|
171 |
+
wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.CMP_ASSET_SUFFIX.'.css', __FILE__),'', CMP_VERSION );
|
172 |
+
wp_enqueue_style( 'cmp-style' );
|
173 |
+
wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
|
174 |
+
wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
|
175 |
+
wp_register_style( 'animate-css', plugins_url('/css/animate'.CMP_ASSET_SUFFIX.'.css', __FILE__) );
|
176 |
+
wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
|
177 |
+
|
178 |
+
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
|
179 |
+
wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
|
180 |
+
wp_register_script( 'cmp-typography', plugins_url('/js/typography'.CMP_ASSET_SUFFIX.'.js', __FILE__), array('select2-js' ), CMP_VERSION );
|
181 |
+
wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.CMP_ASSET_SUFFIX.'.js', __FILE__), array('webfont', 'select2-js'), CMP_VERSION );
|
182 |
+
wp_register_script( 'countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
183 |
+
}
|
184 |
+
|
185 |
}
|
186 |
|
187 |
+
/**
|
188 |
+
* Enqueue scripts and styles for topbar CMP icon
|
189 |
+
*/
|
190 |
+
public function cmp_add_admin_style() {
|
191 |
|
192 |
+
if ( !is_user_logged_in() ) {
|
193 |
+
return;
|
194 |
+
}
|
|
|
|
|
195 |
|
196 |
+
$roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
|
197 |
+
|
198 |
+
// push WP administrator to roles array, since it is default
|
199 |
+
array_push( $roles_topbar, 'administrator' );
|
200 |
+
|
201 |
+
// get current user
|
202 |
+
$current_user = wp_get_current_user();
|
203 |
+
|
204 |
+
// check for roles array length
|
205 |
+
if ( count( $current_user->roles ) > 0 ) {
|
206 |
+
// enqueue topbar script and style only, if current user is allowed to display topbar, or is admin
|
207 |
+
foreach ( $current_user->roles as $role ) {
|
208 |
+
if ( in_array( $role, $roles_topbar ) ) {
|
209 |
+
wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', CMP_VERSION);
|
210 |
+
wp_enqueue_style( 'cmp_admin_style' );
|
211 |
+
wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
|
212 |
+
wp_enqueue_script( 'cmp_admin_script' );
|
213 |
+
wp_localize_script( 'cmp_admin_script', 'cmp_ajax', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
|
214 |
+
break;
|
215 |
+
}
|
216 |
+
};
|
217 |
|
218 |
+
// this one is for broken wp admin, where current user does not have any roles
|
219 |
+
} else {
|
220 |
+
wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', CMP_VERSION);
|
221 |
+
wp_enqueue_style( 'cmp_admin_style' );
|
222 |
+
wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
|
223 |
+
wp_enqueue_script( 'cmp_admin_script' );
|
224 |
+
}
|
225 |
|
226 |
+
}
|
|
|
|
|
|
|
227 |
|
228 |
+
/**
|
229 |
+
* Set Plugin assets minified or full path based on DEBUG mode
|
230 |
+
*
|
231 |
+
* @since 2.8.1
|
232 |
+
*/
|
233 |
+
public function cmp_assets_suffix() {
|
234 |
|
235 |
+
// If there's no debug mode, use the minified assets supplied.
|
236 |
+
if ( ! defined( 'CMP_DEBUG' ) ) {
|
237 |
+
define( 'CMP_ASSET_SUFFIX', '.min' );
|
238 |
+
return;
|
239 |
+
}
|
240 |
|
241 |
+
if ( true === CMP_DEBUG ) {
|
242 |
+
define( 'CMP_ASSET_SUFFIX', null );
|
243 |
+
} else {
|
244 |
+
define( 'CMP_ASSET_SUFFIX', '.min' );
|
245 |
+
}
|
246 |
+
}
|
247 |
|
|
|
248 |
|
249 |
+
/**
|
250 |
+
* Register CMP menus pages
|
251 |
+
*/
|
252 |
+
public function cmp_adminMenu() {
|
253 |
+
/* Register our plugin page */
|
254 |
+
$page = add_menu_page('CMP Settings', __('CMP Settings', 'cmp-coming-soon-maintenance'), 'activate_plugins', 'cmp-settings', array($this, 'cmp_settings_page'), plugins_url('/img/cmp.png', __FILE__));
|
255 |
|
256 |
+
add_submenu_page('cmp-settings', 'Content Settings', __('Content Settings', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-settings' );
|
257 |
|
258 |
+
add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
|
|
|
259 |
|
260 |
+
add_submenu_page('cmp-settings', 'Subscribers', __('Subscribers', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
|
261 |
|
262 |
+
add_submenu_page('cmp-settings', 'Translation', __('Translation', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-translate', array($this, 'cmp_translate_page') );
|
263 |
|
264 |
+
add_submenu_page('cmp-settings', 'Upload New Theme', __('Upload New Theme', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-upload-theme', array($this, 'cmp_upload_page') );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
|
266 |
+
add_submenu_page('cmp-settings', 'Help', __('Help', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-help', array($this, 'cmp_help_page') );
|
|
|
|
|
|
|
|
|
|
|
267 |
|
268 |
+
/* Using registered $page handle to hook script load */
|
269 |
+
add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueAdminScripts'));
|
|
|
|
|
|
|
270 |
|
271 |
+
}
|
|
|
|
|
272 |
|
273 |
+
/**
|
274 |
+
* enqueue styles and scripts when navigated to CMP Settings page
|
275 |
+
*/
|
276 |
+
public function cmp_enqueueAdminScripts() {
|
277 |
+
wp_enqueue_media();
|
278 |
+
wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
|
279 |
+
wp_enqueue_script( 'cmp_settings_js' );
|
280 |
+
wp_enqueue_script( 'cmp-typography' );
|
281 |
+
wp_enqueue_script( 'wp-color-picker' );
|
282 |
+
wp_enqueue_script( 'webfont' );
|
283 |
+
wp_enqueue_script( 'select2-js' );
|
284 |
+
wp_enqueue_style( 'wp-color-picker' );
|
285 |
+
wp_enqueue_style( 'select2' );
|
286 |
+
wp_enqueue_style( 'font_awesome' );
|
287 |
+
|
288 |
+
if ( in_array( $this->cmp_selectedTheme(), $this->fontanimation_themes ) ) {
|
289 |
+
wp_enqueue_style('animate-css');
|
290 |
+
}
|
291 |
+
}
|
292 |
|
293 |
+
/**
|
294 |
+
* Render CMP Settings Page
|
295 |
+
*/
|
296 |
+
public function cmp_settings_page() {
|
297 |
+
// include default options page
|
298 |
+
// check for selected theme update, not sure where else this to put
|
299 |
+
$this->cmp_check_update( $this->cmp_selectedTheme() );
|
300 |
+
require_once ('cmp-settings.php');
|
301 |
+
}
|
302 |
|
303 |
+
/**
|
304 |
+
* Render CMP Advanced Settings Sub Page
|
305 |
+
*/
|
306 |
+
public function cmp_advanced_page() {
|
307 |
+
wp_enqueue_script('select2-js');
|
308 |
+
wp_enqueue_style('select2');
|
309 |
+
require_once ('cmp-advanced.php');
|
310 |
+
}
|
311 |
|
312 |
+
/**
|
313 |
+
* Render CMP Subscribers Sub Page
|
314 |
+
*/
|
315 |
+
public function cmp_subs_page() {
|
316 |
+
require_once ('cmp-subscribers.php');
|
317 |
+
}
|
318 |
|
319 |
+
/**
|
320 |
+
* Render CMP Translation Sub Page
|
321 |
+
*/
|
322 |
+
public function cmp_translate_page() {
|
323 |
+
require_once ('cmp-translate.php');
|
324 |
+
}
|
325 |
|
326 |
+
/**
|
327 |
+
* Render CMP Upload new Theme Sub Page
|
328 |
+
*/
|
329 |
+
public function cmp_upload_page() {
|
330 |
+
require_once ('cmp-upload.php');
|
331 |
+
}
|
332 |
|
333 |
+
/**
|
334 |
+
* Render CMP Help and About Sub Page
|
335 |
+
*/
|
336 |
+
public function cmp_help_page() {
|
337 |
+
require_once ('cmp-help.php');
|
338 |
+
}
|
339 |
|
340 |
+
/**
|
341 |
+
* returns bundled plugin`s assets URL for Premium Themes
|
342 |
+
*
|
343 |
+
* @since 2.6
|
344 |
+
* @access public
|
345 |
+
* @param string
|
346 |
+
* @return URL string
|
347 |
+
*/
|
348 |
+
public function cmp_asset_url( $filepath ) {
|
349 |
+
return plugins_url( $filepath, __FILE__ );
|
350 |
}
|
351 |
|
352 |
+
/**
|
353 |
+
* Overrides wp login page, Loggout current user and wp redirect, if cmp is enabled
|
354 |
+
*
|
355 |
+
* @access public
|
356 |
+
*/
|
357 |
+
public function cmp_admin_override(){
|
358 |
+
|
359 |
+
// if admin or CMP disabled, return
|
360 |
+
if ( current_user_can('administrator') || $this->cmp_status() == 0 ) {
|
361 |
+
return;
|
362 |
+
}
|
363 |
+
|
364 |
+
if ( is_user_logged_in() ) {
|
365 |
|
366 |
+
// logout and force redirect if logged-in user role is not set to bypass CMP
|
367 |
+
if ( !$this->cmp_roles_filter() ) {
|
368 |
+
wp_logout();
|
369 |
+
wp_redirect( get_bloginfo('url') );
|
370 |
+
exit();
|
371 |
+
}
|
372 |
}
|
373 |
}
|
|
|
374 |
|
375 |
+
// function to display CMP landing page
|
376 |
+
public function cmp_displayPage() {
|
377 |
|
378 |
+
// check if preview is set
|
379 |
+
if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
|
380 |
|
381 |
+
// register html class for rendering of HTML elements in Themes
|
382 |
+
require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
|
383 |
+
$html = new CMP_Coming_Soon_and_Maintenance_Render_HTML();
|
384 |
|
385 |
+
// iframe preview with sidebar controls cmp_preview=true&selector=true - nt.com only
|
386 |
+
if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
|
387 |
+
if ( file_exists( CMP_PREMIUM_THEMES_DIR .'preview-selector.php' ) ) {
|
388 |
+
require_once ( CMP_PREMIUM_THEMES_DIR . 'preview-selector.php' );
|
389 |
+
die();
|
390 |
+
}
|
391 |
+
}
|
392 |
+
|
393 |
+
// preview specific CMP theme
|
394 |
+
if ( (isset( $_GET['theme'] ) && !empty( $_GET['theme'] )) || (isset( $_GET['cmp_theme'] ) && !empty( $_GET['cmp_theme'] )) ) {
|
395 |
+
$theme_preview = ( isset( $_GET['theme'] ) ) ? esc_attr($_GET['theme']) : esc_attr($_GET['cmp_theme']);
|
396 |
+
|
397 |
+
if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
|
398 |
+
require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
|
399 |
+
die();
|
400 |
+
}
|
401 |
|
402 |
+
}
|
403 |
|
404 |
+
// finally render theme preview cmp_preview=true
|
405 |
+
if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
|
406 |
+
require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
|
|
|
|
|
|
|
407 |
die();
|
408 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
+
// bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
|
412 |
+
if ( isset($_GET['cmp_bypass']) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
|
413 |
+
nocache_headers();
|
414 |
+
header('Cache-Control: max-age=0; private');
|
415 |
+
setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
|
416 |
+
return;
|
417 |
+
}
|
418 |
|
419 |
+
// if bypass Cookie is set, return
|
420 |
+
if ( isset($_COOKIE['cmp_bypass']) && $_COOKIE['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() ) ) && get_option('niteoCS_bypass', '0') == '1' ) {
|
421 |
+
return;
|
422 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
|
424 |
+
// Render CMP Theme mode if is activated and not in immediate redirect mode
|
425 |
+
if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
|
426 |
+
|
427 |
+
// check if user logged in, page filters and access role
|
428 |
+
if ( !is_user_logged_in() && $this->cmp_page_filter() ) {
|
429 |
+
|
430 |
+
// register html class for rendering of HTML elements in Themes
|
431 |
+
require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
|
432 |
+
$html = new CMP_Coming_Soon_and_Maintenance_Render_HTML();
|
433 |
+
|
434 |
+
// if themes with countdown timer
|
435 |
+
if ( in_array($this->cmp_selectedTheme(), $this->countdown_themes) ){
|
436 |
+
// if counter is enabled
|
437 |
+
if ( get_option('niteoCS_counter', '1') == '1' ) {
|
438 |
+
// if countdown date is set
|
439 |
+
if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
|
440 |
+
// if timer < timestamp do set action
|
441 |
+
if ( get_option('niteoCS_counter_date' ) < time() ) {
|
442 |
+
// if action set to disable cmp
|
443 |
+
if ( get_option('niteoCS_countdown_action') == 'disable-cmp' ) {
|
444 |
+
update_option('niteoCS_activation', '0');
|
445 |
+
}
|
446 |
+
|
447 |
+
// if action set to redirect
|
448 |
+
if ( get_option('niteoCS_countdown_action') == 'redirect' ) {
|
449 |
+
$redirect_url = esc_url(get_option('niteoCS_countdown_redirect'));
|
450 |
+
header('Location: '.$redirect_url);
|
451 |
+
die();
|
452 |
+
}
|
453 |
}
|
454 |
}
|
455 |
}
|
456 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
|
458 |
+
// if maintanance mode send correct 503 headers
|
459 |
+
if ( $this->cmp_status() == '1' ){
|
460 |
+
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
461 |
+
header('Status: 503 Service Temporarily Unavailable');
|
462 |
+
header('Retry-After: 86400'); // retry in a day
|
463 |
+
}
|
464 |
+
|
465 |
+
// render selected CMP theme
|
466 |
+
if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
|
467 |
+
require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
|
468 |
+
die();
|
469 |
+
}
|
470 |
}
|
471 |
}
|
|
|
472 |
|
473 |
+
// if CMP in redirect mode with 0 timeout
|
474 |
+
if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() && $this->cmp_page_filter() ) {
|
475 |
|
476 |
+
$redirect_url = get_option('niteoCS_URL_redirect');
|
477 |
+
// redirect to URL
|
478 |
+
if ( $redirect_url != '') {
|
479 |
+
header('Location: '.esc_url( $redirect_url ));
|
480 |
+
die();
|
481 |
+
}
|
482 |
}
|
483 |
}
|
|
|
484 |
|
485 |
|
486 |
+
// return CMP activation status and it`s states
|
487 |
+
public function cmp_status() {
|
488 |
|
489 |
+
if ( !get_option('niteoCS_status') ||
|
490 |
+
get_option('niteoCS_status') == '' ||
|
491 |
+
get_option('niteoCS_status') == false ) {
|
492 |
+
return '0';
|
493 |
|
494 |
+
} else {
|
495 |
+
return get_option( 'niteoCS_activation', '2' );
|
496 |
+
}
|
497 |
}
|
|
|
498 |
|
499 |
+
// function to toggle CMP activation for admin menu icon
|
500 |
+
public function cmp_toggle_activation () {
|
501 |
+
// check for ajax
|
502 |
+
if ( isset( $_POST['payload'] ) && $_POST['payload'] == 'toggle_cmp_status' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
503 |
|
504 |
+
// verify nonce
|
505 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
506 |
+
// verify user rights
|
507 |
+
if( !current_user_can('publish_pages') ) {
|
508 |
+
die('Sorry, but this request is invalid');
|
509 |
+
}
|
510 |
|
511 |
+
if ( get_option('niteoCS_status', '') == '' ) {
|
512 |
+
update_option('niteoCS_status', '1');
|
513 |
+
} else {
|
514 |
+
update_option('niteoCS_status', '');
|
515 |
+
}
|
516 |
+
|
517 |
+
echo 'success';
|
518 |
+
wp_die();
|
519 |
+
return;
|
520 |
+
}
|
521 |
}
|
|
|
522 |
|
523 |
+
// check selected theme
|
524 |
+
public function cmp_selectedTheme() {
|
525 |
+
return get_option('niteoCS_theme', 'hardwork');
|
526 |
+
}
|
527 |
|
528 |
|
529 |
+
// return installed theme path
|
530 |
+
public function cmp_themePath( $slug ) {
|
531 |
+
if ( in_array( $slug, $this->cmp_themes_bundled ) ) {
|
532 |
+
return CMP_PLUGIN_DIR . 'themes/';
|
533 |
|
534 |
+
} else {
|
535 |
+
return CMP_PREMIUM_THEMES_DIR;
|
536 |
+
}
|
537 |
}
|
|
|
538 |
|
539 |
+
// return installed theme dir
|
540 |
+
public function cmp_themeURL( $slug ) {
|
541 |
+
if ( in_array( $slug, $this->cmp_themes_bundled ) ) {
|
542 |
+
return plugins_url( '/themes/', __FILE__ );
|
543 |
|
544 |
+
} else {
|
545 |
+
return plugins_url( '/cmp-premium-themes/');
|
546 |
+
|
547 |
+
}
|
548 |
}
|
|
|
549 |
|
550 |
+
// older version of cmp_themeURL public function - migration after 1.9 version.
|
551 |
+
//can be deleted in future...
|
552 |
+
public function cmp_themeDirPath() {
|
553 |
+
if ( $this->niteo_in_array_r( $this->cmp_selectedTheme(), $this->cmp_premium_themes(), true ) ) {
|
554 |
+
return plugins_url( '/cmp-premium-themes/');
|
555 |
|
556 |
+
} else {
|
557 |
+
return plugins_url( '/themes/', __FILE__ );
|
558 |
+
}
|
559 |
}
|
|
|
560 |
|
561 |
+
// display admin topbar notice
|
562 |
+
public function cmp_admin_bar(){
|
563 |
|
564 |
+
// CMP PLUGIN ACTIVATION AND STATUS CHANGE SETTINGS!
|
565 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && ( get_current_screen() && get_current_screen()->id == 'toplevel_page_cmp-settings' ) ) {
|
566 |
|
567 |
+
// verify nonce and user rights
|
568 |
+
if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
|
569 |
+
die('Sorry, but this request is invalid');
|
570 |
+
}
|
571 |
|
572 |
+
if ( isset($_POST['activate']) && is_numeric($_POST['activate']) ) {
|
573 |
+
update_option('niteoCS_activation', sanitize_text_field($_POST['activate']));
|
574 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
|
576 |
+
if ( isset($_POST['cmp_status']) ) {
|
577 |
+
update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
|
578 |
+
} else {
|
|
|
579 |
|
580 |
+
update_option('niteoCS_status', false);
|
581 |
+
}
|
|
|
582 |
|
583 |
+
// purge cache in 3rd party plugins
|
584 |
+
if ( function_exists( 'w3tc_pgcache_flush' ) ) {
|
585 |
+
w3tc_pgcache_flush();
|
586 |
+
}
|
587 |
|
588 |
+
if ( function_exists( 'wp_cache_clear_cache' ) ) {
|
589 |
+
wp_cache_clear_cache();
|
590 |
+
}
|
591 |
|
592 |
+
if ( class_exists( 'Endurance_Page_Cache' ) ) {
|
593 |
+
$epc = new Endurance_Page_Cache;
|
594 |
+
$epc->purge_all();
|
595 |
+
}
|
596 |
|
597 |
+
if ( class_exists( 'SG_CachePress_Supercacher' ) && method_exists( 'SG_CachePress_Supercacher', 'purge_cache' ) ) {
|
598 |
+
SG_CachePress_Supercacher::purge_cache (true );
|
599 |
+
}
|
600 |
|
601 |
+
if ( isset( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
|
602 |
+
$GLOBALS['wp_fastest_cache']->deleteCache( true );
|
603 |
+
}
|
604 |
|
605 |
+
if ( is_callable( array( 'Swift_Performance_Cache', 'clear_all_cache' ) ) ) {
|
606 |
+
Swift_Performance_Cache::clear_all_cache();
|
607 |
+
}
|
608 |
|
609 |
+
}
|
|
|
610 |
|
|
|
611 |
|
612 |
+
// Display admin TOPBAR
|
613 |
+
require_once(ABSPATH . 'wp-admin/includes/screen.php');
|
614 |
|
615 |
+
$roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
|
616 |
|
617 |
+
// push WP administrator to roles array, since it is default
|
618 |
+
array_push( $roles_topbar, 'administrator' );
|
619 |
|
620 |
+
$current_user = wp_get_current_user();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
|
622 |
+
// if current user cannot access topbar, return
|
623 |
+
foreach ( $current_user->roles as $role ) {
|
|
|
|
|
|
|
|
|
|
|
624 |
|
625 |
+
if ( !in_array( $role, $roles_topbar ) ) {
|
626 |
+
return false;
|
627 |
+
}
|
628 |
+
};
|
629 |
|
630 |
+
global $wp_admin_bar;
|
631 |
+
|
632 |
+
$class = '';
|
633 |
+
$msg= '';
|
634 |
+
|
635 |
+
switch ( get_option( 'niteoCS_activation', '2' ) ) {
|
636 |
+
case '1':
|
637 |
+
$msg = __('Maintenance Mode:','cmp-coming-soon-maintenance');
|
638 |
+
$class = ' maintenance';
|
639 |
+
break;
|
640 |
+
case '2':
|
641 |
+
$msg = __('Coming Soon Mode:','cmp-coming-soon-maintenance');
|
642 |
+
$class = ' coming-soon';
|
643 |
+
break;
|
644 |
+
case '3':
|
645 |
+
$msg = __('Redirect Mode:','cmp-coming-soon-maintenance');
|
646 |
+
$class = ' redirect';
|
647 |
+
break;
|
648 |
+
default:
|
649 |
+
break;
|
650 |
+
}
|
651 |
|
652 |
+
$ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
|
653 |
+
|
654 |
+
$msg = '<img src="'.plugins_url('/img/cmp.png', __FILE__).'" alt="CMP Logo" class="cmp-logo"><span class="cmp-status-msg">'.$msg.'</span>';
|
655 |
+
$msg .='<div class="toggle-wrapper">
|
656 |
+
<input type="checkbox" id="cmp-status-menubar" class="toggle-checkbox"'.checked( '1', get_option('niteoCS_status', false), false ).' name="cmp_status_menu" data-security="'. esc_attr($ajax_nonce).'">
|
657 |
+
<label for="cmp-status-menubar" class="toggle"><span class="toggle_handler"></span></label>
|
658 |
+
</div>';
|
659 |
+
|
660 |
+
//Add the main siteadmin menu item
|
661 |
+
$wp_admin_bar->add_menu( array(
|
662 |
+
'id' => 'cmp-admin-notice',
|
663 |
+
'href' => admin_url().'admin.php?page=cmp-settings',
|
664 |
+
'parent' => 'top-secondary',
|
665 |
+
'title' => $msg,
|
666 |
+
'meta' => array( 'class' => 'cmp-notice'.$class ),
|
667 |
+
) );
|
668 |
+
|
669 |
+
// Display CMP Settings in topbar only for administrator
|
670 |
+
if ( user_can( $current_user, 'administrator' ) ) {
|
671 |
+
$wp_admin_bar->add_node( array(
|
672 |
+
'id' => 'cmp-settings',
|
673 |
+
'title' => __('CMP Settings', 'cmp-coming-soon-maintenancee'),
|
674 |
+
'href' => admin_url('admin.php?page=cmp-settings'),
|
675 |
+
'parent' => 'cmp-admin-notice'
|
676 |
+
));
|
677 |
}
|
678 |
|
679 |
+
$wp_admin_bar->add_node( array(
|
680 |
+
'id' => 'cmp-preview',
|
681 |
+
'title' => __('CMP Preview', 'cmp-coming-soon-maintenancee'),
|
682 |
+
'href' => get_site_url().'/?cmp_preview=true',
|
683 |
+
'parent'=> 'cmp-admin-notice',
|
684 |
+
'meta' => array('target' => '_blank' )
|
685 |
+
));
|
686 |
|
687 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
688 |
|
689 |
+
public function cmp_activate() {
|
|
|
690 |
|
691 |
+
if ( get_option('niteoCS_archive') ) {
|
692 |
+
//get all the options back from the archive
|
693 |
+
$options = get_option('niteoCS_archive');
|
694 |
+
// update options
|
695 |
+
foreach ($options as $option) {
|
696 |
+
update_option($option['name'], $option['value']);
|
697 |
+
}
|
698 |
|
699 |
+
// delete archive
|
700 |
+
delete_option('niteoCS_archive');
|
701 |
+
}
|
702 |
}
|
703 |
|
704 |
+
// archive plugin stuff when plugin is deactivated
|
705 |
+
public function cmp_deactivate() {
|
706 |
+
//get all the options. store them in an array
|
707 |
+
$options = array();
|
708 |
+
|
709 |
+
global $wpdb;
|
710 |
+
$saved_options = $wpdb->get_results( "SELECT * FROM $wpdb->options WHERE option_name LIKE 'niteoCS_%'", OBJECT );
|
711 |
+
$i = 0;
|
712 |
+
foreach ($saved_options as $option) {
|
713 |
+
$options[$i] = array('name' => $option->option_name, 'value' => get_option( $option->option_name) );
|
714 |
+
$i++;
|
715 |
+
}
|
716 |
|
717 |
+
//store the options all in one record, in case we ever reactivate the plugin
|
718 |
+
update_option('niteoCS_archive', $options);
|
|
|
|
|
|
|
719 |
|
720 |
+
//delete the separate ones
|
721 |
+
foreach ( $options as $option ) {
|
722 |
+
delete_option($option['name']);
|
723 |
|
724 |
+
}
|
725 |
|
726 |
+
}
|
727 |
|
728 |
+
// clean plugin stuff when plugin is deleted
|
729 |
+
public function cmp_plugin_delete() {
|
730 |
+
delete_option('niteoCS_archive');
|
731 |
+
}
|
732 |
|
733 |
+
// returns list of premium themes => manually defined
|
734 |
+
public function cmp_premium_themes() {
|
735 |
+
|
736 |
+
$premium_themes = array();
|
737 |
+
array_push( $premium_themes, array('name' => 'element', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=element', 'price' => '10') );
|
738 |
|
739 |
+
array_push( $premium_themes, array('name' => 'stylo', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=stylo', 'price' => '10') );
|
740 |
|
741 |
+
array_push( $premium_themes, array('name' => 'fifty', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=fifty', 'price' => '10') );
|
|
|
|
|
742 |
|
743 |
+
array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=hardwork_premium', 'price' => '10') );
|
|
|
744 |
|
745 |
+
array_push( $premium_themes, array('name' => 'postery', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=postery', 'price' => '10') );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
|
747 |
+
array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=frame', 'price' => '10') );
|
|
|
|
|
|
|
|
|
748 |
|
749 |
+
array_push( $premium_themes, array('name' => 'eclipse', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=eclipse', 'price' =>'0') );
|
|
|
750 |
|
751 |
+
array_push( $premium_themes, array('name' => 'orbit', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=orbit', 'price' => '0') );
|
752 |
+
|
753 |
+
// array_push( $premium_themes, array('name' => 'coder', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=coder', 'price' => '0') );
|
754 |
|
755 |
+
return $premium_themes;
|
|
|
756 |
}
|
757 |
|
758 |
+
/**
|
759 |
+
* Difference between Premium Themes installed and Premium Themes available sets in cmp_premium_themes() function.
|
760 |
+
*
|
761 |
+
* @since 2.2
|
762 |
+
* @access public
|
763 |
+
* @return array
|
764 |
+
*/
|
765 |
+
public function cmp_downloadable_themes() {
|
766 |
+
$downloadable_themes = array();
|
767 |
+
|
768 |
+
foreach ( $this->cmp_premium_themes() as $premium ) {
|
769 |
+
if ( !in_array($premium['name'], $this->cmp_themes_premium_installed) ) {
|
770 |
+
array_push( $downloadable_themes, $premium );
|
771 |
+
}
|
772 |
+
}
|
773 |
|
774 |
+
return $downloadable_themes;
|
|
|
775 |
}
|
776 |
|
777 |
+
// theme updates function
|
778 |
+
public function cmp_check_update( $theme_slug ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
|
780 |
+
if ( !in_array( $theme_slug, $this->cmp_themes_premium_installed ) ) {
|
781 |
+
return;
|
782 |
+
}
|
783 |
|
784 |
+
// check for current theme version
|
785 |
+
$remote_version = '';
|
786 |
+
$current_version = '';
|
787 |
|
788 |
+
if ( CMP_VERSION == true ) {
|
789 |
+
delete_transient( $theme_slug.'_updatecheck' );
|
790 |
+
}
|
791 |
|
792 |
+
// check if update check transient is set
|
793 |
+
if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
|
794 |
+
|
795 |
+
$current_version = $this->cmp_theme_version($theme_slug);
|
796 |
+
// get remote version from remote server
|
797 |
+
$request = wp_remote_post( CMP_UPDATE_URL .'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')) );
|
798 |
+
|
799 |
+
// if no error, retrivee body
|
800 |
+
if ( !is_wp_error( $request ) ) {
|
801 |
|
802 |
+
// decode to json
|
803 |
+
$remote_version = json_decode( $request['body'], true );
|
804 |
|
805 |
+
// get remove version key
|
806 |
+
if ( isset($remote_version['version']) ) {
|
807 |
|
808 |
+
$remote_version = $remote_version['version'];
|
|
|
809 |
|
810 |
+
// if remote version is bigger than current, display info about new version
|
811 |
+
if ( (float)$remote_version > (float)$current_version ) {
|
|
|
|
|
812 |
|
813 |
+
$title = ucwords(str_replace('_', ' ', $theme_slug));
|
|
|
814 |
|
815 |
+
// create nonce
|
816 |
+
$ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
|
|
|
817 |
|
818 |
+
// if admin screen is not in updating theme
|
819 |
+
if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
|
820 |
|
821 |
+
$transient = '<div class="update-nag notice notice-warning"><p class="message">'.sprintf(__('There is a <b>recommended</b> update of <b>CMP Theme %s</b> available:', 'cmp-coming-soon-maintenance'), $title).' <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type=premium" class="update-theme" data-type="premium" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-name="'.esc_attr($title).'" data-remote_url="' . esc_url( CMP_UPDATE_URL ) . '" data-new_ver="' . esc_attr( $remote_version ) . '">'.__(' update now','cmp-coming-soon-maintenance').'</a> or <a href="' . esc_url( CMP_UPDATE_URL ).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('view update %s notes.','cmp-coming-soon-maintenance'), $remote_version).'</a></p><div class="release-note"></div></div>';
|
|
|
|
|
822 |
|
823 |
+
// set transient with 12 hour expire
|
824 |
+
set_transient( $theme_slug.'_updatecheck', $transient, 60*60*12 );
|
|
|
|
|
825 |
|
826 |
+
echo $transient;
|
827 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
828 |
|
829 |
+
} else {
|
830 |
+
// set transient no update available with 12 hours expire
|
831 |
+
set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
|
832 |
+
}
|
833 |
|
834 |
+
}
|
835 |
+
}
|
|
|
|
|
836 |
|
837 |
+
} else if ( $updatecheck_transient != '' ) {
|
838 |
+
echo $updatecheck_transient;
|
|
|
|
|
|
|
|
|
|
|
839 |
}
|
840 |
+
|
|
|
841 |
return;
|
842 |
}
|
843 |
|
844 |
+
public function cmp_theme_upload($zip) {
|
845 |
+
// allow zip file to upload
|
846 |
+
add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
|
848 |
+
// load PHP WP FILE
|
849 |
+
if ( ! function_exists( 'wp_handle_upload' ) ) {
|
850 |
+
require_once realpath('../../../wp-admin/includes/file.php');
|
851 |
}
|
|
|
852 |
|
853 |
+
$uploadedfile = $zip;
|
854 |
+
$filename = $uploadedfile['name'];
|
855 |
+
/* You can use wp_check_filetype() public function to check the
|
856 |
+
file type and go on wit the upload or stop it.*/
|
857 |
+
$filetype = wp_check_filetype( $filename );
|
858 |
+
|
859 |
+
if ( $filetype['ext'] == 'zip' ) {
|
860 |
+
// Upload file
|
861 |
+
$movefile = wp_handle_upload( $uploadedfile, array('test_form' => FALSE) );
|
862 |
+
|
863 |
+
if ( $movefile && !isset( $movefile['error'] ) ) {
|
864 |
+
|
865 |
+
WP_Filesystem();
|
866 |
+
$source_path = $movefile['file'];
|
867 |
+
$theme_name = str_replace('.zip', '', $filename);
|
868 |
+
$destination_path = CMP_PREMIUM_THEMES_DIR;
|
869 |
+
|
870 |
+
// create new theme DIR
|
871 |
+
if ( wp_mkdir_p( $destination_path ) ) {
|
872 |
+
// Unzip FILE into that DIR
|
873 |
+
$unzipfile = unzip_file( $source_path, $destination_path);
|
874 |
+
|
875 |
+
if ( $unzipfile ) {
|
876 |
+
// delete FILE
|
877 |
+
wp_delete_file( $source_path );
|
878 |
+
$this->cmp_themes_premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
|
879 |
+
$this->cmp_themes_available = array_merge( $this->cmp_themes_bundled, $this->cmp_themes_premium_installed );
|
880 |
+
echo '<div class="notice notice-success is-dismissible"><p class="message">'.ucwords(str_replace('_', ' ', $theme_name)).' '.__(' theme was successfully installed!', 'cmp-coming-soon-maintenance').'</p></div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
881 |
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
882 |
|
883 |
+
} else {
|
884 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
|
885 |
+
return;
|
886 |
+
}
|
887 |
+
|
888 |
} else {
|
889 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
|
890 |
return;
|
891 |
}
|
|
|
892 |
|
|
|
|
|
|
|
|
|
893 |
} else {
|
894 |
+
/**
|
895 |
+
* Error generated by _wp_handle_upload()
|
896 |
+
* @see _wp_handle_upload() in wp-admin/includes/file.php
|
897 |
+
*/
|
898 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.$movefile['error'].'</p></div>';
|
899 |
+
return;
|
900 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
901 |
} else {
|
902 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.__('Unable to upload new Theme file .', 'cmp-coming-soon-maintenance'). strtoupper($filetype['ext']) .__(' file extension is not supported. Please upload ZIP file containing CMP Theme.', 'cmp-coming-soon-maintenance').'</p></div>';
|
903 |
return;
|
904 |
}
|
905 |
+
|
906 |
+
add_filter('upload_mimes', array($this, 'niteo_remove_zip_mime'));
|
907 |
+
return;
|
908 |
}
|
|
|
909 |
|
910 |
+
public function cmp_theme_update_install( $file ) {
|
911 |
+
$ajax = false;
|
912 |
+
// check for ajax
|
913 |
+
if ( isset( $_POST['file'] ) ) {
|
914 |
+
// verify nonce
|
915 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
916 |
+
// verify user rights
|
917 |
+
if( !current_user_can('publish_pages') ) {
|
918 |
+
die('Sorry, but this request is invalid');
|
919 |
+
}
|
920 |
|
921 |
+
// sanitize array
|
922 |
+
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
|
923 |
|
924 |
+
if ( !empty( $_POST['file'] ) ) {
|
925 |
+
$file = $_POST['file'];
|
926 |
+
$ajax = true;
|
927 |
+
}
|
928 |
+
}
|
929 |
|
930 |
+
// load PHP WP FILE
|
931 |
+
if ( ! empty( $file ) ) {
|
932 |
+
// Download file to temp location.
|
933 |
+
$file['tmp_name'] = download_url( $file['url'] );
|
934 |
+
|
935 |
+
|
936 |
+
// If error storing temporarily, return the error.
|
937 |
+
if ( !is_wp_error( $file['tmp_name'] ) ) {
|
938 |
+
WP_Filesystem();
|
939 |
+
|
940 |
+
// create new theme DIR
|
941 |
+
if ( wp_mkdir_p( CMP_PREMIUM_THEMES_DIR ) ) {
|
942 |
+
// Unzip FILE into that DIR
|
943 |
+
$unzipfile = unzip_file( $file['tmp_name'], CMP_PREMIUM_THEMES_DIR );
|
944 |
+
|
945 |
+
if ( !is_wp_error( $unzipfile ) ) {
|
946 |
+
|
947 |
+
// delete FILE
|
948 |
+
wp_delete_file( $file['tmp_name'] );
|
949 |
+
// reload premium installed themes
|
950 |
+
$this->cmp_themes_premium_installed = array_map('basename', glob( CMP_PREMIUM_THEMES_DIR . '*', GLOB_ONLYDIR));
|
951 |
+
// add it to all installed themes array
|
952 |
+
$this->cmp_themes_available = array_merge( $this->cmp_themes_bundled, $this->cmp_themes_premium_installed );
|
953 |
+
// reply response
|
954 |
+
// set transient no update available with 24 hours expire
|
955 |
+
set_transient( $file['name'] . '_updatecheck', '', 60*60*24 );
|
956 |
+
// die
|
957 |
+
if ( $ajax ) {
|
958 |
+
wp_die('success');
|
959 |
+
return;
|
960 |
|
961 |
+
} else {
|
962 |
+
echo '<div class="notice notice-success is-dismissible"><p>'. ucwords( str_replace( '_', ' ', $file['name'] ) ) .' '. __( CMP_PREMIUM_THEMES_DIR, 'cmp-coming-soon-maintenance' ).'</p></div>';
|
963 |
+
return;
|
964 |
+
}
|
965 |
+
|
966 |
+
} else {
|
967 |
+
|
968 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
|
969 |
|
970 |
+
if ( $ajax ) {
|
971 |
+
wp_die('error');
|
972 |
+
return;
|
973 |
+
}
|
974 |
+
}
|
975 |
|
976 |
+
} else {
|
977 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
|
978 |
+
if ( $ajax ) {
|
979 |
+
wp_die('error');
|
980 |
+
return;
|
981 |
+
}
|
982 |
+
}
|
983 |
+
|
984 |
+
} else {
|
985 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp-coming-soon-maintenance').' '.$file['tmp_name']->get_error_message().'</p></div>';
|
986 |
+
if ( $ajax === true ) {
|
987 |
+
wp_die('error');
|
988 |
+
return;
|
989 |
+
}
|
990 |
+
}
|
991 |
} else {
|
992 |
+
|
993 |
+
echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
|
994 |
+
if ( $ajax === true ) {
|
995 |
+
wp_die('error');
|
996 |
+
return;
|
997 |
+
}
|
998 |
}
|
999 |
|
1000 |
+
return;
|
|
|
1001 |
}
|
1002 |
|
1003 |
+
public function load_textdomain() {
|
1004 |
+
load_plugin_textdomain( 'cmp-coming-soon-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
1005 |
+
}
|
1006 |
|
1007 |
+
// build unsplash api
|
1008 |
+
public function cmp_unsplash_api ( $query ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1009 |
|
1010 |
+
$api_url = 'https://api.unsplash.com/'.$query.'&client_id=41f043163758cf2e898e8a868bc142c20bc3f5966e7abac4779ee684088092ab' ;
|
1011 |
+
|
1012 |
+
if ( function_exists( 'wp_remote_get' ) ) {
|
1013 |
|
1014 |
+
$response = wp_remote_get( $api_url );
|
|
|
|
|
|
|
|
|
1015 |
|
1016 |
+
if ( !is_object( $response ) && isset( $response['body'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
|
1018 |
+
$body = $response['body'];
|
1019 |
+
$data = array( 'response' => $response['response']['code'], 'body' => $body );
|
|
|
1020 |
|
|
|
1021 |
} else {
|
1022 |
+
$data = array( 'response' => 'Unplash API', 'body' => 'Not responding after 5000ms' );
|
1023 |
}
|
1024 |
|
1025 |
+
} else {
|
1026 |
+
$data = array( 'response' => '500', 'body' => 'You have neither cUrl installed nor allow_url_fopen activated. Ask your server hosting provider to allow on of those options.' );
|
1027 |
+
}
|
1028 |
|
1029 |
+
return $data;
|
1030 |
+
}
|
1031 |
|
1032 |
+
// prepare unsplash url and get unsplash photo via cmp_unsplash_api()
|
1033 |
+
public function niteo_unsplash( $params ) {
|
1034 |
+
$ajax = false;
|
1035 |
+
|
1036 |
+
// check for ajax
|
1037 |
+
if ( isset( $_POST['params'] ) ) {
|
1038 |
+
// verify nonce
|
1039 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
1040 |
+
// verify user rights
|
1041 |
+
if( !current_user_can('publish_pages') ) {
|
1042 |
+
die('Sorry, but this request is invalid');
|
1043 |
}
|
1044 |
|
1045 |
+
// sanitize array
|
1046 |
+
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
|
|
|
1047 |
|
1048 |
+
if ( !empty( $_POST['params'] ) ) {
|
1049 |
+
$params = $_POST['params'];
|
1050 |
+
$ajax = true;
|
|
|
|
|
|
|
|
|
1051 |
}
|
1052 |
+
}
|
1053 |
|
1054 |
+
array_key_exists ('feed', $params) ? $feed = $params['feed'] : $feed = '';
|
1055 |
+
array_key_exists ('url', $params) ? $url = $params['url'] : $url = '';
|
1056 |
+
array_key_exists ('feat', $params) ? $feat = $params['feat'] : $feat = '';
|
1057 |
+
array_key_exists ('custom_str', $params) ? $custom_str = $params['custom_str'] : $custom_str = '';
|
1058 |
+
array_key_exists ('count', $params) ? $count = $params['count'] : $count = '1';
|
1059 |
+
|
1060 |
+
switch ( $feed ) {
|
1061 |
+
// specific unsplash photo by url/id
|
1062 |
+
case '0':
|
1063 |
+
$id = '';
|
1064 |
+
// check if $query contains unsplash.com url
|
1065 |
+
if ( strpos( $url, 'unsplash.com' ) !== false ) {
|
1066 |
+
$parts = parse_url( $url );
|
1067 |
+
// check for photo parameter in URL
|
1068 |
+
if ( isset($parts['query'])) {
|
1069 |
+
parse_str($parts['query'], $query);
|
1070 |
+
$id = $query['photo'];
|
1071 |
+
}
|
1072 |
+
// if no ID found, get last part of URL containing ID
|
1073 |
+
if ( $id == '' ) {
|
1074 |
|
1075 |
+
$pathFragments = explode('/', $parts['path']);
|
1076 |
+
$id = end($pathFragments);
|
1077 |
+
}
|
1078 |
|
1079 |
+
// $query is ID
|
1080 |
+
} else {
|
1081 |
+
$id = $url;
|
1082 |
+
}
|
|
|
|
|
1083 |
|
1084 |
+
// prepare query for single image
|
1085 |
+
$api_query = 'photos/'.$id.'?';
|
1086 |
+
break;
|
1087 |
|
1088 |
+
// random from user
|
1089 |
+
case '1':
|
|
|
|
|
|
|
|
|
1090 |
|
1091 |
+
if ( $custom_str[0] == '@' ) {
|
1092 |
+
$custom_str = substr($custom_str, 1);
|
1093 |
+
}
|
|
|
1094 |
|
1095 |
+
// prepare query for random photo from collection
|
1096 |
+
$api_query = 'photos/random/?username='.$custom_str.'&count='.$count;
|
1097 |
+
break;
|
1098 |
|
1099 |
+
// random from collection
|
1100 |
+
case '2':
|
1101 |
+
if ( is_numeric( $url ) ) {
|
1102 |
+
$collection = $url;
|
1103 |
+
} else {
|
1104 |
+
$collection = filter_var($url, FILTER_SANITIZE_NUMBER_INT);
|
1105 |
+
$collection = str_replace('-', '', $collection );
|
1106 |
+
}
|
1107 |
|
1108 |
+
// prepare query for random photo from collection
|
1109 |
+
$api_query = 'photos/random/?collections='.$collection.'&count='.$count;
|
1110 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
|
1112 |
+
// random photo
|
1113 |
+
case '3':
|
1114 |
|
1115 |
+
// featured
|
1116 |
+
if ( $feat == '0' || $feat == '') {
|
1117 |
+
$featured = 'false';
|
1118 |
+
} else {
|
1119 |
+
$featured = 'true';
|
1120 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1121 |
|
1122 |
+
// category
|
1123 |
+
$search = str_replace(' ', ',', $url);
|
1124 |
|
1125 |
+
if ( $search !== '' ) {
|
1126 |
+
$search = 'query='.$search.'&';
|
1127 |
+
}
|
1128 |
+
// prepare query for random photo
|
1129 |
+
$api_query = 'photos/random/?orientation=landscape&featured='.$featured.'&'.$search.'count='.$count;
|
1130 |
+
break;
|
1131 |
|
1132 |
+
default:
|
1133 |
+
$api_query = 'photos/random/?orientation=landscape&count='.$count;
|
1134 |
+
break;
|
1135 |
+
}
|
1136 |
|
1137 |
+
$unsplash_img = $this->cmp_unsplash_api( $api_query );
|
|
|
|
|
|
|
|
|
1138 |
|
1139 |
+
if ( $ajax === true ) {
|
1140 |
+
echo json_encode($unsplash_img);
|
1141 |
+
wp_die();
|
|
|
|
|
1142 |
|
1143 |
+
} else {
|
1144 |
+
return $unsplash_img;
|
1145 |
+
}
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
// check value in multidimensional array
|
1149 |
+
public function niteo_in_array_r($needle, $haystack, $strict = false) {
|
1150 |
+
foreach ( $haystack as $item ) {
|
1151 |
+
if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
|
1152 |
+
return true;
|
1153 |
+
}
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
return false;
|
1157 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1158 |
|
1159 |
+
// save subscribe function
|
1160 |
+
// $check must be true, to avoid duplicated requests after update to 2.1
|
1161 |
+
public function niteo_subscribe( $check ) {
|
1162 |
+
|
1163 |
+
$subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
|
1164 |
+
|
1165 |
+
$response = '';
|
1166 |
+
// get translation lists
|
1167 |
+
if ( get_option('niteoCS_translation') ) {
|
1168 |
+
$translation = json_decode( get_option('niteoCS_translation'), true );
|
1169 |
+
$response_ok = $translation[7]['translation'];
|
1170 |
+
$response_duplicate = $translation[5]['translation'];
|
1171 |
+
$response_invalid = $translation[6]['translation'];
|
1172 |
+
|
1173 |
+
} else {
|
1174 |
+
$response_ok = 'Thank you, your sign-up request was successful!';
|
1175 |
+
$response_duplicate = 'This Email address has already been on our subscriber list.';
|
1176 |
+
$response_invalid = 'Please insert valid Email address.';
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
$ajax = false;
|
1180 |
+
|
1181 |
+
// check for ajax request
|
1182 |
+
if ( isset( $_POST['check'] ) && $_POST['check'] == true ) {
|
1183 |
+
$check = true;
|
1184 |
+
$ajax = true;
|
1185 |
+
}
|
1186 |
|
1187 |
+
if ( $check === true ) :
|
1188 |
+
|
1189 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
1190 |
+
&& isset( $_POST['form_honeypot'] )
|
1191 |
+
&& $_POST['form_honeypot'] === ''
|
1192 |
+
&& isset( $_POST['email'] ) )
|
1193 |
+
{
|
1194 |
+
|
1195 |
+
if ( is_email( $_POST['email'] ) ) {
|
1196 |
+
// email already passed is_email, no need to sanitize
|
1197 |
+
$email = $_POST['email'];
|
1198 |
+
|
1199 |
+
// sanitize all inputs
|
1200 |
+
$ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
|
1201 |
+
$firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
|
1202 |
+
$lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
|
1203 |
+
$timestamp = time();
|
1204 |
+
|
1205 |
+
switch ( $subscribe_method ) {
|
1206 |
+
// default custom CMP method
|
1207 |
+
case 'cmp':
|
1208 |
+
// get subscribe list
|
1209 |
+
$subscribe_list = get_option('niteoCS_subscribers_list');
|
1210 |
+
|
1211 |
+
// if no subscribe list yet, create first item and insert it into DB
|
1212 |
+
if ( !$subscribe_list ) {
|
1213 |
+
$new_list = array();
|
1214 |
+
$new_email = array( 'id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
|
1215 |
+
array_push( $new_list, $new_email );
|
1216 |
+
update_option( 'niteoCS_subscribers_list', $new_list );
|
1217 |
$response = array( 'status' => '1', 'message' => $response_ok);
|
1218 |
|
1219 |
} else {
|
1220 |
+
// check if email don`t already exists
|
1221 |
+
if ( !$this->niteo_in_array_r( $email, $subscribe_list, true ) ) {
|
1222 |
+
$count = count( $subscribe_list );
|
1223 |
+
$new_email = array( 'id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
|
1224 |
+
array_push( $subscribe_list, $new_email );
|
1225 |
+
update_option('niteoCS_subscribers_list', $subscribe_list);
|
1226 |
+
$response = array( 'status' => '1', 'message' => $response_ok);
|
1227 |
+
|
1228 |
+
// if email exists return duplicate response
|
1229 |
+
} else {
|
1230 |
+
$response = array( 'status' => '0', 'message' => $response_duplicate);
|
1231 |
+
}
|
1232 |
}
|
1233 |
+
break;
|
1234 |
+
|
1235 |
+
// mailchimp API call
|
1236 |
+
case 'mailchimp':
|
1237 |
+
$api_key = esc_attr( get_option('niteoCS_mailchimp_apikey') );
|
1238 |
+
$list_id = esc_attr( get_option('niteoCS_mailchimp_list_selected') );
|
1239 |
+
$email = $_POST['email'];
|
1240 |
+
$double_opt = get_option( 'niteoCS_mailchimp[double-opt]', '0' );
|
1241 |
+
$status = ( $double_opt == '1') ? 'pending' : 'subscribed'; // subscribed, cleaned, pending
|
1242 |
+
|
1243 |
+
$args = array(
|
1244 |
+
'method' => 'PUT',
|
1245 |
+
'headers' => array(
|
1246 |
+
'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
|
1247 |
+
),
|
1248 |
+
'body' => json_encode(array(
|
1249 |
+
'email_address' => $email,
|
1250 |
+
'status' => $status
|
1251 |
+
))
|
1252 |
+
);
|
1253 |
+
|
1254 |
+
$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 );
|
1255 |
+
|
1256 |
+
if ( !is_wp_error( $mailchimp ) ) {
|
1257 |
+
|
1258 |
+
$body = json_decode( $mailchimp['body'] );
|
1259 |
+
|
1260 |
+
if ( $mailchimp['response']['code'] == 200 && $body->status == $status ) {
|
1261 |
+
$response = array( 'status' => '1', 'message' => $response_ok);
|
1262 |
+
|
1263 |
+
} else {
|
1264 |
+
$response = array( 'status' => '0', 'message' => 'Error ' . $mailchimp['response']['code'] . ' ' . $body->title . ': ' . $body->detail);
|
1265 |
+
}
|
1266 |
|
1267 |
+
} else {
|
1268 |
+
$error = $mailchimp->get_error_message();
|
1269 |
+
$response = array( 'status' => '0', 'message' => $error);
|
1270 |
+
}
|
1271 |
|
1272 |
+
break;
|
1273 |
|
1274 |
+
default:
|
1275 |
+
break;
|
1276 |
+
}
|
1277 |
|
1278 |
+
// if not email, set response invalid
|
1279 |
+
} else {
|
1280 |
+
$response = array( 'status' => '0', 'message' => $response_invalid);
|
1281 |
+
}
|
1282 |
+
}
|
1283 |
|
1284 |
+
endif; // $check !== true
|
1285 |
|
1286 |
+
if ( $ajax === true ) {
|
1287 |
+
echo json_encode( $response );
|
1288 |
+
wp_die();
|
1289 |
|
1290 |
+
} else {
|
1291 |
+
return ( $response == '' ) ? $response : json_encode( $response );
|
1292 |
+
}
|
1293 |
+
|
1294 |
}
|
|
|
|
|
1295 |
|
1296 |
+
public function niteo_export_csv() {
|
1297 |
+
// load subscribers array
|
1298 |
+
$subscribers = get_option('niteoCS_subscribers_list');
|
1299 |
+
|
1300 |
+
if( !empty($subscribers) ) {
|
1301 |
+
$filename = 'subscribers-list-' . date('Y-m-d') . '.csv';
|
1302 |
+
header('Content-Type: text/csv');
|
1303 |
+
header('Content-Disposition: attachment;filename='.$filename);
|
1304 |
+
$fp = fopen('php://output', 'w');
|
1305 |
+
fputcsv($fp, array(__('Date','cmp-coming-soon-maintenance'),__('Email','cmp-coming-soon-maintenance')));
|
1306 |
+
foreach ($subscribers as $key => $value) {
|
1307 |
+
if ( isset( $value['ip_address'] ) ) {
|
1308 |
+
unset($subscribers[$key]['ip_address']);
|
1309 |
+
}
|
1310 |
+
if ( isset( $value['id'] ) ) {
|
1311 |
+
unset($subscribers[$key]['id']);
|
1312 |
+
}
|
1313 |
+
|
1314 |
+
if ( isset( $value['timestamp'] ) ) {
|
1315 |
+
$format="Y-m-d H:i:s";
|
1316 |
+
$subscribers[$key]['timestamp'] = date_i18n($format, $subscribers[$key]['timestamp']);
|
1317 |
+
}
|
1318 |
}
|
1319 |
|
1320 |
+
foreach ( $subscribers as $key => $value ) {
|
1321 |
+
fputcsv($fp, $value, $delimiter = ',', $enclosure = '"' );
|
|
|
1322 |
}
|
1323 |
+
fclose($fp);
|
1324 |
}
|
1325 |
+
die();
|
1326 |
+
}
|
1327 |
|
1328 |
+
public function niteo_allow_zip_mime( $existing_mimes = array() ) {
|
1329 |
+
// add your own extension here - as many as you like
|
1330 |
+
$existing_mimes['zip'] = 'application/zip';
|
1331 |
+
|
1332 |
+
// return amended array
|
1333 |
+
return $existing_mimes;
|
1334 |
}
|
|
|
|
|
1335 |
|
1336 |
+
public function niteo_remove_zip_mime( $existing_mimes = array() ) {
|
1337 |
+
// remove zip mime
|
1338 |
+
unset ($existing_mimes['zip']);
|
1339 |
|
1340 |
+
// return amended array
|
1341 |
+
return $existing_mimes;
|
1342 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1343 |
|
1344 |
|
1345 |
+
public function cmp_admin_notice() {
|
1346 |
+
if ( isset($_GET['page']) && ($_GET['page'] == 'cmp-settings' || $_GET['page'] == 'cmp-translate' || $_GET['page'] == 'cmp-advanced') ) {
|
1347 |
+
if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
|
1348 |
+
$status = 'success';
|
1349 |
+
$message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
|
1350 |
|
1351 |
+
echo '<div class="notice notice-'.$status.' is-dismissible"><p>'.$message.'.</p></div>';
|
1352 |
+
}
|
1353 |
}
|
1354 |
+
return;
|
1355 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1356 |
|
1357 |
+
// convert hex to rgba
|
1358 |
+
public function hex2rgba ( $hex, $opacity ) {
|
1359 |
+
list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
|
1360 |
|
1361 |
+
$rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
|
|
|
1362 |
|
|
|
|
|
|
|
|
|
|
|
1363 |
return $rgba;
|
1364 |
}
|
1365 |
|
1366 |
+
// convert hex to hsl css
|
1367 |
+
public function hex2hsl( $hex, $opacity ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1368 |
|
1369 |
+
if ( $hex[0] != '#' ) {
|
1370 |
+
$rgba = explode( ',', $hex);
|
1371 |
+
$rgba[3] = str_replace(')', '', $rgba[3]);
|
1372 |
+
$rgba[3] = $rgba[3] - ( $opacity / 100 );
|
1373 |
+
$rgba = $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')';
|
1374 |
+
return $rgba;
|
1375 |
+
}
|
1376 |
|
1377 |
+
list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
|
1378 |
|
1379 |
+
$r = $red / 255.0;
|
1380 |
+
$g = $green / 255.0;
|
1381 |
+
$b = $blue / 255.0;
|
1382 |
$H = 0;
|
1383 |
$S = 0;
|
1384 |
+
$V = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1385 |
|
1386 |
+
$min = min( $r, $g, $b );
|
1387 |
+
$max = max( $r, $g, $b );
|
1388 |
+
$delta = ( $max - $min );
|
1389 |
|
1390 |
+
$L = ( $max + $min ) / 2.0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1391 |
|
1392 |
+
if( $delta == 0 ) {
|
1393 |
+
$H = 0;
|
1394 |
+
$S = 0;
|
1395 |
+
} else {
|
1396 |
+
$S = $L > 0.5 ? $delta / ( 2 - $max - $min ) : $delta / ( $max + $min );
|
1397 |
+
|
1398 |
+
$dR = ( ( ( $max - $r ) / 6) + ( $delta / 2 ) ) / $delta;
|
1399 |
+
$dG = ( ( ( $max - $g ) / 6) + ( $delta / 2 ) ) / $delta;
|
1400 |
+
$dB = ( ( ( $max - $b ) / 6) + ( $delta / 2 ) ) / $delta;
|
1401 |
+
|
1402 |
+
if ( $r == $max )
|
1403 |
+
$H = $dB - $dG;
|
1404 |
+
else if( $g == $max )
|
1405 |
+
$H = ( 1/3 ) + $dR - $dB;
|
1406 |
+
else
|
1407 |
+
$H = ( 2/3 ) + $dG - $dR;
|
1408 |
+
|
1409 |
+
if ( $H < 0 )
|
1410 |
+
$H += 1;
|
1411 |
+
if ( $H > 1 )
|
1412 |
+
$H -= 1;
|
1413 |
+
}
|
1414 |
|
1415 |
+
$HSL = array( 'hue' => round( ($H*360), 0 ), 'saturation'=> round( ($S*100), 0 ), 'luminosity' => round( ( $L*100 ), 0) );
|
1416 |
+
|
1417 |
+
// if color is white {
|
1418 |
+
if ( $HSL['hue'] == 0 && $HSL['saturation'] == 0) {
|
1419 |
+
$requested_lumi = $HSL['luminosity'] + $opacity;
|
1420 |
+
} else {
|
1421 |
+
$requested_lumi = $HSL['luminosity'] - $opacity;
|
1422 |
+
}
|
1423 |
+
|
1424 |
+
$requested_lumi = (int)round($requested_lumi);
|
1425 |
|
1426 |
+
if ( $requested_lumi > 90 ) {
|
1427 |
+
|
1428 |
+
$requested_lumi = 90;
|
1429 |
+
}
|
1430 |
|
1431 |
+
$HSL = 'hsl( '. $HSL['hue'] .', '.( $HSL['saturation']) .'%, '. $requested_lumi . '%)';
|
1432 |
+
return $HSL;
|
1433 |
}
|
|
|
1434 |
|
1435 |
+
// check if mobile
|
1436 |
+
public function isMobile() {
|
1437 |
+
if ( isset($_SERVER["HTTP_USER_AGENT"]) ) {
|
1438 |
+
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
|
1439 |
|
1440 |
+
} else {
|
1441 |
+
return false;
|
1442 |
+
}
|
1443 |
+
}
|
1444 |
|
1445 |
+
// sanitize function
|
1446 |
+
public function sanitize_checkbox( $input ) {
|
1447 |
+
return ( ( isset( $input ) && true == $input ) ? '1' : '0' );
|
1448 |
+
}
|
1449 |
|
1450 |
+
// sanitize function
|
1451 |
+
public function niteo_sanitize_html( $html ) {
|
1452 |
|
1453 |
+
if ( !current_user_can( 'unfiltered_html' ) ) {
|
1454 |
+
$allowed = wp_kses_allowed_html( 'post' );
|
1455 |
+
$html = wp_kses( $html, $allowed );
|
|
|
|
|
1456 |
}
|
|
|
|
|
|
|
|
|
|
|
1457 |
|
1458 |
+
return $html;
|
1459 |
+
}
|
1460 |
|
1461 |
+
// public function to sort social icons
|
1462 |
+
public function sort_social($a, $b){
|
1463 |
+
if ( $a['hidden'] == $b['hidden'] ) {
|
1464 |
+
if( $a['order'] == $b['order'] ) {
|
1465 |
+
return 0;
|
1466 |
+
}
|
1467 |
+
return $a['order'] < $b['order'] ? -1 : 1;
|
1468 |
+
} else {
|
1469 |
+
return $a['hidden'] > $b['hidden'] ? 1 : -1;
|
1470 |
+
}
|
1471 |
+
}
|
1472 |
|
1473 |
+
// public function to shift multidimensional array
|
1474 |
+
public function customShift($array, $name){
|
1475 |
|
1476 |
+
foreach($array as $key => $val){ // loop all elements
|
1477 |
+
if($val['name'] == $name){ // check for id $id
|
1478 |
+
unset($array[$key]); // unset the $array with id $id
|
1479 |
+
array_unshift($array, $val); // unshift the array with $val to push in the beginning of array
|
1480 |
+
return $array; // return new $array
|
1481 |
+
}
|
1482 |
+
}
|
1483 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1484 |
|
1485 |
+
public function get_youtube_img( $youtube_url ) {
|
1486 |
+
$youtube = preg_match('/.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/', $youtube_url, $url);
|
|
|
1487 |
|
1488 |
+
if ( isset( $url[7] ) && $url[7] != '') {
|
1489 |
+
$youtube_image = 'http://img.youtube.com/vi/' . $url[7] . '/hqdefault.jpg';
|
1490 |
+
return $youtube_image;
|
1491 |
+
}
|
1492 |
}
|
1493 |
|
1494 |
+
public function cmp_get_pages() {
|
1495 |
+
$page_titles = array();
|
1496 |
+
$pages = array();
|
1497 |
+
$page_ids = get_all_page_ids();
|
1498 |
|
1499 |
+
foreach ($page_ids as $page_id ) {
|
1500 |
+
array_push( $page_titles, get_the_title($page_id) );
|
1501 |
+
}
|
1502 |
|
1503 |
+
foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
|
1504 |
+
$pages[] = array('id' => $id, 'name' => $name);
|
|
|
|
|
|
|
|
|
|
|
1505 |
}
|
1506 |
|
1507 |
+
return $pages;
|
1508 |
+
}
|
1509 |
|
1510 |
+
// send json data for theme info overlay AJAX request
|
1511 |
+
public function niteo_themeinfo( ) {
|
1512 |
+
|
1513 |
+
// check for ajax
|
1514 |
+
if ( isset( $_POST['theme_slug'] ) ) {
|
1515 |
+
// verify nonce
|
1516 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
1517 |
+
// verify user rights
|
1518 |
+
if( !current_user_can('publish_pages') ) {
|
1519 |
+
die('Sorry, but this request is invalid');
|
1520 |
+
}
|
1521 |
|
1522 |
+
|
1523 |
+
// sanitize $post
|
1524 |
+
$theme_slug = sanitize_text_field( $_POST['theme_slug'] );
|
1525 |
+
$data = array( 'result' => 'true', 'author_homepage' => CMP_AUTHOR_HOMEPAGE, 'author' => CMP_AUTHOR );
|
1526 |
|
1527 |
+
if ( !empty( $theme_slug ) ) {
|
1528 |
+
$headers = array('Theme Name', 'Description');
|
1529 |
+
$theme_info = get_file_data(plugin_dir_path( __FILE__ ).'/themes/'. $theme_slug. '.txt', $headers, '');
|
1530 |
+
|
1531 |
+
$screenshots = array_map( 'basename', glob( plugin_dir_path( __FILE__ ) . 'img/thumbnails/'.$theme_slug.'/*' ) );
|
1532 |
+
|
1533 |
+
foreach ( $screenshots as $key => $screenshot ) {
|
1534 |
+
$screenshots[$key] = plugins_url('img/thumbnails/'.$theme_slug.'/'.$screenshot, __FILE__ );
|
1535 |
+
}
|
1536 |
+
|
1537 |
+
$data['name'] = $theme_info[0];
|
1538 |
+
$data['description'] = $theme_info[1];
|
1539 |
+
$data['screenshots'] = $screenshots;
|
1540 |
}
|
1541 |
|
1542 |
+
echo json_encode ($data);
|
1543 |
+
wp_die();
|
1544 |
+
}
|
1545 |
+
}
|
1546 |
|
1547 |
+
// legacy function for premium themes redirect
|
1548 |
+
public function niteo_redirect() {
|
1549 |
+
return;
|
1550 |
}
|
|
|
1551 |
|
1552 |
+
// returns array of google fonts from /inc/webfonts.php
|
1553 |
+
public function cmp_get_google_fonts() {
|
1554 |
+
$fonts = include_once wp_normalize_path( dirname( __FILE__ ) . '/inc/webfonts.php' );
|
1555 |
+
$google_fonts = json_decode( $fonts, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1556 |
|
1557 |
+
return $google_fonts;
|
1558 |
+
}
|
|
|
|
|
1559 |
|
1560 |
+
public function cmp_google_variant_title( $variant ) {
|
1561 |
+
|
1562 |
+
switch( $variant ) {
|
1563 |
+
case '100':
|
1564 |
+
return 'Thin 100';
|
1565 |
+
break;
|
1566 |
+
case '100italic':
|
1567 |
+
return 'Thin 100 Italic';
|
1568 |
+
break;
|
1569 |
+
case '200':
|
1570 |
+
return 'Extra-light 200';
|
1571 |
+
break;
|
1572 |
+
case '200italic':
|
1573 |
+
return 'Extra-light 200 Italic';
|
1574 |
+
break;
|
1575 |
+
case '300':
|
1576 |
+
return 'Light 300';
|
1577 |
+
break;
|
1578 |
+
case '300italic':
|
1579 |
+
return 'Light 300 Italic';
|
1580 |
+
break;
|
1581 |
+
case '400':
|
1582 |
+
return 'Regular 400';
|
1583 |
+
break;
|
1584 |
+
case '400italic':
|
1585 |
+
return 'Regular 400 Italic';
|
1586 |
+
break;
|
1587 |
+
case '500':
|
1588 |
+
return 'Medium 500';
|
1589 |
+
break;
|
1590 |
+
case '500italic':
|
1591 |
+
return 'Meidum 500 Italic';
|
1592 |
+
break;
|
1593 |
+
case '600':
|
1594 |
+
return 'Semi-Bold 600';
|
1595 |
+
break;
|
1596 |
+
case '600italic':
|
1597 |
+
return 'Semi-Bold 600 Italic';
|
1598 |
+
break;
|
1599 |
+
case '700':
|
1600 |
+
return 'Bold 700';
|
1601 |
+
break;
|
1602 |
+
case '700italic':
|
1603 |
+
return 'Bold 700 Italic';
|
1604 |
+
break;
|
1605 |
+
case '800':
|
1606 |
+
return 'Extra-Bold 800';
|
1607 |
+
break;
|
1608 |
+
case '800italic':
|
1609 |
+
return 'Extra-Bold Italic';
|
1610 |
+
break;
|
1611 |
+
case '900':
|
1612 |
+
return 'Black 900';
|
1613 |
+
break;
|
1614 |
+
case '900italic':
|
1615 |
+
return 'Black 900 Italic';
|
1616 |
+
break;
|
1617 |
+
case 'regular':
|
1618 |
+
return 'Regular 400';
|
1619 |
+
break;
|
1620 |
+
case 'italic':
|
1621 |
+
return 'Regular 400 Italic';
|
1622 |
+
break;
|
1623 |
+
default:
|
1624 |
+
break;
|
1625 |
+
}
|
1626 |
}
|
1627 |
|
1628 |
+
// returns true if current page is in page array (blacklist or whitelist)
|
1629 |
+
// since 2.2
|
1630 |
+
public function cmp_page_filter() {
|
1631 |
+
|
1632 |
+
if ( is_front_page() && is_home() ) {
|
1633 |
+
// default homepage
|
1634 |
+
$page_id = '-1';
|
1635 |
+
} elseif ( is_front_page() ) {
|
1636 |
+
// static homepage
|
1637 |
+
$page_id = '-1';
|
1638 |
+
} elseif ( is_home() ) {
|
1639 |
+
// posts page
|
1640 |
+
$page_id = get_option( 'page_for_posts' );
|
1641 |
+
} else {
|
1642 |
+
//everyting else
|
1643 |
+
$page_id = get_the_ID();
|
1644 |
+
}
|
1645 |
|
1646 |
+
|
1647 |
+
switch ( get_option('niteoCS_page_filter', '0') ) {
|
1648 |
+
// disabled return true
|
1649 |
+
case '0':
|
|
|
1650 |
return true;
|
1651 |
+
break;
|
1652 |
|
1653 |
+
// whitelist
|
1654 |
+
case '1':
|
1655 |
+
$page_list = json_decode( get_option('niteoCS_page_whitelist', '[]'), true );
|
|
|
1656 |
|
1657 |
+
if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
|
1658 |
+
return true;
|
|
|
1659 |
|
1660 |
+
} else {
|
1661 |
+
return false;
|
1662 |
+
}
|
1663 |
+
break;
|
1664 |
|
1665 |
+
// blacklist
|
1666 |
+
case '2':
|
1667 |
+
$page_list = json_decode( get_option('niteoCS_page_blacklist', '[]'), true );
|
1668 |
|
1669 |
+
if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
|
1670 |
+
return false;
|
1671 |
|
1672 |
+
} else {
|
1673 |
+
return true;
|
1674 |
+
}
|
|
|
1675 |
|
1676 |
+
break;
|
|
|
1677 |
|
1678 |
+
default:
|
1679 |
+
return true;
|
1680 |
+
break;
|
1681 |
+
}
|
|
|
|
|
1682 |
|
1683 |
+
return true;
|
1684 |
+
}
|
1685 |
|
1686 |
+
// returns true if logged in user meet CMP roles filter
|
1687 |
+
// since 2.2
|
1688 |
+
public function cmp_roles_filter() {
|
1689 |
+
$roles = json_decode( get_option('niteoCS_roles', '[]'), true );
|
1690 |
+
// push WP administrator to roles array, since it is default
|
1691 |
+
array_push( $roles, 'administrator' );
|
1692 |
|
1693 |
+
$current_user = wp_get_current_user();
|
|
|
1694 |
|
1695 |
+
foreach ( $current_user->roles as $role ) {
|
1696 |
+
if ( in_array( $role, $roles ) ) {
|
1697 |
+
return true;
|
1698 |
+
}
|
1699 |
+
};
|
1700 |
|
1701 |
+
return false;
|
1702 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1703 |
|
|
|
1704 |
|
1705 |
+
public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
|
1706 |
+
if ( is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra) ) {
|
1707 |
+
if ( $hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins']) ) {
|
1708 |
+
$this_plugin = plugin_basename(__FILE__);
|
1709 |
+
foreach ( $hook_extra['plugins'] as $key => $plugin ) {
|
1710 |
+
if ( $this_plugin == $plugin ) {
|
1711 |
+
$this_plugin_updated = true;
|
1712 |
+
break;
|
1713 |
+
}
|
1714 |
+
}// endforeach;
|
1715 |
+
unset( $key, $plugin, $this_plugin );
|
1716 |
|
1717 |
+
if ( isset( $this_plugin_updated ) && $this_plugin_updated === true ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1718 |
|
1719 |
+
// migrate google analytics options
|
1720 |
+
if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
|
1721 |
+
update_option('niteoCS_analytics_status', 'google');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1722 |
}
|
1723 |
|
1724 |
+
// add social icons to social settings
|
1725 |
+
if ( get_option('niteoCS_socialmedia') ) {
|
1726 |
+
$niteoCS_socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
|
1727 |
+
$socialmedia = json_decode( $niteoCS_socialmedia, true );
|
1728 |
+
$update = false;
|
1729 |
+
|
1730 |
+
// add soundcloud and phone social media in 2.2 update
|
1731 |
+
if ( !$this->niteo_in_array_r( 'soundcloud', $socialmedia, true ) ) {
|
1732 |
+
$soundcloud = array(
|
1733 |
+
'name' => 'soundcloud',
|
1734 |
+
'url' => '',
|
1735 |
+
'active' => '1',
|
1736 |
+
'hidden' => '1',
|
1737 |
+
'order' => '17',
|
1738 |
+
);
|
1739 |
+
array_push( $socialmedia, $soundcloud );
|
1740 |
+
$update = true;
|
1741 |
+
}
|
1742 |
+
|
1743 |
+
// add whatsapp and phone social media in 2.3 update
|
1744 |
+
if ( !$this->niteo_in_array_r( 'whatsapp', $socialmedia, true ) ) {
|
1745 |
+
$whatsapp = array(
|
1746 |
+
'name' => 'whatsapp',
|
1747 |
+
'url' => '',
|
1748 |
+
'active' => '1',
|
1749 |
+
'hidden' => '1',
|
1750 |
+
'order' => '18',
|
1751 |
+
);
|
1752 |
+
array_push( $socialmedia, $whatsapp );
|
1753 |
+
|
1754 |
+
$phone = array(
|
1755 |
+
'name' => 'phone',
|
1756 |
+
'url' => '',
|
1757 |
+
'active' => '1',
|
1758 |
+
'hidden' => '1',
|
1759 |
+
'order' => '19',
|
1760 |
+
);
|
1761 |
+
array_push( $socialmedia, $phone );
|
1762 |
+
$update = true;
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
// add telegram social media in 2.6.6 update
|
1766 |
+
if ( !$this->niteo_in_array_r( 'telegram', $socialmedia, true ) ) {
|
1767 |
+
$telegram = array(
|
1768 |
+
'name' => 'telegram',
|
1769 |
+
'url' => '',
|
1770 |
+
'active' => '1',
|
1771 |
+
'hidden' => '1',
|
1772 |
+
'order' => '20',
|
1773 |
+
);
|
1774 |
+
array_push( $socialmedia, $telegram );
|
1775 |
+
$update = true;
|
1776 |
+
}
|
1777 |
+
|
1778 |
+
if ( $update == true ) {
|
1779 |
+
update_option('niteoCS_socialmedia', json_encode( $socialmedia) );
|
1780 |
+
}
|
1781 |
}
|
1782 |
|
1783 |
+
// migrate overlay color and opacity settings after update 2.8
|
1784 |
+
|
1785 |
+
$current_theme = get_option('niteoCS_theme');
|
1786 |
+
|
1787 |
+
if ( $current_theme ) {
|
1788 |
+
$overlay_color = get_option('niteoCS_overlay_color['.$current_theme.']');
|
1789 |
+
$overlay_opacity = get_option('niteoCS_overlay_opacity['.$current_theme.']');
|
1790 |
+
|
1791 |
+
if ( $overlay_color ) {
|
1792 |
+
update_option( 'niteoCS_overlay['.$current_theme.']', 'solid-color' );
|
1793 |
+
update_option( 'niteoCS_overlay['.$current_theme.'][color]', $overlay_color );
|
1794 |
+
}
|
1795 |
+
|
1796 |
+
if ( $overlay_opacity ) {
|
1797 |
+
update_option( 'niteoCS_overlay['.$current_theme.'][opacity]', $overlay_opacity );
|
1798 |
+
}
|
1799 |
+
|
1800 |
+
delete_option('niteoCS_overlay_color['.$current_theme.']');
|
1801 |
+
delete_option('niteoCS_overlay_opacity['.$current_theme.']');
|
1802 |
+
|
1803 |
}
|
|
|
1804 |
|
|
|
|
|
1805 |
|
1806 |
+
// check for < 1.8 version where subscriber ID was not set
|
1807 |
+
if ( get_option('niteoCS_subscribers_list') ) {
|
1808 |
+
$subscribe_list = get_option('niteoCS_subscribers_list');
|
1809 |
|
1810 |
+
if ( is_array( $subscribe_list ) && count( $subscribe_list ) > 0 && !array_key_exists ('id', $subscribe_list[0]) ) {
|
1811 |
+
$i = 1;
|
1812 |
+
foreach( $subscribe_list as &$sub ){
|
1813 |
+
$sub['id'] = $i;
|
1814 |
+
$sub = array('id' => $sub['id']) + $sub;
|
1815 |
+
// check if ip address is set
|
1816 |
+
if (!array_key_exists('ip_address', $sub)) {
|
1817 |
+
$sub['ip_address'] = 'nodata';
|
1818 |
+
}
|
1819 |
+
$i++;
|
1820 |
+
}
|
1821 |
+
update_option('niteoCS_subscribers_list', $subscribe_list);
|
1822 |
+
}
|
1823 |
}
|
1824 |
|
1825 |
+
// delete transients for theme updates, to ensure the updates for latest cmp versions runs again
|
1826 |
+
foreach ( $this->cmp_themes_premium_installed as $theme_slug ) {
|
1827 |
+
delete_transient( $theme_slug.'_updatecheck' );
|
1828 |
}
|
|
|
|
|
|
|
1829 |
|
1830 |
+
// migrate overlay color and opacity settings after update 2.8
|
1831 |
+
|
1832 |
+
$current_theme = get_option('niteoCS_theme');
|
1833 |
|
1834 |
+
if ( $current_theme ) {
|
1835 |
+
$overlay_color = get_option('niteoCS_overlay_color['.$current_theme.']');
|
1836 |
+
$overlay_opacity = get_option('niteoCS_overlay_opacity['.$current_theme.']');
|
1837 |
+
|
1838 |
+
if ( $overlay_color ) {
|
1839 |
+
update_option( 'niteoCS_overlay['.$current_theme.']', 'color' );
|
1840 |
+
update_option( 'niteoCS_overlay['.$current_theme.'][color]', $overlay_color );
|
1841 |
+
}
|
1842 |
|
1843 |
+
if ( $overlay_opacity ) {
|
1844 |
+
update_option( 'niteoCS_overlay['.$current_theme.'][opacity]', $overlay_opacity );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1845 |
}
|
1846 |
+
|
1847 |
+
delete_option('niteoCS_overlay_color['.$current_theme.']');
|
1848 |
+
delete_option('niteoCS_overlay_opacity['.$current_theme.']');
|
1849 |
+
|
1850 |
}
|
|
|
1851 |
|
1852 |
+
}// endif; $this_plugin_updated
|
1853 |
+
}// endif update plugin and plugins not empty.
|
1854 |
+
}// endif; $hook_extra
|
1855 |
+
}// updatePlugin
|
1856 |
|
|
|
|
|
|
|
|
|
1857 |
|
1858 |
+
public function add_action_links ( $links ) {
|
1859 |
+
$settings = array(
|
1860 |
+
'<a href="' . admin_url( 'admin.php?page=cmp-settings' ) . '">CMP Settings</a>',
|
1861 |
+
);
|
1862 |
+
return array_merge( $settings, $links );
|
1863 |
+
}
|
1864 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1865 |
|
1866 |
+
// returns version of selected CMP theme
|
1867 |
+
public function cmp_theme_version( $theme_slug ) {
|
1868 |
+
// if premium theme style.css exists get its version
|
1869 |
|
1870 |
+
if ( in_array( $theme_slug, $this->cmp_themes_premium_installed ) ) {
|
1871 |
+
if ( file_exists( CMP_PREMIUM_THEMES_DIR . $theme_slug . '/style.css' ) ) {
|
1872 |
+
$version = get_file_data( CMP_PREMIUM_THEMES_DIR . $theme_slug . '/style.css', array('Version'), '' );
|
1873 |
+
}
|
1874 |
|
1875 |
+
} else {
|
1876 |
+
$version = CMP_VERSION;
|
|
|
1877 |
}
|
1878 |
|
1879 |
+
// if we have local version of theme and not in updating theme
|
1880 |
+
if ( is_array( $version ) ) {
|
1881 |
+
$version = $version[0];
|
1882 |
+
}
|
1883 |
|
1884 |
+
return $version;
|
|
|
|
|
1885 |
}
|
1886 |
|
1887 |
+
/**
|
1888 |
+
* Connect to Mailchimp via API and retrieve Mailchimp lists
|
1889 |
+
*
|
1890 |
+
* @since 2.6
|
1891 |
+
* @access public
|
1892 |
+
* @return Object
|
1893 |
+
*/
|
1894 |
+
public function cmp_mailchimp_list_ajax( $apikey ) {
|
1895 |
+
|
1896 |
+
// check for ajax
|
1897 |
+
if ( isset( $_POST['params'] ) ) {
|
1898 |
+
// verify nonce
|
1899 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
1900 |
+
// verify user rights
|
1901 |
+
if( !current_user_can('publish_pages') ) {
|
1902 |
+
die('Sorry, but this request is invalid');
|
1903 |
+
}
|
1904 |
|
1905 |
+
// sanitize array
|
1906 |
+
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1907 |
|
1908 |
+
// check params
|
1909 |
+
if ( !empty( $_POST['params'] ) ) {
|
1910 |
+
$params = $_POST['params'];
|
1911 |
+
}
|
1912 |
|
1913 |
+
$api_key = $params['apikey'];
|
|
|
|
|
|
|
1914 |
|
1915 |
+
$dc = substr( $api_key,strpos($api_key,'-') + 1 ); // datacenter, it is the part of your api key - us5, us8 etc
|
1916 |
|
1917 |
+
$args = array(
|
1918 |
+
'headers' => array(
|
1919 |
+
'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
|
1920 |
+
)
|
1921 |
+
);
|
1922 |
|
|
|
|
|
|
|
|
|
|
|
1923 |
|
1924 |
+
// retrieve response from mailchimp
|
1925 |
+
$response = wp_remote_get( 'https://'.$dc.'.api.mailchimp.com/3.0/lists/', $args );
|
1926 |
+
|
1927 |
+
// if we have it, create new array with lists id and name, else push error messages into array
|
1928 |
+
if ( !is_wp_error( $response ) ) {
|
1929 |
+
$lists_array = array();
|
1930 |
+
|
1931 |
+
$body = json_decode( $response['body'], true);
|
1932 |
+
|
1933 |
+
if ( $response['response']['code'] == 200 ) {
|
1934 |
+
$lists_array['response'] = 200;
|
1935 |
+
$i = 0;
|
1936 |
+
foreach ( $body['lists'] as $list ) {
|
1937 |
+
$lists_array['lists'][$i]['id'] = $list['id'];
|
1938 |
+
$lists_array['lists'][$i]['name'] = $list['name'];
|
1939 |
+
$i++;
|
1940 |
+
}
|
1941 |
|
1942 |
+
} else {
|
1943 |
+
$lists_array['response'] = $response['response']['code'];
|
1944 |
+
$lists_array['message'] = $body['title'] . ': ' . $body['detail'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1945 |
}
|
1946 |
|
1947 |
} else {
|
1948 |
+
$lists_array['response'] = '500';
|
1949 |
+
$lists_array['message'] = $response->get_error_message();
|
1950 |
}
|
1951 |
|
1952 |
+
// json encode response
|
1953 |
+
$lists_json = json_encode( $lists_array );
|
|
|
|
|
1954 |
|
1955 |
+
// save it
|
1956 |
+
update_option('niteoCS_mailchimp_lists', $lists_json);
|
1957 |
|
1958 |
+
// delete selected old mailchimp list because we do not want it
|
1959 |
+
delete_option('niteoCS_mailchimp_list_selected');
|
1960 |
|
1961 |
+
// echo ajax result
|
1962 |
+
echo $lists_json;
|
1963 |
+
wp_die();
|
|
|
|
|
|
|
1964 |
|
1965 |
+
}
|
1966 |
|
1967 |
+
}
|
1968 |
}
|
1969 |
+
|
1970 |
+
endif;
|
1971 |
+
|
1972 |
+
/*
|
1973 |
+
* @since 2.8.1
|
1974 |
+
* @return object|Login_Designer The one true Login_Designer Instance.
|
1975 |
+
*/
|
1976 |
+
function cmp_coming_soon_and_maintenance() {
|
1977 |
+
return CMP_Coming_Soon_and_Maintenance::instance();
|
1978 |
}
|
1979 |
|
1980 |
+
// Get the things running
|
1981 |
+
cmp_coming_soon_and_maintenance();
|
1982 |
+
|
1983 |
|
1984 |
register_uninstall_hook( __FILE__, array('niteo_cmp', 'cmp_plugin_delete') );
|
1985 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
|
|
4 |
Tags: coming soon, landing page, launch page, maintenance mode, under construction
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -112,6 +112,14 @@ CMP – Coming Soon & Maintenance plugin has all premium features you ever wishe
|
|
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.8 update</h4>
|
116 |
<ul>
|
117 |
<li>New Feature: Background Gradient Overlay. You can now set a beautiful gradient over your Background images or videos!</li>
|
4 |
Tags: coming soon, landing page, launch page, maintenance mode, under construction
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.8.1
|
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 |
+
|
116 |
+
<h4>CMP 2.8.1 small update</h4>
|
117 |
+
<ul>
|
118 |
+
<li>New feature: Support of Mailchimp Double Opt In integration.</li>
|
119 |
+
<li>Internally rewritten CMP Class for a better plugin security.</li>
|
120 |
+
</ul>
|
121 |
+
|
122 |
+
|
123 |
<h4>CMP 2.8 update</h4>
|
124 |
<ul>
|
125 |
<li>New Feature: Background Gradient Overlay. You can now set a beautiful gradient over your Background images or videos!</li>
|
themes/construct/construct-theme.php
CHANGED
@@ -27,7 +27,7 @@
|
|
27 |
|
28 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
29 |
|
30 |
-
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='
|
31 |
|
32 |
|
33 |
<style>
|
27 |
|
28 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
29 |
|
30 |
+
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.CMP_VERSION;?>" type="text/css" media="all">
|
31 |
|
32 |
|
33 |
<style>
|
themes/countdown/countdown-theme.php
CHANGED
@@ -37,7 +37,7 @@
|
|
37 |
|
38 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
39 |
|
40 |
-
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='
|
41 |
|
42 |
<style>
|
43 |
body,input, select, textarea, button {font-family:'<?php echo esc_attr( $content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
|
37 |
|
38 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
39 |
|
40 |
+
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.CMP_VERSION;?>" type="text/css" media="all">
|
41 |
|
42 |
<style>
|
43 |
body,input, select, textarea, button {font-family:'<?php echo esc_attr( $content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
|
themes/hardwork/hardwork-theme.php
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
?>
|
27 |
|
28 |
|
29 |
-
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='
|
30 |
|
31 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
32 |
|
26 |
?>
|
27 |
|
28 |
|
29 |
+
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.CMP_VERSION ;?>" type="text/css" media="all">
|
30 |
|
31 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
32 |
|
themes/hardwork/style.css
CHANGED
@@ -60,11 +60,13 @@ img {
|
|
60 |
flex-grow: 10;
|
61 |
width: 70%;
|
62 |
max-width: 1170px;
|
|
|
63 |
margin: 0 auto;
|
64 |
}
|
65 |
|
66 |
|
67 |
|
|
|
68 |
.graphic-logo {
|
69 |
width: auto;
|
70 |
max-width: 500px;
|
@@ -202,7 +204,7 @@ img {
|
|
202 |
}
|
203 |
|
204 |
@media only screen and (max-width : 560px) {
|
205 |
-
.section {padding: 4em 1em;}
|
206 |
.section-body {width: auto;}
|
207 |
.graphic-logo {max-height: 200px;padding-bottom: 0;max-width: 100%;}
|
208 |
.section-body,
|
60 |
flex-grow: 10;
|
61 |
width: 70%;
|
62 |
max-width: 1170px;
|
63 |
+
min-height: calc(100vh - 7em);
|
64 |
margin: 0 auto;
|
65 |
}
|
66 |
|
67 |
|
68 |
|
69 |
+
|
70 |
.graphic-logo {
|
71 |
width: auto;
|
72 |
max-width: 500px;
|
204 |
}
|
205 |
|
206 |
@media only screen and (max-width : 560px) {
|
207 |
+
.section {padding: 4em 1em; min-height: calc(100vh - 11em);}
|
208 |
.section-body {width: auto;}
|
209 |
.graphic-logo {max-height: 200px;padding-bottom: 0;max-width: 100%;}
|
210 |
.section-body,
|