CMP – Coming Soon & Maintenance Plugin by NiteoThemes - Version 2.5

Version Description

Download this release

Release Info

Developer niteo
Plugin Icon 128x128 CMP – Coming Soon & Maintenance Plugin by NiteoThemes
Version 2.5
Comparing to
See all releases

Code changes from version 2.4.2 to 2.5

Files changed (49) hide show
  1. cmp-advanced.php +114 -38
  2. cmp-settings.php +30 -51
  3. cmp-subscribers.php +19 -41
  4. cmp-translate.php +4 -8
  5. css/animate.css +44 -16
  6. css/animate.min.css +183 -2
  7. css/cmp-settings-style.css +23 -5
  8. css/cmp-settings-style.min.css +1 -1
  9. css/preview-iframe.css +1 -1
  10. img/thumbnails/eclipse/screenshot1.jpg +0 -0
  11. img/thumbnails/eclipse/screenshot2.jpg +0 -0
  12. img/thumbnails/fifty/screenshot1.jpg +0 -0
  13. img/thumbnails/fifty/screenshot2.jpg +0 -0
  14. img/thumbnails/frame/screenshot1.jpg +0 -0
  15. img/thumbnails/orbit/screenshot1.jpg +0 -0
  16. img/thumbnails/orbit/screenshot2.jpg +0 -0
  17. img/thumbnails/orbit/screenshot3.jpg +0 -0
  18. img/thumbnails/stylo/screenshot1.jpg +0 -0
  19. img/thumbnails/stylo/screenshot2.jpg +0 -0
  20. img/thumbnails/stylo/screenshot3.jpg +0 -0
  21. img/thumbnails/stylo/screenshot4.jpg +0 -0
  22. img/thumbnails/stylo/screenshot5.jpg +0 -0
  23. img/thumbnails/stylo_thumbnail.jpg +0 -0
  24. inc/class-cmp-render_html.php +353 -227
  25. inc/class-cmp-subscribers.php +6 -2
  26. inc/preview-selector.php +0 -158
  27. inc/settings/settings-background_effects.php +64 -0
  28. inc/settings/settings-contact_form.php +116 -0
  29. inc/settings/settings-contact_form_disabled.php +37 -0
  30. inc/settings/settings-counter.php +8 -4
  31. inc/settings/settings-footer.php +21 -6
  32. inc/settings/settings-logo.php +7 -8
  33. inc/settings/settings-slider.php +2 -10
  34. inc/settings/settings-subscribe.php +28 -6
  35. js/settings.js +51 -87
  36. js/settings.min.js +10 -10
  37. js/typography.js +1 -5
  38. js/typography.min.js +1 -1
  39. niteo-cmp.php +125 -56
  40. readme.txt +13 -3
  41. themes/construct/construct-theme.php +2 -1
  42. themes/construct/style.css +5 -3
  43. themes/countdown/countdown-settings.php +4 -2
  44. themes/countdown/countdown-theme.php +5 -1
  45. themes/countdown/style.css +7 -11
  46. themes/hardwork/hardwork-settings.php +4 -2
  47. themes/hardwork/hardwork-theme.php +1 -1
  48. themes/hardwork/style.css +3 -1
  49. themes/stylo.txt +3 -0
cmp-advanced.php CHANGED
@@ -17,6 +17,30 @@ if ( isset( $_POST['niteoCS_page_filter'] ) ) {
17
  update_option('niteoCS_page_filter', sanitize_text_field( $_POST['niteoCS_page_filter'] ));
18
  }
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  // update page whitelist if set
21
  if ( isset( $_POST['niteoCS_page-whitelist'] ) ) {
22
 
@@ -108,6 +132,12 @@ $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
108
 
109
  $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), true);
110
 
 
 
 
 
 
 
111
  ?>
112
 
113
  <div class="wrap">
@@ -134,12 +164,6 @@ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), t
134
  <span><?php _e('Whitelist Settings', 'cmp-coming-soon-maintenance');?></span>
135
  </legend>
136
 
137
- <p>
138
- <label title="Disabled">
139
- <input type="radio" class="page-whitelist" name="niteoCS_page_filter" value="0" <?php checked('0', $niteoCS_page_filter);?>><?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
140
- </label>
141
- </p>
142
-
143
  <p>
144
  <label title="Page Whitelist">
145
  <input type="radio" class="page-whitelist" name="niteoCS_page_filter" value="1" <?php checked('1', $niteoCS_page_filter);?>><?php _e('Page Whitelist', 'cmp-coming-soon-maintenance');?>
@@ -152,11 +176,17 @@ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), t
152
  </label>
153
  </p>
154
 
 
 
 
 
 
 
155
  </fieldset>
156
  </th>
157
 
158
  <td>
159
- <fieldset id="page-whitelist" style="margin-top: 1em;">
160
  <h4><?php _e('CMP Whitelist - Select the specific page(s) to display CMP Landing Page.', 'cmp-coming-soon-maintenance');?></h4>
161
  <select name="niteoCS_page-whitelist[]" class="cmp-whitelist" multiple="multiple">
162
  <option value="-1" <?php echo in_array('-1', $niteoCS_page_whitelist) ? 'selected' : '';?>><?php _e('Homepage', 'cmp-coming-soon-maintenance');?></option>
@@ -171,7 +201,7 @@ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), t
171
 
172
  </fieldset>
173
 
174
- <fieldset id="page-blacklist" style="margin-top: 1em;">
175
  <h4><?php _e('CMP Blacklist - Select the pages to NOT display CMP landing page.', 'cmp-coming-soon-maintenance');?></h4>
176
  <select name="niteoCS_page-blacklist[]" class="cmp-blacklist" multiple="multiple">
177
  <option value="-1" <?php echo in_array('-1', $niteoCS_page_blacklist) ? 'selected' : '';?>><?php _e('Homepage', 'cmp-coming-soon-maintenance');?></option>
@@ -186,7 +216,7 @@ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), t
186
 
187
  </fieldset>
188
 
189
- <p id="page-disabled"><?php _e('CMP landing page is displayed on all pages by default. You can enable Page Whitelist to display CMP only on specific page(s) or Page Blacklist to exclude CMP landing page on specific page(s) by enabling Page Whitelist or Page Blacklist here.', 'cmp-coming-soon-maintenance');?></p>
190
 
191
  </td>
192
  </tr>
@@ -291,6 +321,68 @@ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), t
291
 
292
  </div>
293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  </div> <!-- <div class="cmp-inputs-wrapper"> -->
295
 
296
  <?php
@@ -309,37 +401,21 @@ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), t
309
 
310
  <script>
311
  jQuery(document).ready(function($){
 
 
312
 
313
- // page whitelist/blacklist
314
- jQuery('.page-whitelist').change(function() {
315
- switch( jQuery('.page-whitelist:checked' ).val() ) {
316
- // disabled
317
- case '0':
318
- jQuery('#page-disabled').css('display','block');
319
- jQuery('#page-whitelist').css('display','none');
320
- jQuery('#page-blacklist').css('display','none');
321
- break
322
-
323
- // whitelist
324
- case '1':
325
- jQuery('#page-disabled').css('display','none');
326
- jQuery('#page-whitelist').css('display','block');
327
- jQuery('#page-blacklist').css('display','none');
328
- break;
329
-
330
- // blacklist
331
- case '2':
332
- jQuery('#page-disabled').css('display','none');
333
- jQuery('#page-whitelist').css('display','none');
334
- jQuery('#page-blacklist').css('display','block');
335
- break;
336
-
337
- default:
338
- break;
339
- }
340
- });
341
 
342
- jQuery('.page-whitelist').trigger('change');
 
 
 
 
 
343
 
344
  jQuery('.cmp-whitelist, .cmp-blacklist, .cmp-user_roles').select2({
345
  width: 'calc(100% - 1em)',
17
  update_option('niteoCS_page_filter', sanitize_text_field( $_POST['niteoCS_page_filter'] ));
18
  }
19
 
20
+ if ( isset( $_POST['niteoCS_bypass_id'] ) ) {
21
+ if ( $_POST['niteoCS_bypass_id'] == '' ) {
22
+ update_option('niteoCS_bypass_id', md5( get_home_url() ));
23
+ } else {
24
+ update_option('niteoCS_bypass_id', sanitize_text_field( $_POST['niteoCS_bypass_id'] ));
25
+ }
26
+
27
+ }
28
+
29
+ if ( isset( $_POST['niteoCS_bypass'] ) && is_numeric($_POST['niteoCS_bypass']) ) {
30
+ update_option('niteoCS_bypass', sanitize_text_field( $_POST['niteoCS_bypass'] ));
31
+ }
32
+
33
+
34
+
35
+ if ( isset( $_POST['niteoCS_bypass_expire'] ) ) {
36
+ if ( $_POST['niteoCS_bypass_expire'] == '' ) {
37
+ update_option('niteoCS_bypass_expire', 172800);
38
+ } else {
39
+ update_option('niteoCS_bypass_expire', filter_var( $_POST['niteoCS_bypass_expire'], FILTER_SANITIZE_NUMBER_INT ));
40
+ }
41
+
42
+ }
43
+
44
  // update page whitelist if set
45
  if ( isset( $_POST['niteoCS_page-whitelist'] ) ) {
46
 
132
 
133
  $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), true);
134
 
135
+ $bypass = get_option('niteoCS_bypass', '0');
136
+
137
+ $bypass_id = get_option('niteoCS_bypass_id', md5( get_home_url() ));
138
+
139
+ $bypass_expire = get_option('niteoCS_bypass_expire', '172800');
140
+
141
  ?>
142
 
143
  <div class="wrap">
164
  <span><?php _e('Whitelist Settings', 'cmp-coming-soon-maintenance');?></span>
165
  </legend>
166
 
 
 
 
 
 
 
167
  <p>
168
  <label title="Page Whitelist">
169
  <input type="radio" class="page-whitelist" name="niteoCS_page_filter" value="1" <?php checked('1', $niteoCS_page_filter);?>><?php _e('Page Whitelist', 'cmp-coming-soon-maintenance');?>
176
  </label>
177
  </p>
178
 
179
+ <p>
180
+ <label title="Disabled">
181
+ <input type="radio" class="page-whitelist" name="niteoCS_page_filter" value="0" <?php checked('0', $niteoCS_page_filter);?>><?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
182
+ </label>
183
+ </p>
184
+
185
  </fieldset>
186
  </th>
187
 
188
  <td>
189
+ <fieldset class="page-whitelist-switch x1" style="margin-top: 1em;">
190
  <h4><?php _e('CMP Whitelist - Select the specific page(s) to display CMP Landing Page.', 'cmp-coming-soon-maintenance');?></h4>
191
  <select name="niteoCS_page-whitelist[]" class="cmp-whitelist" multiple="multiple">
192
  <option value="-1" <?php echo in_array('-1', $niteoCS_page_whitelist) ? 'selected' : '';?>><?php _e('Homepage', 'cmp-coming-soon-maintenance');?></option>
201
 
202
  </fieldset>
203
 
204
+ <fieldset class="page-whitelist-switch x2" style="margin-top: 1em;">
205
  <h4><?php _e('CMP Blacklist - Select the pages to NOT display CMP landing page.', 'cmp-coming-soon-maintenance');?></h4>
206
  <select name="niteoCS_page-blacklist[]" class="cmp-blacklist" multiple="multiple">
207
  <option value="-1" <?php echo in_array('-1', $niteoCS_page_blacklist) ? 'selected' : '';?>><?php _e('Homepage', 'cmp-coming-soon-maintenance');?></option>
216
 
217
  </fieldset>
218
 
219
+ <p class="page-whitelist-switch x0"><?php _e('CMP landing page is displayed on all pages by default. You can enable Page Whitelist to display CMP only on specific page(s) or Page Blacklist to exclude CMP landing page on specific page(s) by enabling Page Whitelist or Page Blacklist here.', 'cmp-coming-soon-maintenance');?></p>
220
 
221
  </td>
222
  </tr>
321
 
322
  </div>
323
 
324
+ <div class="table-wrapper general">
325
+ <h3 class="no-icon"><?php _e('CMP Bypass URL', 'cmp-coming-soon-maintenance');?></h3>
326
+ <table class="general">
327
+ <tbody>
328
+ <tr>
329
+
330
+ <th>
331
+ <fieldset>
332
+ <legend class="screen-reader-text">
333
+ <span><?php _e('Whitelist Settings', 'cmp-coming-soon-maintenance');?></span>
334
+ </legend>
335
+
336
+ <p>
337
+ <label title="Page Whitelist">
338
+ <input type="radio" class="cmp-bypass" name="niteoCS_bypass" value="1" <?php checked('1', $bypass);?>><?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
339
+ </label>
340
+ </p>
341
+
342
+ <p>
343
+ <label title="Disabled">
344
+ <input type="radio" class="cmp-bypass" name="niteoCS_bypass" value="0" <?php checked('0', $bypass);?>><?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
345
+ </label>
346
+ </p>
347
+
348
+ </fieldset>
349
+ </th>
350
+
351
+ <td>
352
+
353
+ <fieldset class="cmp-bypass-switch x1" style="margin-top: 1em;">
354
+
355
+ <h4 style="margin-bottom:0.5em"><?php _e('Bypass URL', 'cmp-coming-soon-maintenance');?></h4>
356
+ <code><?php echo get_home_url().'/?cmp_bypass=' . $bypass_id;?></code>
357
+
358
+ <p><?php _e('You can use this URL to bypass CMP maintenance page. Once you access your website with this URL, CMP Cookie will be set with default expiration of 2 days. If the cookie expires, you need to access your website again with this URL.', 'cmp-coming-soon-maintenance');?></p>
359
+
360
+ <h4><?php _e('Set Bypass Passphrase', 'cmp-coming-soon-maintenance');?></h4>
361
+ <input type="text" name="niteoCS_bypass_id" value="<?php echo esc_attr( $bypass_id ); ?>" class="regular-text code"><br>
362
+
363
+ <p style="margin-top:0"><?php _e('You can use passphrase which contains letters, numbers, underscores or dashes only.', 'cmp-coming-soon-maintenance');?></p>
364
+
365
+ <h4><?php _e('Set bypass cookie Expiration Time in seconds', 'cmp-coming-soon-maintenance');?></h4>
366
+ <input type="text" name="niteoCS_bypass_expire" value="<?php echo esc_attr( $bypass_expire ); ?>" class="regular-text code"><br>
367
+
368
+ <p style="margin-top:0"><?php _e('You can set custom Bypass CMP Cookie expiration time in seconds (1hour = 3600). Default expiration time is 2 days (172800).', 'cmp-coming-soon-maintenance');?></p>
369
+
370
+ <p><?php _e('Please note this solution is using browser cookies which might not work correctly if you are using caching plugins.', 'cmp-coming-soon-maintenance');?></p>
371
+
372
+ </fieldset>
373
+
374
+ <p class="cmp-bypass-switch x0"><?php _e('You can Enable CMP Bypass where you can set custom URL parameter to bypass CMP page. You can send this URL to anyone who would like to sneak peak into your Website while it is under development or maintanence.', 'cmp-coming-soon-maintenance');?></p>
375
+
376
+ </td>
377
+ </tr>
378
+
379
+ <?php echo $this->render_settings->submit(); ?>
380
+
381
+ </tbody>
382
+ </table>
383
+
384
+ </div>
385
+
386
  </div> <!-- <div class="cmp-inputs-wrapper"> -->
387
 
388
  <?php
401
 
402
  <script>
403
  jQuery(document).ready(function($){
404
+ toggle_settings('page-whitelist');
405
+ toggle_settings('cmp-bypass');
406
 
407
+ function toggle_settings ( classname ) {
408
+ // Logo type inputs
409
+ jQuery('.'+classname).change(function() {
410
+ var value = jQuery('.'+classname+':checked' ).val();
411
+ value = ( jQuery.isNumeric(value) ) ? 'x'+value : value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
 
413
+ jQuery('.'+classname+'-switch.'+value).css('display','block');
414
+ jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none');
415
+ });
416
+
417
+ jQuery('.'+classname).first().trigger('change');
418
+ }
419
 
420
  jQuery('.cmp-whitelist, .cmp-blacklist, .cmp-user_roles').select2({
421
  width: 'calc(100% - 1em)',
cmp-settings.php CHANGED
@@ -219,17 +219,6 @@ if (isset($_POST['niteoCS_custom_css'])) {
219
  }
220
 
221
 
222
-
223
- if (isset($_POST['niteoCS_subscribe_type']) && is_numeric($_POST['niteoCS_subscribe_type'])) {
224
- update_option('niteoCS_subscribe_type', sanitize_text_field($_POST['niteoCS_subscribe_type']));
225
- }
226
-
227
- if (isset($_POST['niteoCS_subscribe_label'])) {
228
- update_option('niteoCS_subscribe_label', sanitize_text_field($_POST['niteoCS_subscribe_label']));
229
- }
230
-
231
-
232
-
233
  if (isset($_POST['niteoCS_soc_title'])) {
234
  update_option('niteoCS_soc_title', sanitize_text_field($_POST['niteoCS_soc_title']));
235
  }
@@ -239,11 +228,6 @@ if (isset($_POST['niteoCS_socialmedia'])) {
239
  }
240
 
241
 
242
- if ( isset($_POST['niteoCS_subscribe_code']) ) {
243
- $shortcode = str_replace('"', '\'', $_POST['niteoCS_subscribe_code']);
244
- update_option('niteoCS_subscribe_code', sanitize_text_field($shortcode));
245
- }
246
-
247
  if (isset($_POST['niteoCS_body_title'])) {
248
  update_option('niteoCS_body_title', sanitize_text_field($_POST['niteoCS_body_title']));
249
  }
@@ -266,10 +250,6 @@ if (isset($_POST['niteoCS_redirect_time'])) {
266
  }
267
 
268
 
269
-
270
-
271
-
272
-
273
  // get Settings TAB
274
  $niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
275
  $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
@@ -280,11 +260,6 @@ $niteoCS_body = get_option('niteoCS_body');
280
  $niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.'));
281
  $niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
282
 
283
- // get subscribe settings
284
- $niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
285
- $niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
286
- $niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
287
- $niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
288
 
289
  // get SEO
290
  $niteoCS_favicon_id = get_option('niteoCS_favicon_id');
@@ -294,7 +269,6 @@ $niteoCS_analytics_status = get_option('niteoCS_analytics_status', 'disabled');
294
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
295
  $niteoCS_analytics_other = stripslashes(get_option('niteoCS_analytics_other', ''));
296
 
297
-
298
  // get Custom CSS
299
  $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
300
 
@@ -557,6 +531,8 @@ add_thickbox();
557
  <input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
558
  <span class="input-label"><?php if ( $this->cmp_selectedTheme() == $theme_slug ) { _e('Active', 'cmp-coming-soon-maintenance'); } else { _e('Select', 'cmp-coming-soon-maintenance'); }?></span>
559
  </div>
 
 
560
 
561
  <button type="button" class="theme-details button hide"><i class="fa fa-eye" aria-hidden="true"></i><?php _e('DETAILS', 'cmp-coming-soon-maintenance');?></button>
562
  </div>
@@ -710,6 +686,19 @@ add_thickbox();
710
 
711
  }
712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  ?>
714
 
715
  <div class="table-wrapper content" id="social-section">
@@ -863,6 +852,11 @@ add_thickbox();
863
  require (dirname(__FILE__) . '/inc/settings/settings-background.php');
864
  }
865
 
 
 
 
 
 
866
  // get slider settings
867
  if ( $theme_supports['slider'] ) {
868
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-slider.php') ) {
@@ -1108,27 +1102,23 @@ add_thickbox();
1108
  </table>
1109
  </div>
1110
 
1111
- <div class="table-wrapper custom_css">
1112
- <h3><?php _e('Enter Custom CSS', 'cmp-coming-soon-maintenance');?></h3>
1113
- <table class="custom_css">
1114
- <tbody>
1115
- <tr>
1116
- <td>
1117
- <fieldset>
1118
- <textarea name="niteoCS_custom_css" rows="20" id="niteoCS_custom_css" class="code"><?php echo esc_attr( $niteoCS_custom_css ); ?></textarea>
1119
- </fieldset>
1120
- </td>
1121
- </tr>
1122
 
1123
- <?php echo $this->render_settings->submit(); ?>
 
 
1124
 
1125
- </tbody>
1126
- </table>
1127
 
 
 
 
1128
  </div>
1129
 
 
 
 
1130
  </form>
1131
 
 
1132
  </div> <!-- <div class="cmp-settings-wrapper"> -->
1133
 
1134
  <?php
@@ -1143,14 +1133,3 @@ add_thickbox();
1143
 
1144
  </div> <!-- <div id="wrap"> -->
1145
 
1146
- <script>
1147
-
1148
- // jQuery(document).ready(function($){
1149
-
1150
- // jQuery('#csoptions :input').change(function(){
1151
- // console.log(jQuery(this));
1152
- // console.log("Form changed");
1153
- // });
1154
- // });
1155
-
1156
- </script>
219
  }
220
 
221
 
 
 
 
 
 
 
 
 
 
 
 
222
  if (isset($_POST['niteoCS_soc_title'])) {
223
  update_option('niteoCS_soc_title', sanitize_text_field($_POST['niteoCS_soc_title']));
224
  }
228
  }
229
 
230
 
 
 
 
 
 
231
  if (isset($_POST['niteoCS_body_title'])) {
232
  update_option('niteoCS_body_title', sanitize_text_field($_POST['niteoCS_body_title']));
233
  }
250
  }
251
 
252
 
 
 
 
 
253
  // get Settings TAB
254
  $niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
255
  $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
260
  $niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.'));
261
  $niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
262
 
 
 
 
 
 
263
 
264
  // get SEO
265
  $niteoCS_favicon_id = get_option('niteoCS_favicon_id');
269
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
270
  $niteoCS_analytics_other = stripslashes(get_option('niteoCS_analytics_other', ''));
271
 
 
272
  // get Custom CSS
273
  $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
274
 
531
  <input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
532
  <span class="input-label"><?php if ( $this->cmp_selectedTheme() == $theme_slug ) { _e('Active', 'cmp-coming-soon-maintenance'); } else { _e('Select', 'cmp-coming-soon-maintenance'); }?></span>
533
  </div>
534
+
535
+ <a href="<?php echo get_site_url().'?cmp_preview=true&cmp_theme='.$theme_slug;?>" target="_blank" class="theme-preview button hide"><i class="fa fa-external-link" aria-hidden="true"></i><?php _e('PREVIEW', 'cmp-coming-soon-maintenance');?></a>
536
 
537
  <button type="button" class="theme-details button hide"><i class="fa fa-eye" aria-hidden="true"></i><?php _e('DETAILS', 'cmp-coming-soon-maintenance');?></button>
538
  </div>
686
 
687
  }
688
 
689
+ // get contact form settings
690
+ if ( isset($theme_supports['contact-form']) && $theme_supports['contact-form'] ) {
691
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-contact_form.php') ) {
692
+ require (dirname(__FILE__) . '/inc/settings/settings-contact_form.php');
693
+ }
694
+
695
+ } else {
696
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-contact_form_disabled.php') ) {
697
+ require (dirname(__FILE__) . '/inc/settings/settings-contact_form_disabled.php');
698
+ }
699
+
700
+ }
701
+
702
  ?>
703
 
704
  <div class="table-wrapper content" id="social-section">
852
  require (dirname(__FILE__) . '/inc/settings/settings-background.php');
853
  }
854
 
855
+ // get background effects settings
856
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-background_effects.php') ) {
857
+ require (dirname(__FILE__) . '/inc/settings/settings-background_effects.php');
858
+ }
859
+
860
  // get slider settings
