Coming soon and Maintenance mode - Version 3.5.3

Version Description

=

  • Fixed issues (sanitized,escaped).

Step by step guide

Logo

  • Show logo - Choose to show or hide your logo.
  • Logo - Click "Upload" button to upload your logo.
  • Logo position - Here you can choose your logo position(Left, Center, Right).
  • Distance from top - Type here your logo distance from top.
  • Logo Animation type - Choose animation type for your logo.
  • Animation waiting time - Type here waiting time for Logo animation(in milliseconds).
  • Logo max width - Type here your website logo maximum width.
  • Logo max height - Type here your website logo maximum height.

Title

  • Show title - Choose to show or hide your Title.
  • Title - Type here the Title.
  • Title color - Select the title color.
  • Title Font Size - Type here title font size.
  • Title Font family - Choose the font family for title.
  • Title position - Choose Title position(Left, Center, Right).
  • Distance from top - Type here Title field distance from top.
  • Title Animation type - Choose animation type for Title.
  • Animation waiting time - Type here Title animation waiting time(in milliseconds).

Message

  • Show Message - Choose to show or hide Message box.
  • Message - Type here message for under construction page(you can use WordPress posts/pages default editor).
  • Message position - Choose position for Message box(Left, Center, Right).
  • Distance from top - Type here Message box distance from top.
  • Message Animation type - Choose animation type for Message box.
  • Animation waiting time - Type here waiting time for Message box animation(in milliseconds).

Countdown

  • Show/hide - Choose to show or hide.
  • Text for Day field - Type here default text for Day field.
  • Text for Hour field - Type here default text for Hour field.
  • Text for Minute field - Type here default text for Minute field.
  • Text for Second field - Type here default text for Second field.
  • Countdown date - Type here the Countdown time(days, hour), then select the Countdown start date.
  • After Countdown expired - Choose what will happens with Under construction page when Countdown expired(Disable coming soon or only hide Countdown).
  • Position - Choose the position(Left, Center, Right).
  • Distance from top - Type here the distance from top.
  • Animation type - Choose animation type.
  • Animation waiting time - Type here waiting time for animation(in milliseconds).
  • Buttons type - Choose the buttons type(button, circle, vertical slider)
  • Text color - Select the text color.
  • Background color - Select the background color.
  • Border radius - Type here the buttons border radius.
  • Size - Select the size.
  • Border width - Select the border width for circle buttons(only appears when you choose Countdown circle buttons).
  • Font-size - Type here the countdown text font-size.
  • Font family - Select the text Font family.

Progress bar

  • Show Progress bar - Choose to show or hide Progress bar.
  • Progress bar percentage - Here you can select Progress bar percentage.
  • Width - Type here Progress bar width.
  • Progress bar position - Choose position for Progress bar(Left, Center, Right).
  • Distance from top - Type here Progress bar distance from top.
  • Progress bar load color - Select progress bar load color.
  • Border color - Select Progress bar border color.
  • Border width - Choose progress bar border width.
  • Border radius - Choose progress bar border radius.
  • Animation type - Choose animation type for Progress bar.
  • Animation waiting time - Type here waiting time for Progress bar animation(in milliseconds).

Subscribe (Mailing list)

  • Show the Form - Choose to show or hide Subscribe Form.
  • User First name text - Type here text for user first name field.
  • User Last name text - Type here text for user last name field.
  • Email field text - Type here text for email field.
  • Send button text - Type here the Send button text.
  • Success email text - Type here the text that will appear after users submit the correct email.
  • Existing email text - Type here the text that will appear after users type already submitted email.
  • Blank email field text - Type here the text that will appear after users submit a blank field.
  • Invalid email text - Type here the text that will appear after users submit invalid email.
  • Subscribe Form position - Choose position for Subscribe Form(Left, Center, Right).
  • Distance from top - Type here Subscribe Form distance from top.
  • Font Size - Type here font size for all texts in Subscribe Form.
  • Email field border radius - Type here border radius for email field.
  • Input max width - Type here max with for input field.
  • Font family - Type here font family for all texts in Subscribe Form.
  • Input field border color - Select the input field border color.
  • Placeholder text color - Select default text color for input fields.
  • Send button bg color - Select the send button background color.
  • Send button text color - Select the send button text color.
  • Input field text color - Select the input field text color.
  • After submit text color - Select color of the text, that will appear after submit.
  • Animation type - Choose animation type for Subscribe Form.
  • Animation waiting time - Type here waiting time for Subscribe Form animation(in milliseconds).

Social buttons

  • Show social buttons - Choose to show or hide social buttons.
  • Facebook url - Type here Facebook url.
  • Facebook img url - Type here Facebook icon url or upload it.
  • Twitter url - Type here Twitter url.
  • Twitter img url - Type here Twitter icon url or upload it.
  • YouTube url - Type here YouTube url.
  • YouTube img url - Type here YouTube icon url or upload it.
  • Instagram url - Type here Instagram url.
  • Instagram img url - Type here Instagram icon url or upload it.
  • Social buttons position - Choose position for Social buttons(Left, Center, Right).
  • Distance from top - Type here Social buttons distance from top.
  • Animation type - Choose animation type for Social buttons.
  • Animation waiting time - Type here waiting time for Social buttons animation(in milliseconds).
  • Social buttons max width - Type here maximum width for Social buttons.
  • Social buttons max height - Type here maximum height for Social buttons.

Link To Admin

  • Show - Choose to show or hide Link To Admin.
  • Link To Admin text - Type here Link To Admin text.
  • Text color - Choose text color.
  • Font Size - Type here text Font Size.
  • Font family - Select Font family for Link To Admin.
  • Link To Admin position - Choose position for Link To Admin(Left, Center, Right).
  • Distance from top - Type here Link To Admin distance from top.
  • Animation type - Choose animation type for Link To Admin.
  • Animation waiting time - Type here waiting time for Link To Admin animation(in milliseconds).

Content

  • Content position - Choose content position(Left top, Left middle, Left bottom, Center top, Center middle, Center bottom, Right top, Right middle, Right bottom).
  • Content bg color - Select content background color.
  • Content transparency - Select transparency for content.
  • Border radius - Type here border radius for content.
  • Content max width - Type here content maximum width.
  • Padding - Type here content padding value(padding properties define the space between the element border and the element content).
  • Margin - Type here content margin value(margin properties define the space around elements).
  • Elements ordering - Choose the order of showing elements(you can move all elements using drop down functionality).

Background

  • Background type - Select the background type you want to use.
  • Set color - Select the background color(option will appear if you choose "Background color" type).
  • Img url - Type the image url or just upload images for background(option will appear if you choose "Background image" type).
  • Slider img urls - Type the image urls or just upload images for Background Slider(option will appear if you choose "Background Slider" type).
  • YouTube video id - Type YouTube video Id, for example if YouTube video full url is "https://www.youtube.com/watch?v=0AqnCSdkjQ0", then you just need to type here "0AqnCSdkjQ0" (option will appear if you choose "YouTube Background" type).
  • Video Sound - Choose mute or unmute background video(option will appear if you choose "YouTube Background" type).

Except pages and IPs

  • Disable the plugin for this ips - You can disable the plugin for this ips, just type the ip and click anywhere, then type the next ip in next field that will appear.
  • Disable the plugin for this urls - You can disable the plugin for this urls, just type the url and click anywhere, then type the next url in next field that will appear.

Search engine and Favicon

  • Title(SEO) - Type here the Title for Search engines(It will be visible for search engines).
  • Favicon - Here you can upload favicon.
  • Enable Search Robots - Here you can enable or disable coming soon page for search robots(If you disable this option then your website will disappear from search engines).
  • Meta Keywords - Type here meta keywords.
  • Meta Description - Type here meta description.

Subscribers page

On this page you can view subscribed users emails. You can copy emails list and send emails using Gmail or other email services. You can remove emails from email list as well.

Send Mail all subscribed Users - Send Mail to all subscribed Users All fields are required - All fields are required

  • Your display Email - Type here the Display Email address, your users will see it when you send them email.
  • Your display Name - Type here name(company or website name) that your users will see when you send them email.
  • Message title - Type here message title.
  • Message - Type here message text.

All fields required, so fill all fields and click on send button, that's all.

Download this release

Release Info

Developer wpdevart
Plugin Icon 128x128 Coming soon and Maintenance mode
Version 3.5.3
Comparing to
See all releases

Code changes from version 3.5.2 to 3.5.3

Files changed (4) hide show
  1. coming_soon.php +1 -1
  2. includes/admin_menu.php +9 -3
  3. includes/front_end.php +323 -339
  4. readme.txt +6 -2
coming_soon.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wpdevart.com/wordpress-coming-soon-plugin/
5
  * Author URI: https://wpdevart.com
6
  * Description: Coming soon and Maintenance mode plugin is awesome tool to show your users that you are working on your website to make it better. Our coming soon plugin is the best way to create better coming soon page.
7
- * Version: 3.5.2
8
  * Author: wpdevart
9
  * License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
4
  * Plugin URI: https://wpdevart.com/wordpress-coming-soon-plugin/
5
  * Author URI: https://wpdevart.com
6
  * Description: Coming soon and Maintenance mode plugin is awesome tool to show your users that you are working on your website to make it better. Our coming soon plugin is the best way to create better coming soon page.
7
+ * Version: 3.5.3
8
  * Author: wpdevart
9
  * License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