861
  if ( $theme_supports['slider'] ) {
862
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-slider.php') ) {
1102
  </table>
1103
  </div>
1104
 
 
 
 
 
 
 
 
 
 
 
 
1105
 
1106
+
1107
+ <div class="table-wrapper-css custom_css">
1108
+ <h3><?php _e('Enter Custom CSS', 'cmp-coming-soon-maintenance');?></h3>
1109
 
 
 
1110
 
1111
+ <textarea name="niteoCS_custom_css" rows="20" id="niteoCS_custom_css" class="code"><?php echo esc_attr( $niteoCS_custom_css ); ?></textarea>
1112
+
1113
+ <?php echo $this->render_settings->submit(); ?>
1114
  </div>
1115
 
1116
+
1117
+
1118
+
1119
  </form>
1120
 
1121
+
1122
  </div> <!-- <div class="cmp-settings-wrapper"> -->
1123
 
1124
  <?php
1133
 
1134
  </div> <!-- <div id="wrap"> -->
1135
 
 
 
 
 
 
 
 
 
 
 
 
cmp-subscribers.php CHANGED
@@ -1,24 +1,6 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
- // delete_option('niteoCS_subscribers_list');
5
- $subscribe_list = get_option('niteoCS_subscribers_list');
6
-
7
- // check for < 1.8 version where ID was not set
8
- if ( is_array($subscribe_list) && count($subscribe_list) > 0 && !array_key_exists ('id', $subscribe_list[0])) {
9
- $i = 1;
10
- foreach($subscribe_list as &$sub){
11
- $sub['id'] = $i;
12
- $sub = array('id' => $sub['id']) + $sub;
13
- // check if ip address is set
14
- if (!array_key_exists('ip_address', $sub)) {
15
- $sub['ip_address'] = 'nodata';
16
- }
17
- $i++;
18
- }
19
- update_option('niteoCS_subscribers_list', $subscribe_list);
20
- }
21
-
22
 
23
  // WP_List_Table is not loaded automatically so we need to load it in our application
24
  if( ! class_exists( 'WP_List_Table' ) ) {
@@ -34,30 +16,26 @@ $cmp_subs_list_table = new cmp_subs_list_table();
34
  $cmp_subs_list_table->prepare_items();
35
  ?>
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- <div class="wrap">
39
- <h1></h1>
40
- <div id="icon-users" class="icon32"></div>
41
- <div class="cmp-inputs-wrapper subscribers-settings">
42
- <?php wp_nonce_field('cmp_process_bulk_action', '_nonce'); ?>
43
- <h2><?php _e('View / Edit Subscribers', 'cmp-coming-soon-maintenance');?></h2>
44
- <form name="cmp_subscribe_form" method="post" action="admin.php?page=cmp-subscribers">
45
- <?php $cmp_subs_list_table->display(); ?>
46
- </form>
47
-
48
- <button id="export_csv" class="button"><?php _e('Export All Subscribers','cmp-coming-soon-maintenance');?></button>
49
- </div>
50
- <?php
51
- // get sidebar with "widgets"
52
- if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
53
- require (dirname(__FILE__) . '/cmp-sidebar.php');
54
- }
55
-
56
- ?>
57
- </div>
58
-
59
-
60
-
61
 
62
 
63
  <script type="text/javascript">
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  // WP_List_Table is not loaded automatically so we need to load it in our application
6
  if( ! class_exists( 'WP_List_Table' ) ) {
16
  $cmp_subs_list_table->prepare_items();
17
  ?>
18
 
19
+ <div class="wrap">
20
+ <h1></h1>
21
+ <div id="icon-users" class="icon32"></div>
22
+ <div class="cmp-inputs-wrapper subscribers-settings">
23
+ <?php wp_nonce_field('cmp_process_bulk_action', '_nonce'); ?>
24
+ <h2><?php _e('View / Edit Subscribers', 'cmp-coming-soon-maintenance');?></h2>
25
+ <form name="cmp_subscribe_form" method="post" action="admin.php?page=cmp-subscribers">
26
+ <?php $cmp_subs_list_table->display(); ?>
27
+ </form>
28
+
29
+ <button id="export_csv" class="button"><?php _e('Export All Subscribers','cmp-coming-soon-maintenance');?></button>
30
+ </div>
31
+ <?php
32
+ // get sidebar with "widgets"
33
+ if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
34
+ require (dirname(__FILE__) . '/cmp-sidebar.php');
35
+ }
36
 
37
+ ?>
38
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
 
41
  <script type="text/javascript">
cmp-translate.php CHANGED
@@ -18,6 +18,8 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
18
  7 => array('id' => 7, 'string' => 'Thank you, your sign-up request was successful!', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_7'] )),
19
  8 => array('id' => 8, 'string' => 'Submit', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_8'] )),
20
  9 => array('id' => 9, 'string' => 'Scroll', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_9'] )),
 
 
21
  );
22
 
23
  update_option('niteoCS_translation', wp_json_encode($translation));
@@ -36,20 +38,14 @@ if ( !get_option('niteoCS_translation') ) {
36
  7 => array('id' => 7, 'string' => 'Thank you, your sign-up request was successful!', 'translation' => 'Thank you, your sign-up request was successful!'),
37
  8 => array('id' => 8, 'string' => 'Submit', 'translation' => 'Submit'),
38
  9 => array('id' => 9, 'string' => 'Scroll', 'translation' => 'Scroll'),
 
 
39
  );
40
 
41
  update_option('niteoCS_translation', wp_json_encode($translation));
42
  }
43
 
44
- // add scroll to translation list - v2.0
45
- if ( get_option('niteoCS_translation') ) {
46
- $translation = json_decode( get_option('niteoCS_translation'), true );
47
- if ( !isset($translation[9]) ) {
48
- array_push( $translation, array('id' => 9, 'string' => 'Scroll', 'translation' => 'Scroll') );
49
- }
50
 
51
- update_option('niteoCS_translation', wp_json_encode($translation));
52
- }
53
 
54
  // WP_List_Table is not loaded automatically so we need to load it in our application
55
  if( ! class_exists( 'WP_List_Table' ) ) {
18
  7 => array('id' => 7, 'string' => 'Thank you, your sign-up request was successful!', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_7'] )),
19
  8 => array('id' => 8, 'string' => 'Submit', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_8'] )),
20
  9 => array('id' => 9, 'string' => 'Scroll', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_9'] )),
21
+ 10 => array('id' => 10, 'string' => 'First Name', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_10'] )),
22
+ 11 => array('id' => 11, 'string' => 'Last Name', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_11'] )),
23
  );
24
 
25
  update_option('niteoCS_translation', wp_json_encode($translation));
38
  7 => array('id' => 7, 'string' => 'Thank you, your sign-up request was successful!', 'translation' => 'Thank you, your sign-up request was successful!'),
39
  8 => array('id' => 8, 'string' => 'Submit', 'translation' => 'Submit'),
40
  9 => array('id' => 9, 'string' => 'Scroll', 'translation' => 'Scroll'),
41
+ 10 => array('id' => 10, 'string' => 'First Name', 'translation' => 'First Name'),
42
+ 11 => array('id' => 11, 'string' => 'Last Name', 'translation' => 'Last Name'),
43
  );
44
 
45
  update_option('niteoCS_translation', wp_json_encode($translation));
46
  }
47
 
 
 
 
 
 
 
48
 
 
 
49
 
50
  // WP_List_Table is not loaded automatically so we need to load it in our application
51
  if( ! class_exists( 'WP_List_Table' ) ) {
css/animate.css CHANGED
@@ -21,8 +21,8 @@
21
  @-webkit-keyframes fadeInDown {
22
  from {
23
  opacity: 0;
24
- -webkit-transform: translate3d(0, -100%, 0);
25
- transform: translate3d(0, -100%, 0);
26
  }
27
 
28
  to {
@@ -35,8 +35,8 @@
35
  @keyframes fadeInDown {
36
  from {
37
  opacity: 0;
38
- -webkit-transform: translate3d(0, -100%, 0);
39
- transform: translate3d(0, -100%, 0);
40
  }
41
 
42
  to {
@@ -55,8 +55,8 @@
55
  @-webkit-keyframes fadeInLeft {
56
  from {
57
  opacity: 0;
58
- -webkit-transform: translate3d(-100%, 0, 0);
59
- transform: translate3d(-100%, 0, 0);
60
  }
61
 
62
  to {
@@ -69,8 +69,8 @@
69
  @keyframes fadeInLeft {
70
  from {
71
  opacity: 0;
72
- -webkit-transform: translate3d(-100%, 0, 0);
73
- transform: translate3d(-100%, 0, 0);
74
  }
75
 
76
  to {
@@ -89,8 +89,8 @@
89
  @-webkit-keyframes fadeInRight {
90
  from {
91
  opacity: 0;
92
- -webkit-transform: translate3d(100%, 0, 0);
93
- transform: translate3d(100%, 0, 0);
94
  }
95
 
96
  to {
@@ -103,8 +103,8 @@
103
  @keyframes fadeInRight {
104
  from {
105
  opacity: 0;
106
- -webkit-transform: translate3d(100%, 0, 0);
107
- transform: translate3d(100%, 0, 0);
108
  }
109
 
110
  to {
@@ -122,8 +122,8 @@
122
  @-webkit-keyframes fadeInUp {
123
  from {
124
  opacity: 0;
125
- -webkit-transform: translate3d(0, 100%, 0);
126
- transform: translate3d(0, 100%, 0);
127
  }
128
 
129
  to {
@@ -136,8 +136,8 @@
136
  @keyframes fadeInUp {
137
  from {
138
  opacity: 0;
139
- -webkit-transform: translate3d(0, 100%, 0);
140
- transform: translate3d(0, 100%, 0);
141
  }
142
 
143
  to {
@@ -152,3 +152,31 @@
152
  animation-name: fadeInUp;
153
  }
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  @-webkit-keyframes fadeInDown {
22
  from {
23
  opacity: 0;
24
+ -webkit-transform: translate3d(0, -50px, 0);
25
+ transform: translate3d(0, -50px, 0);
26
  }
27
 
28
  to {
35
  @keyframes fadeInDown {
36
  from {
37
  opacity: 0;
38
+ -webkit-transform: translate3d(0, -50px, 0);
39
+ transform: translate3d(0, -50px, 0);
40
  }
41
 
42
  to {
55
  @-webkit-keyframes fadeInLeft {
56
  from {
57
  opacity: 0;
58
+ -webkit-transform: translate3d(-50px, 0, 0);
59
+ transform: translate3d(-50px, 0, 0);
60
  }
61
 
62
  to {
69
  @keyframes fadeInLeft {
70
  from {
71
  opacity: 0;
72
+ -webkit-transform: translate3d(-50px, 0, 0);
73
+ transform: translate3d(-50px, 0, 0);
74
  }
75
 
76
  to {
89
  @-webkit-keyframes fadeInRight {
90
  from {
91
  opacity: 0;
92
+ -webkit-transform: translate3d(50px, 0, 0);
93
+ transform: translate3d(50px, 0, 0);
94
  }
95
 
96
  to {
103
  @keyframes fadeInRight {
104
  from {
105
  opacity: 0;
106
+ -webkit-transform: translate3d(50px, 0, 0);
107
+ transform: translate3d(50px, 0, 0);
108
  }
109
 
110
  to {
122
  @-webkit-keyframes fadeInUp {
123
  from {
124
  opacity: 0;
125
+ -webkit-transform: translate3d(0, 50px, 0);
126
+ transform: translate3d(0, 50px, 0);
127
  }
128
 
129
  to {
136
  @keyframes fadeInUp {
137
  from {
138
  opacity: 0;
139
+ -webkit-transform: translate3d(0, 50px, 0);
140
+ transform: translate3d(0, 50px, 0);
141
  }
142
 
143
  to {
152
  animation-name: fadeInUp;
153
  }
154
 
155
+ @-webkit-keyframes zoomIn {
156
+ from {
157
+ opacity: 0;
158
+ -webkit-transform: scale3d(0.3, 0.3, 0.3);
159
+ transform: scale3d(0.3, 0.3, 0.3);
160
+ }
161
+
162
+ 50% {
163
+ opacity: 1;
164
+ }
165
+ }
166
+
167
+ @keyframes zoomIn {
168
+ from {
169
+ opacity: 0;
170
+ -webkit-transform: scale3d(0.3, 0.3, 0.3);
171
+ transform: scale3d(0.3, 0.3, 0.3);
172
+ }
173
+
174
+ 50% {
175
+ opacity: 1;
176
+ }
177
+ }
178
+
179
+ .zoomIn {
180
+ -webkit-animation-name: zoomIn;
181
+ animation-name: zoomIn;
182
+ }
css/animate.min.css CHANGED
@@ -1,7 +1,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,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,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(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,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(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,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,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
css/cmp-settings-style.css CHANGED
@@ -98,7 +98,6 @@ textarea {
98
  #niteoCS_countdown_redirect,
99
  #niteoCS_countdown_text,
100
  .table-wrapper.content,
101
- .table-wrapper.custom_css,
102
  .table-wrapper.install,
103
  .table-wrapper.seo,
104
  .table-wrapper.theme-setup {
@@ -118,7 +117,7 @@ textarea {
118
 
119
  .cmp-status .active {
120
  background-color: #ddd
121
- }
122
 
123
  .redirect {
124
  margin-bottom: 0
@@ -127,13 +126,30 @@ textarea {
127
  .help-settings,
128
  .subscribers-settings,
129
  .table-wrapper,
130
- .translate-settings {
131
  background-color: #fff;
132
  border: 1px solid #dedede;
133
  margin: 0 0 1em;
134
  max-width: 920px
135
  }
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  .cmp-inputs-wrapper .translation input,
138
  .cmp-inputs-wrapper .translation textarea {
139
  width: 100%;
@@ -158,7 +174,8 @@ textarea {
158
  padding: 1em
159
  }
160
 
161
- .table-wrapper h3 {
 
162
  position: relative;
163
  padding: .5em 0 .5em 1em;
164
  margin: 0;
@@ -167,7 +184,8 @@ textarea {
167
  }
168
 
169
  #unsplash-media,
170
- .background-media td fieldset {
 
171
  padding-top: 1em
172
  }
173
 
98
  #niteoCS_countdown_redirect,
99
  #niteoCS_countdown_text,
100
  .table-wrapper.content,
 
101
  .table-wrapper.install,
102
  .table-wrapper.seo,
103
  .table-wrapper.theme-setup {
117
 
118
  .cmp-status .active {
119
  background-color: #ddd
120
+ }
121
 
122
  .redirect {
123
  margin-bottom: 0
126
  .help-settings,
127
  .subscribers-settings,
128
  .table-wrapper,
129
+ .translate-settings {
130
  background-color: #fff;
131
  border: 1px solid #dedede;
132
  margin: 0 0 1em;
133
  max-width: 920px
134
  }
135
 
136
+ div.custom_css {
137
+ padding-bottom: 2em;
138
+ padding-right: 3em;
139
+ background: white;
140
+ border: 1px solid #dedede;
141
+ }
142
+
143
+ .CodeMirror-wrap {
144
+ border-right: 1px solid #dedede;
145
+ }
146
+
147
+ .custom_css .cmp-submit {
148
+ padding-left: 1em;
149
+ border-top: 1px solid #dedede;
150
+ padding-top: 2em;
151
+ }
152
+
153
  .cmp-inputs-wrapper .translation input,
154
  .cmp-inputs-wrapper .translation textarea {
155
  width: 100%;
174
  padding: 1em
175
  }
176
 
177
+ .table-wrapper h3,
178
+ .custom_css h3 {
179
  position: relative;
180
  padding: .5em 0 .5em 1em;
181
  margin: 0;
184
  }
185
 
186
  #unsplash-media,
187
+ .background-media td fieldset,
188
+ .cmp-logo-switch.graphic {
189
  padding-top: 1em
190
  }
191
 
css/cmp-settings-style.min.css CHANGED
@@ -1 +1 @@
1
- #wpwrap{overflow-x:hidden}.no-margin{margin:0}.cmp-settings-wrapper{position:relative;margin-top:1em}.wrapper-disabled{opacity:.4}.comingsoon-error,.comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.comingsoon-success{border-left:4px solid #00d221}.padding-bottom{padding-bottom:10px}.select2-container--default .select2-selection--single,input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.select2-container .select2-selection--single{height:35px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.select2-container:not(.select2-container--open){width:100%!important}input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}​input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}input[type=text],textarea{width:100%}#niteoCS_countdown_redirect,#niteoCS_countdown_text,.table-wrapper.content,.table-wrapper.custom_css,.table-wrapper.install,.table-wrapper.seo,.table-wrapper.theme-setup{display:none}.wp-upload-form.cmp{padding:4em;display:block}.cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-status .active{background-color:#ddd}.redirect{margin-bottom:0}.help-settings,.subscribers-settings,.table-wrapper,.translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-inputs-wrapper .translation input,.cmp-inputs-wrapper .translation textarea{width:100%}.cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.table-wrapper.closed table,.translate-settings tfoot{display:none}.help-settings,.subscribers-settings,.translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}#unsplash-media,.background-media td fieldset{padding-top:1em}.table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#niteoCS-text-logo,.theme-title,th label{font-weight:600}.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.table-wrapper h4{margin:0}.table-wrapper table{padding:1em;height:auto;width:90%}.table-wrapper .theme-selector{width:100%}.table-wrapper select{margin-bottom:10px;width:100%}.table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}#unsplash_img,.table-wrapper td.theme-selector{max-width:100%}.table-wrapper th{vertical-align:top;width:180px;text-align:left}#delete-banner,#delete-favicon,#delete-logo,#delete-video-thumb{display:none}.social-media{margin-top:0;margin-bottom:3em}.social-inputs{position:relative}.social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}#niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.social-description{margin-top:0}.social-inputs .label:nth-of-type(2){left:62px}.social-inputs .label:nth-of-type(3){left:148px}.social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.social-media i{font-size:2.45em;cursor:pointer}.social-media i.active{color:#d54e21}.social-inputs li{display:none;width:100%}.social-inputs li.active{display:inline-block}#custom_content_font,#custom_headings_font,.unsplash-feed{display:none}.social-inputs p{position:relative;padding-left:50px;height:50px}.social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.theme-details,.toggle{cursor:pointer}.social-inputs label{padding-left:100px}.social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}#unsplash_img{display:none}.color-preview,.gradient-preview,.pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.theme-overlay .screenshot,.thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.video-wrapper{position:relative;width:100%;margin-top:1em}.video-wrapper video{margin-top:-35px}#add-pattern{margin-bottom:1em}.info{font-size:12px}.nav-tab i{padding-right:3px}.banner-wrapper,.favicon-wrapper,.logo-wrapper{margin:1em 0}.favicon-wrapper img,.logo-wrapper img{background-color:#efefef;padding:1em}.favicon-wrapper img{max-width:32px}.background-media img,.logo-wrapper img{max-width:100%;width:100%}.logo-wrapper img{max-height:150px;width:auto}#font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}#heading-example{border-bottom:none;line-height:1.5;padding:0}.font-selector td:first-of-type{padding-bottom:2em}.font-selector fieldset{padding:.5em 0}.theme-wrapper{display:inline-block;margin:2em 1em 2em 0;width:calc(33.33% - 1.5em + 6px);text-align:center;border:1px solid #efefef;border-radius:6px;position:relative}.theme-wrapper:nth-of-type(3n){margin-right:0}.theme-wrapper.active{background-color:#ddd}.thumbnail-holder{width:100%;border-top-left-radius:5px;border-top-right-radius:5px}.thumbnail-holder::before{content:'';display:block;padding-top:56.25%;-webkit-transition:background-color .1s;transition:background-color .1s;border-top-left-radius:5px;border-top-right-radius:5px}.theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.7)}.toggle,.toggle-wrapper{display:inline-block}.theme-title{float:left;text-transform:uppercase}.theme-version{float:right}.theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px;height:2em;background:#656565;line-height:2em;padding-right:10px;color:white}.active .theme-inputs{background:#27ae60}.theme-inputs .italic{font-style:italic}.theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-button,.cmp-preview,.theme-wrapper .button{height:28px;line-height:28px;padding:0 10px;min-width:80px;border-radius:3px;color:#fff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;box-shadow:none;-webkit-box-shadow:none;text-shadow:none;text-transform:uppercase}.cmp-button.submit,.theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.theme-wrapper a.button:visited,.theme-wrapper a.button:focus{background:transparent;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-button.submit:focus,.cmp-button.submit:hover,.theme-actions .activate:focus,.theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.theme-wrapper .button{border:2px solid #ffffff!important;background:transparent;width:180px;line-height:2.5em;height:3em}.theme-wrapper .button.theme-select input[type=radio]{position:relative;background:transparent;border:none;outline:none;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper .button.theme-select input[type=radio]::before{content:none}.theme-wrapper .button.theme-select input[type=radio]::after{content:'';font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.theme-wrapper .button:hover,.theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.theme-wrapper .button.theme-select:hover input[type=radio]::after,.selected.button{color:#23282d!important}.theme-wrapper .theme-select,.theme-wrapper .theme-preview,.theme-wrapper .theme-purchase{margin-bottom:5px}.theme-wrapper .theme-select.selected{background-color:#32b2ff}.theme-wrapper .theme-details.button{line-height:0em}.cmp-preview{background-color:#2485bf!important}.cmp-preview:active,.cmp-preview:hover{background-color:#32b2ff!important}.theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.theme-info .theme-purchase:focus,.theme-info .theme-purchase:hover{background-color:#34495e}.button i{margin-right:5px}.theme-purchase a,.theme-purchase a:hover,.theme-purchase a:visited{color:#fff;text-decoration:none}p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.fifty-layout input:checked+img,.theme-overlay .screenshots-nav div:hover{opacity:1}.toggle,.toggle:after,.toggle:before{-webkit-transition:all .2s ease-in-out}.theme-overlay .screenshots-nav .left{float:left}.theme-overlay .screenshots-nav .right{float:right}.theme-description ul{list-style:none;padding-left:2em}.theme-description h4,.theme-description li{font-size:13px}.theme-description .supported i{color:green}.theme-description .not-supported i{color:red}.wp-list-table .column-id{width:5%}.cmp-status{margin-bottom:3em}.toggle{position:relative;width:200px;height:30px;font-weight:600;background:0 0;border:2px solid #f1f1f1;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-radius:15px}.toggle:after,.toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}input[type=checkbox].toggle-checkbox{display:none}.toggle_handler{display:inline-block;position:relative;z-index:1;background:#c0392b;width:90px;height:24px;top:3px;left:5px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-radius:10px 0 0 10px}.toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.toggle-wrapper:hover .toggle_handler{background:#e74c3c}.toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.toggle:before{content:"Disabled";left:22px;color:#fff}.toggle-checkbox:checked+.toggle:before,.toggle:after{color:#23282d}.toggle:after{content:"Enabled";right:26px}.toggle-checkbox:checked+.toggle:after{color:#fff}.fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.fifty-layout input{visibility:hidden;position:absolute;margin:0}.fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px}.cmp-sidebar-wrapper{display:inline-block;width:calc(100% - 6em - 920px);max-width:350px;min-width:300px;margin-left:1em;padding-top:0;vertical-align:top;text-align:center}.cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.widget.donate img{max-width:50px}.widget.donate img.niteo-logo{max-width:120px}.cmp-rate-us .button,.cmp-rate-us a{display:block;text-align:center}.cmp-rate-us a{padding:1em 0}.cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-rate-us form{text-align:center}.subscribers .column-id{width:5%}@media screen and (max-width:1450px){.cmp-inputs-wrapper{min-width:70%}.cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.theme-wrapper,.theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.theme-wrapper,.theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.table-wrapper th{display:block}.cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.table-wrapper table{width:100%}.table-wrapper th{width:140px}}@media screen and (max-width:782px){.social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-inputs-wrapper,.cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.theme-overlay .theme-info,.theme-overlay .theme-screenshots{width:100%;float:none}input[type=text],textarea{font-size:13px}}@media screen and (max-width:560px){.social-inputs .label:nth-of-type(2){left:50px}.social-inputs .label:nth-of-type(3){left:105px}.social-inputs p i{top:22px}.social-inputs input[type=checkbox]{top:28px;left:53px}.social-inputs label{padding-left:55px}.social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}}
1
+ #wpwrap{overflow-x:hidden}.no-margin{margin:0}.cmp-settings-wrapper{position:relative;margin-top:1em}.wrapper-disabled{opacity:.4}.comingsoon-error,.comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.comingsoon-success{border-left:4px solid #00d221}.padding-bottom{padding-bottom:10px}.select2-container--default .select2-selection--single,input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.select2-container .select2-selection--single{height:35px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.select2-container:not(.select2-container--open){width:100%!important}input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}​input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}input[type=text],textarea{width:100%}#niteoCS_countdown_redirect,#niteoCS_countdown_text,.table-wrapper.content,.table-wrapper.install,.table-wrapper.seo,.table-wrapper.theme-setup{display:none}.wp-upload-form.cmp{padding:4em;display:block}.cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-status .active{background-color:#ddd}.redirect{margin-bottom:0}.help-settings,.subscribers-settings,.table-wrapper,.translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}div.custom_css{padding-bottom:2em;padding-right:3em;background:white;border:1px solid #dedede}.CodeMirror-wrap{border-right:1px solid #dedede}.custom_css .cmp-submit{padding-left:1em;border-top:1px solid #dedede;padding-top:2em}.cmp-inputs-wrapper .translation input,.cmp-inputs-wrapper .translation textarea{width:100%}.cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.table-wrapper.closed table,.translate-settings tfoot{display:none}.help-settings,.subscribers-settings,.translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.table-wrapper h3,.custom_css h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}#unsplash-media,.background-media td fieldset,.cmp-logo-switch.graphic{padding-top:1em}.table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#niteoCS-text-logo,.theme-title,th label{font-weight:600}.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.table-wrapper h4{margin:0}.table-wrapper table{padding:1em;height:auto;width:90%}.table-wrapper .theme-selector{width:100%}.table-wrapper select{margin-bottom:10px;width:100%}.table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}#unsplash_img,.table-wrapper td.theme-selector{max-width:100%}.table-wrapper th{vertical-align:top;width:180px;text-align:left}#delete-banner,#delete-favicon,#delete-logo,#delete-video-thumb{display:none}.social-media{margin-top:0;margin-bottom:3em}.social-inputs{position:relative}.social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}#niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.social-description{margin-top:0}.social-inputs .label:nth-of-type(2){left:62px}.social-inputs .label:nth-of-type(3){left:148px}.social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.social-media i{font-size:2.45em;cursor:pointer}.social-media i.active{color:#d54e21}.social-inputs li{display:none;width:100%}.social-inputs li.active{display:inline-block}#custom_content_font,#custom_headings_font,.unsplash-feed{display:none}.social-inputs p{position:relative;padding-left:50px;height:50px}.social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.theme-details,.toggle{cursor:pointer}.social-inputs label{padding-left:100px}.social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}#unsplash_img{display:none}.color-preview,.gradient-preview,.pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.theme-overlay .screenshot,.thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.video-wrapper{position:relative;width:100%;margin-top:1em}.video-wrapper video{margin-top:-35px}#add-pattern{margin-bottom:1em}.info{font-size:12px}.nav-tab i{padding-right:3px}.banner-wrapper,.favicon-wrapper,.logo-wrapper{margin:1em 0}.favicon-wrapper img,.logo-wrapper img{background-color:#efefef;padding:1em}.favicon-wrapper img{max-width:32px}.background-media img,.logo-wrapper img{max-width:100%;width:100%}.logo-wrapper img{max-height:150px;width:auto}#font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}#heading-example{border-bottom:none;line-height:1.5;padding:0}.font-selector td:first-of-type{padding-bottom:2em}.font-selector fieldset{padding:.5em 0}.theme-wrapper{display:inline-block;margin:2em 1em 2em 0;width:calc(33.33% - 1.5em + 6px);text-align:center;border:1px solid #efefef;border-radius:6px;position:relative}.theme-wrapper:nth-of-type(3n){margin-right:0}.theme-wrapper.active{background-color:#ddd}.thumbnail-holder{width:100%;border-top-left-radius:5px;border-top-right-radius:5px}.thumbnail-holder::before{content:'';display:block;padding-top:56.25%;-webkit-transition:background-color .1s;transition:background-color .1s;border-top-left-radius:5px;border-top-right-radius:5px}.theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.7)}.toggle,.toggle-wrapper{display:inline-block}.theme-title{float:left;text-transform:uppercase}.theme-version{float:right}.theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px;height:2em;background:#656565;line-height:2em;padding-right:10px;color:white}.active .theme-inputs{background:#27ae60}.theme-inputs .italic{font-style:italic}.theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-button,.cmp-preview,.theme-wrapper .button{height:28px;line-height:28px;padding:0 10px;min-width:80px;border-radius:3px;color:#fff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;box-shadow:none;-webkit-box-shadow:none;text-shadow:none;text-transform:uppercase}.cmp-button.submit,.theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.theme-wrapper a.button:visited,.theme-wrapper a.button:focus{background:transparent;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-button.submit:focus,.cmp-button.submit:hover,.theme-actions .activate:focus,.theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.theme-wrapper .button{border:2px solid #ffffff!important;background:transparent;width:180px;line-height:2.5em;height:3em}.theme-wrapper .button.theme-select input[type=radio]{position:relative;background:transparent;border:none;outline:none;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper .button.theme-select input[type=radio]::before{content:none}.theme-wrapper .button.theme-select input[type=radio]::after{content:'';font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.theme-wrapper .button:hover,.theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.theme-wrapper .button.theme-select:hover input[type=radio]::after,.selected.button{color:#23282d!important}.theme-wrapper .theme-select,.theme-wrapper .theme-preview,.theme-wrapper .theme-purchase{margin-bottom:5px}.theme-wrapper .theme-select.selected{background-color:#32b2ff}.theme-wrapper .theme-details.button{line-height:0em}.cmp-preview{background-color:#2485bf!important}.cmp-preview:active,.cmp-preview:hover{background-color:#32b2ff!important}.theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.theme-info .theme-purchase:focus,.theme-info .theme-purchase:hover{background-color:#34495e}.button i{margin-right:5px}.theme-purchase a,.theme-purchase a:hover,.theme-purchase a:visited{color:#fff;text-decoration:none}p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.fifty-layout input:checked+img,.theme-overlay .screenshots-nav div:hover{opacity:1}.toggle,.toggle:after,.toggle:before{-webkit-transition:all .2s ease-in-out}.theme-overlay .screenshots-nav .left{float:left}.theme-overlay .screenshots-nav .right{float:right}.theme-description ul{list-style:none;padding-left:2em}.theme-description h4,.theme-description li{font-size:13px}.theme-description .supported i{color:green}.theme-description .not-supported i{color:red}.wp-list-table .column-id{width:5%}.cmp-status{margin-bottom:3em}.toggle{position:relative;width:200px;height:30px;font-weight:600;background:0 0;border:2px solid #f1f1f1;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-radius:15px}.toggle:after,.toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}input[type=checkbox].toggle-checkbox{display:none}.toggle_handler{display:inline-block;position:relative;z-index:1;background:#c0392b;width:90px;height:24px;top:3px;left:5px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-radius:10px 0 0 10px}.toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.toggle-wrapper:hover .toggle_handler{background:#e74c3c}.toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.toggle:before{content:"Disabled";left:22px;color:#fff}.toggle-checkbox:checked+.toggle:before,.toggle:after{color:#23282d}.toggle:after{content:"Enabled";right:26px}.toggle-checkbox:checked+.toggle:after{color:#fff}.fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.fifty-layout input{visibility:hidden;position:absolute;margin:0}.fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px}.cmp-sidebar-wrapper{display:inline-block;width:calc(100% - 6em - 920px);max-width:350px;min-width:300px;margin-left:1em;padding-top:0;vertical-align:top;text-align:center}.cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.widget.donate img{max-width:50px}.widget.donate img.niteo-logo{max-width:120px}.cmp-rate-us .button,.cmp-rate-us a{display:block;text-align:center}.cmp-rate-us a{padding:1em 0}.cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-rate-us form{text-align:center}.subscribers .column-id{width:5%}@media screen and (max-width:1450px){.cmp-inputs-wrapper{min-width:70%}.cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.theme-wrapper,.theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.theme-wrapper,.theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.table-wrapper th{display:block}.cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.table-wrapper table{width:100%}.table-wrapper th{width:140px}}@media screen and (max-width:782px){.social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-inputs-wrapper,.cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.theme-overlay .theme-info,.theme-overlay .theme-screenshots{width:100%;float:none}input[type=text],textarea{font-size:13px}}@media screen and (max-width:560px){.social-inputs .label:nth-of-type(2){left:50px}.social-inputs .label:nth-of-type(3){left:105px}.social-inputs p i{top:22px}.social-inputs input[type=checkbox]{top:28px;left:53px}.social-inputs label{padding-left:55px}.social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}}
css/preview-iframe.css CHANGED
@@ -11,7 +11,7 @@ iframe {
11
  height: 100vh;
12
  min-height: 100%;
13
  background-color: rgba(0, 0, 0, 0.5);
14
- opacity: 0;
15
  -webkit-transition: opacity 300ms ease-in-out;
16
  transition: opacity 300ms ease-in-out;
17
  }
11
  height: 100vh;
12
  min-height: 100%;
13
  background-color: rgba(0, 0, 0, 0.5);
14
+ opacity: 1;
15
  -webkit-transition: opacity 300ms ease-in-out;
16
  transition: opacity 300ms ease-in-out;
17
  }
img/thumbnails/eclipse/screenshot1.jpg CHANGED
Binary file
img/thumbnails/eclipse/screenshot2.jpg CHANGED
Binary file
img/thumbnails/fifty/screenshot1.jpg CHANGED
Binary file
img/thumbnails/fifty/screenshot2.jpg CHANGED
Binary file
img/thumbnails/frame/screenshot1.jpg CHANGED
Binary file
img/thumbnails/orbit/screenshot1.jpg CHANGED
Binary file
img/thumbnails/orbit/screenshot2.jpg CHANGED
Binary file
img/thumbnails/orbit/screenshot3.jpg CHANGED
Binary file
img/thumbnails/stylo/screenshot1.jpg ADDED
Binary file
img/thumbnails/stylo/screenshot2.jpg ADDED
Binary file
img/thumbnails/stylo/screenshot3.jpg ADDED
Binary file
img/thumbnails/stylo/screenshot4.jpg ADDED
Binary file
img/thumbnails/stylo/screenshot5.jpg ADDED
Binary file
img/thumbnails/stylo_thumbnail.jpg ADDED
Binary file
inc/class-cmp-render_html.php CHANGED
@@ -9,9 +9,9 @@ class cmp_render_html extends niteo_cmp {
9
  // Render Background
10
  public function cmp_background( $niteoCS_banner, $themeslug, $overlay = false ) {
11
  $size = $this->isMobile() ? 'large' : 'full';
12
-
13
  // change background if preview background is set
14
- if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
15
  $niteoCS_banner = esc_attr($_GET['background']);
16
  $theme = esc_attr($_GET['theme']);
17
 
@@ -53,6 +53,7 @@ class cmp_render_html extends niteo_cmp {
53
  // unsplash
54
  $background_class = 'image';
55
  $unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '3');
 
56
  switch ( $unplash_feed ) {
57
  // specific photo from id
58
  case '0':
@@ -184,188 +185,6 @@ class cmp_render_html extends niteo_cmp {
184
  }
185
 
186
 
187
- // Render Javascripts
188
- public function cmp_javascripts( $background, $themeslug ) {
189
- if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
190
- $background = esc_attr($_GET['background']);
191
- } ?>
192
-
193
- <script>
194
- window.addEventListener("load",function(event) {
195
- init();
196
- });
197
-
198
- function init(){
199
- var image = document.getElementById('background-image');
200
-
201
- if ( image === null ) {
202
- image = document.getElementById('body');
203
- }
204
-
205
- if ( image != null ) {
206
- image.className += " loaded";
207
- }
208
-
209
- // theme specific function after init
210
- <?php
211
- switch ( $themeslug ) {
212
- case 'fifty': ?>
213
- var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
214
- setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
215
-
216
- <?php
217
- break;
218
-
219
- case 'hardwork_premium': ?>
220
- var contentWrapper = document.getElementsByClassName('section-body')[0];
221
- setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
222
- <?php
223
- break;
224
-
225
- case 'construct' :
226
- if ( $background != 5 && $background != 4 ) { ?>
227
- // run paraxify
228
- myParaxify = paraxify('.image', {
229
- speed: 1,
230
- boost: 0.5
231
- });
232
- <?php
233
- }
234
- break;
235
-
236
- default:
237
- break;
238
- } ?>
239
-
240
- }
241
- </script>
242
-
243
- <?php
244
- // if video background ini vidim background player
245
- switch ( $background ) {
246
- // video
247
- case '5': ?>
248
- <script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
249
- <script>
250
- <?php
251
- $video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
252
-
253
- if ( !empty( $video_poster ) ) {
254
- $video_poster = $video_poster[0];
255
- }
256
- // video
257
- $source = get_option('niteoCS_banner_video['.$themeslug.']');
258
-
259
- switch ( $source ) {
260
- case 'YouTube':
261
- $banner_url = get_option('niteoCS_youtube_url['.$themeslug.']'); ?>
262
-
263
- var myBackground = new vidim( '#player', {
264
- src: '<?php echo esc_url( $banner_url ); ?>',
265
- type: 'YouTube',
266
- poster: '<?php echo esc_url( $video_poster ); ?>',
267
- quality: 'hd1080'
268
- }
269
- );
270
-
271
- <?php
272
- break;
273
-
274
- case 'vimeo':
275
- $banner_url = get_option('niteoCS_vimeo_url['.$themeslug.']'); ?>
276
- var myBackground = new vidim( '#player', {
277
- src: '<?php echo esc_url( $banner_url ); ?>',
278
- type: 'vimeo',
279
- poster: '<?php echo esc_url( $video_poster ); ?>',
280
- }
281
- );
282
- <?php
283
- break;
284
-
285
- case 'video/mp4':
286
- $banner_url = get_option('niteoCS_video_file_url['.$themeslug.']');
287
- $banner_url = wp_get_attachment_url( $banner_url ); ?>
288
- var myBackground = new vidim( '#player', {
289
- src: [
290
- {
291
- type: 'video/mp4',
292
- src: '<?php echo esc_url( $banner_url ); ?>',
293
- },
294
- ],
295
- poster: '<?php echo esc_url( $video_poster ); ?>',
296
- });
297
- <?php
298
- break;
299
- default:
300
- break;
301
- } ?>
302
- </script>
303
- <?php
304
- break;
305
- // custom images or unplash
306
- case '0':
307
- case '1':
308
-
309
- if ( get_option('niteoCS_slider['.$themeslug.']', '1') == 1 ) {
310
- $slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
311
- $slider_autoplay = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
312
- // render slice effect scripts
313
- if ( $slider_effect == 'slice' ) { ?>
314
-
315
- <script type='text/javascript' src='<?php echo plugins_url('js/external/imagesloaded.pkgd.min.js', __DIR__);?>'></script>
316
- <script type='text/javascript' src='<?php echo plugins_url('js/external/anime.min.js', __DIR__);?>'></script>
317
- <script type='text/javascript' src='<?php echo plugins_url('js/external/uncover.js', __DIR__);?>'></script>
318
- <script type='text/javascript' src='<?php echo $this->cmp_themeURL($themeslug).$themeslug.'/js/slice.js';?>'></script>
319
- <?php
320
-
321
- // render slick carousel DOM and scripts
322
- } else { ?>
323
-
324
- <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
325
- <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.js'></script>
326
- <script>
327
- $('#slider').slick({
328
- slide: '.slide',
329
- slidesToShow: 1,
330
- arrows: false,
331
- fade: <?php echo esc_attr($slider_effect);?>,
332
- speed: 1000,
333
- autoplay: <?php echo esc_attr($slider_autoplay);?>,
334
- autoplaySpeed: 10000,
335
- });
336
-
337
- $('.prev').click(function() {
338
- $('#slider').slick('slickPrev');
339
- });
340
-
341
- $('.next').click(function() {
342
- $('#slider').slick('slickNext');
343
- });
344
- </script>
345
- <?php
346
- }
347
- }
348
- break;
349
-
350
- default:
351
- break;
352
- }
353
-
354
- // render redirect script if CMP is in redirect mode
355
- if ( $this->cmp_status() == 3 ) {
356
- $url = get_option('niteoCS_URL_redirect');
357
- $time = get_option('niteoCS_redirect_time'); ?>
358
- <script>
359
- setTimeout(function() {
360
- window.location.href = "<?php echo esc_url($url);?>";
361
- }, <?php echo esc_attr($time * 1000);?>);
362
- </script>
363
- <?php
364
- }
365
-
366
- return;
367
- }
368
-
369
  // render slider
370
  public function cmp_slider( $themeslug, $overlay = false ) {
371
 
@@ -417,7 +236,7 @@ class cmp_render_html extends niteo_cmp {
417
 
418
  // unsplash
419
  case '1':
420
- $unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
421
 
422
  switch ( $unplash_feed ) {
423
  // specific photo from id
@@ -512,7 +331,7 @@ class cmp_render_html extends niteo_cmp {
512
  }
513
 
514
  // render Social Icons
515
- public function cmp_social_icons( $mode = 'icon', $title = false ) {
516
 
517
  $html = '';
518
 
@@ -531,6 +350,8 @@ class cmp_render_html extends niteo_cmp {
531
 
532
  $html = $html.'<ul class="social-list">';
533
 
 
 
534
  ob_start();
535
 
536
  foreach ( $socialmedia as $social ) {
@@ -539,19 +360,19 @@ class cmp_render_html extends niteo_cmp {
539
 
540
  switch ($social['name']) {
541
  case 'envelope-o':
542
- echo ( $mode == 'text' ) ? '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank">Email</a></li>' : '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
543
  break;
544
 
545
  case 'phone':
546
- echo ( $mode == 'text' ) ? '<li><a href="tel:'.esc_attr($social['url']).'" target="_blank">'.__('Phone', 'cmp-coming-soon-maintenance').'</a></li>' : '<li><a href="tel:'.esc_html($social['url']).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
547
  break;
548
 
549
  case 'whatsapp':
550
- echo ( $mode == 'text' ) ? '<li><a href="https://api.whatsapp.com/send?phone='.esc_html(str_replace('+', '', $social['url'])).'" target="_blank">'.ucfirst($social['name']).'</a></li>' : '<li><a href="https://api.whatsapp.com/send?phone='.esc_html(str_replace('+', '', $social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
551
  break;
552
 
553
  default:
554
- echo ( $mode == 'text' ) ? '<li><a href="'.esc_url($social['url']).'" target="top">'.ucfirst($social['name']).'</a></li>' : '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
555
  break;
556
  }
557
  }
@@ -614,37 +435,54 @@ class cmp_render_html extends niteo_cmp {
614
  $replace = array('<p>', '</p>' );
615
  $html = str_replace($replace, '', do_shortcode( stripslashes( get_option('niteoCS_subscribe_code') ))) ;
616
 
617
- // if subsctbiers is niteo, render our html form
618
  } else if ( $subscribe == '2' ) {
 
619
  $niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
620
 
621
- if ( get_option('niteoCS_translation') ) {
622
- $translation = json_decode( get_option('niteoCS_translation'), true );
623
- $placeholder = $translation[4]['translation'];
624
- $submit = $translation[8]['translation'];
625
- } else {
626
- $placeholder = 'Insert your email address.';
627
- $submit = 'Submit';
628
- }
629
-
630
- if ($this->cmp_selectedTheme() == 'postery' || (isset($_GET['theme']) && $_GET['theme'] == 'postery') ) {
631
- $submit = '&#xf1d9;';
632
  }
633
 
634
- if ( isset($_GET['theme']) && $_GET['theme'] == 'eclipse' ) {
635
- $niteoCS_subscribe_label = 'SUBSCRIBE US';
636
- } ?>
 
 
 
 
 
 
 
 
 
637
 
638
  <form id="subscribe-form" method="post" class="cmp-subscribe">
639
  <?php wp_nonce_field('save_options','save_options_field'); ?>
640
- <?php
641
- if ( $niteoCS_subscribe_label != '' ) { ?>
642
- <label for="EMAIL"><?php echo esc_html( $niteoCS_subscribe_label );?></label>
643
- <?php
644
- } ?>
645
- <input type="email" id="email-subscribe" name="EMAIL" placeholder="<?php echo esc_attr($placeholder);?>" required>
 
 
 
 
 
 
 
 
646
 
647
- <input type="submit" id="submit-subscribe" value="<?php echo esc_attr($submit);?>">
648
 
649
  <div style="display: none;">
650
  <input type="text" name="form_honeypot" value="" tabindex="-1" autocomplete="off">
@@ -653,18 +491,24 @@ class cmp_render_html extends niteo_cmp {
653
  <div id="subscribe-response"><?php echo isset( $response ) ? $response : '';?></div>
654
 
655
  <div id="subscribe-overlay"></div>
 
656
  </form>
657
 
658
  <script>
659
 
660
  var ajaxurl = "<?php echo admin_url('admin-ajax.php');?>";
661
 
662
- function AJAXform( formID, buttonID, resultID, emailID, formMethod = 'POST' ){
663
 
664
  var selectForm = document.getElementById(formID); // Select the form by ID.
665
  var selectButton = document.getElementById(buttonID); // Select the button by ID.
666
  var selectResult = document.getElementById(resultID); // Select result element by ID.
667
- var emailInput = document.getElementById(emailID); // Select result element by ID.
 
 
 
 
 
668
 
669
  function XMLhttp(){
670
 
@@ -678,10 +522,13 @@ class cmp_render_html extends niteo_cmp {
678
  }
679
 
680
  };
 
 
 
681
 
682
  httpRequest.open(formMethod, ajaxurl, true);
683
  httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
684
- httpRequest.send('action=niteo_subscribe&check=true&form_honeypot&EMAIL=' + emailInput.value);
685
  }
686
 
687
  selectButton.onclick = function(){ // If clicked on the button.
@@ -700,7 +547,7 @@ class cmp_render_html extends niteo_cmp {
700
  /* Usage */
701
  window.addEventListener("load",function(event) {
702
  document.getElementById('submit-subscribe').onclick = function() {
703
- AJAXform( 'subscribe-form', 'submit-subscribe', 'subscribe-response', 'email-subscribe', 'POST' );
704
  }
705
 
706
  });
@@ -769,22 +616,31 @@ class cmp_render_html extends niteo_cmp {
769
  switch ( $theme_preview ) {
770
  case 'hardwork':
771
  case 'hardwork_premium':
772
- echo '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas. Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
773
  break;
774
 
775
  case 'countdown':
776
- echo '<h2>We are currently improving our site</h2>';
777
  break;
778
 
779
  case 'frame':
780
- echo '<p>Stay tuned for new features!</p>';
781
  break;
782
 
783
  case 'orbit':
784
- echo '<p>Orbit is a modern and fun theme for your short maintenance mode. You can set custom background, social icons, footer message and of course the main content. We recommend to keep it simple by setting up only a gradient background.</p>';
 
 
 
 
785
  break;
786
- default:
787
 
 
 
 
 
 
 
788
  break;
789
  }
790
 
@@ -808,18 +664,24 @@ class cmp_render_html extends niteo_cmp {
808
  switch ( $theme_preview ) {
809
  case 'hardwork':
810
  case 'hardwork_premium':
811
- echo '<h2>We will be back soon!</h2>';
 
812
  break;
813
 
814
  case 'eclipse':
815
- echo '<h2>Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a></h2>';
816
  break;
817
 
818
  case 'orbit':
819
- echo '<h2>WE ARE IN ORBIT ! STAY TUNED ...</h2>';
 
 
 
 
820
  break;
821
 
822
  default:
 
823
  break;
824
  }
825
 
@@ -883,11 +745,35 @@ class cmp_render_html extends niteo_cmp {
883
  * @return HTML
884
  **/
885
  public function cmp_get_custom_css() {
886
- if ( get_option('niteoCS_custom_css', '') !== '' ) {
887
- return '<style>'.stripslashes( wp_filter_nohtml_kses( get_option('niteoCS_custom_css') ) ) . '</style>';
 
 
 
 
 
888
  }
889
 
890
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
891
  }
892
 
893
  /**
@@ -916,4 +802,244 @@ class cmp_render_html extends niteo_cmp {
916
  return false;
917
  }
918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
919
  }
9
  // Render Background
10
  public function cmp_background( $niteoCS_banner, $themeslug, $overlay = false ) {
11
  $size = $this->isMobile() ? 'large' : 'full';
12
+ $html = '';
13
  // change background if preview background is set
14
+ if ( isset( $_GET['background'] ) && is_numeric( $_GET['background'] ) ) {
15
  $niteoCS_banner = esc_attr($_GET['background']);
16
  $theme = esc_attr($_GET['theme']);
17
 
53
  // unsplash
54
  $background_class = 'image';
55
  $unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '3');
56
+
57
  switch ( $unplash_feed ) {
58
  // specific photo from id
59
  case '0':
185
  }
186
 
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  // render slider
189
  public function cmp_slider( $themeslug, $overlay = false ) {
190
 
236
 
237
  // unsplash
238
  case '1':
239
+ $unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '3');
240
 
241
  switch ( $unplash_feed ) {
242
  // specific photo from id
331
  }
332
 
333
  // render Social Icons
334
+ public function cmp_social_icons( $mode = 'icon', $title = false, $themeslug = false ) {
335
 
336
  $html = '';
337
 
350
 
351
  $html = $html.'<ul class="social-list">';
352
 
353
+ $theme_html = ( $themeslug == 'stylo' ) ? '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="3em" height="3em" viewBox="0 0 80 80" xml:space="preserve"><circle transform="rotate(-90 40 40)" class="another-circle" cx="40" cy="40" r="36" /></svg>' : '';
354
+
355
  ob_start();
356
 
357
  foreach ( $socialmedia as $social ) {
360
 
361
  switch ($social['name']) {
362
  case 'envelope-o':
363
+ echo ( $mode == 'text' ) ? '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank">Email</a></li>' : '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank">'.$theme_html.'<i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
364
  break;
365
 
366
  case 'phone':
367
+ echo ( $mode == 'text' ) ? '<li><a href="tel:'.esc_attr($social['url']).'" target="_blank">'.__('Phone', 'cmp-coming-soon-maintenance').'</a></li>' : '<li><a href="tel:'.esc_html($social['url']).'" target="_blank">'.$theme_html.'<i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
368
  break;
369
 
370
  case 'whatsapp':
371
+ echo ( $mode == 'text' ) ? '<li><a href="https://api.whatsapp.com/send?phone='.esc_html(str_replace('+', '', $social['url'])).'" target="_blank">'.ucfirst($social['name']).'</a></li>' : '<li><a href="https://api.whatsapp.com/send?phone='.esc_html(str_replace('+', '', $social['url'])).'" target="_blank">'.$theme_html.'<i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
372
  break;
373
 
374
  default:
375
+ echo ( $mode == 'text' ) ? '<li><a href="'.esc_url($social['url']).'" target="top">'.ucfirst($social['name']).'</a></li>' : '<li><a href="'.esc_url($social['url']).'" target="top">'.$theme_html.'<i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
376
  break;
377
  }
378
  }
435
  $replace = array('<p>', '</p>' );
436
  $html = str_replace($replace, '', do_shortcode( stripslashes( get_option('niteoCS_subscribe_code') ))) ;
437
 
438
+ // CMP subscribe form
439
  } else if ( $subscribe == '2' ) {
440
+ // get label
441
  $niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
442
 
443
+ // override label if in Theme preview
444
+ if ( isset( $_GET['theme'] ) ) {
445
+ switch ( $_GET['theme'] ) {
446
+ case 'eclipse':
447
+ $niteoCS_subscribe_label = 'SUBSCRIBE US';
448
+ break;
449
+ default:
450
+ break;
451
+ }
452
+
 
453
  }
454
 
455
+ // get translation if exists
456
+
457
+ $translation = json_decode( get_option('niteoCS_translation'), true );
458
+ $placeholder = isset($translation[4]['translation']) ? $translation[4]['translation'] : 'Insert your email address.';
459
+ $placeholder_firstname = isset($translation[10]['translation']) ? $translation[10]['translation'] : 'First Name';
460
+ $placeholder_lastname = isset($translation[11]['translation']) ? $translation[11]['translation'] : 'First Name';
461
+ $submit = isset($translation[8]['translation']) ? $translation[8]['translation'] : 'Submit';
462
+
463
+ $placeholder = ( ( $this->cmp_selectedTheme() == 'stylo' && !isset( $_GET['theme'] ) ) || ( isset( $_GET['theme'] ) && $_GET['theme'] == 'stylo' ) ) ? '&#xf003; '.$placeholder : $placeholder;
464
+ $submit = ( ( $this->cmp_selectedTheme() == 'postery' && !isset( $_GET['theme'] ) ) || ( isset( $_GET['theme'] ) && $_GET['theme'] == 'postery' ) ) ? '&#xf1d9;' : $submit;
465
+
466
+ ?>
467
 
468
  <form id="subscribe-form" method="post" class="cmp-subscribe">
469
  <?php wp_nonce_field('save_options','save_options_field'); ?>
470
+
471
+ <?php if ( ( $this->cmp_selectedTheme() == 'stylo' && !isset( $_GET['theme'] ) ) || ( isset($_GET['theme']) && $_GET['theme'] == 'stylo' ) ) : ?>
472
+
473
+ <input type="text" id="firstname-subscribe" name="cmp_firstname" placeholder="&#xf2c0; <?php echo esc_attr( $placeholder_firstname );?>">
474
+
475
+ <input type="text" id="lastname-subscribe" name="cmp_lastname" placeholder="&#xf2c0; <?php echo esc_attr( $placeholder_lastname );?>">
476
+
477
+ <?php endif;?>
478
+
479
+ <?php if ( $niteoCS_subscribe_label != '' ) : ?>
480
+ <label for="email"><?php echo esc_html( $niteoCS_subscribe_label );?></label>
481
+ <?php endif;?>
482
+
483
+ <input type="email" id="email-subscribe" name="email" placeholder="<?php echo esc_attr( $placeholder );?>" required>
484
 
485
+ <input type="submit" id="submit-subscribe" value="<?php echo esc_attr( $submit );?>">
486
 
487
  <div style="display: none;">
488
  <input type="text" name="form_honeypot" value="" tabindex="-1" autocomplete="off">
491
  <div id="subscribe-response"><?php echo isset( $response ) ? $response : '';?></div>
492
 
493
  <div id="subscribe-overlay"></div>
494
+
495
  </form>
496
 
497
  <script>
498
 
499
  var ajaxurl = "<?php echo admin_url('admin-ajax.php');?>";
500
 
501
+ function AJAXform( formID, buttonID, resultID, emailID, firstnameID, lastnameID, formMethod = 'POST' ){
502
 
503
  var selectForm = document.getElementById(formID); // Select the form by ID.
504
  var selectButton = document.getElementById(buttonID); // Select the button by ID.
505
  var selectResult = document.getElementById(resultID); // Select result element by ID.
506
+ var emailInput = document.getElementById(emailID); // Select email input by ID.
507
+ var firstnameInput = document.getElementById(firstnameID); // Select firstname input by ID.
508
+ var lastnameInput = document.getElementById(lastnameID); // Select lastname input by ID.
509
+
510
+ var firstname;
511
+ var lastname;
512
 
513
  function XMLhttp(){
514
 
522
  }
523
 
524
  };
525
+
526
+ firstname = ( firstnameInput == null ) ? '' : firstnameInput.value;
527
+ lastname = ( lastnameInput == null ) ? '' : lastnameInput.value;
528
 
529
  httpRequest.open(formMethod, ajaxurl, true);
530
  httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
531
+ httpRequest.send('action=niteo_subscribe&check=true&form_honeypot&email=' + emailInput.value + '&firstname=' + firstname + '&lastname=' + lastname);
532
  }
533
 
534
  selectButton.onclick = function(){ // If clicked on the button.
547
  /* Usage */
548
  window.addEventListener("load",function(event) {
549
  document.getElementById('submit-subscribe').onclick = function() {
550
+ AJAXform( 'subscribe-form', 'submit-subscribe', 'subscribe-response', 'email-subscribe', 'firstname-subscribe', 'lastname-subscribe', 'POST' );
551
  }
552
 
553
  });
616
  switch ( $theme_preview ) {
617
  case 'hardwork':
618
  case 'hardwork_premium':
619
+ return '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas. Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
620
  break;
621
 
622
  case 'countdown':
623
+ return '<h2>We are currently improving our site</h2>';
624
  break;
625
 
626
  case 'frame':
627
+ return '<p>Stay tuned for new features!</p>';
628
  break;
629
 
630
  case 'orbit':
631
+ return '<p>Orbit is a modern and fun theme for your short maintenance mode. You can set custom background, social icons, footer message and of course the main content. We recommend to keep it simple by setting up only a gradient background.</p>';
632
+ break;
633
+
634
+ case 'fifty':
635
+ return '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
636
  break;
 
637
 
638
+ case 'stylo':
639
+ return '<p>You can use <a href="https://niteothemes.com/projects/cmp-stylo-theme/">Stylo</a> as a landing page, maintenance or coming soon page. It supports both subscriber and contact form, all CMP background options and big beautiful counter.</p>';
640
+ break;
641
+
642
+ default:
643
+ return wpautop( stripslashes( get_option('niteoCS_body', '') ) );
644
  break;
645
  }
646
 
664
  switch ( $theme_preview ) {
665
  case 'hardwork':
666
  case 'hardwork_premium':
667
+ case 'fifty':
668
+ return '<h2>We will be back soon!</h2>';
669
  break;
670
 
671
  case 'eclipse':
672
+ return '<h2>Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a></h2>';
673
  break;
674
 
675
  case 'orbit':
676
+ return '<h2>WE ARE IN ORBIT ! STAY TUNED ...</h2>';
677
+ break;
678
+
679
+ case 'stylo':
680
+ return '<h2 class="animated '. $class .'">Something Awesome is Coming!</h2>';
681
  break;
682
 
683
  default:
684
+ return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
685
  break;
686
  }
687
 
745
  * @return HTML
746
  **/
747
  public function cmp_get_custom_css() {
748
+
749
+ $css = '';
750
+
751
+ $themeslug = $this->cmp_selectedTheme();
752
+
753
+ if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
754
+ $themeslug = esc_attr($_GET['theme']);
755
  }
756
 
757
+ // add blur effect if enabled
758
+ if ( get_option('niteoCS_effect['. $themeslug .']', 'disabled') == 'blur' ) {
759
+ $blur = get_option('niteoCS_effect_blur['. $themeslug .']', '0.5');
760
+ ob_start(); ?>
761
+ <style>
762
+ #background-image,.slide-background,.video-banner {filter:blur(<?php echo esc_attr($blur);?>px);transform:scale(1.1);}
763
+ #background-wrapper, .slick-slider {overflow:hidden;}
764
+ #background-image:not(.slide) {background-attachment: initial;}
765
+ </style>
766
+
767
+ <?php
768
+
769
+ $css = ob_get_clean();
770
+ }
771
+
772
+ $custom_css = ( get_option('niteoCS_custom_css', '') != '' ) ? '<style>'.stripslashes( wp_filter_nohtml_kses( get_option('niteoCS_custom_css') ) ).'</style>' : '';
773
+
774
+ $css .= $custom_css ;
775
+
776
+ return $css;
777
  }
778
 
779
  /**
802
  return false;
803
  }
804
 
805
+
806
+ // Render Javascripts
807
+ public function cmp_javascripts( $background, $themeslug ) {
808
+ if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
809
+ $background = esc_attr($_GET['background']);
810
+ } ?>
811
+
812
+ <script>
813
+ window.addEventListener("load",function(event) {
814
+ init();
815
+ });
816
+
817
+ function init(){
818
+ var image = document.getElementById('background-image');
819
+
820
+ if ( image === null ) {
821
+ image = document.getElementById('body');
822
+ }
823
+
824
+ if ( image != null ) {
825
+ image.className += " loaded";
826
+ }
827
+
828
+ // theme specific function after init
829
+ <?php
830
+ switch ( $themeslug ) {
831
+ case 'fifty': ?>
832
+ var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
833
+ setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
834
+
835
+ <?php
836
+ break;
837
+
838
+ case 'hardwork_premium': ?>
839
+ var contentWrapper = document.getElementsByClassName('section-body')[0];
840
+ setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
841
+ <?php
842
+ break;
843
+
844
+ case 'construct' :
845
+ if ( $background != 5 && $background != 4 ) { ?>
846
+ // run paraxify
847
+ myParaxify = paraxify('.image', {
848
+ speed: 1,
849
+ boost: 0.5
850
+ });
851
+ <?php
852
+ }
853
+ break;
854
+
855
+ default:
856
+ break;
857
+ } ?>
858
+
859
+ }
860
+ </script>
861
+
862
+ <?php
863
+ // if video background ini vidim background player
864
+ switch ( $background ) {
865
+ // video
866
+ case '5': ?>
867
+ <script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
868
+ <script>
869
+ <?php
870
+ $video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
871
+
872
+ if ( !empty( $video_poster ) ) {
873
+ $video_poster = $video_poster[0];
874
+ }
875
+ // video
876
+ $source = get_option('niteoCS_banner_video['.$themeslug.']');
877
+
878
+ switch ( $source ) {
879
+ case 'YouTube':
880
+ $banner_url = get_option('niteoCS_youtube_url['.$themeslug.']'); ?>
881
+
882
+ var myBackground = new vidim( '#player', {
883
+ src: '<?php echo esc_url( $banner_url ); ?>',
884
+ type: 'YouTube',
885
+ poster: '<?php echo esc_url( $video_poster ); ?>',
886
+ quality: 'hd1080'
887
+ }
888
+ );
889
+
890
+ <?php
891
+ break;
892
+
893
+ case 'vimeo':
894
+ $banner_url = get_option('niteoCS_vimeo_url['.$themeslug.']'); ?>
895
+ var myBackground = new vidim( '#player', {
896
+ src: '<?php echo esc_url( $banner_url ); ?>',
897
+ type: 'vimeo',
898
+ poster: '<?php echo esc_url( $video_poster ); ?>',
899
+ }
900
+ );
901
+ <?php
902
+ break;
903
+
904
+ case 'video/mp4':
905
+ $banner_url = get_option('niteoCS_video_file_url['.$themeslug.']');
906
+ $banner_url = wp_get_attachment_url( $banner_url ); ?>
907
+ var myBackground = new vidim( '#player', {
908
+ src: [
909
+ {
910
+ type: 'video/mp4',
911
+ src: '<?php echo esc_url( $banner_url ); ?>',
912
+ },
913
+ ],
914
+ poster: '<?php echo esc_url( $video_poster ); ?>',
915
+ });
916
+ <?php
917
+ break;
918
+ default:
919
+ break;
920
+ } ?>
921
+ </script>
922
+ <?php
923
+ break;
924
+ // custom images or unplash
925
+ case '0':
926
+ case '1':
927
+
928
+ if ( get_option('niteoCS_slider['.$themeslug.']', '1') == 1 ) {
929
+ $slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
930
+ $slider_autoplay = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
931
+ // render slice effect scripts
932
+ if ( $slider_effect == 'slice' ) { ?>
933
+
934
+ <script type='text/javascript' src='<?php echo plugins_url('js/external/imagesloaded.pkgd.min.js', __DIR__);?>'></script>
935
+ <script type='text/javascript' src='<?php echo plugins_url('js/external/anime.min.js', __DIR__);?>'></script>
936
+ <script type='text/javascript' src='<?php echo plugins_url('js/external/uncover.js', __DIR__);?>'></script>
937
+ <script type='text/javascript' src='<?php echo $this->cmp_themeURL($themeslug).$themeslug.'/js/slice.js';?>'></script>
938
+ <?php
939
+
940
+ // render slick carousel DOM and scripts
941
+ } else { ?>
942
+
943
+ <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" Crossorigin="anonymous"></script>
944
+ <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.js'></script>
945
+ <script>
946
+ $('#slider').slick({
947
+ slide: '.slide',
948
+ slidesToShow: 1,
949
+ arrows: false,
950
+ fade: <?php echo esc_attr($slider_effect);?>,
951
+ speed: 1000,
952
+ autoplay: <?php echo esc_attr($slider_autoplay);?>,
953
+ autoplaySpeed: 10000,
954
+ });
955
+
956
+ $('.prev').click(function() {
957
+ $('#slider').slick('slickPrev');
958
+ });
959
+
960
+ $('.next').click(function() {
961
+ $('#slider').slick('slickNext');
962
+ });
963
+ </script>
964
+ <?php
965
+ }
966
+ }
967
+ break;
968
+
969
+ default:
970
+ break;
971
+ }
972
+
973
+ // render redirect script if CMP is in redirect mode
974
+ if ( $this->cmp_status() == 3 ) {
975
+ $url = get_option('niteoCS_URL_redirect');
976
+ $time = get_option('niteoCS_redirect_time'); ?>
977
+ <script>
978
+ setTimeout(function() {
979
+ window.location.href = "<?php echo esc_url($url);?>";
980
+ }, <?php echo esc_attr($time * 1000);?>);
981
+ </script>
982
+ <?php
983
+ }
984
+
985
+
986
+ // include jquery and CF7 scripts for stylo theme contact form 7
987
+ if ( $themeslug == 'stylo' && get_option('niteoCS_contact_form_type', 'cf7') == 'cf7' ) {
988
+
989
+ $site_url = str_replace( '/', '\/', site_url() );
990
+
991
+ // load jquery if not already loaded by slider
992
+ if ( get_option('niteoCS_slider['.$themeslug.']', '1') == 1 && (get_option('niteoCS_banner['.$themeslug.']', '1') == 1 || get_option('niteoCS_banner['.$themeslug.']', '1') == 0 ) ) {
993
+
994
+ } else {
995
+ ?>
996
+ <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" Crossorigin="anonymous"></script>
997
+ <?php
998
+ } ?>
999
+
1000
+ <script type='text/javascript'>
1001
+ /* <![CDATA[ */
1002
+ var wpcf7 = {"apiSettings":{"root":"<?php echo $site_url;?>\/wp-json\/contact-form-7\/v1","namespace":"contact-form-7\/v1"},"recaptcha":{"messages":{"empty":"Please verify that you are not a robot."}}};
1003
+ /* ]]> */
1004
+ </script>
1005
+
1006
+ <script type='text/javascript' src='<?php echo plugins_url('contact-form-7/includes/js/scripts.js?ver=5.0.1');?>'></script>
1007
+
1008
+ <?php
1009
+ }
1010
+
1011
+ return false;
1012
+ }
1013
+
1014
+
1015
+ /**
1016
+ * render Contact Form.
1017
+ *
1018
+ * @since 2.5
1019
+ * @return HTML
1020
+ **/
1021
+ public function cmp_contact_form() {
1022
+ $form_type = get_option('niteoCS_contact_form_type', 'cf7');
1023
+
1024
+ if ( $form_type == 'disabled' ) {
1025
+ return false;
1026
+ }
1027
+
1028
+ $form_id = get_option('niteoCS_contact_form_id', '');
1029
+
1030
+ switch ($form_type) {
1031
+ case 'cf7':
1032
+
1033
+ $replace = array('<p>', '</p>' );
1034
+ $html = str_replace( $replace, '', do_shortcode('[contact-form-7 id='.$form_id.']') ) ;
1035
+ break;
1036
+
1037
+ default:
1038
+ $html = '';
1039
+ break;
1040
+ }
1041
+
1042
+ return $html;
1043
+ }
1044
+
1045
  }
inc/class-cmp-subscribers.php CHANGED
@@ -125,7 +125,7 @@ class cmp_subs_list_table extends WP_List_Table {
125
  }
126
 
127
  // if delete action
128
- if ($_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['id'])) {
129
  foreach ($this->subscriber_list as $key => $subscriber) {
130
  // unset posted id from subscribers delete
131
  if ($subscriber['id'] == $_GET['id']) {
@@ -167,6 +167,8 @@ class cmp_subs_list_table extends WP_List_Table {
167
  $columns = array(
168
  'cb' => '<input type="checkbox" />',
169
  'id' => __('ID', 'cmp-coming-soon-maintenance'),
 
 
170
  'email' => __('Email', 'cmp-coming-soon-maintenance'),
171
  'timestamp' => __('Time', 'cmp-coming-soon-maintenance'),
172
  'ip_address' => __('IP Address', 'cmp-coming-soon-maintenance'),
@@ -212,7 +214,9 @@ class cmp_subs_list_table extends WP_List_Table {
212
  return $item[ $column_name ]+1;
213
  case 'email':
214
  case 'ip_address':
215
- return $item[ $column_name ];
 
 
216
 
217
  case 'timestamp':
218
  return date($this->dateformat, $item[ $column_name ]);
125
  }
126
 
127
  // if delete action
128
+ if ( $_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['id']) ) {
129
  foreach ($this->subscriber_list as $key => $subscriber) {
130
  // unset posted id from subscribers delete
131
  if ($subscriber['id'] == $_GET['id']) {
167
  $columns = array(
168
  'cb' => '<input type="checkbox" />',
169
  'id' => __('ID', 'cmp-coming-soon-maintenance'),
170
+ 'firstname' => __('First Name', 'cmp-coming-soon-maintenance'),
171
+ 'lastname' => __('Last Name', 'cmp-coming-soon-maintenance'),
172
  'email' => __('Email', 'cmp-coming-soon-maintenance'),
173
  'timestamp' => __('Time', 'cmp-coming-soon-maintenance'),
174
  'ip_address' => __('IP Address', 'cmp-coming-soon-maintenance'),
214
  return $item[ $column_name ]+1;
215
  case 'email':
216
  case 'ip_address':
217
+ case 'firstname':
218
+ case 'lastname':
219
+ return isset($item[ $column_name ]) ? $item[ $column_name ] : '';
220
 
221
  case 'timestamp':
222
  return date($this->dateformat, $item[ $column_name ]);
inc/preview-selector.php DELETED
@@ -1,158 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html <?php language_attributes(); ?>>
4
- <head>
5
- <meta charset="<?php bloginfo( 'charset' ); ?>">
6
- <meta name="viewport" content="width=device-width, initial-scale=1">
7
-
8
- <?php
9
- $background = '';
10
- $theme_name = '';
11
- $theme_slug = '';
12
- $buy = false;
13
- $buy_url = '#free';
14
- $price = 0;
15
- $premium_themes = $this->cmp_premium_themes();
16
-
17
- if ( isset($_GET['theme']) ) {
18
- $theme_slug = esc_attr($_GET['theme']);
19
- $theme_name = str_replace('_', ' ', ucwords($theme_slug));
20
- $theme_var = '&theme='.esc_attr($_GET['theme']);
21
-
22
- } else {
23
-
24
- $theme_slug = 'hardwork';
25
- $theme_name = 'Hardwork';
26
- $theme_var = '&theme=hardwork';
27
- }
28
-
29
- if ( isset($_GET['background']) && is_numeric($_GET['background'])) {
30
- $background = $_GET['background'];
31
- $background_attr = '&background='.esc_attr($background);
32
- } else {
33
- $background = '1';
34
- $background_attr = '&background=1';
35
- }
36
-
37
- // get buy URL if premium Theme
38
- if ( $this->niteo_in_array_r( $theme_slug, $premium_themes ) ) {
39
- $buy = true;
40
- foreach ( $premium_themes as $premium ) {
41
-
42
- if ( $premium['name'] == $theme_slug ) {
43
- $buy_url = $premium['url'];
44
- $price = $premium['price'];
45
- break;
46
- }
47
- }
48
- } ?>
49
-
50
- <!-- SEO -->
51
- <meta name="description" content="">
52
- <title>Niteothemes CMP <?php echo esc_html( $theme_name ) .' '. __('Preview', 'cmp-coming-soon-maintenance');?></title>
53
-
54
- <?php wp_site_icon(); ?>
55
-
56
- <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) .'/css/preview-iframe.css?ver='.esc_attr( $this->version ) ;?>" type="text/css" media="all">
57
-
58
- <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
59
-
60
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
61
-
62
- <!-- Google analytics code -->
63
- <!-- <script>
64
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
65
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
66
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
67
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
68
-
69
- ga('create', 'UA-71587476-9', 'auto');
70
- ga('send', 'pageview');
71
-
72
- </script> -->
73
-
74
-
75
- </head>
76
-
77
-
78
- <body id="body">
79
-
80
- <div class="background-wrap"></div>
81
-
82
- <div id="preview-customize">
83
- <div class="panel-wrapper">
84
- <div class="panel open">
85
- <a href="#">
86
- <i class="ion ion-levels" aria-hidden="true"></i>
87
- <span><?php _e('Quick Options', 'cmp-coming-soon-maintenance');?></span>
88
- </a>
89
- </div>
90
-
91
- <div class="panel contact">
92
- <a href="mailto:<?php echo antispambot('info@niteothemes.com');?>">
93
- <i class="ion ion-ios-email" aria-hidden="true"></i>
94
- <span><?php _e('Ask Question', 'cmp-coming-soon-maintenance');?></span>
95
- </a>
96
- </div>
97
-
98
- <div class="panel support">
99
- <a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance" target="_blank">
100
- <i class="ion ion-help-buoy" aria-hidden="true"></i>
101
- <span><?php _e('Get Support', 'cmp-coming-soon-maintenance');?></span>
102
- </a>
103
- </div>
104
-
105
- <div class="panel purchase <?php echo ( $buy == true ) ? 'premium' : 'free';?>">
106
- <a href="<?php echo esc_url( $buy_url );?>" target="_blank">
107
- <i class="ion ion-ios-cart" aria-hidden="true"></i>
108
- <span><?php _e('Purchase Theme', 'cmp-coming-soon-maintenance');?></span>
109
- </a>
110
- </div>
111
-
112
- <div class="panel homepage">
113
- <a href="https://niteothemes.com/?utm_source=selector&utm_medium=referral" target="_blank">
114
- <i class="ion ion-ios-home" aria-hidden="true"></i>
115
- <span><?php _e('Visit NiteoThemes', 'cmp-coming-soon-maintenance');?></span>
116
- </a>
117
- </div>
118
- </div>
119
-
120
- <div class="customize-content">
121
-
122
- <div class="theme-selector">
123
- <h3><?php _e('Theme', 'cmp-coming-soon-maintenance');?><span class="theme-name"></span></h3>
124
- <?php
125
- foreach ( $this->theme_array as $slug ) {
126
-
127
- $premium =
128
- $title = str_replace( '_', ' ', ucwords($slug) );
129
- echo '<a href="'.esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $slug ).esc_attr( $background_attr ).'&utm_campaign='.esc_attr( $slug ).'" class="thumbnail" data-name="'.$title.'" data-slug="'.$slug.'">';
130
- echo '<img src="'.plugin_dir_url( dirname( __FILE__ ) ) .'img/thumbnails/'.$slug.'_thumbnail.jpg" alt="CMP '.$title.'">';
131
- echo '</a>';
132
- } ?>
133
- </div>
134
-
135
- <div class="background-selector">
136
- <h3><?php _e('Background', 'cmp-coming-soon-maintenance');?></h3>
137
-
138
- <a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=1" class="thumbnail" data-background="1"><i class="ion ion-image" aria-hidden="true"></i><?php _e('Image', 'cmp-coming-soon-maintenance');?></a>
139
-
140
- <a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=5" class="thumbnail" data-background="5"><i class="ion ion-film-marker" aria-hidden="true"></i><?php _e('Video', 'cmp-coming-soon-maintenance');?></a>
141
-
142
- <a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=3" class="thumbnail" data-background="3"><i class="ion ion-grid" aria-hidden="true"></i><?php _e('Pattern', 'cmp-coming-soon-maintenance');?></a>
143
-
144
- <a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=6" class="thumbnail" data-background="6"><i class="ion ion-android-color-palette" aria-hidden="true"></i><?php _e('Gradient', 'cmp-coming-soon-maintenance');?></a>
145
-
146
- <a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=4" class="thumbnail" data-background="4"><i class="ion ion-paintbucket" aria-hidden="true"></i><?php _e('Color', 'cmp-coming-soon-maintenance');?></a>
147
-
148
- </div>
149
- </div>
150
- </div>
151
-
152
- <iframe src="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true'.esc_attr( $theme_var ).esc_attr( $background_attr );?>" id="theme-preview" frameborder="0" data-slug="<?php echo esc_attr($theme_slug);?>" data-background="<?php echo esc_attr($background);?>" data-premium='<?php echo json_encode($premium_themes);?>'></iframe>
153
-
154
- </body>
155
-
156
- <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
157
- <script type="text/javascript" src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) .'js/preview-iframe.js?ver='.esc_attr( $this->version ) ;?>"></script>
158
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/settings/settings-background_effects.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+
4
+ if (isset($_POST['niteoCS_effect_'.$themeslug])) {
5
+ update_option('niteoCS_effect['.$themeslug.']', sanitize_text_field($_POST['niteoCS_effect_'.$themeslug]));
6
+ }
7
+
8
+
9
+ if (isset($_POST['niteoCS_effect_blur_'.$themeslug]) && is_numeric($_POST['niteoCS_effect_blur_'.$themeslug])) {
10
+ update_option('niteoCS_effect_blur['.$themeslug.']', sanitize_text_field($_POST['niteoCS_effect_blur_'.$themeslug]));
11
+ }
12
+
13
+
14
+ $background_effect = get_option('niteoCS_effect['.$themeslug.']', 'disabled');
15
+ $effect_blur = get_option('niteoCS_effect_blur['.$themeslug.']', '0.5');
16
+
17
+ ?>
18
+ <div class="table-wrapper theme-setup background-effects">
19
+ <h3><?php _e('Background Effects', 'cmp-coming-soon-maintenance');?></h3>
20
+ <table class="theme-setup">
21
+ <tbody>
22
+ <tr>
23
+ <th>
24
+ <fieldset>
25
+ <legend class="screen-reader-text">
26
+ <span><?php _e('Background Effects', 'cmp-coming-soon-maintenance');?></span>
27
+ </legend>
28
+
29
+ <p>
30
+ <label title="Blur">
31
+ <input type="radio" class="background-effect" name="niteoCS_effect_<?php echo esc_attr( $themeslug );?>" value="blur" <?php checked( 'blur', $background_effect );?>>&nbsp;<?php _e('Blur', 'cmp-coming-soon-maintenance');?>
32
+ </label>
33
+ </p>
34
+
35
+ <p>
36
+ <label title="Disabled">
37
+ <input type="radio" class="background-effect" name="niteoCS_effect_<?php echo esc_attr( $themeslug );?>" value="disabled" <?php checked( 'disabled', $background_effect );?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
38
+ </label>
39
+ </p>
40
+
41
+ </fieldset>
42
+ </th>
43
+
44
+ <td>
45
+ <fieldset class="background-effect-switch disabled">
46
+ <p>Disabled</p>
47
+
48
+ </fieldset>
49
+
50
+ <fieldset class="background-effect-switch blur">
51
+
52
+ <label for="niteoCS_effect_blur_<?php echo esc_attr( $themeslug );?>"><?php _e('Blur amount', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $effect_blur ); ?></span>px</label></br>
53
+ <input type="range" class="blur-range" name="niteoCS_effect_blur_<?php echo esc_attr( $themeslug );?>" min="0.5" max="10" step="0.5" value="<?php echo esc_attr( $effect_blur ); ?>" />
54
+ </fieldset>
55
+
56
+ </td>
57
+ </tr>
58
+
59
+ <?php echo $this->render_settings->submit(); ?>
60
+
61
+ </tbody>
62
+ </table>
63
+
64
+ </div>
inc/settings/settings-contact_form.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+
4
+ // contact form
5
+ if ( isset($_POST['niteoCS_contact_form_type']) ) {
6
+ update_option('niteoCS_contact_form_type', sanitize_text_field($_POST['niteoCS_contact_form_type']));
7
+ }
8
+
9
+ // contact form
10
+ if ( isset($_POST['niteoCS_contact_form_id']) && is_numeric($_POST['niteoCS_contact_form_id']) ) {
11
+ update_option('niteoCS_contact_form_id', sanitize_text_field($_POST['niteoCS_contact_form_id']));
12
+ }
13
+
14
+ // contact form
15
+ if ( isset($_POST['niteoCS_contact_form_label']) ) {
16
+ update_option('niteoCS_contact_form_label', sanitize_text_field($_POST['niteoCS_contact_form_label']));
17
+ }
18
+
19
+ // get contact form settings
20
+ $contact_form_type = get_option('niteoCS_contact_form_type', 'cf7');
21
+ $contact_form_id = get_option('niteoCS_contact_form_id', 'disabled');
22
+ $contact_form_label = get_option('niteoCS_contact_form_label', 'Get in Touch');
23
+
24
+ ?>
25
+
26
+ <div class="table-wrapper content" id="contact-form-section">
27
+ <h3><?php _e('Contact Form', 'cmp-coming-soon-maintenance');?></h3>
28
+ <table class="content">
29
+ <tbody>
30
+ <tr>
31
+ <th>
32
+
33
+ <fieldset>
34
+ <legend class="screen-reader-text">
35
+ <span><?php _e('Contact Form Options', 'cmp-coming-soon-maintenance');?></span>
36
+ </legend>
37
+
38
+ <p>
39
+ <label title="3rd Party">
40
+ <input type="radio" class="contact-form" name="niteoCS_contact_form_type" value="cf7" <?php checked( 'cf7', $contact_form_type );?>>&nbsp;<?php _e('3rd Party', 'cmp-coming-soon-maintenance');?>
41
+ </label>
42
+ </p>
43
+
44
+ <p>
45
+ <label title="Disabled">
46
+ <input type="radio" class="contact-form" name="niteoCS_contact_form_type" value="disabled" <?php checked( 'disabled', $contact_form_type );?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
47
+ </label>
48
+ </p>
49
+
50
+ </fieldset>
51
+
52
+ </th>
53
+
54
+ <td id="subscribe-disabled" class="contact-form-switch disabled">
55
+ <p><?php _e('Subscribe Form is disabled.', 'cmp-coming-soon-maintenance');?></p>
56
+ </td>
57
+
58
+ <td id="subscribe-3rdparty" class="contact-form-switch cf7">
59
+ <fieldset>
60
+
61
+ <label for="niteoCS_contact_form_label"><?php _e('Contact Form label', 'cmp-coming-soon-maintenance' );?>
62
+ <input type="text" name="niteoCS_contact_form_label" value="<?php echo esc_attr( $contact_form_label );?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
63
+ </label>
64
+
65
+
66
+ <label for="niteoCS_contact_form_id"><?php _e('Select your contact form', 'cmp-coming-soon-maintenance' );?>
67
+
68
+ <?php
69
+ // if cf7 is activated
70
+ if ( class_exists( 'WPCF7_ContactForm' ) ) {
71
+ $args = array('post_type' => 'wpcf7_contact_form', 'posts_per_page' => -1);
72
+ $cf7forms = get_posts( $args );
73
+
74
+ // if any wpcf7_contact_form exists
75
+ if ( !empty( $cf7forms ) ) {
76
+ $post_ids = wp_list_pluck( $cf7forms , 'ID' );
77
+ $form_titles = wp_list_pluck( $cf7forms , 'post_title' );
78
+ $cf7status = true;
79
+
80
+ } else {
81
+ $cf7status = __( 'No contact forms detected. Please create a new Contact Form 7.', 'cmp-coming-soon-maintenance' );
82
+ }
83
+
84
+ } else {
85
+ $cf7status = __( 'Please install Contact Form 7 plugin to select contact form.', 'cmp-coming-soon-maintenance' );
86
+ } ?>
87
+
88
+
89
+ <select name="niteoCS_contact_form_id" <?php echo ( $cf7status !== true ) ? 'disabled' : '';?>>
90
+ <?php
91
+ if ( $cf7status !== true ) {
92
+ echo '<option value="disabled" selected>'.$cf7status.'</option>';
93
+
94
+ } else {
95
+ $i = 0;
96
+ foreach ( $post_ids as $id ) { ?>
97
+ <option value="<?php echo esc_attr( $id );?>" <?php selected($id, $contact_form_id);?>><?php echo esc_html( $form_titles[$i] );?></option>
98
+ <?php
99
+ $i++;
100
+ }
101
+
102
+ } ?>
103
+ </select>
104
+
105
+ </label>
106
+
107
+ <p><?php printf( __('If the list is empty, please make sure you have installed %s plugin and you have created a Contact Form. If not, you can create new Contact Form in %s > Contact > New', 'cmp-coming-soon-maintenance'), '<a href="https://wordpress.org/plugins/contact-form-7/">Contact Form 7</a>', '<a href="'.get_admin_url().'">Admin</a>');?></p>
108
+ </fieldset>
109
+ </td>
110
+ </tr>
111
+
112
+ <?php echo $this->render_settings->submit(); ?>
113
+
114
+ </tbody>
115
+ </table>
116
+ </div>
inc/settings/settings-contact_form_disabled.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+ ?>
4
+
5
+ <div class="table-wrapper content wrapper-disabled closed" id="contact-form-section">
6
+ <h3><?php _e('Contact Form', 'cmp-coming-soon-maintenance');?></h3>
7
+ <table class="content">
8
+ <tbody>
9
+ <tr>
10
+ <th>
11
+ <fieldset>
12
+ <legend class="screen-reader-text">
13
+ <span><?php _e('Contact Form Options', 'cmp-coming-soon-maintenance');?></span>
14
+ </legend>
15
+
16
+ <p>
17
+ <label title="3rd Party">
18
+ <input disabled type="radio" name="niteoCS_contact_form_type" value="1">&nbsp;<?php _e('3rd Party', 'cmp-coming-soon-maintenance');?>
19
+ </label>
20
+ </p>
21
+
22
+ <p>
23
+ <label title="Disabled">
24
+ <input disabled type="radio" name="niteoCS_contact_form_type" value="0" checked="checked">&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
25
+ </label>
26
+ </p>
27
+
28
+ </fieldset>
29
+ </th>
30
+
31
+ <td id="contact-form-disabled">
32
+ <p><?php _e('Contact Form is disabled or is not supported by selected Theme.', 'cmp-coming-soon-maintenance');?></p>
33
+ </td>
34
+
35
+ </tbody>
36
+ </table>
37
+ </div>
inc/settings/settings-counter.php CHANGED
@@ -89,6 +89,7 @@ $niteoCS_counter_heading = get_option('niteoCS_counter_heading', 'STAY TUNED, W
89
 
90
  <p><?php _e('Click on date input and set a date & time for a Countdown timer.', 'cmp-coming-soon-maintenance');?></p>
91
  <fieldset>
 
92
  <legend class="screen-reader-text">
93
  <span><?php _e('Counter setup', 'cmp-coming-soon-maintenance');?></span>
94
  </legend>
@@ -96,11 +97,13 @@ $niteoCS_counter_heading = get_option('niteoCS_counter_heading', 'STAY TUNED, W
96
  <input type="text" name="niteoCS_counter_date" id="niteoCS_counter_date" placeholder="<?php _e('Select Date..','cmp-coming-soon-maintenance');?>" value="<?php echo esc_attr( $niteoCS_counter_date); ?>" class="regular-text code"><br>
97
 
98
  <label for="niteoCS_countdown_action"><?php _e('Countdown action:', 'cmp-coming-soon-maintenance');?></label>
 
99
  <select name="niteoCS_countdown_action">
100
- <option value="no-action" <?php if ( $niteoCS_countdown_action == 'no-action' ) { echo ' selected="selected"'; } ?>><?php _e('No action', 'cmp-coming-soon-maintenance');?></option>
101
- <!-- <option value="display-text" <?php if ( $niteoCS_countdown_action == 'display-text' ) { echo ' selected="selected"'; } ?>><?php _e('Display custom text', 'cmp-coming-soon-maintenance');?></option> -->
102
- <option value="disable-cmp" <?php if ( $niteoCS_countdown_action == 'disable-cmp' ) { echo ' selected="selected"'; } ?>><?php _e('Disable CMP Plugin Page', 'cmp-coming-soon-maintenance');?></option>
103
- <option value="redirect" <?php if ( $niteoCS_countdown_action == 'redirect' ) { echo ' selected="selected"'; } ?>><?php _e('URL redirect', 'cmp-coming-soon-maintenance');?></option>
 
104
  </select>
105
 
106
  <label for="niteoCS_countdown_text" id="niteoCS_countdown_text"><?php _e('Enter custom text', 'cmp-coming-soon-maintenance');?>
@@ -110,6 +113,7 @@ $niteoCS_counter_heading = get_option('niteoCS_counter_heading', 'STAY TUNED, W
110
  <label for="niteoCS_countdown_redirect" id="niteoCS_countdown_redirect"><?php _e('Enter redirect URL', 'cmp-coming-soon-maintenance');?>
111
  <input type="text" name="niteoCS_countdown_redirect" value="<?php echo esc_url( $niteoCS_countdown_redirect); ?>" class="regular-text code"><br>
112
  </label>
 
113
  </fieldset>
114
  </td>
115
  </tr>
89
 
90
  <p><?php _e('Click on date input and set a date & time for a Countdown timer.', 'cmp-coming-soon-maintenance');?></p>
91
  <fieldset>
92
+
93
  <legend class="screen-reader-text">
94
  <span><?php _e('Counter setup', 'cmp-coming-soon-maintenance');?></span>
95
  </legend>
97
  <input type="text" name="niteoCS_counter_date" id="niteoCS_counter_date" placeholder="<?php _e('Select Date..','cmp-coming-soon-maintenance');?>" value="<?php echo esc_attr( $niteoCS_counter_date); ?>" class="regular-text code"><br>
98
 
99
  <label for="niteoCS_countdown_action"><?php _e('Countdown action:', 'cmp-coming-soon-maintenance');?></label>
100
+
101
  <select name="niteoCS_countdown_action">
102
+
103
+ <option value="no-action" <?php if ( $niteoCS_countdown_action == 'no-action' ) { echo ' selected="selected"'; } ?>><?php _e('No action', 'cmp-coming-soon-maintenance');?></option>
104
+ <option value="disable-cmp" <?php if ( $niteoCS_countdown_action == 'disable-cmp' ) { echo ' selected="selected"'; } ?>><?php _e('Disable CMP Plugin Page', 'cmp-coming-soon-maintenance');?></option>
105
+ <option value="redirect" <?php if ( $niteoCS_countdown_action == 'redirect' ) { echo ' selected="selected"'; } ?>><?php _e('URL redirect', 'cmp-coming-soon-maintenance');?></option>
106
+
107
  </select>
108
 
109
  <label for="niteoCS_countdown_text" id="niteoCS_countdown_text"><?php _e('Enter custom text', 'cmp-coming-soon-maintenance');?>
113
  <label for="niteoCS_countdown_redirect" id="niteoCS_countdown_redirect"><?php _e('Enter redirect URL', 'cmp-coming-soon-maintenance');?>
114
  <input type="text" name="niteoCS_countdown_redirect" value="<?php echo esc_url( $niteoCS_countdown_redirect); ?>" class="regular-text code"><br>
115
  </label>
116
+
117
  </fieldset>
118
  </td>
119
  </tr>
inc/settings/settings-footer.php CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  <div class="table-wrapper content" id="copyright-section">
2
  <h3><?php _e('Footer Content', 'cmp-coming-soon-maintenance');?></h3>
3
  <table class="content">
@@ -10,6 +20,17 @@
10
  </fieldset>
11
  </td>
12
  </tr>
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  <?php echo $this->render_settings->submit(); ?>
15
 
@@ -18,7 +39,6 @@
18
  </div>
19
 
20
  <?php if ( $this->cmp_selectedTheme() == 'eclipse' ):
21
-
22
  if (isset($_POST['niteoCS_contact_content_'.$themeslug])) {
23
  update_option('niteoCS_contact_content['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_content_'.$themeslug]));
24
  }
@@ -31,17 +51,12 @@
31
  update_option('niteoCS_contact_title['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_title_'.$themeslug]));
32
  }
33
 
34
- if (isset($_POST['niteoCS_contact_email_'.$themeslug])) {
35
- update_option('niteoCS_contact_email['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_email_'.$themeslug]));
36
- }
37
-
38
  if (isset($_POST['niteoCS_contact_phone_'.$themeslug])) {
39
  update_option('niteoCS_contact_phone['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_phone_'.$themeslug]));
40
  }
41
 
42
  $niteoCS_contact_content = stripslashes(get_option('niteoCS_contact_content['.$themeslug.']', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'));
43
  $niteoCS_contact_title = get_option('niteoCS_contact_title['.$themeslug.']', 'Quick Contacts');
44
- $niteoCS_contact_email = get_option('niteoCS_contact_email['.$themeslug.']', 'john.doe@email.com');
45
  $niteoCS_contact_phone = get_option('niteoCS_contact_phone['.$themeslug.']', '+123456789'); ?>
46
 
47
  <div class="table-wrapper content">
1
+ <?php
2
+ if (isset($_POST['niteoCS_contact_email_'.$themeslug])) {
3
+ update_option('niteoCS_contact_email['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_email_'.$themeslug]));
4
+ }
5
+
6
+ $niteoCS_contact_email = get_option('niteoCS_contact_email['.$themeslug.']', 'john.doe@email.com');
7
+ ?>
8
+
9
+
10
+
11
  <div class="table-wrapper content" id="copyright-section">
12
  <h3><?php _e('Footer Content', 'cmp-coming-soon-maintenance');?></h3>
13
  <table class="content">
20
  </fieldset>
21
  </td>
22
  </tr>
23
+
24
+ <?php if ( $this->cmp_selectedTheme() == 'stylo' ): ?>
25
+ <tr>
26
+ <th><h4><?php _e('Contact Email', 'cmp-coming-soon-maintenance');?></h4></th>
27
+ <td>
28
+ <fieldset>
29
+ <input type="text" name="niteoCS_contact_email_<?php echo esc_attr($themeslug);?>" value="<?php echo esc_attr( $niteoCS_contact_email );?>" class="regular-text code">
30
+ </fieldset>
31
+ </td>
32
+ </tr>
33
+ <?php endif;?>
34
 
35
  <?php echo $this->render_settings->submit(); ?>
36
 
39
  </div>
40
 
41
  <?php if ( $this->cmp_selectedTheme() == 'eclipse' ):
 
42
  if (isset($_POST['niteoCS_contact_content_'.$themeslug])) {
43
  update_option('niteoCS_contact_content['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_content_'.$themeslug]));
44
  }
51
  update_option('niteoCS_contact_title['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_title_'.$themeslug]));
52
  }
53
 
 
 
 
 
54
  if (isset($_POST['niteoCS_contact_phone_'.$themeslug])) {
55
  update_option('niteoCS_contact_phone['.$themeslug.']', sanitize_text_field($_POST['niteoCS_contact_phone_'.$themeslug]));
56
  }
57
 
58
  $niteoCS_contact_content = stripslashes(get_option('niteoCS_contact_content['.$themeslug.']', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'));
59
  $niteoCS_contact_title = get_option('niteoCS_contact_title['.$themeslug.']', 'Quick Contacts');
 
60
  $niteoCS_contact_phone = get_option('niteoCS_contact_phone['.$themeslug.']', '+123456789'); ?>
61
 
62
  <div class="table-wrapper content">
inc/settings/settings-logo.php CHANGED
@@ -14,19 +14,19 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
14
 
15
  <p>
16
  <label title="<?php _e('Text Logo', 'cmp-coming-soon-maintenance');?>">
17
- <input type="radio" class="niteoCS-logo-type" name="niteoCS_logo_type_<?php echo esc_attr($themeslug);?>" value="text"<?php if ( $niteoCS_logo_type == 'text') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Text Logo', 'cmp-coming-soon-maintenance');?>
18
  </label>
19
  </p>
20
 
21
  <p>
22
  <label title="<?php _e('Graphic Logo', 'cmp-coming-soon-maintenance');?>">
23
- <input type="radio" class="niteoCS-logo-type" name="niteoCS_logo_type_<?php echo esc_attr($themeslug);?>" value="graphic"<?php if ( $niteoCS_logo_type == 'graphic') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Graphic Logo', 'cmp-coming-soon-maintenance');?>
24
  </label>
25
  </p>
26
 
27
  <p>
28
  <label title="<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>">
29
- <input type="radio" class="niteoCS-logo-type" name="niteoCS_logo_type_<?php echo esc_attr($themeslug);?>" value="disabled"<?php if ( $niteoCS_logo_type == 'disabled') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
30
  </label>
31
  </p>
32
 
@@ -34,14 +34,13 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
34
  </th>
35
 
36
  <td>
37
- <fieldset class="text-logo" <?php echo ( $niteoCS_logo_type != 'text') ? 'style="display:none"' : '';?>>
38
-
39
  <p>
40
- <input type="text" class="widefat" id="niteoCS-text-logo" name="niteoCS_text_logo_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_text_logo); ?>" />
41
  </p>
42
  </fieldset>
43
 
44
- <fieldset class="graphic-logo" <?php echo ( $niteoCS_logo_type != 'graphic') ? 'style="display:none"' : '';?>>
45
 
46
  <input type="hidden" class="widefat" id="niteoCS-logo-id" name="niteoCS_logo_id_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_logo_id ); ?>" />
47
  <input id="add-logo" type="button" class="button" value="Select Logo" />
@@ -56,7 +55,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
56
 
57
  </fieldset>
58
 
59
- <p class="disabled-logo" <?php echo ( $niteoCS_logo_type != 'disabled') ? 'style="display:none"' : '';?>><?php _e('Logo is disabled', 'cmp-coming-soon-maintenance');?></p>
60
  </td>
61
  </tr>
62
 
14
 
15
  <p>
16
  <label title="<?php _e('Text Logo', 'cmp-coming-soon-maintenance');?>">
17
+ <input type="radio" class="cmp-logo" name="niteoCS_logo_type_<?php echo esc_attr($themeslug);?>" value="text"<?php if ( $niteoCS_logo_type == 'text') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Text Logo', 'cmp-coming-soon-maintenance');?>
18
  </label>
19
  </p>
20
 
21
  <p>
22
  <label title="<?php _e('Graphic Logo', 'cmp-coming-soon-maintenance');?>">
23
+ <input type="radio" class="cmp-logo" name="niteoCS_logo_type_<?php echo esc_attr($themeslug);?>" value="graphic"<?php if ( $niteoCS_logo_type == 'graphic') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Graphic Logo', 'cmp-coming-soon-maintenance');?>
24
  </label>
25
  </p>
26
 
27
  <p>
28
  <label title="<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>">
29
+ <input type="radio" class="cmp-logo" name="niteoCS_logo_type_<?php echo esc_attr($themeslug);?>" value="disabled"<?php if ( $niteoCS_logo_type == 'disabled') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
30
  </label>
31
  </p>
32
 
34
  </th>
35
 
36
  <td>
37
+ <fieldset class="cmp-logo-switch text">
 
38
  <p>
39
+ <input type="text" class="widefat" id="niteoCS-text-logo" name="niteoCS_text_logo_<?php echo esc_attr($themeslug);?>" type="text" placeholder="<?php _e('Click to set..', 'cmp-coming-soon-maintenance');?>" value="<?php echo esc_attr($niteoCS_text_logo); ?>" />
40
  </p>
41
  </fieldset>
42
 
43
+ <fieldset class="cmp-logo-switch graphic">
44
 
45
  <input type="hidden" class="widefat" id="niteoCS-logo-id" name="niteoCS_logo_id_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_logo_id ); ?>" />
46
  <input id="add-logo" type="button" class="button" value="Select Logo" />
55
 
56
  </fieldset>
57
 
58
+ <p class="cmp-logo-switch disabled"><?php _e('Logo is disabled', 'cmp-coming-soon-maintenance');?></p>
59
  </td>
60
  </tr>
61
 
inc/settings/settings-slider.php CHANGED
@@ -36,6 +36,7 @@ $niteoCS_slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 't
36
  $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '0');
37
  $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
38
 
 
39
  ?>
40
 
41
  <div class="table-wrapper theme-setup slider">
@@ -145,19 +146,10 @@ jQuery(document).ready(function($){
145
  }
146
  break;
147
 
148
- case '2':
149
- jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
150
- break;
151
- case '3':
152
- jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
153
- break;
154
- case '4':
155
- jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
156
- break;
157
  default:
158
  jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
159
  }
160
- });
161
 
162
 
163
  });
36
  $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '0');
37
  $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
38
 
39
+
40
  ?>
41
 
42
  <div class="table-wrapper theme-setup slider">
146
  }
147
  break;
148
 
 
 
 
 
 
 
 
 
 
149
  default:
150
  jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
151
  }
152
+ }).trigger('change');
153
 
154
 
155
  });
inc/settings/settings-subscribe.php CHANGED
@@ -1,5 +1,27 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ?>
4
 
5
  <div class="table-wrapper content" id="subscribe-section">
@@ -15,30 +37,30 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
15
 
16
  <p>
17
  <label title="Niteo Subscribe">
18
- <input type="radio" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Niteo Subscribe', 'cmp-coming-soon-maintenance');?>
19
  </label>
20
  </p>
21
 
22
  <p>
23
  <label title="3rd Party Plugin">
24
- <input type="radio" name="niteoCS_subscribe_type" value="1"<?php if ( $niteoCS_subscribe_type == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('3rd Party Plugin', 'cmp-coming-soon-maintenance');?>
25
  </label>
26
  </p>
27
 
28
  <p>
29
  <label title="Disabled">
30
- <input type="radio" name="niteoCS_subscribe_type" value="0"<?php if ( $niteoCS_subscribe_type == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
31
  </label>
32
  </p>
33
 
34
  </fieldset>
35
  </th>
36
 
37
- <td id="subscribe-disabled">
38
  <p><?php _e('Subscribe Form is disabled.', 'cmp-coming-soon-maintenance');?></p>
39
  </td>
40
 
41
- <td id="subscribe-3rdparty">
42
  <fieldset>
43
  <label class="subscribe" for="niteoCS_subscribe_code">3rd Party Plugin Shortcode
44
  <input type="text" name="niteoCS_subscribe_code" id="niteoCS_subscribe_code" value="<?php echo stripslashes( esc_attr($niteoCS_subscribe_code ));?>" class="regular-text code">
@@ -57,7 +79,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
57
  </fieldset>
58
  </td>
59
 
60
- <td id="subscribe-niteo">
61
  <fieldset>
62
  <p><?php _e('Default subscribe form will be displayed to visitors. Only export of email addresses to .csv file is supported. Mailing List will be deleted after deletion of CMP plugin.', 'cmp-coming-soon-maintenance');?></p>
63
 
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+
4
+
5
+ if (isset($_POST['niteoCS_subscribe_type']) && is_numeric($_POST['niteoCS_subscribe_type'])) {
6
+ update_option('niteoCS_subscribe_type', sanitize_text_field($_POST['niteoCS_subscribe_type']));
7
+ }
8
+
9
+ if (isset($_POST['niteoCS_subscribe_label'])) {
10
+ update_option('niteoCS_subscribe_label', sanitize_text_field($_POST['niteoCS_subscribe_label']));
11
+ }
12
+
13
+ if ( isset($_POST['niteoCS_subscribe_code']) ) {
14
+ $shortcode = str_replace('"', '\'', $_POST['niteoCS_subscribe_code']);
15
+ update_option('niteoCS_subscribe_code', sanitize_text_field($shortcode));
16
+ }
17
+
18
+ // get subscribe settings
19
+ $niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
20
+ $niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
21
+ $niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
22
+ $niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
23
+
24
+
25
  ?>
26
 
27
  <div class="table-wrapper content" id="subscribe-section">
37
 
38
  <p>
39
  <label title="Niteo Subscribe">
40
+ <input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Niteo Subscribe', 'cmp-coming-soon-maintenance');?>
41
  </label>
42
  </p>
43
 
44
  <p>
45
  <label title="3rd Party Plugin">
46
+ <input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="1"<?php if ( $niteoCS_subscribe_type == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('3rd Party Plugin', 'cmp-coming-soon-maintenance');?>
47
  </label>
48
  </p>
49
 
50
  <p>
51
  <label title="Disabled">
52
+ <input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="0"<?php if ( $niteoCS_subscribe_type == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
53
  </label>
54
  </p>
55
 
56
  </fieldset>
57
  </th>
58
 
59
+ <td id="subscribe-disabled" class="subscribe-switch x0">
60
  <p><?php _e('Subscribe Form is disabled.', 'cmp-coming-soon-maintenance');?></p>
61
  </td>
62
 
63
+ <td id="subscribe-3rdparty" class="subscribe-switch x1">
64
  <fieldset>
65
  <label class="subscribe" for="niteoCS_subscribe_code">3rd Party Plugin Shortcode
66
  <input type="text" name="niteoCS_subscribe_code" id="niteoCS_subscribe_code" value="<?php echo stripslashes( esc_attr($niteoCS_subscribe_code ));?>" class="regular-text code">
79
  </fieldset>
80
  </td>
81
 
82
+ <td id="subscribe-niteo" class="subscribe-switch x2">
83
  <fieldset>
84
  <p><?php _e('Default subscribe form will be displayed to visitors. Only export of email addresses to .csv file is supported. Mailing List will be deleted after deletion of CMP plugin.', 'cmp-coming-soon-maintenance');?></p>
85
 
js/settings.js CHANGED
@@ -4,15 +4,20 @@ jQuery(document).ready(function($){
4
  var tab = document.location.hash.substring(1);
5
  var action = jQuery('#csoptions').attr('action');
6
 
 
 
 
 
7
  navtab = function(tab) {
8
-
9
  jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');
10
  jQuery('.nav-tab-wrapper .' + tab).addClass('nav-tab-active');
11
 
12
  jQuery('.table-wrapper.' + tab).css('display', 'block');
 
13
  jQuery('.comingsoon.' + tab).css('display', 'block');
14
 
15
  jQuery('.table-wrapper:not(.' + tab + ')').css('display', 'none');
 
16
  jQuery('.comingsoon:not(.' + tab + ')').css('display', 'none');
17
 
18
  if ( tab == 'install' ) {
@@ -25,8 +30,10 @@ jQuery(document).ready(function($){
25
  }
26
  }
27
 
28
- if (tab != '') {
29
  navtab(tab);
 
 
30
  }
31
 
32
  window.onhashchange = function(){
@@ -40,6 +47,33 @@ jQuery(document).ready(function($){
40
  document.location.hash = tab;
41
  });
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  jQuery('#cmp-status').click(function(){
45
  jQuery('.cmp-status input[type=radio]').prop("disabled", (_, val) => !val);
@@ -77,25 +111,6 @@ jQuery(document).ready(function($){
77
  jQuery(this).parent().toggleClass('closed');
78
  });
79
 
80
- // Logo type inputs
81
- jQuery('.niteoCS-logo-type').change(function() {
82
-
83
- if ( jQuery('.niteoCS-logo-type:checked' ).val() == 'text' ) {
84
- jQuery('.text-logo').css('display','block');
85
- jQuery('.graphic-logo').css('display','none');
86
- jQuery('.disabled-logo').css('display','none');
87
-
88
- } else if ( jQuery('.niteoCS-logo-type:checked' ).val() == 'graphic' ) {
89
- jQuery('.text-logo').css('display','none');
90
- jQuery('.graphic-logo').css('display','block');
91
- jQuery('.disabled-logo').css('display','none');
92
-
93
- } else if ( jQuery('.niteoCS-logo-type:checked' ).val() == 'disabled' ) {
94
- jQuery('.text-logo').css('display','none');
95
- jQuery('.graphic-logo').css('display','none');
96
- jQuery('.disabled-logo').css('display','block');
97
- }
98
- });
99
 
100
  // test unsplash image
101
  jQuery('#test-unsplash').click(function(e){
@@ -207,14 +222,6 @@ jQuery(document).ready(function($){
207
  });
208
 
209
 
210
-
211
- // change all selects to select2
212
- jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({
213
- width: '100%',
214
- minimumResultsForSearch: -1,
215
-
216
- });
217
-
218
  videoPreview = function() {
219
  var source = $('.banner-video-source').val();
220
  $('.video-wrapper').css('padding-top', '0');
@@ -439,40 +446,6 @@ jQuery(document).ready(function($){
439
  }
440
  });
441
 
442
- // hiding subscribe from on load
443
- if ( jQuery('#niteoCS_subscribe').prop('checked') == true) {
444
- jQuery('.subscribe').css('display','block')
445
- }
446
-
447
- // hiding subscribe from on change
448
- jQuery('#niteoCS_subscribe').change(function() {
449
-
450
- if( jQuery(this)[0].checked ) {
451
- jQuery('.subscribe').css('display','block')
452
- } else {
453
- jQuery('.subscribe').css('display','none')
454
- }
455
- });
456
-
457
- // hiding subscribe on change
458
- jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function() {
459
- if ( jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked' ).val() == 0 ) {
460
- jQuery('#subscribe-disabled').css('display','block');
461
- jQuery('#subscribe-3rdparty').css('display','none');
462
- jQuery('#subscribe-niteo').css('display','none');
463
-
464
- } else if ( jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked' ).val() == 1 ) {
465
- jQuery('#subscribe-disabled').css('display','none');
466
- jQuery('#subscribe-3rdparty').css('display','block');
467
- jQuery('#subscribe-niteo').css('display','none');
468
- } else {
469
- jQuery('#subscribe-disabled').css('display','none');
470
- jQuery('#subscribe-3rdparty').css('display','none');
471
- jQuery('#subscribe-niteo').css('display','block');
472
- }
473
- });
474
-
475
-
476
  // preview animation
477
  jQuery('.heading-animation').on('change', function() {
478
  heading_anim = jQuery('.heading-animation option:selected').val();
@@ -613,7 +586,7 @@ jQuery(document).ready(function($){
613
  };
614
 
615
  $parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');
616
- console.log(data);
617
  $.post(ajaxurl, data, function(response) {
618
  response = response.trim();
619
  if (response == 'success') {
@@ -853,27 +826,7 @@ jQuery(document).ready(function($){
853
 
854
  });
855
 
856
- jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');
857
-
858
- media_upload_button('logo', false, 'image');
859
- media_upload_button('favicon', false, 'image');
860
- media_upload_button('images', true, 'image');
861
- media_upload_button('pattern', false, 'image');
862
- media_upload_button('video-thumb', false, 'image');
863
- media_upload_button('video', false, 'video');
864
-
865
- $('#niteoCS_overlay_opacity').on('input', function () {
866
- $(this).trigger('change');
867
- });
868
-
869
- jQuery('#niteoCS_overlay_opacity').change(function(){
870
- if (this.value == 0) {
871
- jQuery('#current-opacity').html(': transparent');
872
-
873
- } else {
874
- jQuery('#current-opacity').html(': '+this.value);
875
- }
876
- });
877
 
878
 
879
  // define functions //
@@ -972,14 +925,13 @@ jQuery(document).ready(function($){
972
  });
973
  }
974
 
975
- toggle_settings( 'analytics' );
976
 
977
  function toggle_settings ( classname ) {
978
-
979
  // Logo type inputs
980
  jQuery('.'+classname).change(function() {
981
 
982
  var value = jQuery('.'+classname+':checked' ).val();
 
983
 
984
  jQuery('.'+classname+'-switch.'+value).css('display','block');
985
  jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none');
@@ -990,6 +942,18 @@ jQuery(document).ready(function($){
990
 
991
  }
992
 
 
 
 
 
 
 
 
 
 
 
 
 
993
  });
994
 
995
 
4
  var tab = document.location.hash.substring(1);
5
  var action = jQuery('#csoptions').attr('action');
6
 
7
+ // ini custom css textarea to codeEditor
8
+ wp.codeEditor.initialize('niteoCS_custom_css');
9
+
10
+ // function to tab navigation
11
  navtab = function(tab) {
 
12
  jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');
13
  jQuery('.nav-tab-wrapper .' + tab).addClass('nav-tab-active');
14
 
15
  jQuery('.table-wrapper.' + tab).css('display', 'block');
16
+ jQuery('.table-wrapper-css.' + tab).css('display', 'block');
17
  jQuery('.comingsoon.' + tab).css('display', 'block');
18
 
19
  jQuery('.table-wrapper:not(.' + tab + ')').css('display', 'none');
20
+ jQuery('.table-wrapper-css:not(.' + tab).css('display', 'none');
21
  jQuery('.comingsoon:not(.' + tab + ')').css('display', 'none');
22
 
23
  if ( tab == 'install' ) {
30
  }
31
  }
32
 
33
+ if ( tab != '' ) {
34
  navtab(tab);
35
+ } else {
36
+ jQuery('.table-wrapper-css').css('display', 'none');
37
  }
38
 
39
  window.onhashchange = function(){
47
  document.location.hash = tab;
48
  });
49
 
50
+ // update range inputs on change
51
+ update_range('.blur-range');
52
+ update_range('.overlay-opacity');
53
+
54
+ // create media upload buttons
55
+ media_upload_button('logo', false, 'image');
56
+ media_upload_button('favicon', false, 'image');
57
+ media_upload_button('images', true, 'image');
58
+ media_upload_button('pattern', false, 'image');
59
+ media_upload_button('video-thumb', false, 'image');
60
+ media_upload_button('video', false, 'video');
61
+
62
+ // show / hide settings
63
+ toggle_settings( 'analytics' );
64
+ toggle_settings( 'contact-form' );
65
+ toggle_settings( 'subscribe' );
66
+ toggle_settings( 'background-effect' );
67
+ toggle_settings( 'cmp-logo' );
68
+
69
+
70
+ // change all selects to select2
71
+ jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({
72
+ width: '100%',
73
+ minimumResultsForSearch: -1,
74
+
75
+ });
76
+
77
 
78
  jQuery('#cmp-status').click(function(){
79
  jQuery('.cmp-status input[type=radio]').prop("disabled", (_, val) => !val);
111
  jQuery(this).parent().toggleClass('closed');
112
  });
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  // test unsplash image
116
  jQuery('#test-unsplash').click(function(e){
222
  });
223
 
224
 
 
 
 
 
 
 
 
 
225
  videoPreview = function() {
226
  var source = $('.banner-video-source').val();
227
  $('.video-wrapper').css('padding-top', '0');
446
  }
447
  });
448
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
449
  // preview animation
450
  jQuery('.heading-animation').on('change', function() {
451
  heading_anim = jQuery('.heading-animation option:selected').val();
586
  };
587
 
588
  $parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');
589
+
590
  $.post(ajaxurl, data, function(response) {
591
  response = response.trim();
592
  if (response == 'success') {
826
 
827
  });
828
 
829
+ // jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
830
 
831
 
832
  // define functions //
925
  });
926
  }
927
 
 
928
 
929
  function toggle_settings ( classname ) {
 
930
  // Logo type inputs
931
  jQuery('.'+classname).change(function() {
932
 
933
  var value = jQuery('.'+classname+':checked' ).val();
934
+ value = ( jQuery.isNumeric(value) ) ? 'x'+value : value;
935
 
936
  jQuery('.'+classname+'-switch.'+value).css('display','block');
937
  jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none');
942
 
943
  }
944
 
945
+
946
+
947
+ function update_range ( selector ) {
948
+ jQuery( selector ).on('input', function () {
949
+ var value = jQuery(this).val();
950
+
951
+ // change label value
952
+ jQuery(this).parent().find('span').html(value);
953
+
954
+ });
955
+ }
956
+
957
  });
958
 
959
 
js/settings.min.js CHANGED
@@ -1,35 +1,35 @@
1
- jQuery(document).ready(function($){var formChanged=!1;var tab=document.location.hash.substring(1);var action=jQuery('#csoptions').attr('action');navtab=function(tab){jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');jQuery('.nav-tab-wrapper .'+tab).addClass('nav-tab-active');jQuery('.table-wrapper.'+tab).css('display','block');jQuery('.comingsoon.'+tab).css('display','block');jQuery('.table-wrapper:not(.'+tab+')').css('display','none');jQuery('.comingsoon:not(.'+tab+')').css('display','none');if(tab=='install'){jQuery('.submit').css('display','none');jQuery('#csoptions').attr('action',action)}else{jQuery('.submit').css('display','block');jQuery('#csoptions').attr('action',action+'#'+tab)}}
2
- if(tab!=''){navtab(tab)}
3
  window.onhashchange=function(){tab=document.location.hash.substring(1);navtab(tab)}
4
- $('.nav-tab:not(.theme-preview)').click(function(e){e.preventDefault();tab=$(this).data('tab');document.location.hash=tab});jQuery('#cmp-status').click(function(){jQuery('.cmp-status input[type=radio]').prop("disabled",(_,val)=>!val);jQuery('#cmp-status-menubar').prop("checked",(_,val)=>!val)});cmp_status_inputs();function cmp_status_inputs(){jQuery('.cmp-status legend:not(.disabled)').click(function(){if(jQuery('#cmp-status').prop('checked')==!1){return}
5
  var $children=jQuery(this).children('input');$children.prop("checked",!0);jQuery('.cmp-status legend').removeClass('active');jQuery(this).addClass('active');$children.trigger('change');if($children.val()=='3'){jQuery('.redirect-inputs').fadeIn('fast')}else{jQuery('.redirect-inputs').fadeOut('fast')}})}
6
- jQuery('.table-wrapper h3').click(function(){jQuery(this).parent().toggleClass('closed')});jQuery('.niteoCS-logo-type').change(function(){if(jQuery('.niteoCS-logo-type:checked').val()=='text'){jQuery('.text-logo').css('display','block');jQuery('.graphic-logo').css('display','none');jQuery('.disabled-logo').css('display','none')}else if(jQuery('.niteoCS-logo-type:checked').val()=='graphic'){jQuery('.text-logo').css('display','none');jQuery('.graphic-logo').css('display','block');jQuery('.disabled-logo').css('display','none')}else if(jQuery('.niteoCS-logo-type:checked').val()=='disabled'){jQuery('.text-logo').css('display','none');jQuery('.graphic-logo').css('display','none');jQuery('.disabled-logo').css('display','block')}});jQuery('#test-unsplash').click(function(e){e.preventDefault();var media_wrapper=jQuery('#unsplash-media'),unsplash_feed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),unsp_url='',feat='',custom_str='',security=jQuery(this).data('security');switch(unsplash_feed){case '0':unsp_url=jQuery('#niteoCS-unsplash-0').val();break;case '1':custom_str=jQuery('#niteoCS-unsplash-1').val();break;case '2':unsp_url=jQuery('#niteoCS-unsplash-2').val();break;case '3':unsp_url=jQuery('#niteoCS-unsplash-3').val();if(jQuery('#niteoCS_unsplash_feat').is(':checked')){feat='1'}else{feat='0'}
7
  break;default:break}
8
  if(unsplash_feed==3||unsp_url!=''||custom_str!=''){var params={feed:unsplash_feed,url:unsp_url,feat:feat,custom_str:custom_str};jQuery(this).prop('disabled',!0);jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');media_wrapper.html('');var data={action:'niteo_unsplash',security:security,params:params};$.post(ajaxurl,data,function(response){var unsplash=JSON.parse(response);jQuery('#unsplash_img').remove();var loadingTimeout=setTimeout(function(){jQuery('#test-unsplash').prop('disabled',!1);jQuery('#test-unsplash').text('Display Unsplash Photo');jQuery('#unsplash-media').html('<p>It seems <a href="https://status.unsplash.com/" target="_blank">Unsplash API</a> is not responding. Please try again later.</p>')},5000);if(unsplash.response=='200'){var unsplash=jQuery.parseJSON(unsplash.body);if(unsplash[0]){var img=unsplash[0].urls.raw+'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588';var author=unsplash[0].user.name;var author_url=unsplash[0].user.links.html;var img_url=unsplash[0].links.html;var img_id=unsplash[0].id}else{var img=unsplash.urls.raw+'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588';var author=unsplash.user.name;var author_url=unsplash.user.links.html;var img_url=unsplash.links.html;var img_id=unsplash.id}
9
  jQuery('<img />',{src:img,id:'unsplash_img'}).one('load',function(){jQuery(this).appendTo(media_wrapper);jQuery(this).fadeIn();jQuery('#test-unsplash').prop('disabled',!1);jQuery('#test-unsplash').text('Display Unsplash Photo');jQuery('#unsplash-media').append('<span><a href="'+img_url+'" target="_blank">Photo</a> (ID: '+img_id+') by <a href="'+author_url+'" target="_blank">'+author+'</a> / <a href="https://unsplash.com/" target="_blank">Unsplash</a></span>')
10
- clearTimeout(loadingTimeout)})}else{jQuery('#test-unsplash').prop('disabled',!1);jQuery('#test-unsplash').text('Display Unsplash Photo');jQuery('#unsplash-media').html('<p>Error '+unsplash.response+': <span style="text-transform:lowercase;">'+unsplash.body+'</span></p>');clearTimeout(loadingTimeout)}})}else{jQuery('#unsplash_img').remove()}});jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({width:'100%',minimumResultsForSearch:-1,});videoPreview=function(){var source=$('.banner-video-source').val();$('.video-wrapper').css('padding-top','0');if(source=='YouTube'){var youtubeLink=$('#niteoCS-youtube-url').val();if(youtubeLink.match(/(youtube.com)/)){var split_c='v=';var split_n=1}
11
  if(youtubeLink.match(/(youtu.be)/)||youtubeLink.match(/(vimeo.com\/)+[0-9]/)){var split_c='/';var split_n=3}
12
  if(source=='vimeo'){var youtubeLink=$('#niteoCS-vimeo-url').val();if(youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/)){var split_c='/';var split_n=5}}
13
  if(youtubeLink){var getYouTubeVideoID=youtubeLink.split(split_c)[split_n];if(getYouTubeVideoID!=undefined){var cleanVideoID=getYouTubeVideoID.replace(/(&)+(.*)/,'');if(source=='banner_youtube'&&youtubeLink.match(/(youtu.be)/)||youtubeLink.match(/(youtube.com)/)){var videoEmbedLink='https://www.youtube.com/embed/'+cleanVideoID+'?autoplay=0'}
14
  if(source=='banner_vimeo'&&youtubeLink.match(/(vimeo.com\/)+[0-9]/)||youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/)){var videoEmbedLink='https://player.vimeo.com/video/'+cleanVideoID+'?autoplay=0'}
15
  var $iframe=$('<iframe src="'+videoEmbedLink+'" allowfullscreen></iframe>');$('.video-wrapper').html($iframe);var videoRatio=($iframe.height()/$iframe.width())*100;$iframe.css('position','absolute');$iframe.css('top','0');$iframe.css('left','0');$iframe.css('width','100%');$iframe.css('height','100%');$('.video-wrapper').css('padding-top',videoRatio+'%');$('#niteoCS-vimeo-url').css('border','1px solid #ddd');$('#niteoCS-youtube-url').css('border','1px solid #ddd')}else{$('.video-wrapper').text('Please enter correct '+source+' URL.').css('padding-top','0');$('#niteoCS-vimeo-url').css('border','1px solid #d60000');$('#niteoCS-youtube-url').css('border','1px solid #d60000')}}else{$('.video-wrapper').text('Please enter '+source+' URL.').css('padding-top','0');$('#niteoCS-vimeo-url').css('border','1px solid #d60000');$('#niteoCS-youtube-url').css('border','1px solid #d60000')}}
16
  if(source=='video/mp4'){var videoURL=jQuery('#niteoCS-video-id').data('url');if(videoURL!=''){$('.video-wrapper').html('<video width="600" height="400" controls><source src="'+videoURL+'" type="video/mp4">Your browser does not support the video tag.</video>')}}};jQuery('#niteoCS-youtube-url').keyup(function(){videoPreview()});jQuery('#csoptions .banner-video-source').change(function(){switch(jQuery('#csoptions .banner-video-source').val()){case 'YouTube':jQuery('.youtube-source-input').css('display','block');jQuery('.vimeo-source-input').css('display','none');jQuery('.file-source-input').css('display','none');break;case 'vimeo':jQuery('.youtube-source-input').css('display','none');jQuery('.vimeo-source-input').css('display','block');jQuery('.file-source-input').css('display','none');break;case 'video/mp4':jQuery('.youtube-source-input').css('display','none');jQuery('.vimeo-source-input').css('display','none');jQuery('.file-source-input').css('display','block');videoPreview();break;default:jQuery('.file-source-input').css('display','block');jQuery('.youtube-source-input').css('display','none');jQuery('.vimeo-source-input').css('display','none')}});jQuery('#csoptions .banner-video-source').trigger('change');jQuery('#csoptions .niteoCS_banner').change(function(){switch(jQuery('#csoptions .niteoCS_banner:checked').val()){case '0':jQuery('#custom_banner').css('display','block');jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');break;case '1':jQuery('#unsplash_banner').css('display','block');jQuery('.theme_background fieldset:not(#unsplash_banner)').css('display','none');break;case '2':jQuery('#default_banner').css('display','block');jQuery('.theme_background fieldset:not(#default_banner)').css('display','none');break;case '3':jQuery('#graphic_pattern').css('display','block');jQuery('.theme_background fieldset:not(#graphic_pattern)').css('display','none');break;case '4':jQuery('#solid_color').css('display','block');jQuery('.theme_background fieldset:not(#solid_color)').css('display','none');break;case '5':jQuery('#video_banner').css('display','block');jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');videoPreview();break;case '6':jQuery('#gradient_background').css('display','block');jQuery('.theme_background fieldset:not(#gradient_background)').css('display','none');break;default:jQuery('#custom_banner').css('display','block');jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');break}});jQuery('#csoptions .niteoCS_banner:first').trigger('change');var unsplasfeed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();jQuery('#unsplash-feed-'+unsplasfeed).css('display','block');jQuery('#unsplash_banner select[name^="unsplash_feed"]').on('change',function(){unsplasfeed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();jQuery('.unsplash-feed').css('display','none');jQuery('#unsplash-feed-'+unsplasfeed).css('display','block');jQuery('#test-unsplash').trigger('click')});if(jQuery('#csoptions .niteoCS_banner:checked').val()==1){jQuery('#test-unsplash').trigger('click')}
17
- jQuery('select.background-gradient').on('change',function(){var gradient=jQuery('select.background-gradient option:selected').val();if(gradient=='custom'){jQuery('.custom-gradient').css('display','block');jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'})}else{colors=gradient.split(':');jQuery('.custom-gradient').css('display','none');jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)','background':'-webkit-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)','background':'linear-gradient(135deg, '+colors[0]+' 0%, '+colors[1]+' 100%)'})}}).trigger('change');jQuery('#niteoCS_banner_color').wpColorPicker({change:function(event,ui){jQuery('.color-preview').css('background-color',ui.color.toString())}});jQuery('#niteoCS_gradient_one').wpColorPicker({change:function(event,ui){jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'-webkit-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'linear-gradient(135deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'})}});jQuery('#niteoCS_gradient_two').wpColorPicker({change:function(event,ui){jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)','background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)','background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)'})}});jQuery('select[name^="niteoCS_banner_pattern"]').on('change',function(){var pattern=jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();if(pattern!='custom'){var pattern_url=jQuery(this).data('url');jQuery('#add-pattern').css('display','none');jQuery('.pattern-wrapper').css('background-image','url(\''+pattern_url+pattern+'.png\')')}else{var pattern_url=jQuery('#niteoCS_banner_pattern_custom').val();jQuery('#add-pattern').css('display','block');jQuery('.pattern-wrapper').css('background-image','url(\''+pattern_url+'\')')}});if(jQuery('#niteoCS_subscribe').prop('checked')==!0){jQuery('.subscribe').css('display','block')}
18
- jQuery('#niteoCS_subscribe').change(function(){if(jQuery(this)[0].checked){jQuery('.subscribe').css('display','block')}else{jQuery('.subscribe').css('display','none')}});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){if(jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()==0){jQuery('#subscribe-disabled').css('display','block');jQuery('#subscribe-3rdparty').css('display','none');jQuery('#subscribe-niteo').css('display','none')}else if(jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()==1){jQuery('#subscribe-disabled').css('display','none');jQuery('#subscribe-3rdparty').css('display','block');jQuery('#subscribe-niteo').css('display','none')}else{jQuery('#subscribe-disabled').css('display','none');jQuery('#subscribe-3rdparty').css('display','none');jQuery('#subscribe-niteo').css('display','block')}});jQuery('.heading-animation').on('change',function(){heading_anim=jQuery('.heading-animation option:selected').val();jQuery('#heading-example').removeClass().addClass('animated '+heading_anim)});jQuery('.content-animation').on('change',function(){heading_anim=jQuery('.content-animation option:selected').val();jQuery('#content-example').removeClass().addClass('animated '+heading_anim)});var update_social=function(name,key,val){var socialmedia=$('#niteoCS_socialmedia').attr('value');socialmedia=$.parseJSON(socialmedia);$.each(socialmedia,function(i,ele){if(ele.name==name){ele[key]=val}});$('#niteoCS_socialmedia').attr('value',JSON.stringify(socialmedia))};var $sortableList=$('.social-inputs');var sortEventHandler=function(event,ui){var inputs=$sortableList.find('input[type="text"]');var order=ui.item.index();inputs.each(function(i,ele){var name=$(ele).data('name');update_social(name,'order',i)})};$sortableList.sortable({stop:sortEventHandler});$sortableList.on('sortchange',sortEventHandler);(function($){$.fn.toggleDisabled=function(){return this.each(function(){var $this=$(this);var active;var name=$this.data('name');if($this.attr('disabled')){$this.prop('disabled',!1);active='1'}else{$this.prop('disabled',!0);active='0'}
19
  update_social(name,'active',active)})}})(jQuery);jQuery('.social-inputs input[type="text"]').focusout(function(){var name=jQuery(this).data('name');var socialurl=jQuery(this).attr('value');update_social(name,'url',socialurl)});jQuery('.social-inputs input[type="checkbox"]').click(function(e){var $this=$(this).siblings('input[type="text"]');$this.toggleDisabled()});jQuery('.social-media i').click(function(){var name=jQuery(this).data('name');jQuery(this).toggleClass('active');jQuery('.social-inputs li.'+name).toggleClass('active');jQuery('.social-inputs li.'+name+' input').trigger('change');if(jQuery(this).hasClass('active')){update_social(name,'hidden','0')}else{update_social(name,'hidden','1')}
20
  if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}else{jQuery('.social-inputs .label').css('display','none')}});if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}
21
  jQuery('.view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>')}).fail(function(){$this.closest('.notice').find('.release-note p').remove();$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>')})});jQuery('.update-theme').click(function(e){e.preventDefault();var $this=$(this),$parent=$this.parents('.notice'),security=$this.data('security'),slug=$this.data('slug'),themeName=$this.data('name'),remoteUrl=jQuery(this).data('remote_url');var update={'name':slug,'tmp_name':'','url':remoteUrl+'?action=download&slug='+slug,}
22
- var data={action:'cmp_theme_update_install',security:security,file:update};$parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');console.log(data);$.post(ajaxurl,data,function(response){response=response.trim();if(response=='success'){setTimeout(function(){$parent.removeClass('notice-warning').addClass('notice-success');$parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500)}else{response=response.slice(0,-1);var error=$('p',$(response)).text();$parent.removeClass('notice-warning').addClass('notice-error');$parent.find('.message').html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+error+'</span>')}})});jQuery('.theme-select').click(function(){jQuery(this).parent().find('input[name="select_theme"]').prop("checked",!0).trigger('change');jQuery('.theme-select').removeClass('selected');jQuery(this).parent().find('.theme-select').addClass('selected')});jQuery('.theme-update.button').one('click',function(e){e.preventDefault();var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),security=$wrapper.data('security'),slug=$wrapper.data('slug'),remoteUrl=$wrapper.data('remote_url');var update={'name':slug,'tmp_name':'','url':remoteUrl+'?action=download&slug='+slug,}
23
  var data={action:'cmp_theme_update_install',security:security,file:update};$this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');$.post(ajaxurl,data,function(response){if(response=='success'){setTimeout(function(){$this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');setTimeout(function(){$this.fadeOut()},1500)},1500)}else{response=response.slice(0,-1);$this.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')}})});jQuery('.theme-details').click(function(){var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),slug=$wrapper.data('slug'),version=$wrapper.data('version'),remoteUrl=$wrapper.data('remote_url'),type=$wrapper.data('type'),purchased=$wrapper.data('purchased'),freebie=$wrapper.data('freebie'),noticeHtml='',security=jQuery('.update-theme').data('security'),price=$wrapper.data('price'),i=0;var data={action:'niteo_themeinfo',security:jQuery('.theme-wrapper').data('security'),theme_slug:jQuery(this).parents('.theme-wrapper').data('slug'),};$.post(ajaxurl,data,function(response){var buttonDisabled='';var buyButton='';var versionInfo='';var noticeHtml='';response=jQuery.parseJSON(response);if(response.result=='true'){jQuery('body').addClass('modal-open');if(purchased=='1'){versionInfo='<span class="theme-version">Version: '+version+'</span>';noticeHtml='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';if(jQuery('.update-theme').length){var updateSlug=jQuery('.update-theme').data('slug');if(slug==updateSlug){var newVer=jQuery('.update-theme').data('new_ver');noticeHtml='<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response.name+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'" class="update-theme" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}}
24
  if(purchased!='1'&&type=='premium'){var buttonDisabled='disabled ';var buyURL=$wrapper.find('a').attr('href');price=(price==0)?'Download':'$'+price;var buyButton='<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>'+price+'</a></button>';if(freebie){var buyButton='<p style="font-weight: bold;font-size: 1.2em;margin-bottom: 8px;">Pay what you want</p>'+buyButton}}
25
  var screenshots=response.screenshots;var arrows='';if(Object.keys(screenshots).length>1){arrows='<div class="screenshots-nav"><div class="left"><i class="fa fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fa fa-chevron-right" aria-hidden="true"></i></div></div>'}
26
  var html=$(['<div class="theme-backdrop">',' <div class="theme-wrap">',' <div class="theme-header">',' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',' </div>',' <div class="theme-about">',' <div class="theme-screenshots">',' <div class="screenshot" style="background-image:url(\''+screenshots['0']+'\')">'+arrows+'</div>',' </div>',' <div class="theme-info">',' <h2 class="theme-name">'+response.name+versionInfo+'</h2>',' <p class="theme-author">By <a href="'+response.author_homepage+'" target="_blank">'+response.author+'</a></p>',noticeHtml,buyButton,' <div class="theme-description">'+response.description+'</div>',' </div>',' </div>',' <div class="theme-actions">',' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response.name+'">Activate</button>',' <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+slug+'&utm_source=cmp&utm_medium=referral&utm_campaign='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response.name+'">Live Preview</a>',' </div>',' </div>','</div>',].join("\n"));jQuery('.theme-overlay.cmp').append(html);jQuery('.theme-overlay.cmp .view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>')}).fail(function(){$this.closest('.notice').find('.release-note p').remove();$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>')})});jQuery('.theme-overlay.cmp .close').click(function(e){e.preventDefault();jQuery('body').removeClass('modal-open');jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast')});jQuery('.theme-overlay.cmp .activate').click(function(e){e.preventDefault();jQuery('input[name="select_theme"]').each(function(){if(jQuery(this).val()==slug){jQuery(this).prop('checked',!0);jQuery('.theme-select').removeClass('selected');jQuery(this).parent().addClass('selected')}});jQuery(this).submit()});jQuery('.screenshots-nav .right').click(function(){i++;if(i==Object.keys(screenshots).length){i=0}
27
  if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}});jQuery('.screenshots-nav .left').click(function(){i--;if(i<0){i=Object.keys(screenshots).length-1}
28
- if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}})}})});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');$('#niteoCS_overlay_opacity').on('input',function(){$(this).trigger('change')});jQuery('#niteoCS_overlay_opacity').change(function(){if(this.value==0){jQuery('#current-opacity').html(': transparent')}else{jQuery('#current-opacity').html(': '+this.value)}});function ucwords(str){return(str+'').replace(/^([a-z])|\s+([a-z])/g,function($1){return $1.toUpperCase()})}
29
  function strtolower(str){return(str+'').toLowerCase()}
30
  function media_upload_button(name,multiple,type){var $container=jQuery('.'+name+'-wrapper');var $add_button=jQuery('#add-'+name);var $delete_button=jQuery('#delete-'+name);var image;var imgID='';var title=name.replace('-',' ');title=title[0].toUpperCase()+title.slice(1);if(jQuery('#niteoCS-'+name+'-id').val()!=''){$delete_button.css('display','block')}
31
  $add_button.click(function(e){e.preventDefault();if(media_uploader){media_uploader.open();return}
32
  var media_uploader=wp.media({title:'Select '+title,button:{text:'Insert '+title},multiple:multiple,library:{type:[type]},}).on('select',function(){var attachment=media_uploader.state().get('selection').toJSON();if(attachment.length>0){$container.empty();jQuery(attachment).each(function(i){if(attachment[i].sizes&&attachment[i].sizes.large){image=attachment[i].sizes.large.url}else{image=attachment[i].url}
33
  var comma=i===0?'':',';imgID+=(comma+attachment[i].id);if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}else if(name=='video'){$container.append('<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>')}else{$container.append('<img src="'+image+'" alt="" style="max-width:588px"/>')}});$delete_button.css('display','block')}
34
  jQuery('#niteoCS-'+name+'-id').val(imgID).trigger('change')}).open();if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}});$delete_button.click(function(e){jQuery(this).css('display','none');$container.empty();jQuery('#niteoCS-'+name+'-id').val('');jQuery('#niteoCS-'+name+'-id').trigger('change')})}
35
- toggle_settings('analytics');function toggle_settings(classname){jQuery('.'+classname).change(function(){var value=jQuery('.'+classname+':checked').val();jQuery('.'+classname+'-switch.'+value).css('display','block');jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none')});jQuery('.'+classname).first().trigger('change')}})
 
1
+ jQuery(document).ready(function($){var formChanged=!1;var tab=document.location.hash.substring(1);var action=jQuery('#csoptions').attr('action');wp.codeEditor.initialize('niteoCS_custom_css');navtab=function(tab){jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');jQuery('.nav-tab-wrapper .'+tab).addClass('nav-tab-active');jQuery('.table-wrapper.'+tab).css('display','block');jQuery('.table-wrapper-css.'+tab).css('display','block');jQuery('.comingsoon.'+tab).css('display','block');jQuery('.table-wrapper:not(.'+tab+')').css('display','none');jQuery('.table-wrapper-css:not(.'+tab).css('display','none');jQuery('.comingsoon:not(.'+tab+')').css('display','none');if(tab=='install'){jQuery('.submit').css('display','none');jQuery('#csoptions').attr('action',action)}else{jQuery('.submit').css('display','block');jQuery('#csoptions').attr('action',action+'#'+tab)}}
2
+ if(tab!=''){navtab(tab)}else{jQuery('.table-wrapper-css').css('display','none')}
3
  window.onhashchange=function(){tab=document.location.hash.substring(1);navtab(tab)}
4
+ $('.nav-tab:not(.theme-preview)').click(function(e){e.preventDefault();tab=$(this).data('tab');document.location.hash=tab});update_range('.blur-range');update_range('.overlay-opacity');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');toggle_settings('analytics');toggle_settings('contact-form');toggle_settings('subscribe');toggle_settings('background-effect');toggle_settings('cmp-logo');jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({width:'100%',minimumResultsForSearch:-1,});jQuery('#cmp-status').click(function(){jQuery('.cmp-status input[type=radio]').prop("disabled",(_,val)=>!val);jQuery('#cmp-status-menubar').prop("checked",(_,val)=>!val)});cmp_status_inputs();function cmp_status_inputs(){jQuery('.cmp-status legend:not(.disabled)').click(function(){if(jQuery('#cmp-status').prop('checked')==!1){return}
5
  var $children=jQuery(this).children('input');$children.prop("checked",!0);jQuery('.cmp-status legend').removeClass('active');jQuery(this).addClass('active');$children.trigger('change');if($children.val()=='3'){jQuery('.redirect-inputs').fadeIn('fast')}else{jQuery('.redirect-inputs').fadeOut('fast')}})}
6
+ jQuery('.table-wrapper h3').click(function(){jQuery(this).parent().toggleClass('closed')});jQuery('#test-unsplash').click(function(e){e.preventDefault();var media_wrapper=jQuery('#unsplash-media'),unsplash_feed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),unsp_url='',feat='',custom_str='',security=jQuery(this).data('security');switch(unsplash_feed){case '0':unsp_url=jQuery('#niteoCS-unsplash-0').val();break;case '1':custom_str=jQuery('#niteoCS-unsplash-1').val();break;case '2':unsp_url=jQuery('#niteoCS-unsplash-2').val();break;case '3':unsp_url=jQuery('#niteoCS-unsplash-3').val();if(jQuery('#niteoCS_unsplash_feat').is(':checked')){feat='1'}else{feat='0'}
7
  break;default:break}
8
  if(unsplash_feed==3||unsp_url!=''||custom_str!=''){var params={feed:unsplash_feed,url:unsp_url,feat:feat,custom_str:custom_str};jQuery(this).prop('disabled',!0);jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');media_wrapper.html('');var data={action:'niteo_unsplash',security:security,params:params};$.post(ajaxurl,data,function(response){var unsplash=JSON.parse(response);jQuery('#unsplash_img').remove();var loadingTimeout=setTimeout(function(){jQuery('#test-unsplash').prop('disabled',!1);jQuery('#test-unsplash').text('Display Unsplash Photo');jQuery('#unsplash-media').html('<p>It seems <a href="https://status.unsplash.com/" target="_blank">Unsplash API</a> is not responding. Please try again later.</p>')},5000);if(unsplash.response=='200'){var unsplash=jQuery.parseJSON(unsplash.body);if(unsplash[0]){var img=unsplash[0].urls.raw+'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588';var author=unsplash[0].user.name;var author_url=unsplash[0].user.links.html;var img_url=unsplash[0].links.html;var img_id=unsplash[0].id}else{var img=unsplash.urls.raw+'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588';var author=unsplash.user.name;var author_url=unsplash.user.links.html;var img_url=unsplash.links.html;var img_id=unsplash.id}
9
  jQuery('<img />',{src:img,id:'unsplash_img'}).one('load',function(){jQuery(this).appendTo(media_wrapper);jQuery(this).fadeIn();jQuery('#test-unsplash').prop('disabled',!1);jQuery('#test-unsplash').text('Display Unsplash Photo');jQuery('#unsplash-media').append('<span><a href="'+img_url+'" target="_blank">Photo</a> (ID: '+img_id+') by <a href="'+author_url+'" target="_blank">'+author+'</a> / <a href="https://unsplash.com/" target="_blank">Unsplash</a></span>')
10
+ clearTimeout(loadingTimeout)})}else{jQuery('#test-unsplash').prop('disabled',!1);jQuery('#test-unsplash').text('Display Unsplash Photo');jQuery('#unsplash-media').html('<p>Error '+unsplash.response+': <span style="text-transform:lowercase;">'+unsplash.body+'</span></p>');clearTimeout(loadingTimeout)}})}else{jQuery('#unsplash_img').remove()}});videoPreview=function(){var source=$('.banner-video-source').val();$('.video-wrapper').css('padding-top','0');if(source=='YouTube'){var youtubeLink=$('#niteoCS-youtube-url').val();if(youtubeLink.match(/(youtube.com)/)){var split_c='v=';var split_n=1}
11
  if(youtubeLink.match(/(youtu.be)/)||youtubeLink.match(/(vimeo.com\/)+[0-9]/)){var split_c='/';var split_n=3}
12
  if(source=='vimeo'){var youtubeLink=$('#niteoCS-vimeo-url').val();if(youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/)){var split_c='/';var split_n=5}}
13
  if(youtubeLink){var getYouTubeVideoID=youtubeLink.split(split_c)[split_n];if(getYouTubeVideoID!=undefined){var cleanVideoID=getYouTubeVideoID.replace(/(&)+(.*)/,'');if(source=='banner_youtube'&&youtubeLink.match(/(youtu.be)/)||youtubeLink.match(/(youtube.com)/)){var videoEmbedLink='https://www.youtube.com/embed/'+cleanVideoID+'?autoplay=0'}
14
  if(source=='banner_vimeo'&&youtubeLink.match(/(vimeo.com\/)+[0-9]/)||youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/)){var videoEmbedLink='https://player.vimeo.com/video/'+cleanVideoID+'?autoplay=0'}
15
  var $iframe=$('<iframe src="'+videoEmbedLink+'" allowfullscreen></iframe>');$('.video-wrapper').html($iframe);var videoRatio=($iframe.height()/$iframe.width())*100;$iframe.css('position','absolute');$iframe.css('top','0');$iframe.css('left','0');$iframe.css('width','100%');$iframe.css('height','100%');$('.video-wrapper').css('padding-top',videoRatio+'%');$('#niteoCS-vimeo-url').css('border','1px solid #ddd');$('#niteoCS-youtube-url').css('border','1px solid #ddd')}else{$('.video-wrapper').text('Please enter correct '+source+' URL.').css('padding-top','0');$('#niteoCS-vimeo-url').css('border','1px solid #d60000');$('#niteoCS-youtube-url').css('border','1px solid #d60000')}}else{$('.video-wrapper').text('Please enter '+source+' URL.').css('padding-top','0');$('#niteoCS-vimeo-url').css('border','1px solid #d60000');$('#niteoCS-youtube-url').css('border','1px solid #d60000')}}
16
  if(source=='video/mp4'){var videoURL=jQuery('#niteoCS-video-id').data('url');if(videoURL!=''){$('.video-wrapper').html('<video width="600" height="400" controls><source src="'+videoURL+'" type="video/mp4">Your browser does not support the video tag.</video>')}}};jQuery('#niteoCS-youtube-url').keyup(function(){videoPreview()});jQuery('#csoptions .banner-video-source').change(function(){switch(jQuery('#csoptions .banner-video-source').val()){case 'YouTube':jQuery('.youtube-source-input').css('display','block');jQuery('.vimeo-source-input').css('display','none');jQuery('.file-source-input').css('display','none');break;case 'vimeo':jQuery('.youtube-source-input').css('display','none');jQuery('.vimeo-source-input').css('display','block');jQuery('.file-source-input').css('display','none');break;case 'video/mp4':jQuery('.youtube-source-input').css('display','none');jQuery('.vimeo-source-input').css('display','none');jQuery('.file-source-input').css('display','block');videoPreview();break;default:jQuery('.file-source-input').css('display','block');jQuery('.youtube-source-input').css('display','none');jQuery('.vimeo-source-input').css('display','none')}});jQuery('#csoptions .banner-video-source').trigger('change');jQuery('#csoptions .niteoCS_banner').change(function(){switch(jQuery('#csoptions .niteoCS_banner:checked').val()){case '0':jQuery('#custom_banner').css('display','block');jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');break;case '1':jQuery('#unsplash_banner').css('display','block');jQuery('.theme_background fieldset:not(#unsplash_banner)').css('display','none');break;case '2':jQuery('#default_banner').css('display','block');jQuery('.theme_background fieldset:not(#default_banner)').css('display','none');break;case '3':jQuery('#graphic_pattern').css('display','block');jQuery('.theme_background fieldset:not(#graphic_pattern)').css('display','none');break;case '4':jQuery('#solid_color').css('display','block');jQuery('.theme_background fieldset:not(#solid_color)').css('display','none');break;case '5':jQuery('#video_banner').css('display','block');jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');videoPreview();break;case '6':jQuery('#gradient_background').css('display','block');jQuery('.theme_background fieldset:not(#gradient_background)').css('display','none');break;default:jQuery('#custom_banner').css('display','block');jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');break}});jQuery('#csoptions .niteoCS_banner:first').trigger('change');var unsplasfeed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();jQuery('#unsplash-feed-'+unsplasfeed).css('display','block');jQuery('#unsplash_banner select[name^="unsplash_feed"]').on('change',function(){unsplasfeed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();jQuery('.unsplash-feed').css('display','none');jQuery('#unsplash-feed-'+unsplasfeed).css('display','block');jQuery('#test-unsplash').trigger('click')});if(jQuery('#csoptions .niteoCS_banner:checked').val()==1){jQuery('#test-unsplash').trigger('click')}
17
+ jQuery('select.background-gradient').on('change',function(){var gradient=jQuery('select.background-gradient option:selected').val();if(gradient=='custom'){jQuery('.custom-gradient').css('display','block');jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'})}else{colors=gradient.split(':');jQuery('.custom-gradient').css('display','none');jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)','background':'-webkit-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)','background':'linear-gradient(135deg, '+colors[0]+' 0%, '+colors[1]+' 100%)'})}}).trigger('change');jQuery('#niteoCS_banner_color').wpColorPicker({change:function(event,ui){jQuery('.color-preview').css('background-color',ui.color.toString())}});jQuery('#niteoCS_gradient_one').wpColorPicker({change:function(event,ui){jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'-webkit-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)','background':'linear-gradient(135deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'})}});jQuery('#niteoCS_gradient_two').wpColorPicker({change:function(event,ui){jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)','background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)','background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)'})}});jQuery('select[name^="niteoCS_banner_pattern"]').on('change',function(){var pattern=jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();if(pattern!='custom'){var pattern_url=jQuery(this).data('url');jQuery('#add-pattern').css('display','none');jQuery('.pattern-wrapper').css('background-image','url(\''+pattern_url+pattern+'.png\')')}else{var pattern_url=jQuery('#niteoCS_banner_pattern_custom').val();jQuery('#add-pattern').css('display','block');jQuery('.pattern-wrapper').css('background-image','url(\''+pattern_url+'\')')}});jQuery('.heading-animation').on('change',function(){heading_anim=jQuery('.heading-animation option:selected').val();jQuery('#heading-example').removeClass().addClass('animated '+heading_anim)});jQuery('.content-animation').on('change',function(){heading_anim=jQuery('.content-animation option:selected').val();jQuery('#content-example').removeClass().addClass('animated '+heading_anim)});var update_social=function(name,key,val){var socialmedia=$('#niteoCS_socialmedia').attr('value');socialmedia=$.parseJSON(socialmedia);$.each(socialmedia,function(i,ele){if(ele.name==name){ele[key]=val}});$('#niteoCS_socialmedia').attr('value',JSON.stringify(socialmedia))};var $sortableList=$('.social-inputs');var sortEventHandler=function(event,ui){var inputs=$sortableList.find('input[type="text"]');var order=ui.item.index();inputs.each(function(i,ele){var name=$(ele).data('name');update_social(name,'order',i)})};$sortableList.sortable({stop:sortEventHandler});$sortableList.on('sortchange',sortEventHandler);(function($){$.fn.toggleDisabled=function(){return this.each(function(){var $this=$(this);var active;var name=$this.data('name');if($this.attr('disabled')){$this.prop('disabled',!1);active='1'}else{$this.prop('disabled',!0);active='0'}
 
18
  update_social(name,'active',active)})}})(jQuery);jQuery('.social-inputs input[type="text"]').focusout(function(){var name=jQuery(this).data('name');var socialurl=jQuery(this).attr('value');update_social(name,'url',socialurl)});jQuery('.social-inputs input[type="checkbox"]').click(function(e){var $this=$(this).siblings('input[type="text"]');$this.toggleDisabled()});jQuery('.social-media i').click(function(){var name=jQuery(this).data('name');jQuery(this).toggleClass('active');jQuery('.social-inputs li.'+name).toggleClass('active');jQuery('.social-inputs li.'+name+' input').trigger('change');if(jQuery(this).hasClass('active')){update_social(name,'hidden','0')}else{update_social(name,'hidden','1')}
19
  if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}else{jQuery('.social-inputs .label').css('display','none')}});if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}
20
  jQuery('.view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>')}).fail(function(){$this.closest('.notice').find('.release-note p').remove();$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>')})});jQuery('.update-theme').click(function(e){e.preventDefault();var $this=$(this),$parent=$this.parents('.notice'),security=$this.data('security'),slug=$this.data('slug'),themeName=$this.data('name'),remoteUrl=jQuery(this).data('remote_url');var update={'name':slug,'tmp_name':'','url':remoteUrl+'?action=download&slug='+slug,}
21
+ var data={action:'cmp_theme_update_install',security:security,file:update};$parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');$.post(ajaxurl,data,function(response){response=response.trim();if(response=='success'){setTimeout(function(){$parent.removeClass('notice-warning').addClass('notice-success');$parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500)}else{response=response.slice(0,-1);var error=$('p',$(response)).text();$parent.removeClass('notice-warning').addClass('notice-error');$parent.find('.message').html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+error+'</span>')}})});jQuery('.theme-select').click(function(){jQuery(this).parent().find('input[name="select_theme"]').prop("checked",!0).trigger('change');jQuery('.theme-select').removeClass('selected');jQuery(this).parent().find('.theme-select').addClass('selected')});jQuery('.theme-update.button').one('click',function(e){e.preventDefault();var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),security=$wrapper.data('security'),slug=$wrapper.data('slug'),remoteUrl=$wrapper.data('remote_url');var update={'name':slug,'tmp_name':'','url':remoteUrl+'?action=download&slug='+slug,}
22
  var data={action:'cmp_theme_update_install',security:security,file:update};$this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');$.post(ajaxurl,data,function(response){if(response=='success'){setTimeout(function(){$this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');setTimeout(function(){$this.fadeOut()},1500)},1500)}else{response=response.slice(0,-1);$this.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')}})});jQuery('.theme-details').click(function(){var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),slug=$wrapper.data('slug'),version=$wrapper.data('version'),remoteUrl=$wrapper.data('remote_url'),type=$wrapper.data('type'),purchased=$wrapper.data('purchased'),freebie=$wrapper.data('freebie'),noticeHtml='',security=jQuery('.update-theme').data('security'),price=$wrapper.data('price'),i=0;var data={action:'niteo_themeinfo',security:jQuery('.theme-wrapper').data('security'),theme_slug:jQuery(this).parents('.theme-wrapper').data('slug'),};$.post(ajaxurl,data,function(response){var buttonDisabled='';var buyButton='';var versionInfo='';var noticeHtml='';response=jQuery.parseJSON(response);if(response.result=='true'){jQuery('body').addClass('modal-open');if(purchased=='1'){versionInfo='<span class="theme-version">Version: '+version+'</span>';noticeHtml='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';if(jQuery('.update-theme').length){var updateSlug=jQuery('.update-theme').data('slug');if(slug==updateSlug){var newVer=jQuery('.update-theme').data('new_ver');noticeHtml='<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response.name+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'" class="update-theme" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}}
23
  if(purchased!='1'&&type=='premium'){var buttonDisabled='disabled ';var buyURL=$wrapper.find('a').attr('href');price=(price==0)?'Download':'$'+price;var buyButton='<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>'+price+'</a></button>';if(freebie){var buyButton='<p style="font-weight: bold;font-size: 1.2em;margin-bottom: 8px;">Pay what you want</p>'+buyButton}}
24
  var screenshots=response.screenshots;var arrows='';if(Object.keys(screenshots).length>1){arrows='<div class="screenshots-nav"><div class="left"><i class="fa fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fa fa-chevron-right" aria-hidden="true"></i></div></div>'}
25
  var html=$(['<div class="theme-backdrop">',' <div class="theme-wrap">',' <div class="theme-header">',' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',' </div>',' <div class="theme-about">',' <div class="theme-screenshots">',' <div class="screenshot" style="background-image:url(\''+screenshots['0']+'\')">'+arrows+'</div>',' </div>',' <div class="theme-info">',' <h2 class="theme-name">'+response.name+versionInfo+'</h2>',' <p class="theme-author">By <a href="'+response.author_homepage+'" target="_blank">'+response.author+'</a></p>',noticeHtml,buyButton,' <div class="theme-description">'+response.description+'</div>',' </div>',' </div>',' <div class="theme-actions">',' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response.name+'">Activate</button>',' <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+slug+'&utm_source=cmp&utm_medium=referral&utm_campaign='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response.name+'">Live Preview</a>',' </div>',' </div>','</div>',].join("\n"));jQuery('.theme-overlay.cmp').append(html);jQuery('.theme-overlay.cmp .view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>')}).fail(function(){$this.closest('.notice').find('.release-note p').remove();$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>')})});jQuery('.theme-overlay.cmp .close').click(function(e){e.preventDefault();jQuery('body').removeClass('modal-open');jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast')});jQuery('.theme-overlay.cmp .activate').click(function(e){e.preventDefault();jQuery('input[name="select_theme"]').each(function(){if(jQuery(this).val()==slug){jQuery(this).prop('checked',!0);jQuery('.theme-select').removeClass('selected');jQuery(this).parent().addClass('selected')}});jQuery(this).submit()});jQuery('.screenshots-nav .right').click(function(){i++;if(i==Object.keys(screenshots).length){i=0}
26
  if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}});jQuery('.screenshots-nav .left').click(function(){i--;if(i<0){i=Object.keys(screenshots).length-1}
27
+ if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}})}})});function ucwords(str){return(str+'').replace(/^([a-z])|\s+([a-z])/g,function($1){return $1.toUpperCase()})}
28
  function strtolower(str){return(str+'').toLowerCase()}
29
  function media_upload_button(name,multiple,type){var $container=jQuery('.'+name+'-wrapper');var $add_button=jQuery('#add-'+name);var $delete_button=jQuery('#delete-'+name);var image;var imgID='';var title=name.replace('-',' ');title=title[0].toUpperCase()+title.slice(1);if(jQuery('#niteoCS-'+name+'-id').val()!=''){$delete_button.css('display','block')}
30
  $add_button.click(function(e){e.preventDefault();if(media_uploader){media_uploader.open();return}
31
  var media_uploader=wp.media({title:'Select '+title,button:{text:'Insert '+title},multiple:multiple,library:{type:[type]},}).on('select',function(){var attachment=media_uploader.state().get('selection').toJSON();if(attachment.length>0){$container.empty();jQuery(attachment).each(function(i){if(attachment[i].sizes&&attachment[i].sizes.large){image=attachment[i].sizes.large.url}else{image=attachment[i].url}
32
  var comma=i===0?'':',';imgID+=(comma+attachment[i].id);if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}else if(name=='video'){$container.append('<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>')}else{$container.append('<img src="'+image+'" alt="" style="max-width:588px"/>')}});$delete_button.css('display','block')}
33
  jQuery('#niteoCS-'+name+'-id').val(imgID).trigger('change')}).open();if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}});$delete_button.click(function(e){jQuery(this).css('display','none');$container.empty();jQuery('#niteoCS-'+name+'-id').val('');jQuery('#niteoCS-'+name+'-id').trigger('change')})}
34
+ function toggle_settings(classname){jQuery('.'+classname).change(function(){var value=jQuery('.'+classname+':checked').val();value=(jQuery.isNumeric(value))?'x'+value:value;jQuery('.'+classname+'-switch.'+value).css('display','block');jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none')});jQuery('.'+classname).first().trigger('change')}
35
+ function update_range(selector){jQuery(selector).on('input',function(){var value=jQuery(this).val();jQuery(this).parent().find('span').html(value)})}})
js/typography.js CHANGED
@@ -232,7 +232,7 @@ jQuery(document).ready(function($){
232
 
233
  });
234
 
235
- jQuery('.font-selector input[type=range]').change(function(){
236
  var type = jQuery(this).data('type');
237
  var css = jQuery(this).data('css');
238
  var value = jQuery(this).val();
@@ -252,10 +252,6 @@ jQuery(document).ready(function($){
252
  }
253
  });
254
 
255
- jQuery('.font-selector input[type=range]').on('input', function () {
256
- jQuery(this).trigger('change');
257
- });
258
-
259
  if ( heading_font.length && content_font.length ) {
260
  // change fonts families upon a load
261
  WebFont.load({
232
 
233
  });
234
 
235
+ jQuery('.font-selector input[type=range]').on('input', function () {
236
  var type = jQuery(this).data('type');
237
  var css = jQuery(this).data('css');
238
  var value = jQuery(this).val();
252
  }
253
  });
254
 
 
 
 
 
255
  if ( heading_font.length && content_font.length ) {
256
  // change fonts families upon a load
257
  WebFont.load({
js/typography.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(t){headingVariant=jQuery(".headings-google-font-variant").val(),contentVariant=jQuery(".content-google-font-variant").val(),fontVariant=function(t){switch(t){case"100":return"Thin 100";case"100italic":return"Thin 100 Italic";case"200":return"Extra-light 200";case"200italic":return"Extra-light 200 Italic";case"300":return"Light 300";case"300italic":return"Light 300 Italic";case"400":return"Regular 400";case"400italic":return"Regular 400 Italic";case"500":return"Medium 500";case"500italic":return"Meidum 500 Italic";case"600":return"Semi-Bold 600";case"600italic":return"Semi-Bold 600 Italic";case"700":return"Bold 700";case"700italic":return"Bold 700 Italic";case"800":return"Extra-Bold 800";case"800italic":return"Extra-Bold Italic";case"900":return"Black 900";case"900italic":return"Black 900 Italic";case"regular":return"Regular 400";case"italic":return"Regular 400 Italic"}};var e=fonts.google.filter(function(t){return t.id===jQuery(".headings-google-font option:selected").val()}),a=fonts.google.filter(function(t){return t.id===jQuery(".content-google-font option:selected").val()});if(e.length)var n=jQuery.map(e[0].variants,function(t){return{id:t,text:fontVariant(t)}});if(a.length)var i=jQuery.map(a[0].variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFont=jQuery(".headings-google-font").select2({data:fonts.google,width:"100%"}),$contentFont=jQuery(".content-google-font").select2({data:fonts.google,width:"100%"}),$HeadingFontVariant=jQuery(".headings-google-font-variant").select2({data:n}),$contentFontVariant=jQuery(".content-google-font-variant").select2({data:i}),$HeadingFont.on("select2:select",function(t){var e=$HeadingFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFontVariant.empty(),$HeadingFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):$HeadingFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#heading-example, #niteoCS-text-logo").css("font-family",t.params.data.text)}})}),$HeadingFontVariant.on("select2:select",function(t){headingVariant=t.params.data.id,jQuery.isNumeric(headingVariant)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",fontweight).css("font-style","italic"))}),$contentFont.on("select2:select",function(t){var e=$contentFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$contentFontVariant.empty(),$contentFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):$contentFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#content-example").css("font-family",t.params.data.text)}})}),$contentFontVariant.on("select2:select",function(t){contentVariant=t.params.data.id,jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic"))}),jQuery(".font-selector input[type=range]").change(function(){var t=jQuery(this).data("type"),e=jQuery(this).data("css"),a=jQuery(this).val();jQuery(this).parent().find("span").html(a),a="line-height"==e?a:a+"px","heading"==t?jQuery("#heading-example").css(e,a):jQuery("#content-example").css(e,a)}),jQuery(".font-selector input[type=range]").on("input",function(){jQuery(this).trigger("change")}),e.length&&a.length&&WebFont.load({google:{families:[e[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic",a[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery.isNumeric(headingVariant)?jQuery("#heading-example").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example").css("font-weight",fontweight).css("font-style","italic")),jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic")),jQuery("#heading-example, #niteoCS-text-logo").css("font-family",e[0].id),jQuery("#content-example").css("font-family",a[0].id)}})});
1
+ jQuery(document).ready(function(t){headingVariant=jQuery(".headings-google-font-variant").val(),contentVariant=jQuery(".content-google-font-variant").val(),fontVariant=function(t){switch(t){case"100":return"Thin 100";case"100italic":return"Thin 100 Italic";case"200":return"Extra-light 200";case"200italic":return"Extra-light 200 Italic";case"300":return"Light 300";case"300italic":return"Light 300 Italic";case"400":return"Regular 400";case"400italic":return"Regular 400 Italic";case"500":return"Medium 500";case"500italic":return"Meidum 500 Italic";case"600":return"Semi-Bold 600";case"600italic":return"Semi-Bold 600 Italic";case"700":return"Bold 700";case"700italic":return"Bold 700 Italic";case"800":return"Extra-Bold 800";case"800italic":return"Extra-Bold Italic";case"900":return"Black 900";case"900italic":return"Black 900 Italic";case"regular":return"Regular 400";case"italic":return"Regular 400 Italic"}};var e=fonts.google.filter(function(t){return t.id===jQuery(".headings-google-font option:selected").val()}),a=fonts.google.filter(function(t){return t.id===jQuery(".content-google-font option:selected").val()});if(e.length)var n=jQuery.map(e[0].variants,function(t){return{id:t,text:fontVariant(t)}});if(a.length)var i=jQuery.map(a[0].variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFont=jQuery(".headings-google-font").select2({data:fonts.google,width:"100%"}),$contentFont=jQuery(".content-google-font").select2({data:fonts.google,width:"100%"}),$HeadingFontVariant=jQuery(".headings-google-font-variant").select2({data:n}),$contentFontVariant=jQuery(".content-google-font-variant").select2({data:i}),$HeadingFont.on("select2:select",function(t){var e=$HeadingFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFontVariant.empty(),$HeadingFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):$HeadingFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#heading-example, #niteoCS-text-logo").css("font-family",t.params.data.text)}})}),$HeadingFontVariant.on("select2:select",function(t){headingVariant=t.params.data.id,jQuery.isNumeric(headingVariant)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",fontweight).css("font-style","italic"))}),$contentFont.on("select2:select",function(t){var e=$contentFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$contentFontVariant.empty(),$contentFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):$contentFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#content-example").css("font-family",t.params.data.text)}})}),$contentFontVariant.on("select2:select",function(t){contentVariant=t.params.data.id,jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic"))}),jQuery(".font-selector input[type=range]").on("input",function(){var t=jQuery(this).data("type"),e=jQuery(this).data("css"),a=jQuery(this).val();jQuery(this).parent().find("span").html(a),a="line-height"==e?a:a+"px","heading"==t?jQuery("#heading-example").css(e,a):jQuery("#content-example").css(e,a)}),e.length&&a.length&&WebFont.load({google:{families:[e[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic",a[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery.isNumeric(headingVariant)?jQuery("#heading-example").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example").css("font-weight",fontweight).css("font-style","italic")),jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic")),jQuery("#heading-example, #niteoCS-text-logo").css("font-family",e[0].id),jQuery("#content-example").css("font-family",a[0].id)}})});
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.4.2
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -18,7 +18,7 @@ class niteo_cmp {
18
  public function __construct() {
19
  $this->author = 'NiteoThemes';
20
  $this->author_homepage = 'https://niteothemes.com';
21
- $this->version = '2.4.2';
22
  $this->dev = false;
23
  $this->plugins_dir_path = plugin_dir_path( __DIR__ );
24
  if ( $this->plugins_dir_path == './') {
@@ -26,7 +26,7 @@ class niteo_cmp {
26
  }
27
  $this->premium_installed = array();
28
  // set array of themes with countdown
29
- $this->countdown_themes = array('frame', 'countdown', 'postery', 'countdown2');
30
 
31
  // get all installed themes [folder names under /themes] and put them to array
32
  $this->themes_standard = array_map('basename', glob( plugin_dir_path( __FILE__ ) . 'themes/*', GLOB_ONLYDIR));
@@ -42,6 +42,7 @@ class niteo_cmp {
42
  // set remote server URL for updates
43
  $this->remoteServer = ($this->dev == true) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
44
  $this->minified = ($this->dev == true) ? '' : '.min';
 
45
  $this->init();
46
 
47
  }
@@ -80,13 +81,12 @@ class niteo_cmp {
80
  }
81
 
82
  public function cmp_adminInit() {
83
-
84
  $current_user = wp_get_current_user();
85
  if ( user_can( $current_user, 'administrator' ) ) {
86
  // ini render-settings class
87
  require_once('inc/class-cmp-render_settings.php');
88
  $this->render_settings = new cmp_render_settings();
89
-
90
  wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version);
91
  wp_enqueue_style('cmp-style');
92
  wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
@@ -211,6 +211,26 @@ class niteo_cmp {
211
  return plugins_url( $filepath, __FILE__ );
212
  }
213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  // function to display CMP landing page
215
  public function cmp_displayPage() {
216
 
@@ -221,15 +241,15 @@ class niteo_cmp {
221
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
222
  $html = new cmp_render_html();
223
 
224
- // iframe preview with sidebar controls cmp_preview=true&selector=true
225
  if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
226
- if ( file_exists(dirname(__FILE__) . '/inc/preview-selector.php') ) {
227
- require_once (dirname(__FILE__) . '/inc/preview-selector.php');
228
  die();
229
  }
230
  }
231
 
232
- // preview for specific theme cmp_preview=true&theme=slug
233
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
234
  $theme_preview = esc_attr($_GET['theme']);
235
 
@@ -240,13 +260,37 @@ class niteo_cmp {
240
 
241
  }
242
 
243
- // render theme preview cmp_preview=true
 
 
 
 
 
 
 
 
 
 
 
244
  if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
245
  require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
246
  die();
247
  }
248
  }
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  // Render CMP Theme mode if is activated and not in immediate redirect mode
251
  if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
252
 
@@ -297,9 +341,9 @@ class niteo_cmp {
297
  }
298
 
299
  // if CMP in redirect mode with 0 timeout
300
- if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() ) {
301
- $redirect_url = get_option('niteoCS_URL_redirect');
302
 
 
303
  // redirect to URL
304
  if ( $redirect_url != '') {
305
  header('Location: '.esc_url( $redirect_url ));
@@ -309,24 +353,6 @@ class niteo_cmp {
309
  }
310
 
311
 
312
- // override wp login page if cmp is enabled
313
- public function cmp_admin_override(){
314
-
315
- if( is_admin() || $this->cmp_status() == 0 ){
316
- return;
317
- }
318
-
319
- if( is_user_logged_in() ){
320
-
321
- // check for desired wordpress user access rights
322
- if( !$this->cmp_roles_filter() ){
323
- wp_logout();
324
- wp_redirect( get_bloginfo('url') );
325
- exit();
326
- }
327
- }
328
- }
329
-
330
  // return CMP activation status and it`s states
331
  public function cmp_status() {
332
 
@@ -550,13 +576,15 @@ class niteo_cmp {
550
 
551
  // returns list of premium themes => manually defined
552
  public function cmp_premium_themes() {
 
553
  $premium_themes = array();
554
- array_push( $premium_themes, array('name' => 'fifty', 'url' => 'https://niteothemes.com/projects/cmp-fifty-premium-theme/', 'price' => '10') );
555
- array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://niteothemes.com/projects/cmp-hardwork-premium-theme/', 'price' => '5') );
556
- array_push( $premium_themes, array('name' => 'postery', 'url' => 'https://niteothemes.com/projects/cmp-postery-theme/', 'price' => '5') );
557
- array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://niteothemes.com/projects/cmp-frame-theme/', 'price' => '5') );
558
- array_push( $premium_themes, array('name' => 'eclipse', 'url' => 'https://niteothemes.com/projects/cmp-eclipse-theme/', 'price' =>'0') );
559
- array_push( $premium_themes, array('name' => 'orbit', 'url' => 'https://niteothemes.com/projects/cmp-orbit-theme/', 'price' => '0') );
 
560
 
561
  return $premium_themes;
562
  }
@@ -824,13 +852,13 @@ class niteo_cmp {
824
 
825
  $response = wp_remote_get( $api_url );
826
 
827
- if ( isset($response['body']) ) {
828
 
829
  $body = $response['body'];
830
  $data = array( 'response' => $response['response']['code'], 'body' => $body );
831
 
832
  } else {
833
- $data = array( 'response' => $response['response']['code'], 'body' => $response['response']['message'] );
834
  }
835
 
836
  } else {
@@ -936,7 +964,6 @@ class niteo_cmp {
936
  if ( $search !== '' ) {
937
  $search = 'query='.$search.'&';
938
  }
939
-
940
  // prepare query for random photo
941
  $api_query = 'photos/random/?orientation=landscape&featured='.$featured.'&'.$search.'count='.$count;
942
  break;
@@ -987,16 +1014,22 @@ class niteo_cmp {
987
  if ( $_SERVER['REQUEST_METHOD'] == 'POST'
988
  && isset( $_POST['form_honeypot'] )
989
  && $_POST['form_honeypot'] === ''
990
- && isset( $_POST['EMAIL'] ) )
991
  {
992
 
993
- if ( is_email( $_POST['EMAIL'] ) ) {
994
-
995
- $email = $_POST['EMAIL'];
 
 
 
 
996
  $timestamp = time();
997
- $ip_address = sanitize_text_field($_SERVER['REMOTE_ADDR']);
 
998
  $subscribe_list = get_option('niteoCS_subscribers_list');
999
 
 
1000
  if ( get_option('niteoCS_translation') ) {
1001
  $translation = json_decode( get_option('niteoCS_translation'), true );
1002
  $response_ok = $translation[7]['translation'];
@@ -1009,23 +1042,24 @@ class niteo_cmp {
1009
  $response_invalid = 'Please insert valid Email address.';
1010
  }
1011
 
1012
- // if no subscribe list created, create first item and insert it into DB
1013
  if ( !$subscribe_list ) {
1014
- $subscribe_list = array();
1015
- $new_email = array('id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address);
1016
- array_push( $subscribe_list, $new_email );
1017
- update_option( 'niteoCS_subscribers_list', $subscribe_list );
1018
  $response = $response_ok;
1019
 
1020
  } else {
1021
  // check if email don`t already exists
1022
  if ( !$this->niteo_in_array_r( $email, $subscribe_list, true ) ) {
1023
- $count = count($subscribe_list);
1024
- $new_email = array('id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address);
1025
  array_push( $subscribe_list, $new_email );
1026
  update_option('niteoCS_subscribers_list', $subscribe_list);
1027
  $response = $response_ok;
1028
- // if it exists return failed response
 
1029
  } else {
1030
  $response = $response_duplicate;
1031
  }
@@ -1034,11 +1068,8 @@ class niteo_cmp {
1034
  } else {
1035
  $response = $response_invalid;
1036
  }
1037
-
1038
  }
1039
 
1040
-
1041
-
1042
  endif; // $check !== true
1043
 
1044
  if ( $ajax === true ) {
@@ -1448,7 +1479,7 @@ class niteo_cmp {
1448
 
1449
 
1450
  public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
1451
- if (is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra)) {
1452
  if ($hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins'])) {
1453
  $this_plugin = plugin_basename(__FILE__);
1454
  foreach ($hook_extra['plugins'] as $key => $plugin) {
@@ -1526,6 +1557,44 @@ class niteo_cmp {
1526
  }
1527
  }
1528
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1529
  // delete transients for theme updates, to ensure the updates for latest cmp versions runs again
1530
  foreach ( $this->premium_installed as $theme_slug ) {
1531
  delete_transient( $theme_slug.'_updatecheck' );
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.5
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
18
  public function __construct() {
19
  $this->author = 'NiteoThemes';
20
  $this->author_homepage = 'https://niteothemes.com';
21
+ $this->version = '2.5';
22
  $this->dev = false;
23
  $this->plugins_dir_path = plugin_dir_path( __DIR__ );
24
  if ( $this->plugins_dir_path == './') {
26
  }
27
  $this->premium_installed = array();
28
  // set array of themes with countdown
29
+ $this->countdown_themes = array('frame', 'countdown', 'postery', 'countdown2', 'stylo');
30
 
31
  // get all installed themes [folder names under /themes] and put them to array
32
  $this->themes_standard = array_map('basename', glob( plugin_dir_path( __FILE__ ) . 'themes/*', GLOB_ONLYDIR));
42
  // set remote server URL for updates
43
  $this->remoteServer = ($this->dev == true) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
44
  $this->minified = ($this->dev == true) ? '' : '.min';
45
+
46
  $this->init();
47
 
48
  }
81
  }
82
 
83
  public function cmp_adminInit() {
 
84
  $current_user = wp_get_current_user();
85
  if ( user_can( $current_user, 'administrator' ) ) {
86
  // ini render-settings class
87
  require_once('inc/class-cmp-render_settings.php');
88
  $this->render_settings = new cmp_render_settings();
89
+ wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
90
  wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version);
91
  wp_enqueue_style('cmp-style');
92
  wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
211
  return plugins_url( $filepath, __FILE__ );
212
  }
213
 
214
+
215
+ // override wp login page if cmp is enabled
216
+ public function cmp_admin_override(){
217
+
218
+ // if admin or CMP disabled, return
219
+ if( is_admin() || $this->cmp_status() == 0 ){
220
+ return;
221
+ }
222
+
223
+ if( is_user_logged_in() ){
224
+
225
+ // force redirect if logged-in user role is not set to bypass CMP
226
+ if( !$this->cmp_roles_filter() ){
227
+ wp_logout();
228
+ wp_redirect( get_bloginfo('url') );
229
+ exit();
230
+ }
231
+ }
232
+ }
233
+
234
  // function to display CMP landing page
235
  public function cmp_displayPage() {
236
 
241
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
242
  $html = new cmp_render_html();
243
 
244
+ // iframe preview with sidebar controls cmp_preview=true&selector=true - nt.com only
245
  if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
246
+ if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/preview-selector.php') ) {
247
+ require_once ($this->plugins_dir_path . 'cmp-premium-themes/preview-selector.php');
248
  die();
249
  }
250
  }
251
 
252
+ // preview for specific theme cmp_preview=true&theme=slug used in niteothemes
253
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
254
  $theme_preview = esc_attr($_GET['theme']);
255
 
260
 
261
  }
262
 
263
+ // preview for specific theme cmp_preview=true&template=slug used in
264
+ if ( isset($_GET['cmp_theme']) && !empty($_GET['cmp_theme']) ) {
265
+ $theme_preview = esc_attr($_GET['cmp_theme']);
266
+
267
+ if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
268
+ require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
269
+ die();
270
+ }
271
+
272
+ }
273
+
274
+ // finally render theme preview cmp_preview=true
275
  if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
276
  require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
277
  die();
278
  }
279
  }
280
 
281
+ // bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
282
+ if ( isset($_GET['cmp_bypass']) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
283
+ nocache_headers();
284
+ header('Cache-Control: max-age=0; private');
285
+ setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
286
+ return;
287
+ }
288
+
289
+ // if bypass Cookie is set, return
290
+ if ( isset($_COOKIE['cmp_bypass']) && $_COOKIE['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() ) ) && get_option('niteoCS_bypass', '0') == '1' ) {
291
+ return;
292
+ }
293
+
294
  // Render CMP Theme mode if is activated and not in immediate redirect mode
295
  if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
296
 
341
  }
342
 
343
  // if CMP in redirect mode with 0 timeout
344
+ if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() && $this->cmp_page_filter() ) {
 
345
 
346
+ $redirect_url = get_option('niteoCS_URL_redirect');
347
  // redirect to URL
348
  if ( $redirect_url != '') {
349
  header('Location: '.esc_url( $redirect_url ));
353
  }
354
 
355
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  // return CMP activation status and it`s states
357
  public function cmp_status() {
358
 
576
 
577
  // returns list of premium themes => manually defined
578
  public function cmp_premium_themes() {
579
+
580
  $premium_themes = array();
581
+ 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') );
582
+ 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') );
583
+ 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' => '5') );
584
+ 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' => '5') );
585
+ 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' => '5') );
586
+ 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') );
587
+ 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') );
588
 
589
  return $premium_themes;
590
  }
852
 
853
  $response = wp_remote_get( $api_url );
854
 
855
+ if ( !is_object( $response ) && isset( $response['body'] ) ) {
856
 
857
  $body = $response['body'];
858
  $data = array( 'response' => $response['response']['code'], 'body' => $body );
859
 
860
  } else {
861
+ $data = array( 'response' => 'Unplash API', 'body' => 'Not responding after 5000ms' );
862
  }
863
 
864
  } else {
964
  if ( $search !== '' ) {
965
  $search = 'query='.$search.'&';
966
  }
 
967
  // prepare query for random photo
968
  $api_query = 'photos/random/?orientation=landscape&featured='.$featured.'&'.$search.'count='.$count;
969
  break;
1014
  if ( $_SERVER['REQUEST_METHOD'] == 'POST'
1015
  && isset( $_POST['form_honeypot'] )
1016
  && $_POST['form_honeypot'] === ''
1017
+ && isset( $_POST['email'] ) )
1018
  {
1019
 
1020
+ if ( is_email( $_POST['email'] ) ) {
1021
+ // email already passed is_email, no need to sanitize
1022
+ $email = $_POST['email'];
1023
+ // sanitize all inputs
1024
+ $ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
1025
+ $firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
1026
+ $lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
1027
  $timestamp = time();
1028
+
1029
+ // get subscribe list
1030
  $subscribe_list = get_option('niteoCS_subscribers_list');
1031
 
1032
+ // get translation lists
1033
  if ( get_option('niteoCS_translation') ) {
1034
  $translation = json_decode( get_option('niteoCS_translation'), true );
1035
  $response_ok = $translation[7]['translation'];
1042
  $response_invalid = 'Please insert valid Email address.';
1043
  }
1044
 
1045
+ // if no subscribe list yet, create first item and insert it into DB
1046
  if ( !$subscribe_list ) {
1047
+ $new_list = array();
1048
+ $new_email = array( 'id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1049
+ array_push( $new_list, $new_email );
1050
+ update_option( 'niteoCS_subscribers_list', $new_list );
1051
  $response = $response_ok;
1052
 
1053
  } else {
1054
  // check if email don`t already exists
1055
  if ( !$this->niteo_in_array_r( $email, $subscribe_list, true ) ) {
1056
+ $count = count( $subscribe_list );
1057
+ $new_email = array( 'id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1058
  array_push( $subscribe_list, $new_email );
1059
  update_option('niteoCS_subscribers_list', $subscribe_list);
1060
  $response = $response_ok;
1061
+
1062
+ // if email exists return duplicate response
1063
  } else {
1064
  $response = $response_duplicate;
1065
  }
1068
  } else {
1069
  $response = $response_invalid;
1070
  }
 
1071
  }
1072
 
 
 
1073
  endif; // $check !== true
1074
 
1075
  if ( $ajax === true ) {
1479
 
1480
 
1481
  public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
1482
+ if ( is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra) ) {
1483
  if ($hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins'])) {
1484
  $this_plugin = plugin_basename(__FILE__);
1485
  foreach ($hook_extra['plugins'] as $key => $plugin) {
1557
  }
1558
  }
1559
 
1560
+ // add new strings to translation
1561
+ if ( get_option('niteoCS_translation') ) {
1562
+ $translation = json_decode( get_option('niteoCS_translation'), true );
1563
+ if ( !isset($translation[9]) ) {
1564
+ array_push( $translation, array('id' => 9, 'string' => 'Scroll', 'translation' => 'Scroll') );
1565
+ }
1566
+
1567
+ if ( !isset($translation[10]) ) {
1568
+ array_push( $translation, array('id' => 10, 'string' => 'First Name', 'translation' => 'First Name') );
1569
+ }
1570
+
1571
+ if ( !isset($translation[11]) ) {
1572
+ array_push( $translation, array('id' => 11, 'string' => 'Last Name', 'translation' => 'Last Name') );
1573
+ }
1574
+
1575
+ update_option('niteoCS_translation', wp_json_encode($translation));
1576
+ }
1577
+
1578
+
1579
+ // check for < 1.8 version where subscriber ID was not set
1580
+ if ( get_option('niteoCS_subscribers_list') ) {
1581
+ $subscribe_list = get_option('niteoCS_subscribers_list');
1582
+
1583
+ if ( is_array($subscribe_list) && count($subscribe_list) > 0 && !array_key_exists ('id', $subscribe_list[0]) ) {
1584
+ $i = 1;
1585
+ foreach( $subscribe_list as &$sub ){
1586
+ $sub['id'] = $i;
1587
+ $sub = array('id' => $sub['id']) + $sub;
1588
+ // check if ip address is set
1589
+ if (!array_key_exists('ip_address', $sub)) {
1590
+ $sub['ip_address'] = 'nodata';
1591
+ }
1592
+ $i++;
1593
+ }
1594
+ update_option('niteoCS_subscribers_list', $subscribe_list);
1595
+ }
1596
+ }
1597
+
1598
  // delete transients for theme updates, to ensure the updates for latest cmp versions runs again
1599
  foreach ( $this->premium_installed as $theme_slug ) {
1600
  delete_transient( $theme_slug.'_updatecheck' );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
- Stable tag: 2.4.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -34,11 +34,12 @@ CMP plugin offers premium features for free, no PRO versions! With blazing speed
34
  <li>Setup Font loading animations on selected Themes</li>
35
  <li>CMP can be applied to specific pages (blacklist and whitelist)</li>
36
  <li>Customizable WordPress roles to bypass CMP</li>
 
37
  <li>Configurable Countdown Action - disable plugin or redirect to another website</li>
38
  <li>Customize SEO meta tags to search engines and editable favicon</li>
39
  <li>Set response code to search engines (200, 503)</li>
40
  <li>Redirect Mode to redirect your website to another website with predefined timer</li>
41
- <li>Insert Google Analytics Code</li>
42
  <li>Insert Custom CSS</li>
43
  <li>Uses HTML5 & CSS3</li>
44
  <li>Extandable by downloadable Themes.</li>
@@ -58,6 +59,8 @@ CMP plugin offers premium features for free, no PRO versions! With blazing speed
58
  10. CMP - Content Settings
59
  11. CMP - Content Settings
60
  12. CMP - Variables translation
 
 
61
 
62
 
63
  == Installation ==
@@ -108,7 +111,14 @@ CMP plugin offers premium features for free, no PRO versions! With blazing speed
108
  <h4>I really like your plugin and I want to support it!</h4>
109
  <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>
110
 
111
-
 
 
 
 
 
 
 
112
 
113
  == Changelog ==
114
  <h4>CMP 2.4.2 - maintenance update</h4>
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
+ Stable tag: 2.5
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
34
  <li>Setup Font loading animations on selected Themes</li>
35
  <li>CMP can be applied to specific pages (blacklist and whitelist)</li>
36
  <li>Customizable WordPress roles to bypass CMP</li>
37
+ <li>Enable bypass URL parameter to bypass CMP page</li>
38
  <li>Configurable Countdown Action - disable plugin or redirect to another website</li>
39
  <li>Customize SEO meta tags to search engines and editable favicon</li>
40
  <li>Set response code to search engines (200, 503)</li>
41
  <li>Redirect Mode to redirect your website to another website with predefined timer</li>
42
+ <li>Insert Google Analytics Code or any javascript</li>
43
  <li>Insert Custom CSS</li>
44
  <li>Uses HTML5 & CSS3</li>
45
  <li>Extandable by downloadable Themes.</li>
59
  10. CMP - Content Settings
60
  11. CMP - Content Settings
61
  12. CMP - Variables translation
62
+ 13. CMP - Orbit Theme
63
+ 14. CMP - Stylo Theme
64
 
65
 
66
  == Installation ==
111
  <h4>I really like your plugin and I want to support it!</h4>
112
  <p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
113
 
114
+ == Changelog ==
115
+ <h4>CMP 2.5 - user driven update with new requested features :)</h4>
116
+ <ul>
117
+ <li>New Theme: Stylo - modern, animated full-page background graphics for your landing, coming soon or maintenance page!</li>
118
+ <li>New background effects option. From time to time we will add new effects for your backgrounds, this time it is Blur effect, which will be available for all free and premium Themes!</li>
119
+ <li>New Feature: you can enable CMP bypass URL, which can be sent to your users to bypass CMP for website preview.</li>
120
+ <li>New Feature: custom CSS textarea replaced by CSS Code Editor for easier CSS coding.</li>
121
+ </ul>
122
 
123
  == Changelog ==
124
  <h4>CMP 2.4.2 - maintenance update</h4>
themes/construct/construct-theme.php CHANGED
@@ -31,7 +31,8 @@
31
 
32
 
33
  <style>
34
- body,input {font-family:'<?php echo esc_attr( $content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
 
35
  body {background-color:<?php echo esc_attr( $background_color ); ?>}
36
  a {color:<?php echo esc_attr( $font_color ); ?>;}
37
  h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr( $heading_font['family'] );?>', 'sans-serif';}
31
 
32
 
33
  <style>
34
+ body,input, select, textarea, button {font-family:'<?php echo esc_attr( $content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
35
+ input {font-family: <?php echo esc_attr( $content_font['family'] );?>, 'fontAwesome';}
36
  body {background-color:<?php echo esc_attr( $background_color ); ?>}
37
  a {color:<?php echo esc_attr( $font_color ); ?>;}
38
  h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr( $heading_font['family'] );?>', 'sans-serif';}
themes/construct/style.css CHANGED
@@ -18,6 +18,8 @@ body {
18
  flex-direction: column;
19
  margin: 0;
20
  min-height: 100vh;
 
 
21
  }
22
 
23
  img {
@@ -53,11 +55,11 @@ h1,h2,h3,h4,h5,h6{font-weight: 400;}
53
  -moz-flex-grow: 1;}
54
  .section-logo {max-width:100%; margin: 0 auto;}
55
  .section-logo img {max-width: 100%;max-height: 300px;}
56
- .section-banner{height: 700px;}
57
  .section-body p{width:70%;max-width: 900px;margin:0.5em auto;}
58
  .section-social{background-color: #f8f8f8;}
59
  .section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;font-size:1em;}
60
- #background-image, .video-banner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;background-attachment: scroll;background-position: center center;background-repeat: no-repeat;background-size: cover;}
61
  #background-image {opacity: 0; -webkit-transition: opacity 400ms; transition: opacity 400ms;}
62
  #background-image.loaded {opacity: 1;}
63
 
@@ -119,7 +121,7 @@ div.wpcf7-response-output { border:none;margin: 0; padding: 0;}
119
 
120
  @media only screen and (min-width : 1024px) {
121
  #background-image, .video-banner {
122
- background-attachment: fixed;
123
  }
124
  }
125
 
18
  flex-direction: column;
19
  margin: 0;
20
  min-height: 100vh;
21
+ -webkit-font-smoothing: antialiased;
22
+ -moz-osx-font-smoothing: grayscale;
23
  }
24
 
25
  img {
55
  -moz-flex-grow: 1;}
56
  .section-logo {max-width:100%; margin: 0 auto;}
57
  .section-logo img {max-width: 100%;max-height: 300px;}
58
+ .section-banner{height: 700px;overflow:hidden;}
59
  .section-body p{width:70%;max-width: 900px;margin:0.5em auto;}
60
  .section-social{background-color: #f8f8f8;}
61
  .section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;font-size:1em;}
62
+ #background-image, .video-banner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;background-attachment: scroll!important;background-position: center center;background-repeat: no-repeat;background-size: cover;}
63
  #background-image {opacity: 0; -webkit-transition: opacity 400ms; transition: opacity 400ms;}
64
  #background-image.loaded {opacity: 1;}
65
 
121
 
122
  @media only screen and (min-width : 1024px) {
123
  #background-image, .video-banner {
124
+ background-attachment: fixed!important;
125
  }
126
  }
127
 
themes/countdown/countdown-settings.php CHANGED
@@ -37,9 +37,11 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
37
 
38
  <fieldset id="overlay-color">
39
  <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
 
40
 
41
- <label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $overlay_opacity); ?></span></label><br>
42
- <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opacity); ?>" />
 
43
 
44
  </fieldset>
45
  </td>
37
 
38
  <fieldset id="overlay-color">
39
  <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
40
+ </fieldset>
41
 
42
+ <fieldset>
43
+ <label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?>: <span>: <?php echo esc_attr( $overlay_opacity); ?></span></label><br>
44
+ <input type="range" class="overlay-opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opacity); ?>" />
45
 
46
  </fieldset>
47
  </td>
themes/countdown/countdown-theme.php CHANGED
@@ -42,7 +42,9 @@
42
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
43
 
44
  <style>
45
- body,input {font-family:'<?php echo esc_attr ($content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
 
 
46
  body {font-size:<?php echo esc_attr( $content_font['size'] );?>px;}
47
  h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr( $heading_font['family'] );?>', 'sans-serif';}
48
  a {color:<?php echo esc_attr( $font_color ); ?>;}
@@ -95,7 +97,9 @@
95
  echo $html->cmp_background( $banner_type, $themeslug, $overlay );
96
 
97
  } ?>
 
98
 
 
99
  <div class="inner-content">
100
  <?php
101
  // display logo
42
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
43
 
44
  <style>
45
+ body,input, select, textarea, button {font-family:'<?php echo esc_attr( $content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
46
+ input {font-family: <?php echo esc_attr( $content_font['family'] );?>, 'fontAwesome';}
47
+
48
  body {font-size:<?php echo esc_attr( $content_font['size'] );?>px;}
49
  h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr( $heading_font['family'] );?>', 'sans-serif';}
50
  a {color:<?php echo esc_attr( $font_color ); ?>;}
97
  echo $html->cmp_background( $banner_type, $themeslug, $overlay );
98
 
99
  } ?>
100
+ </div>
101
 
102
+ <div class="inner-wrap">
103
  <div class="inner-content">
104
  <?php
105
  // display logo
themes/countdown/style.css CHANGED
@@ -14,6 +14,8 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
14
  html {
15
  -webkit-text-size-adjust: 100%;
16
  -ms-text-size-adjust: 100%;
 
 
17
  }
18
 
19
 
@@ -265,7 +267,7 @@ h1,h2,h3,h4,h5,h6 {
265
  margin-bottom: .5em;
266
  }
267
 
268
- #background-wrapper {
269
  position: relative;
270
  display: -moz-flex;
271
  display: -ms-flexbox;
@@ -282,6 +284,7 @@ h1,h2,h3,h4,h5,h6 {
282
  text-align: center;
283
  }
284
 
 
285
  #background-image {
286
  opacity: 0;
287
  -webkit-transition: opacity .5s;
@@ -301,8 +304,10 @@ h1,h2,h3,h4,h5,h6 {
301
 
302
 
303
 
 
304
  #background-image,
305
- .video-banner {
 
306
  position: absolute;
307
  top: 0;
308
  right: 0;
@@ -315,15 +320,6 @@ h1,h2,h3,h4,h5,h6 {
315
  }
316
 
317
 
318
- .background-overlay {
319
- position: absolute;
320
- top: 0;
321
- right: 0;
322
- bottom: 0;
323
- left: 0;
324
- z-index: -1;
325
- }
326
-
327
  #background-image.pattern {
328
  background-repeat: repeat;
329
  background-size: initial;
14
  html {
15
  -webkit-text-size-adjust: 100%;
16
  -ms-text-size-adjust: 100%;
17
+ -webkit-font-smoothing: antialiased;
18
+ -moz-osx-font-smoothing: grayscale;
19
  }
20
 
21
 
267
  margin-bottom: .5em;
268
  }
269
 
270
+ .inner-wrap {
271
  position: relative;
272
  display: -moz-flex;
273
  display: -ms-flexbox;
284
  text-align: center;
285
  }
286
 
287
+
288
  #background-image {
289
  opacity: 0;
290
  -webkit-transition: opacity .5s;
304
 
305
 
306
 
307
+ #background-wrapper,
308
  #background-image,
309
+ #background-color,
310
+ .background-overlay {
311
  position: absolute;
312
  top: 0;
313
  right: 0;
320
  }
321
 
322
 
 
 
 
 
 
 
 
 
 
323
  #background-image.pattern {
324
  background-repeat: repeat;
325
  background-size: initial;
themes/hardwork/hardwork-settings.php CHANGED
@@ -24,9 +24,11 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
24
  <td>
25
  <fieldset id="overlay-color">
26
  <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
 
27
 
28
- <label for="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $overlay_opacity); ?></span></label><br>
29
- <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opacity); ?>" />
 
30
  </fieldset>
31
  </td>
32
  </tr>
24
  <td>
25
  <fieldset id="overlay-color">
26
  <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
27
+ </fieldset>
28
 
29
+ <fieldset>
30
+ <label for="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?>: <span>: <?php echo esc_attr( $overlay_opacity); ?></span></label><br>
31
+ <input type="range" class="overlay-opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1" value="<?php echo esc_attr( $overlay_opacity); ?>" />
32
  </fieldset>
33
  </td>
34
  </tr>
themes/hardwork/hardwork-theme.php CHANGED
@@ -22,7 +22,7 @@
22
  if ( method_exists ( $html, 'cmp_get_fonts' ) ) {
23
  echo $html->cmp_get_fonts( $heading_font, $content_font );
24
  }
25
-
26
  ?>
27
 
28
 
22
  if ( method_exists ( $html, 'cmp_get_fonts' ) ) {
23
  echo $html->cmp_get_fonts( $heading_font, $content_font );
24
  }
25
+
26
  ?>
27
 
28
 
themes/hardwork/style.css CHANGED
@@ -19,6 +19,8 @@ body{
19
  margin:0;
20
  min-height: 100vh;
21
  position: relative;
 
 
22
  }
23
 
24
  h1,h2,h3,h4,h5,h6{
@@ -202,7 +204,7 @@ img {
202
 
203
  @media only screen and (max-width : 560px) {
204
  .section {padding: 4em 1em;}
205
- .section-body {width: auto;}
206
  .graphic-logo {max-height: 200px;padding-bottom: 0;max-width: 100%;}
207
  .section-body,
208
  .social-list {font-size: 14px!important;}
19
  margin:0;
20
  min-height: 100vh;
21
  position: relative;
22
+ -webkit-font-smoothing: antialiased;
23
+ -moz-osx-font-smoothing: grayscale;
24
  }
25
 
26
  h1,h2,h3,h4,h5,h6{
204
 
205
  @media only screen and (max-width : 560px) {
206
  .section {padding: 4em 1em;}
207
+ .section-body {width: auto;min-height: calc(100vh - 11em);}
208
  .graphic-logo {max-height: 200px;padding-bottom: 0;max-width: 100%;}
209
  .section-body,
210
  .social-list {font-size: 14px!important;}
themes/stylo.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*
2
+ Theme Name: Stylo
3
+ Description: <p>You can use Stylo as a landing page, maintenance or coming soon page. It supports both subscriber and contact form, all background options and big beautiful counter.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Countdown Timer</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Fade in/out Text Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Contact Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>