includes/admin_menu.php CHANGED
@@ -94,6 +94,7 @@ class coming_soon_admin_menu{
94
  $kk=1;
95
 
96
  if(isset($_POST['coming_soon_options_nonce']) && wp_verify_nonce( $_POST['coming_soon_options_nonce'],'coming_soon_options_nonce')){
 
97
  foreach($this->databese_parametrs[$_POST['curent_page']] as $key => $value){
98
  if(isset($_POST[$key])){
99
  if(strpos($key, 'message') !== false){
@@ -1856,7 +1857,8 @@ class coming_soon_admin_menu{
1856
  if($mailing_lists==NULL)
1857
  $mailing_lists=array();
1858
  if(isset($_GET['id']) && isset($_GET['task']) && $_GET['task']=='remove_user'){
1859
- unset($mailing_lists[$_GET['id']]);
 
1860
  update_option('users_mailer',json_encode($mailing_lists));
1861
  }
1862
  ?>
@@ -1966,8 +1968,12 @@ class coming_soon_admin_menu{
1966
  foreach($mailing_lists as $key => $mail){
1967
  array_push($mails_array,$key);
1968
  }
1969
- $headers='From: '.$_POST['massage_from_name'].' <'.$_POST['massage_from_mail'].'>' . "\r\n";
1970
- $send=wp_mail( $mails_array, $_POST['massage_title'], $_POST['massage_description'],$headers);
 
 
 
 
1971
  if(!$send){
1972
  die($this->text_parametrs['error_maied']);
1973
  }
94
  $kk=1;
95
 
96
  if(isset($_POST['coming_soon_options_nonce']) && wp_verify_nonce( $_POST['coming_soon_options_nonce'],'coming_soon_options_nonce')){
97
+ $curent_page = sanitize_text_field($_POST['curent_page']);
98
  foreach($this->databese_parametrs[$_POST['curent_page']] as $key => $value){
99
  if(isset($_POST[$key])){
100
  if(strpos($key, 'message') !== false){
1857
  if($mailing_lists==NULL)
1858
  $mailing_lists=array();
1859
  if(isset($_GET['id']) && isset($_GET['task']) && $_GET['task']=='remove_user'){
1860
+ $get_id = intval($_GET['id']);
1861
+ unset($mailing_lists[$get_id]);
1862
  update_option('users_mailer',json_encode($mailing_lists));
1863
  }
1864
  ?>
1968
  foreach($mailing_lists as $key => $mail){
1969
  array_push($mails_array,$key);
1970
  }
1971
+ $headers_from = sanitize_text_field($_POST['massage_from_mail']);
1972
+ $message_description = sanitize_text_field($_POST['massage_description']);
1973
+ $message_from_name = sanitize_text_field($_POST['massage_from_name']);
1974
+ $message_title = sanitize_text_field($_POST['massage_title']);
1975
+ $headers='From: '.$message_from_name.' <'.$headers_from.'>' . "\r\n";
1976
+ $send=wp_mail( $mails_array, $message_title, $message_description,$headers);
1977
  if(!$send){
1978
  die($this->text_parametrs['error_maied']);
1979
  }
includes/front_end.php CHANGED
@@ -1,113 +1,111 @@
1
- <?php
2
 
3
- /*############ Coming soon Front-end Code ################*/
4
 
5
- class coming_soon_front_end{
6
  private $menu_name;
7
  private $plugin_url;
8
  private $databese_parametrs;
9
  private $params;
10
  private $list_of_animations;
11
 
12
- /*############ Construct parameters function ################*/
13
-
14
- function __construct($params){
15
-
16
- $this->menu_name=$params['menu_name'];
17
- $this->databese_parametrs=$params['databese_parametrs'];
18
- if(isset($params['plugin_url']))
19
- $this->plugin_url=$params['plugin_url'];
20
  else
21
- $this->plugin_url=trailingslashit(dirname(plugins_url('',__FILE__)));
22
-
23
- add_action( 'wp_ajax_coming_soon_page_save_user_mail', array($this,'save_mailing_list') );
24
- add_action( 'wp_ajax_nopriv_coming_soon_page_save_user_mail', array($this,'save_mailing_list') );
25
- $this->params=$this->generete_params();
26
  }
27
-
28
- /*############ Generate parameters function ################*/
29
-
30
- private function generete_params(){
31
-
32
- foreach($this->databese_parametrs as $param_array_key => $param_value){
33
- foreach($this->databese_parametrs[$param_array_key] as $key => $value){
34
- $front_end_parametrs[$key]=get_option($key,$value);
 
 
 
 
35
  }
36
- }
37
-
38
  return $front_end_parametrs;
39
-
40
-
41
-
42
  }
43
 
44
- /*############ Create Front-end function ################*/
45
-
46
- public function create_fornt_end(){
47
- if($this->params['coming_soon_page_mode']=='on'){
48
- //If user doesn't logged in, then the page will automatically redirect him to the Coming soon page
49
- if ( (!is_user_logged_in() && !$this->is_in_except()) || (isset($_GET['special_variable_for_live_previev']) && $_GET['special_variable_for_live_previev']=='sdfg564sfdh645fds4ghs515vsr5g48strh846sd6g41513btsd') )
50
- {
51
- //Get path of the Coming Soon display page and then do a redirect
52
- $this->generete_front_end_html();
53
- exit();
54
- }
55
-
56
- }
57
- else
58
- if((isset($_GET['special_variable_for_live_previev']) && $_GET['special_variable_for_live_previev']=='sdfg564sfdh645fds4ghs515vsr5g48strh846sd6g41513btsd')){
59
  $this->generete_front_end_html();
60
- exit();
61
  }
62
-
63
  }
64
-
65
  /*############################### Generating Front-end ################################*/
66
-
67
- public function generete_front_end_html(){
68
- ?><!DOCTYPE html>
 
69
  <html>
70
- <head>
71
- <meta charset="utf-8">
72
- <title><?php echo $this->params['coming_soon_page_page_seo_title']; ?></title>
73
- <meta name="viewport" content="width=device-width" />
74
- <meta name="viewport" content="initial-scale=1.0" />
75
- <meta name="robots" content="<?php if((int)$this->params['coming_soon_page_enable_search_robots']) echo "index, follow"; else echo "noindex, nofollow"; ?>" />
76
- <meta name="description" content="<?php echo $this->params['coming_soon_page_meta_description']; ?>">
77
- <meta name="keywords" content="<?php echo $this->params['coming_soon_page_meta_keywords']; ?>">
78
- <?php
79
- wp_print_scripts('jquery');
80
- wp_print_scripts('coming-soon-script');
81
- wp_print_styles('coming-soon-style');
82
- $this->generete_front_styles();
83
- $this->generete_front_javascript();
84
- ?>
85
- </head>
86
- <body>
87
- <?php $this->content_html(); ?>
88
- </body>
89
- </html><?php
90
- }
91
-
92
- /*############ Generate Front-end JavaScript ################*/
93
-
94
- private function generete_front_javascript(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  ?>
96
- <script type="text/javascript">
97
- var loading_gif_url="<?php echo $this->plugin_url.'images/loading.gif' ?>";
98
- var coming_soon_ajax_mail_url="<?php echo admin_url( 'admin-ajax.php?action=coming_soon_page_save_user_mail' ); ?>";
99
- var curen_site_home_page="<?php echo site_url(); ?>";
100
- var animation_parametrs=[]
101
-
102
- </script>
103
- <?php
104
-
105
- }
106
-
107
- /*############ Front-end styles function ################*/
108
-
109
- private function generete_front_styles(){
110
- ?>
111
  <style>
112
  <?php
113
  $this->background_css();
@@ -119,269 +117,255 @@ class coming_soon_front_end{
119
  $this->generete_message_footer_css();
120
 
121
  ?>
122
- </style>
123
- <?php
124
- }
 
125
 
 
126
 
127
- /*############################################# Except Page/Post, IP Function #################################################*/
 
 
 
 
128
 
129
- private function is_in_except(){
130
- $only_for_home=false;
131
- $ips=json_decode(stripslashes($this->params['coming_soon_page_showed_ips']), true);
132
- if(!$ips)
133
- $ips=array();
134
-
135
- if($this->params['coming_soon_enable_only_for_home']=='1'){
136
- if(is_front_page() || is_home()){
137
- $only_for_home=true;
138
  }
139
- }
140
- $in_list = in_array($this->get_real_ip(), $ips) || $only_for_home;
141
- if($in_list)
142
- return true;
143
- return false;
144
- }
145
-
146
- /*############ Get IP function ################*/
147
-
148
- private function get_real_ip() {
149
- $ipaddress = '';
150
- if (isset($_SERVER['HTTP_INCAP_CLIENT_IP']) && $_SERVER['HTTP_INCAP_CLIENT_IP'])
151
- $ipaddress = $_SERVER['HTTP_INCAP_CLIENT_IP'];
152
- else if(isset($_SERVER['HTTP_CLIENT_IP']) && $_SERVER['HTTP_CLIENT_IP'])
153
- $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
154
- else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'])
155
- $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
156
- else if(isset($_SERVER['HTTP_X_FORWARDED']) && $_SERVER['HTTP_X_FORWARDED'])
157
- $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
158
- else if(isset($_SERVER['HTTP_FORWARDED_FOR']) && $_SERVER['HTTP_FORWARDED_FOR'])
159
- $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
160
- else if(isset($_SERVER['HTTP_FORWARDED']) && $_SERVER['HTTP_FORWARDED'])
161
- $ipaddress = $_SERVER['HTTP_FORWARDED'];
162
- else if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'])
163
- $ipaddress = $_SERVER['REMOTE_ADDR'];
164
- else
165
- $ipaddress = 'UNKNOWN';
166
- return $ipaddress;
167
- }
168
-
169
- /*############################################################ Background Function ######################################################*/
170
-
171
- private function background_css(){
172
- switch($this->params['coming_soon_page_radio_backroun']){
173
- case 'back_color' :
174
- echo 'body{ background-color:'.$this->params['coming_soon_page_background_color'].'; }';
175
- break;
176
- case 'back_imge' :
177
- echo 'body{ background:url("'.$this->params['coming_soon_page_background_img'].'") no-repeat center center fixed; }';
178
- break;
179
-
180
- }
181
- }
182
 
183
-
184
- /*#################################################################### Content Function ##########################################################*/
185
-
186
- private function content_html(){
187
- // content conteiner
188
- echo '<div id="main_inform_div"><span class="aligment"><div class="information"><center>';
189
- $this->create_logo_html();
190
- $this->create_title_html();
191
- $this->create_message_html();
192
- $this->create_socialis_html();
193
- $this->create_message_footer_html();
194
- // Close the content container
195
- echo '</center></div></span></div> ';
196
- }
197
-
198
- /*############ Content CSS function ################*/
199
-
200
- private function content_css(){
201
- $aligment_position='text-align:center; vertical-align:middle;';
202
- echo ".information{ background: rgba(255,255,255,0.55); border-radius:8px; max-width:740px; padding-right:10px;padding-left:10px;padding-bottom:10px; }\r\n";
203
- echo ".aligment{".$aligment_position.";}\r\n";
204
- echo "#main_inform_div{padding:15px;}\r\n";
205
-
206
-
207
- }
208
-
209
- /*############ Content Java-script function ################*/
210
-
211
- private function content_javascript(){
212
- }
213
- /*######################################################################## Logo Function ##############################################################*/
214
- private function create_logo_html(){
215
- if($this->params['coming_soon_page_logo_enable']){
216
- ?><div id="logo" >
217
- <img id="logo_img" src="<?php echo stripslashes($this->params['coming_soon_page_page_logo']); ?>" />
218
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  <?php }
220
- }
221
-
222
- /*############ Generate Logo function ################*/
223
-
224
- private function generete_logo_css(){
225
- echo '#logo{margin-top:10px;text-align:center;}';
226
- echo '#logo img{max-height:210px;max-width:100%;}';
227
 
228
- }
229
- private function generete_logo_javascript(){
230
- }
231
- /*################################################################################### Title function ###########################################################################*/
232
- private function create_title_html(){
233
- if($this->params['coming_soon_page_title_enable']){
 
 
 
 
 
234
  ?>
235
- <div id="title_style" >
236
- <h1 id="title_h1"><?php echo stripslashes($this->params['coming_soon_page_page_title']) ?></h1>
237
- </div>
238
- <?php
239
- }
240
- }
241
-
242
- /*################################################################################### Generate Title CSS Function ###########################################################################*/
243
-
244
- private function generete_title_css(){
245
- echo '#title_style{margin-top:10px;text-align:center;}';
246
- echo '#title_h1{font-family:Times New Roman,Times,Georgia,serif;font-size:55px;color:#000000;}';
247
-
248
- }
249
-
250
- /*################################################################################### Generate title JS function ###########################################################################*/
251
-
252
- private function generete_title_javascript(){
253
-
254
- }
255
- /*################################################################################### Message Box function ###########################################################################*/
256
- private function create_message_html(){
257
- if($this->params['coming_soon_page_message_enable']){
258
  ?>
259
- <div id="descrip">
260
- <?php echo stripslashes($this->params['coming_soon_page_page_message']) ?>
261
- </div>
262
-
263
- <?php
264
- }
265
- }
266
- private function generete_message_css(){
267
- echo '#descrip{margin-top:10px;text-align:center;}';
268
-
269
- }
270
- private function generete_message_javascript(){
271
-
272
- }
273
- /*################################################################################### Message Footer ###########################################################################*/
274
- private function create_message_footer_html(){
275
- if($this->params['coming_soon_page_message_footer_enable']=='1'){
276
  ?>
277
- <div id="descrip_footer">
278
- <?php echo stripslashes($this->params['coming_soon_page_page_message_footer']) ?>
279
- </div>
280
-
281
- <?php
282
- }
283
- }
284
-
285
- /*############# Footer message function ################*/
286
-
287
- private function generete_message_footer_css(){
288
- echo '#descrip_footer{margin-top:'.$this->params['coming_soon_page_message_footer_top_distance'].'px;text-align:'.$this->text_align($this->params['coming_soon_page_message_footer_in_content_position']).';}';
289
-
290
- }
291
-
292
- /*############# Footer JS function ################*/
293
-
294
- private function generete_message_footer_javascript(){
295
- }
296
-
297
-
298
 
299
- /*################################################################################### Social Buttons function ###########################################################################*/
300
- private function create_socialis_html(){
301
- if($this->params['coming_soon_page_socialis_enable']){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  ?>
303
- <div id="soc_icons" class="soc_icon_coneiner">
304
- <?php if($this->params['coming_soon_page_facebook']){ ?>
305
- <span class="soc_icon">
306
- <a href="<?php echo $this->params['coming_soon_page_facebook']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe']?' target="_blank" ':''; ?>><img src="<?php echo $this->plugin_url.'images/template1/facebook.png'; ?>" /></a>
307
- </span>
308
- <?php } ?>
309
- <?php if($this->params['coming_soon_page_twitter']){ ?>
310
- <span class="soc_icon">
311
- <a href="<?php echo $this->params['coming_soon_page_twitter']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe']?' target="_blank" ':''; ?>><img src="<?php echo $this->plugin_url.'images/template1/twiter.png'; ?>" /></a>
312
- </span>
313
- <?php } ?>
314
- <?php if($this->params['coming_soon_page_youtube']){ ?>
315
- <span class="soc_icon">
316
- <a href="<?php echo $this->params['coming_soon_page_youtube']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe']?' target="_blank" ':''; ?>><img src="<?php echo $this->plugin_url.'images/template1/youtobe.png'; ?>" /></a>
317
- </span>
318
- <?php } ?>
319
- <?php if($this->params['coming_soon_page_instagram']){ ?>
320
- <span class="soc_icon">
321
- <a href="<?php echo $this->params['coming_soon_page_instagram']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe']?' target="_blank" ':''; ?>><img src="<?php echo $this->plugin_url.'images/template1/instagram.png'; ?>" /></a>
322
- </span>
323
- <?php } ?>
324
- </div>
325
- <?php
326
- }
327
- }
328
- private function generete_socialis_css(){
329
- echo '#soc_icons{text-align:center;}';
330
- echo '#soc_icons img{margin-top:10px; }';
331
-
332
- }
333
- private function generete_socialis_javascript(){
334
- }
335
 
336
- private function darkest_brigths($color,$pracent){
337
- $new_color=$color;
338
- if(!(strlen($new_color==6) || strlen($new_color)==7))
339
- {
340
- return $color;
341
- }
342
- $color_vandakanishov=strpos($new_color,'#');
343
- if($color_vandakanishov == false) {
344
- $new_color= str_replace('#','',$new_color);
345
- }
346
- $color_part_1=substr($new_color, 0, 2);
347
- $color_part_2=substr($new_color, 2, 2);
348
- $color_part_3=substr($new_color, 4, 2);
349
- $color_part_1=dechex( (int) (hexdec( $color_part_1 ) - (hexdec( $color_part_1 )* $pracent / 100 )));
350
- $color_part_2=dechex( (int) (hexdec( $color_part_2) - (( ( hexdec( $color_part_2 ) ) ) * $pracent / 100 )));
351
- $color_part_3=dechex( (int) (hexdec( $color_part_3 ) - (( ( hexdec( $color_part_3 ) ) ) * $pracent / 100 )));
352
- if(strlen($color_part_1)<2) $color_part_1="0".$color_part_1;
353
- if(strlen($color_part_2)<2) $color_part_2="0".$color_part_2;
354
- if(strlen($color_part_3)<2) $color_part_3="0".$color_part_3;
355
-
356
- $new_color=$color_part_1.$color_part_2.$color_part_3;
357
- if($color_vandakanishov == false){
358
- return $new_color;
359
- }
360
- else{
361
- return '#'.$new_color;
362
- }
363
 
364
- }
365
- /*###################################### ANOTHER IMPORTANT FUNCTIONS OF COMING SOON PLUGIN ####################################*/
366
- private function text_align($value){
367
- switch($value){
368
- case '0':
369
- case 0 :
370
- return 'left';
371
- break;
372
- case '1':
373
- case 1 :
374
- return 'center';
375
- break;
376
- case '2':
377
- case 2 :
378
- return 'right';
379
- break;
380
- }
381
- return $value;
382
- }
383
-
384
- }
 
 
 
 
 
385
 
386
 
387
 
1
+ <?php
2
 
3
+ /*############ Coming soon Front-end Code ################*/
4
 
5
+ class coming_soon_front_end {
6
  private $menu_name;
7
  private $plugin_url;
8
  private $databese_parametrs;
9
  private $params;
10
  private $list_of_animations;
11
 
12
+ /*############ Construct parameters function ################*/
13
+
14
+ function __construct($params) {
15
+
16
+ $this->menu_name = $params['menu_name'];
17
+ $this->databese_parametrs = $params['databese_parametrs'];
18
+ if (isset($params['plugin_url']))
19
+ $this->plugin_url = $params['plugin_url'];
20
  else
21
+ $this->plugin_url = trailingslashit(dirname(plugins_url('', __FILE__)));
22
+ $this->params = $this->generete_params();
 
 
 
23
  }
24
+
25
+ /*############ Generate parameters function ################*/
26
+
27
+ private function generete_params() {
28
+
29
+ foreach ($this->databese_parametrs as $param_array_key => $param_value) {
30
+ foreach ($this->databese_parametrs[$param_array_key] as $key => $value) {
31
+ if (strpos($key, 'message') !== false) {
32
+ $front_end_parametrs[$key] = wp_filter_post_kses(get_option($key, $value));
33
+ } else {
34
+ $front_end_parametrs[$key] = esc_html(get_option($key, $value));
35
+ }
36
  }
37
+ }
38
+
39
  return $front_end_parametrs;
 
 
 
40
  }
41
 
42
+ /*############ Create Front-end function ################*/
43
+
44
+ public function create_fornt_end() {
45
+ if ($this->params['coming_soon_page_mode'] == 'on') {
46
+ //If user doesn't logged in, then the page will automatically redirect him to the Coming soon page
47
+ if ((!is_user_logged_in() && !$this->is_in_except()) || (isset($_GET['special_variable_for_live_previev']) && $_GET['special_variable_for_live_previev'] == 'sdfg564sfdh645fds4ghs515vsr5g48strh846sd6g41513btsd')) {
48
+ //Get path of the Coming Soon display page and then do a redirect
49
+ $this->generete_front_end_html();
50
+ exit();
51
+ }
52
+ } else
53
+ if ((isset($_GET['special_variable_for_live_previev']) && $_GET['special_variable_for_live_previev'] == 'sdfg564sfdh645fds4ghs515vsr5g48strh846sd6g41513btsd')) {
 
 
 
54
  $this->generete_front_end_html();
55
+ exit();
56
  }
 
57
  }
58
+
59
  /*############################### Generating Front-end ################################*/
60
+
61
+ public function generete_front_end_html() {
62
+ ?>
63
+ <!DOCTYPE html>
64
  <html>
65
+
66
+ <head>
67
+ <meta charset="utf-8">
68
+ <title><?php echo $this->params['coming_soon_page_page_seo_title']; ?></title>
69
+ <meta name="viewport" content="width=device-width" />
70
+ <meta name="viewport" content="initial-scale=1.0" />
71
+ <meta name="robots" content="<?php if ((int)$this->params['coming_soon_page_enable_search_robots']) echo "index, follow";
72
+ else echo "noindex, nofollow"; ?>" />
73
+ <meta name="description" content="<?php echo $this->params['coming_soon_page_meta_description']; ?>">
74
+ <meta name="keywords" content="<?php echo $this->params['coming_soon_page_meta_keywords']; ?>">
75
+ <?php
76
+ wp_print_scripts('jquery');
77
+ wp_print_scripts('coming-soon-script');
78
+ wp_print_styles('coming-soon-style');
79
+ $this->generete_front_styles();
80
+ $this->generete_front_javascript();
81
+ ?>
82
+ </head>
83
+
84
+ <body>
85
+ <?php $this->content_html(); ?>
86
+ </body>
87
+
88
+ </html><?php
89
+ }
90
+
91
+ /*############ Generate Front-end JavaScript ################*/
92
+
93
+ private function generete_front_javascript() {
94
+ ?>
95
+ <script type="text/javascript">
96
+ var loading_gif_url = "<?php echo $this->plugin_url . 'images/loading.gif' ?>";
97
+ var coming_soon_ajax_mail_url = "<?php echo admin_url('admin-ajax.php?action=coming_soon_page_save_user_mail'); ?>";
98
+ var curen_site_home_page = "<?php echo site_url(); ?>";
99
+ var animation_parametrs = []
100
+ </script>
101
+ <?php
102
+
103
+ }
104
+
105
+ /*############ Front-end styles function ################*/
106
+
107
+ private function generete_front_styles() {
108
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  <style>
110
  <?php
111
  $this->background_css();
117
  $this->generete_message_footer_css();
118
 
119
  ?>
120
+ </style>
121
+ <?php
122
+ }
123
+
124
 
125
+ /*############################################# Except Page/Post, IP Function #################################################*/
126
 
127
+ private function is_in_except() {
128
+ $only_for_home = false;
129
+ $ips = json_decode(stripslashes($this->params['coming_soon_page_showed_ips']), true);
130
+ if (!$ips)
131
+ $ips = array();
132
 
133
+ if ($this->params['coming_soon_enable_only_for_home'] == '1') {
134
+ if (is_front_page() || is_home()) {
135
+ $only_for_home = true;
136
+ }
137
+ }
138
+ $in_list = in_array($this->get_real_ip(), $ips) || $only_for_home;
139
+ if ($in_list)
140
+ return true;
141
+ return false;
142
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
+ /*############ Get IP function ################*/
145
+
146
+ private function get_real_ip() {
147
+ $ipaddress = '';
148
+ if (isset($_SERVER['HTTP_INCAP_CLIENT_IP']) && $_SERVER['HTTP_INCAP_CLIENT_IP'])
149
+ $ipaddress = $_SERVER['HTTP_INCAP_CLIENT_IP'];
150
+ else if (isset($_SERVER['HTTP_CLIENT_IP']) && $_SERVER['HTTP_CLIENT_IP'])
151
+ $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
152
+ else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'])
153
+ $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
154
+ else if (isset($_SERVER['HTTP_X_FORWARDED']) && $_SERVER['HTTP_X_FORWARDED'])
155
+ $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
156
+ else if (isset($_SERVER['HTTP_FORWARDED_FOR']) && $_SERVER['HTTP_FORWARDED_FOR'])
157
+ $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
158
+ else if (isset($_SERVER['HTTP_FORWARDED']) && $_SERVER['HTTP_FORWARDED'])
159
+ $ipaddress = $_SERVER['HTTP_FORWARDED'];
160
+ else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'])
161
+ $ipaddress = $_SERVER['REMOTE_ADDR'];
162
+ else
163
+ $ipaddress = 'UNKNOWN';
164
+ return $ipaddress;
165
+ }
166
+
167
+ /*############################################################ Background Function ######################################################*/
168
+
169
+ private function background_css() {
170
+ switch ($this->params['coming_soon_page_radio_backroun']) {
171
+ case 'back_color':
172
+ echo 'body{ background-color:' . $this->params['coming_soon_page_background_color'] . '; }';
173
+ break;
174
+ case 'back_imge':
175
+ echo 'body{ background:url("' . $this->params['coming_soon_page_background_img'] . '") no-repeat center center fixed; }';
176
+ break;
177
+ }
178
+ }
179
+
180
+
181
+ /*#################################################################### Content Function ##########################################################*/
182
+
183
+ private function content_html() {
184
+ // content conteiner
185
+ echo '<div id="main_inform_div"><span class="aligment"><div class="information"><center>';
186
+ $this->create_logo_html();
187
+ $this->create_title_html();
188
+ $this->create_message_html();
189
+ $this->create_socialis_html();
190
+ $this->create_message_footer_html();
191
+ // Close the content container
192
+ echo '</center></div></span></div> ';
193
+ }
194
+
195
+ /*############ Content CSS function ################*/
196
+
197
+ private function content_css() {
198
+ $aligment_position = 'text-align:center; vertical-align:middle;';
199
+ echo ".information{ background: rgba(255,255,255,0.55); border-radius:8px; max-width:740px; padding-right:10px;padding-left:10px;padding-bottom:10px; }\r\n";
200
+ echo ".aligment{" . $aligment_position . ";}\r\n";
201
+ echo "#main_inform_div{padding:15px;}\r\n";
202
+ }
203
+
204
+ /*############ Content Java-script function ################*/
205
+
206
+ private function content_javascript() {
207
+ }
208
+ /*######################################################################## Logo Function ##############################################################*/
209
+ private function create_logo_html() {
210
+ if ($this->params['coming_soon_page_logo_enable']) {
211
+ ?><div id="logo">
212
+ <img id="logo_img" src="<?php echo stripslashes($this->params['coming_soon_page_page_logo']); ?>" />
213
+ </div>
214
  <?php }
215
+ }
 
 
 
 
 
 
216
 
217
+ /*############ Generate Logo function ################*/
218
+
219
+ private function generete_logo_css() {
220
+ echo '#logo{margin-top:10px;text-align:center;}';
221
+ echo '#logo img{max-height:210px;max-width:100%;}';
222
+ }
223
+ private function generete_logo_javascript() {
224
+ }
225
+ /*################################################################################### Title function ###########################################################################*/
226
+ private function create_title_html() {
227
+ if ($this->params['coming_soon_page_title_enable']) {
228
  ?>
229
+ <div id="title_style">
230
+ <h1 id="title_h1"><?php echo stripslashes($this->params['coming_soon_page_page_title']) ?></h1>
231
+ </div>
232
+ <?php
233
+ }
234
+ }
235
+
236
+ /*################################################################################### Generate Title CSS Function ###########################################################################*/
237
+
238
+ private function generete_title_css() {
239
+ echo '#title_style{margin-top:10px;text-align:center;}';
240
+ echo '#title_h1{font-family:Times New Roman,Times,Georgia,serif;font-size:55px;color:#000000;}';
241
+ }
242
+
243
+ /*################################################################################### Generate title JS function ###########################################################################*/
244
+
245
+ private function generete_title_javascript() {
246
+ }
247
+ /*################################################################################### Message Box function ###########################################################################*/
248
+ private function create_message_html() {
249
+ if ($this->params['coming_soon_page_message_enable']) {
 
 
250
  ?>
251
+ <div id="descrip">
252
+ <?php echo stripslashes($this->params['coming_soon_page_page_message']) ?>
253
+ </div>
254
+
255
+ <?php
256
+ }
257
+ }
258
+ private function generete_message_css() {
259
+ echo '#descrip{margin-top:10px;text-align:center;}';
260
+ }
261
+ private function generete_message_javascript() {
262
+ }
263
+ /*################################################################################### Message Footer ###########################################################################*/
264
+ private function create_message_footer_html() {
265
+ if ($this->params['coming_soon_page_message_footer_enable'] == '1') {
 
 
266
  ?>
267
+ <div id="descrip_footer">
268
+ <?php echo stripslashes($this->params['coming_soon_page_page_message_footer']) ?>
269
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
 
271
+ <?php
272
+ }
273
+ }
274
+
275
+ /*############# Footer message function ################*/
276
+
277
+ private function generete_message_footer_css() {
278
+ echo '#descrip_footer{margin-top:' . $this->params['coming_soon_page_message_footer_top_distance'] . 'px;text-align:' . $this->text_align($this->params['coming_soon_page_message_footer_in_content_position']) . ';}';
279
+ }
280
+
281
+ /*############# Footer JS function ################*/
282
+
283
+ private function generete_message_footer_javascript() {
284
+ }
285
+
286
+
287
+
288
+ /*################################################################################### Social Buttons function ###########################################################################*/
289
+ private function create_socialis_html() {
290
+ if ($this->params['coming_soon_page_socialis_enable']) {
291
  ?>
292
+ <div id="soc_icons" class="soc_icon_coneiner">
293
+ <?php if ($this->params['coming_soon_page_facebook']) { ?>
294
+ <span class="soc_icon">
295
+ <a href="<?php echo $this->params['coming_soon_page_facebook']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe'] ? ' target="_blank" ' : ''; ?>><img src="<?php echo $this->plugin_url . 'images/template1/facebook.png'; ?>" /></a>
296
+ </span>
297
+ <?php } ?>
298
+ <?php if ($this->params['coming_soon_page_twitter']) { ?>
299
+ <span class="soc_icon">
300
+ <a href="<?php echo $this->params['coming_soon_page_twitter']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe'] ? ' target="_blank" ' : ''; ?>><img src="<?php echo $this->plugin_url . 'images/template1/twiter.png'; ?>" /></a>
301
+ </span>
302
+ <?php } ?>
303
+ <?php if ($this->params['coming_soon_page_youtube']) { ?>
304
+ <span class="soc_icon">
305
+ <a href="<?php echo $this->params['coming_soon_page_youtube']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe'] ? ' target="_blank" ' : ''; ?>><img src="<?php echo $this->plugin_url . 'images/template1/youtobe.png'; ?>" /></a>
306
+ </span>
307
+ <?php } ?>
308
+ <?php if ($this->params['coming_soon_page_instagram']) { ?>
309
+ <span class="soc_icon">
310
+ <a href="<?php echo $this->params['coming_soon_page_instagram']; ?>" <?php echo $this->params['coming_soon_page_open_new_tabe'] ? ' target="_blank" ' : ''; ?>><img src="<?php echo $this->plugin_url . 'images/template1/instagram.png'; ?>" /></a>
311
+ </span>
312
+ <?php } ?>
313
+ </div>
314
+ <?php
315
+ }
316
+ }
317
+ private function generete_socialis_css() {
318
+ echo '#soc_icons{text-align:center;}';
319
+ echo '#soc_icons img{margin-top:10px; }';
320
+ }
321
+ private function generete_socialis_javascript() {
322
+ }
 
323
 
324
+ private function darkest_brigths($color, $pracent) {
325
+ $new_color = $color;
326
+ if (!(strlen($new_color == 6) || strlen($new_color) == 7)) {
327
+ return $color;
328
+ }
329
+ $color_vandakanishov = strpos($new_color, '#');
330
+ if ($color_vandakanishov == false) {
331
+ $new_color = str_replace('#', '', $new_color);
332
+ }
333
+ $color_part_1 = substr($new_color, 0, 2);
334
+ $color_part_2 = substr($new_color, 2, 2);
335
+ $color_part_3 = substr($new_color, 4, 2);
336
+ $color_part_1 = dechex((int) (hexdec($color_part_1) - (hexdec($color_part_1) * $pracent / 100)));
337
+ $color_part_2 = dechex((int) (hexdec($color_part_2) - (((hexdec($color_part_2))) * $pracent / 100)));
338
+ $color_part_3 = dechex((int) (hexdec($color_part_3) - (((hexdec($color_part_3))) * $pracent / 100)));
339
+ if (strlen($color_part_1) < 2) $color_part_1 = "0" . $color_part_1;
340
+ if (strlen($color_part_2) < 2) $color_part_2 = "0" . $color_part_2;
341
+ if (strlen($color_part_3) < 2) $color_part_3 = "0" . $color_part_3;
 
 
 
 
 
 
 
 
 
342
 
343
+ $new_color = $color_part_1 . $color_part_2 . $color_part_3;
344
+ if ($color_vandakanishov == false) {
345
+ return $new_color;
346
+ } else {
347
+ return '#' . $new_color;
348
+ }
349
+ }
350
+ /*###################################### ANOTHER IMPORTANT FUNCTIONS OF COMING SOON PLUGIN ####################################*/
351
+ private function text_align($value) {
352
+ switch ($value) {
353
+ case '0':
354
+ case 0:
355
+ return 'left';
356
+ break;
357
+ case '1':
358
+ case 1:
359
+ return 'center';
360
+ break;
361
+ case '2':
362
+ case 2:
363
+ return 'right';
364
+ break;
365
+ }
366
+ return $value;
367
+ }
368
+ }
369
 
370
 
371
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wpdevart
3
  Donate link: https://wpdevart.com/wordpress-coming-soon-plugin/
4
  Tags: coming soon, wordpress coming soon, maintenance, maintenance mode, under construction
5
  Requires at least: 3.4.0
6
- Tested up to: 5.8
7
- Stable tag: 3.5.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -720,6 +720,10 @@ No dear users, you need to pay only once for pro version.
720
 
721
  * Bug fixed - Authenticated stored XSS vulnerability.
722
 
 
 
 
 
723
  ==Step by step guide==
724
 
725
  ### Logo
3
  Donate link: https://wpdevart.com/wordpress-coming-soon-plugin/
4
  Tags: coming soon, wordpress coming soon, maintenance, maintenance mode, under construction
5
  Requires at least: 3.4.0
6
+ Tested up to: 5.8.1
7
+ Stable tag: 3.5.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
720
 
721
  * Bug fixed - Authenticated stored XSS vulnerability.
722
 
723
+ = 3.5.3 ==
724
+
725
+ * Fixed issues (sanitized,escaped).
726
+
727
  ==Step by step guide==
728
 
729
  ### Logo