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

Version Description

Download this release

Release Info

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

Code changes from version 2.6.6 to 2.8.3

Files changed (60) hide show
  1. cmp-settings.php +85 -89
  2. cmp-sidebar.php +22 -19
  3. css/animate.min.css +2 -183
  4. css/cmp-settings-style.css +52 -5
  5. css/cmp-settings-style.min.css +1 -1
  6. css/preview-iframe.css +9 -5
  7. img/thumbnails/apollo/screenshot1.jpg +0 -0
  8. img/thumbnails/apollo_thumbnail.jpg +0 -0
  9. img/thumbnails/coder_thumbnail.jpg +0 -0
  10. img/thumbnails/element/screenshot1.jpg +0 -0
  11. img/thumbnails/element_thumbnail.jpg +0 -0
  12. inc/class-cmp-feedback.php +1 -1
  13. inc/class-cmp-render_html.php +332 -54
  14. inc/settings/settings-background.php +432 -227
  15. inc/settings/settings-background_effects.php +0 -64
  16. inc/settings/{settings-contact_form_disabled.php → settings-contact_form-disabled.php} +0 -0
  17. inc/settings/settings-contact_form.php +1 -1
  18. inc/settings/{settings-counter_disabled.php → settings-counter-disabled.php} +0 -0
  19. inc/settings/{settings-footer_disabled.php → settings-footer-disabled.php} +0 -0
  20. inc/settings/{settings-logo_disabled.php → settings-logo-disabled.php} +0 -0
  21. inc/settings/{settings-slider_disabled.php → settings-slider-disabled.php} +0 -0
  22. inc/settings/settings-slider.php +6 -7
  23. inc/settings/settings-special_effects-disabled.php +44 -0
  24. inc/settings/settings-special_effects.php +71 -0
  25. inc/settings/{settings-subscribe_disabled.php → settings-subscribe-disabled.php} +2 -2
  26. inc/settings/settings-subscribe.php +32 -27
  27. inc/webfonts.php +1 -2
  28. js/cmp-admin-head.js +4 -4
  29. js/settings.js +306 -287
  30. js/settings.min.js +1 -38
  31. js/typography.js +9 -10
  32. js/typography.min.js +1 -10
  33. languages/coming-soon-default.mo +0 -0
  34. languages/coming-soon-default.po +1191 -248
  35. niteo-cmp.php +1630 -1420
  36. readme.txt +47 -1
  37. themes/apollo.txt +4 -0
  38. themes/coder.txt +6 -0
  39. themes/construct.txt +1 -1
  40. themes/construct/construct-defaults.php +7 -6
  41. themes/construct/construct-theme.php +2 -2
  42. themes/construct/style.css +2 -1
  43. themes/countdown.txt +1 -1
  44. themes/countdown/countdown-defaults.php +7 -15
  45. themes/countdown/countdown-settings.php +0 -15
  46. themes/countdown/countdown-theme.php +3 -8
  47. themes/countdown/style.css +5 -1
  48. themes/eclipse.txt +1 -1
  49. themes/element.txt +3 -0
  50. themes/fifty.txt +1 -1
  51. themes/frame.txt +1 -1
  52. themes/hardwork.txt +1 -1
  53. themes/hardwork/hardwork-defaults.php +15 -16
  54. themes/hardwork/hardwork-settings.php +15 -15
  55. themes/hardwork/hardwork-theme.php +4 -7
  56. themes/hardwork/style.css +6 -5
  57. themes/hardwork_premium.txt +1 -1
  58. themes/orbit.txt +1 -1
  59. themes/postery.txt +1 -1
  60. themes/stylo.txt +1 -1
cmp-settings.php CHANGED
@@ -6,16 +6,15 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
6
  if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
7
  die('Sorry, but this request is invalid');
8
  }
9
- }
10
 
11
- if ( isset($_POST['select_theme']) && in_array($_POST['select_theme'], $this->theme_array)) {
12
- update_option('niteoCS_theme', sanitize_text_field($_POST['select_theme']));
13
  }
14
 
 
 
 
15
 
16
  $themeslug = $this->cmp_selectedTheme();
17
  $downloadable_themes = $this->cmp_downloadable_themes();
18
- $font_animation = array('hardwork_premium', 'fifty', 'orbit');
19
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
20
 
21
  if (isset($_POST['niteoCS_logo_id_'.$themeslug]) && ( is_numeric($_POST['niteoCS_logo_id_'.$themeslug]) || empty($_POST['niteoCS_logo_id_'.$themeslug]))) {
@@ -256,8 +255,8 @@ $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
256
 
257
  // get Content Settings
258
  $niteoCS_body_title = stripslashes(get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!'));
259
- $niteoCS_body = get_option('niteoCS_body');
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
 
@@ -267,7 +266,7 @@ $niteoCS_title = stripslashes(get_option('niteoCS_title', get_bloginfo('name
267
  $niteoCS_descr = stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page'));
268
  $niteoCS_analytics_status = get_option('niteoCS_analytics_status', 'disabled');
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', ''));
@@ -381,7 +380,7 @@ if( isset($_POST['submit_theme']) ) {
381
  // Handle Theme update
382
  if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
383
  $slug = sanitize_text_field($_GET['theme']);
384
- $theme_url = $this->remoteServer.'?action=download&slug='.$slug;
385
  $update = array(
386
  'name' => $slug,
387
  'tmp_name' => '',
@@ -500,39 +499,43 @@ add_thickbox();
500
  </legend>
501
  <?php
502
  // move active theme to beginning
503
- $key = array_search ($this->cmp_selectedTheme(), $this->theme_array);
 
 
 
504
  if ( $key ) {
505
- $active = $this->theme_array[$key];
506
- unset($this->theme_array[$key]);
507
- array_unshift($this->theme_array, $active);
508
  }
509
 
510
  // define what attribute we want from style.css header
511
  $headers = array('Version');
512
-
513
- foreach ( $this->theme_array as $theme_slug ) {
 
514
  $version = $this->cmp_theme_version( $theme_slug );
515
  $type = 'standard';
516
 
517
  // if premium get theme version
518
- if ( in_array( $theme_slug, $this->premium_installed ) ) {
519
  $type = 'premium';
520
  }
521
 
522
  // get thumbnail
523
  $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
524
 
525
- <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
526
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
527
 
528
  <div class="buttons-wrapper">
529
 
530
  <div class="button theme-select hide<?php echo ( $this->cmp_selectedTheme() == $theme_slug ) ? ' activated' : '';?>">
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>
@@ -576,40 +579,24 @@ add_thickbox();
576
  </legend>
577
  <?php
578
 
579
- // build previews for premium themes
580
  foreach ( $downloadable_themes as $premium_theme ) {
581
  $theme_slug = $premium_theme['name'];
582
- $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__);
583
- $freebie = 'false';
584
-
585
- // check if theme is freebie [price-0] and display download button
586
- if ( $premium_theme['price'] == 0 ) {
587
- $freebie = 'true';
588
- } ?>
589
-
590
 
591
- <div class="theme-wrapper premium" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium" data-freebie="<?php echo esc_attr( $freebie );?>" data-price="<?php echo esc_html( $premium_theme['price'] );?>">
592
 
593
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
594
 
595
- <div class="buttons-wrapper">
596
 
597
- <?php
598
- // premium theme
599
- if ( $freebie !== 'true' ) { ?>
600
- <a href="<?php echo esc_url( $premium_theme['url'] );?>" target="_blank" class="theme-purchase button hide"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>BUY $<?php echo esc_html( $premium_theme['price'] );?></a>
601
- <?php
602
- // if freebie, dislay download icon
603
- } else if ( $freebie == 'true' ) { ?>
604
- <a href="<?php echo esc_url ($premium_theme['url'] );?>" target="_blank" class="theme-purchase button hide"><i class="fa fa-download" aria-hidden="true"></i><?php _e('Download', 'cmp-coming-soon-maintenance');?></a>
605
- <?php
606
- } ?>
607
 
608
- <a href="<?php echo 'http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='.$theme_slug.'&utm_source=cmp&utm_medium=referral&utm_campaign='.$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>
609
 
610
- <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>
611
 
612
- </div>
613
 
614
  <div class="theme-inputs">
615
 
@@ -618,7 +605,7 @@ add_thickbox();
618
  </div>
619
 
620
  <?php
621
- } //endforeach $premium_themes ?>
622
  </fieldset>
623
  </td>
624
  </tr>
@@ -640,7 +627,7 @@ add_thickbox();
640
  <th><h4><?php _e('Title', 'cmp-coming-soon-maintenance');?></h4></th>
641
  <td>
642
  <fieldset>
643
- <input type="text" name="niteoCS_body_title" id="niteoCS_body_title" value="<?php echo stripslashes(esc_attr( $niteoCS_body_title)); ?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
644
  </fieldset>
645
  </td>
646
  </tr>
@@ -648,7 +635,7 @@ add_thickbox();
648
  <tr>
649
  <th><h4><?php _e('Message', 'cmp-coming-soon-maintenance');?></h4></th>
650
  <td>
651
- <?php wp_editor( stripslashes( $this->niteo_sanitize_html( $niteoCS_body ) ), 'niteoCS_body', $settings = array('textarea_name'=>'niteoCS_body', 'editor_height'=>'300') ); ?>
652
  </td>
653
  </tr>
654
 
@@ -661,40 +648,40 @@ add_thickbox();
661
 
662
  <?php
663
  // get counter settings
664
- if ( $theme_supports['counter'] ) {
665
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-counter.php') ) {
666
  require (dirname(__FILE__) . '/inc/settings/settings-counter.php');
667
  }
668
 
669
  } else {
670
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-counter_disabled.php') ) {
671
- require (dirname(__FILE__) . '/inc/settings/settings-counter_disabled.php');
672
  }
673
 
674
  }
675
 
676
  // get subscribe settings
677
- if ( $theme_supports['subscribe'] ) {
678
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-subscribe.php') ) {
679
  require (dirname(__FILE__) . '/inc/settings/settings-subscribe.php');
680
  }
681
 
682
  } else {
683
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-subscribe_disabled.php') ) {
684
- require (dirname(__FILE__) . '/inc/settings/settings-subscribe_disabled.php');
685
  }
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
  }
@@ -760,9 +747,9 @@ add_thickbox();
760
  <?php
761
  foreach ( $socialmedia as $social ) {
762
 
763
- ($social['hidden'] == '0') ? $active = 'active ' : $active = '';
764
 
765
- ($social['active'] == '0') ? $disabled = 'disabled ' : $disabled = '';
766
 
767
  switch ( $social['name'] ) {
768
  case 'envelope-o':
@@ -794,13 +781,13 @@ add_thickbox();
794
  $url = 'https://'.$social['name'].'.com/profile';
795
  break;
796
  } ?>
797
- <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
798
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
799
- <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo esc_html($title);?></label>
800
 
801
- <input type="text" <?php echo $disabled;?>name="niteoCS_<?php echo esc_attr($social['name']);?>" id="niteoCS_<?php echo esc_attr($social['name']);?>" value="<?php echo esc_attr( $social['url'] ); ?>" class="regular-text code <?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>" placeholder="<?php echo $url;?>">
802
 
803
- <input type="checkbox" name="niteoCS_<?php echo esc_attr($social['name']);?>_checkbox" id="niteoCS_<?php echo esc_attr($social['name']);?>_checkbox" class="<?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>" <?php checked( '1', $social['active'] ); ?>>
804
  </p>
805
  </li>
806
  <?php
@@ -826,59 +813,68 @@ add_thickbox();
826
  </div>
827
  <?php
828
  // get footer
829
- if ( $theme_supports['footer'] ) {
830
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-footer.php') ) {
831
- require_once (dirname(__FILE__) . '/inc/settings/settings-footer.php');
832
  }
833
 
834
  } else {
835
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-footer_disabled.php') ) {
836
- require_once (dirname(__FILE__) . '/inc/settings/settings-footer_disabled.php');
837
  }
838
 
839
  }
840
 
841
  // get logo settings
842
- if ( $theme_supports['logo'] ) {
843
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-logo.php') ) {
844
- require (dirname(__FILE__) . '/inc/settings/settings-logo.php');
845
  }
846
 
847
  } else {
848
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-logo_disabled.php') ) {
849
- require (dirname(__FILE__) . '/inc/settings/settings-logo_disabled.php');
850
  }
851
 
852
  }
853
 
854
  // get background settings
855
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-background.php') ) {
856
- require (dirname(__FILE__) . '/inc/settings/settings-background.php');
857
  }
858
 
859
- // get background effects settings
860
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-background_effects.php') ) {
861
- require (dirname(__FILE__) . '/inc/settings/settings-background_effects.php');
 
 
 
 
 
 
 
 
 
 
862
  }
863
 
864
  // get slider settings
865
- if ( $theme_supports['slider'] ) {
866
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-slider.php') ) {
867
- require (dirname(__FILE__) . '/inc/settings/settings-slider.php');
868
  }
869
 
870
  } else {
871
- if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-slider_disabled.php') ) {
872
- require (dirname(__FILE__) . '/inc/settings/settings-slider_disabled.php');
873
  }
874
 
875
  }
876
 
877
  // include theme related settings
878
- if (file_exists($this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php')) {
879
- require ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php' );
880
- }
881
- ?>
882
 
883
  <div class="table-wrapper theme-setup font-selector">
884
  <h3><?php _e('Customize Fonts', 'cmp-coming-soon-maintenance');?></h3>
@@ -913,7 +909,7 @@ add_thickbox();
913
 
914
  <?php
915
  // include theme animation settings
916
- if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
917
 
918
  <fieldset>
919
  <label for="niteoCS_heading_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Animation', 'cmp-coming-soon-maintenance');?></label></br>
@@ -966,7 +962,7 @@ add_thickbox();
966
  </fieldset>
967
  <?php
968
  // include theme animation settings
969
- if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
970
 
971
  <fieldset>
972
  <label for="niteoCS_content_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Animation', 'cmp-coming-soon-maintenance');?></label></br>
@@ -981,7 +977,7 @@ add_thickbox();
981
  <?php
982
  } ?>
983
 
984
- <p style="margin-bottom:0">Fonts preview</p>
985
  <div id="font-example-wrapper">
986
  <h3 id="heading-example" class="animated <?php echo esc_attr($niteoCS_heading_animation);?>" style="font-size:<?php echo esc_attr( $heading_font['size'] );?>px;letter-spacing:<?php echo esc_attr( $heading_font['spacing'] );?>px">Hello, I am your Headings font!</h3>
987
  <p id="content-example" class="animated <?php echo esc_attr($niteoCS_content_animation);?>" style="font-size:<?php echo esc_attr( $content_font['size'] );?>px;letter-spacing:<?php echo esc_attr( $content_font['spacing'] );?>px;line-height:<?php echo esc_attr( $content_font['line-height'] );?>">And this is a long paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
@@ -1091,8 +1087,8 @@ add_thickbox();
1091
  </p>
1092
 
1093
  <p class="analytics-switch other">
1094
- <label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code', 'cmp-coming-soon-maintenance');?></label><br>
1095
- <textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo esc_js( $niteoCS_analytics_other ); ?></textarea>
1096
  </p>
1097
  </fieldset>
1098
 
6
  if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
7
  die('Sorry, but this request is invalid');
8
  }
 
9
 
 
 
10
  }
11
 
12
+ if ( isset($_POST['niteoCS_select_theme']) && in_array($_POST['niteoCS_select_theme'], $this->cmp_themes_available())) {
13
+ update_option('niteoCS_theme', sanitize_text_field($_POST['niteoCS_select_theme']));
14
+ }
15
 
16
  $themeslug = $this->cmp_selectedTheme();
17
  $downloadable_themes = $this->cmp_downloadable_themes();
 
18
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
19
 
20
  if (isset($_POST['niteoCS_logo_id_'.$themeslug]) && ( is_numeric($_POST['niteoCS_logo_id_'.$themeslug]) || empty($_POST['niteoCS_logo_id_'.$themeslug]))) {
255
 
256
  // get Content Settings
257
  $niteoCS_body_title = stripslashes(get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!'));
258
+ $niteoCS_body = stripslashes(get_option('niteoCS_body'));
259
+ $niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.'));
260
  $niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
261
 
262
 
266
  $niteoCS_descr = stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page'));
267
  $niteoCS_analytics_status = get_option('niteoCS_analytics_status', 'disabled');
268
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
269
+ $niteoCS_analytics_other = get_option('niteoCS_analytics_other', '');
270
 
271
  // get Custom CSS
272
  $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
380
  // Handle Theme update
381
  if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
382
  $slug = sanitize_text_field($_GET['theme']);
383
+ $theme_url = CMP_UPDATE_URL.'?action=download&slug='.$slug;
384
  $update = array(
385
  'name' => $slug,
386
  'tmp_name' => '',
499
  </legend>
500
  <?php
501
  // move active theme to beginning
502
+ $key = array_search ( $this->cmp_selectedTheme(), $this->cmp_themes_available() );
503
+
504
+ $themes = $this->cmp_themes_available();
505
+
506
  if ( $key ) {
507
+ $active = $themes[$key];
508
+ unset( $themes[$key] );
509
+ array_unshift( $themes, $active );
510
  }
511
 
512
  // define what attribute we want from style.css header
513
  $headers = array('Version');
514
+
515
+ foreach ( $themes as $theme_slug ) {
516
+
517
  $version = $this->cmp_theme_version( $theme_slug );
518
  $type = 'standard';
519
 
520
  // if premium get theme version
521
+ if ( in_array( $theme_slug, $this->cmp_premium_themes_installed() ) ) {
522
  $type = 'premium';
523
  }
524
 
525
  // get thumbnail
526
  $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
527
 
528
+ <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url(CMP_UPDATE_URL);?>">
529
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
530
 
531
  <div class="buttons-wrapper">
532
 
533
  <div class="button theme-select hide<?php echo ( $this->cmp_selectedTheme() == $theme_slug ) ? ' activated' : '';?>">
534
+ <input type="radio" name="niteoCS_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"'; } ?>>
535
  <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>
536
  </div>
537
 
538
+ <a href="<?php echo esc_url( 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>
539
 
540
  <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>
541
  </div>
579
  </legend>
580
  <?php
581
 
582
+ // build previews for downloadable themes
583
  foreach ( $downloadable_themes as $premium_theme ) {
584
  $theme_slug = $premium_theme['name'];
585
+ $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
 
 
 
 
 
 
 
586
 
587
+ <div class="theme-wrapper premium" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium">
588
 
589
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
590
 
591
+ <div class="buttons-wrapper">
592
 
593
+ <a href="<?php echo esc_url ($premium_theme['url'] );?>" target="_blank" class="theme-purchase button hide"><i class="fa fa-download" aria-hidden="true"></i><?php _e('Get Theme', 'cmp-coming-soon-maintenance');?></a>
 
 
 
 
 
 
 
 
 
594
 
595
+ <a href="<?php echo 'http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='.$theme_slug.'&utm_source=cmp&utm_medium=referral&utm_campaign='.$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>
596
 
597
+ <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>
598
 
599
+ </div>
600
 
601
  <div class="theme-inputs">
602
 
605
  </div>
606
 
607
  <?php
608
+ } ?>
609
  </fieldset>
610
  </td>
611
  </tr>
627
  <th><h4><?php _e('Title', 'cmp-coming-soon-maintenance');?></h4></th>
628
  <td>
629
  <fieldset>
630
+ <input type="text" name="niteoCS_body_title" id="niteoCS_body_title" value="<?php echo esc_attr( $niteoCS_body_title ); ?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
631
  </fieldset>
632
  </td>
633
  </tr>
635
  <tr>
636
  <th><h4><?php _e('Message', 'cmp-coming-soon-maintenance');?></h4></th>
637
  <td>
638
+ <?php wp_editor( $this->niteo_sanitize_html( $niteoCS_body ), 'niteoCS_body', $settings = array('textarea_name'=>'niteoCS_body', 'editor_height'=>'300') ); ?>
639
  </td>
640
  </tr>
641
 
648
 
649
  <?php
650
  // get counter settings
651
+ if ( isset( $theme_supports['counter'] ) && $theme_supports['counter'] ) {
652
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-counter.php') ) {
653
  require (dirname(__FILE__) . '/inc/settings/settings-counter.php');
654
  }
655
 
656
  } else {
657
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-counter-disabled.php') ) {
658
+ require (dirname(__FILE__) . '/inc/settings/settings-counter-disabled.php');
659
  }
660
 
661
  }
662
 
663
  // get subscribe settings
664
+ if ( isset( $theme_supports['subscribe'] ) && $theme_supports['subscribe'] ) {
665
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-subscribe.php') ) {
666
  require (dirname(__FILE__) . '/inc/settings/settings-subscribe.php');
667
  }
668
 
669
  } else {
670
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-subscribe-disabled.php') ) {
671
+ require (dirname(__FILE__) . '/inc/settings/settings-subscribe-disabled.php');
672
  }
673
 
674
  }
675
 
676
  // get contact form settings
677
+ if ( isset( $theme_supports['contact-form'] ) && $theme_supports['contact-form'] ) {
678
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-contact_form.php') ) {
679
  require (dirname(__FILE__) . '/inc/settings/settings-contact_form.php');
680
  }
681
 
682
  } else {
683
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-contact_form-disabled.php') ) {
684
+ require (dirname(__FILE__) . '/inc/settings/settings-contact_form-disabled.php');
685
  }
686
 
687
  }
747
  <?php
748
  foreach ( $socialmedia as $social ) {
749
 
750
+ ( $social['hidden'] == '0' ) ? $active = 'active ' : $active = '';
751
 
752
+ ( $social['active'] == '0' ) ? $disabled = 'disabled ' : $disabled = '';
753
 
754
  switch ( $social['name'] ) {
755
  case 'envelope-o':
781
  $url = 'https://'.$social['name'].'.com/profile';
782
  break;
783
  } ?>
784
+ <li class="<?php echo esc_attr( $active ) . esc_attr( $social['name'] );?>">
785
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
786
+ <label for="niteoCS_<?php echo esc_attr( $social['name'] );?>" class="<?php echo esc_attr( $social['name'] );?>"><?php echo esc_html( $title );?></label>
787
 
788
+ <input type="text" <?php echo $disabled;?>name="niteoCS_<?php echo esc_attr( $social['name'] );?>" id="niteoCS_<?php echo esc_attr( $social['name'] );?>" value="<?php echo ( $social['url'] == '' ) ? esc_attr( $url ) : esc_attr( $social['url'] ); ?>" class="regular-text code <?php echo esc_attr( $social['name'] );?>" data-name="<?php echo esc_attr( $social['name'] );?>">
789
 
790
+ <input type="checkbox" name="niteoCS_<?php echo esc_attr( $social['name'] );?>_checkbox" id="niteoCS_<?php echo esc_attr( $social['name'] );?>_checkbox" class="<?php echo esc_attr( $social['name'] );?>" data-name="<?php echo esc_attr( $social['name'] );?>" <?php checked( '1', $social['active'] ); ?>>
791
  </p>
792
  </li>
793
  <?php
813
  </div>
814
  <?php
815
  // get footer
816
+ if ( isset( $theme_supports['footer'] ) && $theme_supports['footer'] ) {
817
+ if ( file_exists( dirname(__FILE__) . '/inc/settings/settings-footer.php') ) {
818
+ require_once ( dirname(__FILE__) . '/inc/settings/settings-footer.php' );
819
  }
820
 
821
  } else {
822
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-footer-disabled.php' ) ) {
823
+ require_once ( dirname(__FILE__) . '/inc/settings/settings-footer-disabled.php' );
824
  }
825
 
826
  }
827
 
828
  // get logo settings
829
+ if ( isset( $theme_supports['logo'] ) && $theme_supports['logo'] ) {
830
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-logo.php' ) ) {
831
+ require ( dirname(__FILE__) . '/inc/settings/settings-logo.php' );
832
  }
833
 
834
  } else {
835
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-logo-disabled.php' ) ) {
836
+ require ( dirname(__FILE__) . '/inc/settings/settings-logo-disabled.php' );
837
  }
838
 
839
  }
840
 
841
  // get background settings
842
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-background.php' ) ) {
843
+ require ( dirname(__FILE__) . '/inc/settings/settings-background.php' );
844
  }
845
 
846
+ // special effects for premium themes
847
+ if ( in_array( $this->cmp_selectedTheme(), $this->cmp_premium_themes_installed() ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
848
+
849
+ // get background effects settings
850
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-special_effects.php' ) ) {
851
+ require (dirname(__FILE__) . '/inc/settings/settings-special_effects.php' );
852
+ }
853
+
854
+ } else {
855
+
856
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-special_effects-disabled.php' ) ) {
857
+ require ( dirname(__FILE__) . '/inc/settings/settings-special_effects-disabled.php' );
858
+ }
859
  }
860
 
861
  // get slider settings
862
+ if ( isset( $theme_supports['slider'] ) && $theme_supports['slider'] ) {
863
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-slider.php' ) ) {
864
+ require (dirname(__FILE__) . '/inc/settings/settings-slider.php' );
865
  }
866
 
867
  } else {
868
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-slider-disabled.php' ) ) {
869
+ require ( dirname(__FILE__) . '/inc/settings/settings-slider-disabled.php' );
870
  }
871
 
872
  }
873
 
874
  // include theme related settings
875
+ if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php' ) ) {
876
+ require ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php' );
877
+ } ?>
 
878
 
879
  <div class="table-wrapper theme-setup font-selector">
880
  <h3><?php _e('Customize Fonts', 'cmp-coming-soon-maintenance');?></h3>
909
 
910
  <?php
911
  // include theme animation settings
912
+ if ( in_array( $this->cmp_selectedTheme(), $this->cmp_font_animation_themes() ) ) { ?>
913
 
914
  <fieldset>
915
  <label for="niteoCS_heading_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Animation', 'cmp-coming-soon-maintenance');?></label></br>
962
  </fieldset>
963
  <?php
964
  // include theme animation settings
965
+ if ( in_array( $this->cmp_selectedTheme(), $this->cmp_font_animation_themes() ) ) { ?>
966
 
967
  <fieldset>
968
  <label for="niteoCS_content_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Animation', 'cmp-coming-soon-maintenance');?></label></br>
977
  <?php
978
  } ?>
979
 
980
+ <p style="margin-bottom:0"><?php _e('Fonts preview', 'cmp-coming-soon-maintenance');?></p>
981
  <div id="font-example-wrapper">
982
  <h3 id="heading-example" class="animated <?php echo esc_attr($niteoCS_heading_animation);?>" style="font-size:<?php echo esc_attr( $heading_font['size'] );?>px;letter-spacing:<?php echo esc_attr( $heading_font['spacing'] );?>px">Hello, I am your Headings font!</h3>
983
  <p id="content-example" class="animated <?php echo esc_attr($niteoCS_content_animation);?>" style="font-size:<?php echo esc_attr( $content_font['size'] );?>px;letter-spacing:<?php echo esc_attr( $content_font['spacing'] );?>px;line-height:<?php echo esc_attr( $content_font['line-height'] );?>">And this is a long paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
1087
  </p>
1088
 
1089
  <p class="analytics-switch other">
1090
+ <label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code. Script tags will be stripped.', 'cmp-coming-soon-maintenance');?></label><br>
1091
+ <textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo stripslashes( esc_js( $niteoCS_analytics_other ) ); ?></textarea>
1092
  </p>
1093
  </fieldset>
1094
 
cmp-sidebar.php CHANGED
@@ -1,25 +1,10 @@
1
  <div class="cmp-sidebar-wrapper">
2
 
3
  <div class="selected-theme widget">
4
- <h3 class="title"><?php _e('Active CMP Theme', 'cmp-coming-soon-maintenance');?>: <?php echo ucwords( esc_html( str_replace( '_', ' ', $this->cmp_selectedTheme() ) ) );?></h3>
5
-
6
- </div>
7
-
8
- <div class="cmp-rate-us widget">
9
- <h3 class="cmp-rate-us title"><?php _e('Thank you for rating us with five stars!', 'cmp-coming-soon-maintenance');?></h3>
10
- <p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give 5%s feedback by pressing button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-star" aria-hidden="true"></i>');?></p>
11
- <a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/?rate=5#new-post" target="_blank" style="text-decoration:none;">
12
-
13
- <p class="button button-primary"><?php _e('Leave Feedback', 'cmp-coming-soon-maintenance');?></p>
14
- <i class="fa fa-star" aria-hidden="true"></i>
15
- <i class="fa fa-star" aria-hidden="true"></i>
16
- <span class="dashicons dashicons-star-filled"></span>
17
- <i class="fa fa-star" aria-hidden="true"></i>
18
- <i class="fa fa-star" aria-hidden="true"></i>
19
- </a>
20
- <p><?php _e('Also don`t forget you can ask Wordpress Community or our NiteoThemes expert support. For a help simply visit link below.', 'cmp-coming-soon-maintenance');?> <a href="http://wordpress.org/support/plugin/cmp-coming-soon-maintenance/" target="_blank"><?php _e('Wordpress Support Forum', 'cmp-coming-soon-maintenance');?></a>
21
- </p>
22
 
 
 
23
  </div>
24
 
25
  <div class="donate widget">
@@ -43,9 +28,27 @@
43
  </form>
44
  </div>
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  <div class="request-feature widget">
47
  <h3 class="cmp-rate-us title"><?php _e('Request new features', 'cmp-coming-soon-maintenance');?></h3>
48
- <p><?php echo sprintf(__('Do you think some useful feature is missing or you have idea how to improve CMP plugin? You can %s on official Wordpress Support Forum and if we find it useful we will implement it in next CMP Plugin update', 'cmp-coming-soon-maintenance'), '<a href="https://wordpress.org/support/topic/request-features-3/" target="_blank" style="text-decoration:none;">request feature</a>');?> <i class="fa fa-smile-o" aria-hidden="true"></i></p>
49
 
50
  </div>
51
 
1
  <div class="cmp-sidebar-wrapper">
2
 
3
  <div class="selected-theme widget">
4
+ <h3 class="title"><?php _e('Selected CMP Theme', 'cmp-coming-soon-maintenance');?>: <?php echo ucwords( esc_html( str_replace( '_', ' ', $this->cmp_selectedTheme() ) ) );?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
+ <img src="<?php echo esc_url( plugins_url('/img/thumbnails/'. $this->cmp_selectedTheme() . '_thumbnail.jpg', __FILE__) );?>" style="max-width:100%" alt="">
7
+
8
  </div>
9
 
10
  <div class="donate widget">
28
  </form>
29
  </div>
30
 
31
+ <div class="cmp-rate-us widget">
32
+ <h3 class="cmp-rate-us title"><?php _e('Thank you for rating us with five stars!', 'cmp-coming-soon-maintenance');?></h3>
33
+ <p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give 5%s feedback by pressing button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-star" aria-hidden="true"></i>');?></p>
34
+ <a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/?rate=5#new-post" target="_blank" style="text-decoration:none;">
35
+
36
+ <p class="button button-primary"><?php _e('Leave Feedback', 'cmp-coming-soon-maintenance');?></p>
37
+ <i class="fa fa-star" aria-hidden="true"></i>
38
+ <i class="fa fa-star" aria-hidden="true"></i>
39
+ <span class="dashicons dashicons-star-filled"></span>
40
+ <i class="fa fa-star" aria-hidden="true"></i>
41
+ <i class="fa fa-star" aria-hidden="true"></i>
42
+ </a>
43
+ <p><?php _e('Also don`t forget you can ask Wordpress Community or our NiteoThemes expert support. For a help simply visit link below.', 'cmp-coming-soon-maintenance');?> <a href="http://wordpress.org/support/plugin/cmp-coming-soon-maintenance/" target="_blank"><?php _e('Wordpress Support Forum', 'cmp-coming-soon-maintenance');?></a>
44
+ </p>
45
+
46
+ </div>
47
+
48
+
49
  <div class="request-feature widget">
50
  <h3 class="cmp-rate-us title"><?php _e('Request new features', 'cmp-coming-soon-maintenance');?></h3>
51
+ <p><?php echo sprintf( __('Do you miss some feature or do you have idea how to improve CMP plugin? You can %s on official Wordpress Support Forum.', 'cmp-coming-soon-maintenance'), '<a href="http://wordpress.org/support/plugin/cmp-coming-soon-maintenance/" target="_blank" style="text-decoration:none;">request feature</a>' );?> <i class="fa fa-smile-o" aria-hidden="true"></i></p>
52
 
53
  </div>
54
 
css/animate.min.css CHANGED
@@ -1,188 +1,7 @@
1
- @charset "UTF-8";
2
-
3
- /*!
4
  * animate.css -http://daneden.me/animate
5
  * Version - 3.5.2
6
  * Licensed under the MIT license - http://opensource.org/licenses/MIT
7
  *
8
  * Copyright (c) 2017 Daniel Eden
9
- */
10
-
11
- .animated {
12
- -webkit-animation-duration: 1s;
13
- animation-duration: 1s;
14
- -webkit-animation-fill-mode: both;
15
- animation-fill-mode: both;
16
- }
17
-
18
- .animated-fast {
19
- -webkit-animation-duration: 300ms;
20
- animation-duration: 300ms;
21
- -webkit-animation-fill-mode: both;
22
- animation-fill-mode: both;
23
- }
24
-
25
-
26
-
27
- @-webkit-keyframes fadeInDown {
28
- from {
29
- opacity: 0;
30
- -webkit-transform: translate3d(0, -50px, 0);
31
- transform: translate3d(0, -50px, 0);
32
- }
33
-
34
- to {
35
- opacity: 1;
36
- -webkit-transform: none;
37
- transform: none;
38
- }
39
- }
40
-
41
- @keyframes fadeInDown {
42
- from {
43
- opacity: 0;
44
- -webkit-transform: translate3d(0, -50px, 0);
45
- transform: translate3d(0, -50px, 0);
46
- }
47
-
48
- to {
49
- opacity: 1;
50
- -webkit-transform: none;
51
- transform: none;
52
- }
53
- }
54
-
55
- .fadeInDown {
56
- -webkit-animation-name: fadeInDown;
57
- animation-name: fadeInDown;
58
- }
59
-
60
-
61
- @-webkit-keyframes fadeInLeft {
62
- from {
63
- opacity: 0;
64
- -webkit-transform: translate3d(-50px, 0, 0);
65
- transform: translate3d(-50px, 0, 0);
66
- }
67
-
68
- to {
69
- opacity: 1;
70
- -webkit-transform: none;
71
- transform: none;
72
- }
73
- }
74
-
75
- @keyframes fadeInLeft {
76
- from {
77
- opacity: 0;
78
- -webkit-transform: translate3d(-50px, 0, 0);
79
- transform: translate3d(-50px, 0, 0);
80
- }
81
-
82
- to {
83
- opacity: 1;
84
- -webkit-transform: none;
85
- transform: none;
86
- }
87
- }
88
-
89
- .fadeInLeft {
90
- -webkit-animation-name: fadeInLeft;
91
- animation-name: fadeInLeft;
92
- }
93
-
94
-
95
- @-webkit-keyframes fadeInRight {
96
- from {
97
- opacity: 0;
98
- -webkit-transform: translate3d(50px, 0, 0);
99
- transform: translate3d(50px, 0, 0);
100
- }
101
-
102
- to {
103
- opacity: 1;
104
- -webkit-transform: none;
105
- transform: none;
106
- }
107
- }
108
-
109
- @keyframes fadeInRight {
110
- from {
111
- opacity: 0;
112
- -webkit-transform: translate3d(50px, 0, 0);
113
- transform: translate3d(50px, 0, 0);
114
- }
115
-
116
- to {
117
- opacity: 1;
118
- -webkit-transform: none;
119
- transform: none;
120
- }
121
- }
122
-
123
- .fadeInRight {
124
- -webkit-animation-name: fadeInRight;
125
- animation-name: fadeInRight;
126
- }
127
-
128
- @-webkit-keyframes fadeInUp {
129
- from {
130
- opacity: 0;
131
- -webkit-transform: translate3d(0, 50px, 0);
132
- transform: translate3d(0, 50px, 0);
133
- }
134
-
135
- to {
136
- opacity: 1;
137
- -webkit-transform: none;
138
- transform: none;
139
- }
140
- }
141
-
142
- @keyframes fadeInUp {
143
- from {
144
- opacity: 0;
145
- -webkit-transform: translate3d(0, 50px, 0);
146
- transform: translate3d(0, 50px, 0);
147
- }
148
-
149
- to {
150
- opacity: 1;
151
- -webkit-transform: none;
152
- transform: none;
153
- }
154
- }
155
-
156
- .fadeInUp {
157
- -webkit-animation-name: fadeInUp;
158
- animation-name: fadeInUp;
159
- }
160
-
161
- @-webkit-keyframes zoomIn {
162
- from {
163
- opacity: 0;
164
- -webkit-transform: scale3d(0.3, 0.3, 0.3);
165
- transform: scale3d(0.3, 0.3, 0.3);
166
- }
167
-
168
- 50% {
169
- opacity: 1;
170
- }
171
- }
172
-
173
- @keyframes zoomIn {
174
- from {
175
- opacity: 0;
176
- -webkit-transform: scale3d(0.3, 0.3, 0.3);
177
- transform: scale3d(0.3, 0.3, 0.3);
178
- }
179
-
180
- 50% {
181
- opacity: 1;
182
- }
183
- }
184
-
185
- .zoomIn {
186
- -webkit-animation-name: zoomIn;
187
- animation-name: zoomIn;
188
- }
1
+ @charset "UTF-8";/*!
 
 
2
  * animate.css -http://daneden.me/animate
3
  * Version - 3.5.2
4
  * Licensed under the MIT license - http://opensource.org/licenses/MIT
5
  *
6
  * Copyright (c) 2017 Daniel Eden
7
+ */.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-50px,0,0);transform:translate3d(-50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-50px,0,0);transform:translate3d(-50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(50px,0,0);transform:translate3d(50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(50px,0,0);transform:translate3d(50px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/cmp-settings-style.css CHANGED
@@ -183,10 +183,9 @@
183
  text-align: left
184
  }
185
 
186
- .cmp-coming-soon-maintenance #unsplash-media,
187
  .cmp-coming-soon-maintenance .background-media td fieldset,
188
  .cmp-coming-soon-maintenance .cmp-logo-switch.graphic {
189
- padding-top: 1em
190
  }
191
 
192
  .cmp-coming-soon-maintenance .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after {
@@ -369,6 +368,7 @@
369
  .cmp-coming-soon-maintenance .color-preview,
370
  .cmp-coming-soon-maintenance .gradient-preview,
371
  .cmp-coming-soon-maintenance .pattern-wrapper {
 
372
  background-repeat: repeat;
373
  height: 200px;
374
  border: 1px solid #ededed;
@@ -383,7 +383,8 @@
383
  background-position: center
384
  }
385
 
386
- .cmp-coming-soon-maintenance .video-wrapper {
 
387
  position: relative;
388
  width: 100%;
389
  margin-top: 1em
@@ -421,7 +422,48 @@
421
  .cmp-coming-soon-maintenance .background-media img,
422
  .cmp-coming-soon-maintenance .logo-wrapper img {
423
  max-width: 100%;
424
- width: 100%
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
  }
426
 
427
  .cmp-coming-soon-maintenance .logo-wrapper img {
@@ -486,7 +528,7 @@
486
  }
487
 
488
  .cmp-coming-soon-maintenance .theme-wrapper:hover .thumbnail-holder::before {
489
- background-color: rgba(0, 0, 0, 0.7);
490
  }
491
 
492
 
@@ -924,6 +966,11 @@
924
  width: 5%
925
  }
926
 
 
 
 
 
 
927
  @media screen and (max-width:1450px) {
928
  .cmp-coming-soon-maintenance .cmp-inputs-wrapper {
929
  min-width: 70%
183
  text-align: left
184
  }
185
 
 
186
  .cmp-coming-soon-maintenance .background-media td fieldset,
187
  .cmp-coming-soon-maintenance .cmp-logo-switch.graphic {
188
+ margin-top: 1em
189
  }
190
 
191
  .cmp-coming-soon-maintenance .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after {
368
  .cmp-coming-soon-maintenance .color-preview,
369
  .cmp-coming-soon-maintenance .gradient-preview,
370
  .cmp-coming-soon-maintenance .pattern-wrapper {
371
+ position: relative;
372
  background-repeat: repeat;
373
  height: 200px;
374
  border: 1px solid #ededed;
383
  background-position: center
384
  }
385
 
386
+ .cmp-coming-soon-maintenance .video-yt-wrapper,
387
+ .cmp-coming-soon-maintenance .video-local-wrapper {
388
  position: relative;
389
  width: 100%;
390
  margin-top: 1em
422
  .cmp-coming-soon-maintenance .background-media img,
423
  .cmp-coming-soon-maintenance .logo-wrapper img {
424
  max-width: 100%;
425
+ width: 100%;
426
+ vertical-align: top;
427
+ }
428
+
429
+ .cmp-coming-soon-maintenance .background-thumb-wrapper {
430
+ position: relative;
431
+ margin: 1em 0;
432
+ overflow: hidden;
433
+ }
434
+
435
+ .cmp-coming-soon-maintenance .thumbnail-overlay {
436
+ position: absolute;
437
+ top: 0;
438
+ left: 0;
439
+ width: 100%;
440
+ height: 100%;
441
+ z-index: 1;
442
+ }
443
+
444
+ .cmp-coming-soon-maintenance .custom-gallery:not(.gallery-1):not(.gallery-2) {
445
+ display: grid;
446
+ height: auto;
447
+ grid-template-columns: 1fr 1fr 1fr;
448
+ grid-template-rows: 1fr auto;
449
+ grid-template-areas: "Big Big Big" "small-3 small-2 small-1";
450
+ grid-gap: 10px;
451
+ }
452
+
453
+ .cmp-coming-soon-maintenance .custom-gallery.gallery-3 {
454
+ grid-template-columns: 1fr 1fr!important;
455
+ grid-template-areas: "Big Big" "small-2 small-1"!important;
456
+
457
+ }
458
+
459
+ .cmp-coming-soon-maintenance .gallery-2 .big-thumb {
460
+ margin-bottom: 1em;
461
+ }
462
+
463
+ .cmp-coming-soon-maintenance .big-thumb {
464
+ grid-area: Big / Big;
465
+ overflow: hidden;
466
+ position: relative;
467
  }
468
 
469
  .cmp-coming-soon-maintenance .logo-wrapper img {
528
  }
529
 
530
  .cmp-coming-soon-maintenance .theme-wrapper:hover .thumbnail-holder::before {
531
+ background-color: rgba(0, 0, 0, 0.95);
532
  }
533
 
534
 
966
  width: 5%
967
  }
968
 
969
+ .cmp-coming-soon-maintenance .constellation,
970
+ .cmp-coming-soon-maintenance #subscribe-3rdparty fieldset{
971
+ margin-top: 1em;
972
+ }
973
+
974
  @media screen and (max-width:1450px) {
975
  .cmp-coming-soon-maintenance .cmp-inputs-wrapper {
976
  min-width: 70%
css/cmp-settings-style.min.css CHANGED
@@ -1 +1 @@
1
- .cmp-coming-soon-maintenance{overflow-x:hidden}.no-margin{margin:0}.cmp-coming-soon-maintenance .cmp-settings-wrapper{position:relative;margin-top:1em}.cmp-coming-soon-maintenance .wrapper-disabled{opacity:.4}.cmp-coming-soon-maintenance .comingsoon-error,.cmp-coming-soon-maintenance .comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.cmp-coming-soon-maintenance .comingsoon-success{border-left:4px solid #00d221}.cmp-coming-soon-maintenance .padding-bottom{padding-bottom:10px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single,.cmp-coming-soon-maintenance 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)}.cmp-coming-soon-maintenance .select2-container .select2-selection--single{height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.cmp-coming-soon-maintenance .select2-container:not(.select2-container--open){width:100%!important}.cmp-coming-soon-maintenance input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}.cmp-coming-soon-maintenance 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}​.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}.cmp-coming-soon-maintenance input[type=text],.cmp-coming-soon-maintenance textarea{width:100%}.cmp-coming-soon-maintenance #niteoCS_countdown_redirect,.cmp-coming-soon-maintenance #niteoCS_countdown_text,.cmp-coming-soon-maintenance .table-wrapper.content,.cmp-coming-soon-maintenance .table-wrapper.install,.cmp-coming-soon-maintenance .table-wrapper.seo,.cmp-coming-soon-maintenance .table-wrapper.theme-setup{display:none}.cmp-coming-soon-maintenance .wp-upload-form.cmp{padding:4em;display:block}.cmp-coming-soon-maintenance .cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-coming-soon-maintenance .cmp-status .active{background-color:#ddd}.cmp-coming-soon-maintenance .redirect{margin-bottom:0}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .table-wrapper,.cmp-coming-soon-maintenance .translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-coming-soon-maintenance div.custom_css{padding-bottom:2em;padding-right:3em;background:#fff;border:1px solid #dedede}.cmp-coming-soon-maintenance .CodeMirror-wrap{border-right:1px solid #dedede}.cmp-coming-soon-maintenance .custom_css .cmp-submit{padding-left:1em;border-top:1px solid #dedede;padding-top:2em}.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation input,.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation textarea{width:100%}.cmp-coming-soon-maintenance .cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.cmp-coming-soon-maintenance .table-wrapper.closed table,.cmp-coming-soon-maintenance .translate-settings tfoot{display:none}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.cmp-coming-soon-maintenance .custom_css h3,.cmp-coming-soon-maintenance .table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}.cmp-coming-soon-maintenance #unsplash-media,.cmp-coming-soon-maintenance .background-media td fieldset,.cmp-coming-soon-maintenance .cmp-logo-switch.graphic{padding-top:1em}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance #niteoCS-text-logo,.cmp-coming-soon-maintenance .theme-title,.cmp-coming-soon-maintenance th label{font-weight:600}.cmp-coming-soon-maintenance .table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.cmp-coming-soon-maintenance .table-wrapper h4{margin:0}.cmp-coming-soon-maintenance .table-wrapper table{padding:1em;height:auto;width:90%}.cmp-coming-soon-maintenance .table-wrapper .theme-selector{width:100%}.cmp-coming-soon-maintenance .table-wrapper select{margin-bottom:10px;width:100%}.cmp-coming-soon-maintenance .table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .table-wrapper td.theme-selector{max-width:100%}.cmp-coming-soon-maintenance .table-wrapper th{vertical-align:top;width:180px;text-align:left}.cmp-coming-soon-maintenance #delete-banner,.cmp-coming-soon-maintenance #delete-favicon,.cmp-coming-soon-maintenance #delete-logo,.cmp-coming-soon-maintenance #delete-video-thumb{display:none}.cmp-coming-soon-maintenance .social-media{margin-top:0;margin-bottom:3em}.cmp-coming-soon-maintenance .social-inputs{position:relative}.cmp-coming-soon-maintenance .social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}.cmp-coming-soon-maintenance #niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.cmp-coming-soon-maintenance .social-description{margin-top:0}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(2){left:62px}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(3){left:148px}.cmp-coming-soon-maintenance .social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.cmp-coming-soon-maintenance .social-media i{font-size:2.45em;cursor:pointer}.cmp-coming-soon-maintenance .social-media i.active{color:#d54e21}.cmp-coming-soon-maintenance .social-inputs li{display:none;width:100%}.cmp-coming-soon-maintenance .social-inputs li.active{display:inline-block}.cmp-coming-soon-maintenance #custom_content_font,.cmp-coming-soon-maintenance #custom_headings_font,.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .unsplash-feed{display:none}.cmp-coming-soon-maintenance .social-inputs p{position:relative;padding-left:50px;height:50px}.cmp-coming-soon-maintenance .social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.cmp-coming-soon-maintenance .theme-details,.cmp-coming-soon-maintenance .toggle{cursor:pointer}.cmp-coming-soon-maintenance .social-inputs label{padding-left:100px}.cmp-coming-soon-maintenance .social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}.cmp-coming-soon-maintenance .color-preview,.cmp-coming-soon-maintenance .gradient-preview,.cmp-coming-soon-maintenance .pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.cmp-coming-soon-maintenance .theme-overlay .screenshot,.cmp-coming-soon-maintenance .thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.cmp-coming-soon-maintenance .video-wrapper{position:relative;width:100%;margin-top:1em}.cmp-coming-soon-maintenance #add-pattern{margin-bottom:1em}.cmp-coming-soon-maintenance .info{font-size:12px}.cmp-coming-soon-maintenance .nav-tab i{padding-right:3px}.cmp-coming-soon-maintenance .banner-wrapper,.cmp-coming-soon-maintenance .favicon-wrapper,.cmp-coming-soon-maintenance .logo-wrapper{margin:1em 0}.cmp-coming-soon-maintenance .favicon-wrapper img,.cmp-coming-soon-maintenance .logo-wrapper img{background-color:#efefef;padding:1em}.cmp-coming-soon-maintenance .favicon-wrapper img{max-width:32px}.cmp-coming-soon-maintenance .background-media img,.cmp-coming-soon-maintenance .logo-wrapper img{max-width:100%;width:100%}.cmp-coming-soon-maintenance .logo-wrapper img{max-height:150px;width:auto}.cmp-coming-soon-maintenance #font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}.cmp-coming-soon-maintenance #heading-example{border-bottom:none;line-height:1.5;padding:0}.cmp-coming-soon-maintenance .font-selector td:first-of-type{padding-bottom:2em}.cmp-coming-soon-maintenance .font-selector fieldset{padding:.5em 0}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .theme-wrapper:nth-of-type(3n){margin-right:0}.cmp-coming-soon-maintenance .theme-wrapper.active{background-color:#ddd}.cmp-coming-soon-maintenance .thumbnail-holder{width:100%;border-top-left-radius:5px;border-top-right-radius:5px}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.7)}.cmp-coming-soon-maintenance .toggle,.cmp-coming-soon-maintenance .toggle-wrapper{display:inline-block}.cmp-coming-soon-maintenance .theme-title{float:left;text-transform:uppercase}.cmp-coming-soon-maintenance .theme-version{float:right}.cmp-coming-soon-maintenance .theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.cmp-coming-soon-maintenance .theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.cmp-coming-soon-maintenance .theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px 10px 5px 5px;height:2em;background:#656565;line-height:2em;color:#fff}.cmp-coming-soon-maintenance .active .theme-inputs{background:#27ae60}.cmp-coming-soon-maintenance .theme-inputs .italic{font-style:italic}.cmp-coming-soon-maintenance .theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-coming-soon-maintenance .cmp-button,.cmp-coming-soon-maintenance .cmp-preview,.cmp-coming-soon-maintenance .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-coming-soon-maintenance .cmp-button.submit,.cmp-coming-soon-maintenance .theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.cmp-coming-soon-maintenance .theme-wrapper a.button:focus,.cmp-coming-soon-maintenance .theme-wrapper a.button:visited{background:0 0;-webkit-box-shadow:none;box-shadow:none}.cmp-coming-soon-maintenance .theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-coming-soon-maintenance .cmp-button.submit:focus,.cmp-coming-soon-maintenance .cmp-button.submit:hover,.cmp-coming-soon-maintenance .theme-actions .activate:focus,.cmp-coming-soon-maintenance .theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.cmp-coming-soon-maintenance .theme-wrapper .button{border:2px solid #fff!important;background:0 0;width:180px;line-height:2.5em;height:3em}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]{position:relative;background:0 0;border:none;outline:0;-webkit-box-shadow:none;box-shadow:none}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]::before{content:none}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]::after{font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.cmp-coming-soon-maintenance .theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.cmp-coming-soon-maintenance .theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.cmp-coming-soon-maintenance .theme-wrapper .button:hover,.cmp-coming-soon-maintenance .theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.cmp-coming-soon-maintenance .selected.button,.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select:hover input[type=radio]::after{color:#23282d!important}.cmp-coming-soon-maintenance .theme-wrapper .theme-preview,.cmp-coming-soon-maintenance .theme-wrapper .theme-purchase,.cmp-coming-soon-maintenance .theme-wrapper .theme-select{margin-bottom:5px}.cmp-coming-soon-maintenance .theme-wrapper .theme-select.selected{background-color:#32b2ff}.cmp-coming-soon-maintenance .theme-wrapper .theme-details.button{line-height:0}.cmp-coming-soon-maintenance .cmp-preview{background-color:#2485bf!important}.cmp-coming-soon-maintenance .cmp-preview:active,.cmp-coming-soon-maintenance .cmp-preview:hover{background-color:#32b2ff!important}.cmp-coming-soon-maintenance .theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.cmp-coming-soon-maintenance .theme-info .theme-purchase:focus,.cmp-coming-soon-maintenance .theme-info .theme-purchase:hover{background-color:#34495e}.cmp-coming-soon-maintenance .button i{margin-right:5px}.cmp-coming-soon-maintenance .theme-purchase a,.cmp-coming-soon-maintenance .theme-purchase a:hover,.cmp-coming-soon-maintenance .theme-purchase a:visited{color:#fff;text-decoration:none}.cmp-coming-soon-maintenance p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.cmp-coming-soon-maintenance .theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.cmp-coming-soon-maintenance .fifty-layout input:checked+img,.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav div:hover{opacity:1}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav .left{float:left}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav .right{float:right}.cmp-coming-soon-maintenance .theme-description ul{list-style:none;padding-left:2em}.cmp-coming-soon-maintenance .theme-description h4,.cmp-coming-soon-maintenance .theme-description li{font-size:13px}.cmp-coming-soon-maintenance .theme-description .supported i{color:green}.cmp-coming-soon-maintenance .theme-description .not-supported i{color:red}.cmp-coming-soon-maintenance .wp-list-table .column-id{width:5%}.cmp-coming-soon-maintenance .cmp-status{margin-bottom:3em}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .toggle:after,.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance input[type=checkbox].toggle-checkbox{display:none}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.cmp-coming-soon-maintenance .toggle-wrapper:hover .toggle_handler{background:#e74c3c}.cmp-coming-soon-maintenance .toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.cmp-coming-soon-maintenance .toggle:before{content:"Disabled";left:22px;color:#fff}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle:before,.cmp-coming-soon-maintenance .toggle:after{color:#23282d}.cmp-coming-soon-maintenance .toggle:after{content:"Enabled";right:26px}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle:after{color:#fff}.cmp-coming-soon-maintenance .fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.cmp-coming-soon-maintenance .fifty-layout input{visibility:hidden;position:absolute;margin:0}.cmp-coming-soon-maintenance .fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px}.cmp-coming-soon-maintenance .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-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.cmp-coming-soon-maintenance .widget.donate img{max-width:50px}.cmp-coming-soon-maintenance .widget.donate img.niteo-logo{max-width:120px}.cmp-coming-soon-maintenance .cmp-rate-us .button,.cmp-coming-soon-maintenance .cmp-rate-us a{display:block;text-align:center}.cmp-coming-soon-maintenance .cmp-rate-us a{padding:1em 0}.cmp-coming-soon-maintenance .cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-coming-soon-maintenance .cmp-rate-us form{text-align:center}.cmp-coming-soon-maintenance .subscribers .column-id{width:5%}@media screen and (max-width:1450px){.cmp-coming-soon-maintenance .cmp-inputs-wrapper{min-width:70%}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.cmp-coming-soon-maintenance .theme-wrapper,.cmp-coming-soon-maintenance .theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-coming-soon-maintenance .cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.cmp-coming-soon-maintenance .theme-wrapper,.cmp-coming-soon-maintenance .theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.cmp-coming-soon-maintenance .table-wrapper th{display:block}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.cmp-coming-soon-maintenance .table-wrapper table{width:100%}.cmp-coming-soon-maintenance .table-wrapper th{width:140px}}@media screen and (max-width:782px){.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-coming-soon-maintenance .cmp-inputs-wrapper,.cmp-coming-soon-maintenance .cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.cmp-coming-soon-maintenance .theme-overlay .theme-info,.cmp-coming-soon-maintenance .theme-overlay .theme-screenshots{width:100%;float:none}.cmp-coming-soon-maintenance input[type=text],.cmp-coming-soon-maintenance textarea{font-size:13px}}@media screen and (max-width:560px){.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(2){left:50px}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(3){left:105px}.cmp-coming-soon-maintenance .social-inputs p i{top:22px}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]{top:28px;left:53px}.cmp-coming-soon-maintenance .social-inputs label{padding-left:55px}.cmp-coming-soon-maintenance .social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}
1
+ .cmp-coming-soon-maintenance{overflow-x:hidden}.no-margin{margin:0}.cmp-coming-soon-maintenance .cmp-settings-wrapper{position:relative;margin-top:1em}.cmp-coming-soon-maintenance .wrapper-disabled{opacity:.4}.cmp-coming-soon-maintenance .comingsoon-error,.cmp-coming-soon-maintenance .comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.cmp-coming-soon-maintenance .comingsoon-success{border-left:4px solid #00d221}.cmp-coming-soon-maintenance .padding-bottom{padding-bottom:10px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single,.cmp-coming-soon-maintenance 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)}.cmp-coming-soon-maintenance .select2-container .select2-selection--single{height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.cmp-coming-soon-maintenance .select2-container:not(.select2-container--open){width:100%!important}.cmp-coming-soon-maintenance input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}.cmp-coming-soon-maintenance 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}​.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}.cmp-coming-soon-maintenance input[type=text],.cmp-coming-soon-maintenance textarea{width:100%}.cmp-coming-soon-maintenance #niteoCS_countdown_redirect,.cmp-coming-soon-maintenance #niteoCS_countdown_text,.cmp-coming-soon-maintenance .table-wrapper.content,.cmp-coming-soon-maintenance .table-wrapper.install,.cmp-coming-soon-maintenance .table-wrapper.seo,.cmp-coming-soon-maintenance .table-wrapper.theme-setup{display:none}.cmp-coming-soon-maintenance .wp-upload-form.cmp{padding:4em;display:block}.cmp-coming-soon-maintenance .cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-coming-soon-maintenance .cmp-status .active{background-color:#ddd}.cmp-coming-soon-maintenance .redirect{margin-bottom:0}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .table-wrapper,.cmp-coming-soon-maintenance .translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-coming-soon-maintenance div.custom_css{padding-bottom:2em;padding-right:3em;background:#fff;border:1px solid #dedede}.cmp-coming-soon-maintenance .CodeMirror-wrap{border-right:1px solid #dedede}.cmp-coming-soon-maintenance .custom_css .cmp-submit{padding-left:1em;border-top:1px solid #dedede;padding-top:2em}.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation input,.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation textarea{width:100%}.cmp-coming-soon-maintenance .cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.cmp-coming-soon-maintenance .table-wrapper.closed table,.cmp-coming-soon-maintenance .translate-settings tfoot{display:none}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.cmp-coming-soon-maintenance .custom_css h3,.cmp-coming-soon-maintenance .table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}.cmp-coming-soon-maintenance .background-media td fieldset,.cmp-coming-soon-maintenance .cmp-logo-switch.graphic{margin-top:1em}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance #niteoCS-text-logo,.cmp-coming-soon-maintenance .theme-title,.cmp-coming-soon-maintenance th label{font-weight:600}.cmp-coming-soon-maintenance .table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.cmp-coming-soon-maintenance .table-wrapper h4{margin:0}.cmp-coming-soon-maintenance .table-wrapper table{padding:1em;height:auto;width:90%}.cmp-coming-soon-maintenance .table-wrapper .theme-selector{width:100%}.cmp-coming-soon-maintenance .table-wrapper select{margin-bottom:10px;width:100%}.cmp-coming-soon-maintenance .table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .table-wrapper td.theme-selector{max-width:100%}.cmp-coming-soon-maintenance .table-wrapper th{vertical-align:top;width:180px;text-align:left}.cmp-coming-soon-maintenance #delete-banner,.cmp-coming-soon-maintenance #delete-favicon,.cmp-coming-soon-maintenance #delete-logo,.cmp-coming-soon-maintenance #delete-video-thumb{display:none}.cmp-coming-soon-maintenance .social-media{margin-top:0;margin-bottom:3em}.cmp-coming-soon-maintenance .social-inputs{position:relative}.cmp-coming-soon-maintenance .social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}.cmp-coming-soon-maintenance #niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.cmp-coming-soon-maintenance .social-description{margin-top:0}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(2){left:62px}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(3){left:148px}.cmp-coming-soon-maintenance .social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.cmp-coming-soon-maintenance .social-media i{font-size:2.45em;cursor:pointer}.cmp-coming-soon-maintenance .social-media i.active{color:#d54e21}.cmp-coming-soon-maintenance .social-inputs li{display:none;width:100%}.cmp-coming-soon-maintenance .social-inputs li.active{display:inline-block}.cmp-coming-soon-maintenance #custom_content_font,.cmp-coming-soon-maintenance #custom_headings_font,.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .unsplash-feed{display:none}.cmp-coming-soon-maintenance .social-inputs p{position:relative;padding-left:50px;height:50px}.cmp-coming-soon-maintenance .social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.cmp-coming-soon-maintenance .theme-details,.cmp-coming-soon-maintenance .toggle{cursor:pointer}.cmp-coming-soon-maintenance .social-inputs label{padding-left:100px}.cmp-coming-soon-maintenance .social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}.cmp-coming-soon-maintenance .color-preview,.cmp-coming-soon-maintenance .gradient-preview,.cmp-coming-soon-maintenance .pattern-wrapper{position:relative;background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.cmp-coming-soon-maintenance .theme-overlay .screenshot,.cmp-coming-soon-maintenance .thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.cmp-coming-soon-maintenance .video-local-wrapper,.cmp-coming-soon-maintenance .video-yt-wrapper{position:relative;width:100%;margin-top:1em}.cmp-coming-soon-maintenance #add-pattern{margin-bottom:1em}.cmp-coming-soon-maintenance .info{font-size:12px}.cmp-coming-soon-maintenance .nav-tab i{padding-right:3px}.cmp-coming-soon-maintenance .banner-wrapper,.cmp-coming-soon-maintenance .favicon-wrapper,.cmp-coming-soon-maintenance .logo-wrapper{margin:1em 0}.cmp-coming-soon-maintenance .favicon-wrapper img,.cmp-coming-soon-maintenance .logo-wrapper img{background-color:#efefef;padding:1em}.cmp-coming-soon-maintenance .favicon-wrapper img{max-width:32px}.cmp-coming-soon-maintenance .background-media img,.cmp-coming-soon-maintenance .logo-wrapper img{max-width:100%;width:100%;vertical-align:top}.cmp-coming-soon-maintenance .background-thumb-wrapper{position:relative;margin:1em 0;overflow:hidden}.cmp-coming-soon-maintenance .thumbnail-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.cmp-coming-soon-maintenance .custom-gallery:not(.gallery-1):not(.gallery-2){display:grid;height:auto;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr auto;grid-template-areas:"Big Big Big" "small-3 small-2 small-1";grid-gap:10px}.cmp-coming-soon-maintenance .custom-gallery.gallery-3{grid-template-columns:1fr 1fr!important;grid-template-areas:"Big Big" "small-2 small-1"!important}.cmp-coming-soon-maintenance .gallery-2 .big-thumb{margin-bottom:1em}.cmp-coming-soon-maintenance .big-thumb{grid-area:Big/Big;overflow:hidden;position:relative}.cmp-coming-soon-maintenance .logo-wrapper img{max-height:150px;width:auto}.cmp-coming-soon-maintenance #font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}.cmp-coming-soon-maintenance #heading-example{border-bottom:none;line-height:1.5;padding:0}.cmp-coming-soon-maintenance .font-selector td:first-of-type{padding-bottom:2em}.cmp-coming-soon-maintenance .font-selector fieldset{padding:.5em 0}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .theme-wrapper:nth-of-type(3n){margin-right:0}.cmp-coming-soon-maintenance .theme-wrapper.active{background-color:#ddd}.cmp-coming-soon-maintenance .thumbnail-holder{width:100%;border-top-left-radius:5px;border-top-right-radius:5px}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.95)}.cmp-coming-soon-maintenance .toggle,.cmp-coming-soon-maintenance .toggle-wrapper{display:inline-block}.cmp-coming-soon-maintenance .theme-title{float:left;text-transform:uppercase}.cmp-coming-soon-maintenance .theme-version{float:right}.cmp-coming-soon-maintenance .theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.cmp-coming-soon-maintenance .theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.cmp-coming-soon-maintenance .theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px 10px 5px 5px;height:2em;background:#656565;line-height:2em;color:#fff}.cmp-coming-soon-maintenance .active .theme-inputs{background:#27ae60}.cmp-coming-soon-maintenance .theme-inputs .italic{font-style:italic}.cmp-coming-soon-maintenance .theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-coming-soon-maintenance .cmp-button,.cmp-coming-soon-maintenance .cmp-preview,.cmp-coming-soon-maintenance .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-coming-soon-maintenance .cmp-button.submit,.cmp-coming-soon-maintenance .theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.cmp-coming-soon-maintenance .theme-wrapper a.button:focus,.cmp-coming-soon-maintenance .theme-wrapper a.button:visited{background:0 0;-webkit-box-shadow:none;box-shadow:none}.cmp-coming-soon-maintenance .theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-coming-soon-maintenance .cmp-button.submit:focus,.cmp-coming-soon-maintenance .cmp-button.submit:hover,.cmp-coming-soon-maintenance .theme-actions .activate:focus,.cmp-coming-soon-maintenance .theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.cmp-coming-soon-maintenance .theme-wrapper .button{border:2px solid #fff!important;background:0 0;width:180px;line-height:2.5em;height:3em}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]{position:relative;background:0 0;border:none;outline:0;-webkit-box-shadow:none;box-shadow:none}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]::before{content:none}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]::after{font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.cmp-coming-soon-maintenance .theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.cmp-coming-soon-maintenance .theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.cmp-coming-soon-maintenance .theme-wrapper .button:hover,.cmp-coming-soon-maintenance .theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.cmp-coming-soon-maintenance .selected.button,.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select:hover input[type=radio]::after{color:#23282d!important}.cmp-coming-soon-maintenance .theme-wrapper .theme-preview,.cmp-coming-soon-maintenance .theme-wrapper .theme-purchase,.cmp-coming-soon-maintenance .theme-wrapper .theme-select{margin-bottom:5px}.cmp-coming-soon-maintenance .theme-wrapper .theme-select.selected{background-color:#32b2ff}.cmp-coming-soon-maintenance .theme-wrapper .theme-details.button{line-height:0}.cmp-coming-soon-maintenance .cmp-preview{background-color:#2485bf!important}.cmp-coming-soon-maintenance .cmp-preview:active,.cmp-coming-soon-maintenance .cmp-preview:hover{background-color:#32b2ff!important}.cmp-coming-soon-maintenance .theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.cmp-coming-soon-maintenance .theme-info .theme-purchase:focus,.cmp-coming-soon-maintenance .theme-info .theme-purchase:hover{background-color:#34495e}.cmp-coming-soon-maintenance .button i{margin-right:5px}.cmp-coming-soon-maintenance .theme-purchase a,.cmp-coming-soon-maintenance .theme-purchase a:hover,.cmp-coming-soon-maintenance .theme-purchase a:visited{color:#fff;text-decoration:none}.cmp-coming-soon-maintenance p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.cmp-coming-soon-maintenance .theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.cmp-coming-soon-maintenance .fifty-layout input:checked+img,.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav div:hover{opacity:1}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav .left{float:left}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav .right{float:right}.cmp-coming-soon-maintenance .theme-description ul{list-style:none;padding-left:2em}.cmp-coming-soon-maintenance .theme-description h4,.cmp-coming-soon-maintenance .theme-description li{font-size:13px}.cmp-coming-soon-maintenance .theme-description .supported i{color:green}.cmp-coming-soon-maintenance .theme-description .not-supported i{color:red}.cmp-coming-soon-maintenance .wp-list-table .column-id{width:5%}.cmp-coming-soon-maintenance .cmp-status{margin-bottom:3em}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .toggle:after,.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance input[type=checkbox].toggle-checkbox{display:none}.cmp-coming-soon-maintenance .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}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.cmp-coming-soon-maintenance .toggle-wrapper:hover .toggle_handler{background:#e74c3c}.cmp-coming-soon-maintenance .toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.cmp-coming-soon-maintenance .toggle:before{content:"Disabled";left:22px;color:#fff}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle:before,.cmp-coming-soon-maintenance .toggle:after{color:#23282d}.cmp-coming-soon-maintenance .toggle:after{content:"Enabled";right:26px}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle:after{color:#fff}.cmp-coming-soon-maintenance .fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.cmp-coming-soon-maintenance .fifty-layout input{visibility:hidden;position:absolute;margin:0}.cmp-coming-soon-maintenance .fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px}.cmp-coming-soon-maintenance .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-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.cmp-coming-soon-maintenance .widget.donate img{max-width:50px}.cmp-coming-soon-maintenance .widget.donate img.niteo-logo{max-width:120px}.cmp-coming-soon-maintenance .cmp-rate-us .button,.cmp-coming-soon-maintenance .cmp-rate-us a{display:block;text-align:center}.cmp-coming-soon-maintenance .cmp-rate-us a{padding:1em 0}.cmp-coming-soon-maintenance .cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-coming-soon-maintenance .cmp-rate-us form{text-align:center}.cmp-coming-soon-maintenance .subscribers .column-id{width:5%}.cmp-coming-soon-maintenance #subscribe-3rdparty fieldset,.cmp-coming-soon-maintenance .constellation{margin-top:1em}@media screen and (max-width:1450px){.cmp-coming-soon-maintenance .cmp-inputs-wrapper{min-width:70%}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.cmp-coming-soon-maintenance .theme-wrapper,.cmp-coming-soon-maintenance .theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-coming-soon-maintenance .cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.cmp-coming-soon-maintenance .theme-wrapper,.cmp-coming-soon-maintenance .theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.cmp-coming-soon-maintenance .table-wrapper th{display:block}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.cmp-coming-soon-maintenance .table-wrapper table{width:100%}.cmp-coming-soon-maintenance .table-wrapper th{width:140px}}@media screen and (max-width:782px){.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-coming-soon-maintenance .cmp-inputs-wrapper,.cmp-coming-soon-maintenance .cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.cmp-coming-soon-maintenance .theme-overlay .theme-info,.cmp-coming-soon-maintenance .theme-overlay .theme-screenshots{width:100%;float:none}.cmp-coming-soon-maintenance input[type=text],.cmp-coming-soon-maintenance textarea{font-size:13px}}@media screen and (max-width:560px){.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(2){left:50px}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(3){left:105px}.cmp-coming-soon-maintenance .social-inputs p i{top:22px}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]{top:28px;left:53px}.cmp-coming-soon-maintenance .social-inputs label{padding-left:55px}.cmp-coming-soon-maintenance .social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}
css/preview-iframe.css CHANGED
@@ -63,7 +63,7 @@ h3 {
63
  #preview-customize {
64
  position: fixed;
65
  z-index: 11000;
66
- width: 300px;
67
  height: 100%;
68
  left: 100%;
69
  top: 0;
@@ -77,8 +77,8 @@ h3 {
77
  }
78
 
79
  .open #preview-customize {
80
- -webkit-transform: translate3d(-300px,0,0);
81
- transform: translate3d(-300px,0,0);
82
  }
83
 
84
  .customize-content {
@@ -89,11 +89,11 @@ h3 {
89
  }
90
 
91
  .thumbnail {
92
- padding: 5px;
93
  border: 1px solid #e0e0e0;
94
  border-radius: 5px;
95
  display: inline-block;
96
- width: calc(50% - 24px);
97
  margin-right: 5px;
98
  margin-bottom: 6px;
99
  text-align: center;
@@ -101,6 +101,10 @@ padding: 5px;
101
  font-weight: 600;
102
  }
103
 
 
 
 
 
104
  .customize-content img {
105
  max-width: 100%;
106
  border-radius: 5px;
63
  #preview-customize {
64
  position: fixed;
65
  z-index: 11000;
66
+ width: 50vw;
67
  height: 100%;
68
  left: 100%;
69
  top: 0;
77
  }
78
 
79
  .open #preview-customize {
80
+ -webkit-transform: translate3d(-50vw,0,0);
81
+ transform: translate3d(-50vw,0,0);
82
  }
83
 
84
  .customize-content {
89
  }
90
 
91
  .thumbnail {
92
+ padding: 5px;
93
  border: 1px solid #e0e0e0;
94
  border-radius: 5px;
95
  display: inline-block;
96
+ width: calc(34% - 27px);
97
  margin-right: 5px;
98
  margin-bottom: 6px;
99
  text-align: center;
101
  font-weight: 600;
102
  }
103
 
104
+ .background-selector .thumbnail {
105
+ max-width: 140px;
106
+ }
107
+
108
  .customize-content img {
109
  max-width: 100%;
110
  border-radius: 5px;
img/thumbnails/apollo/screenshot1.jpg ADDED
Binary file
img/thumbnails/apollo_thumbnail.jpg ADDED
Binary file
img/thumbnails/coder_thumbnail.jpg ADDED
Binary file
img/thumbnails/element/screenshot1.jpg ADDED
Binary file
img/thumbnails/element_thumbnail.jpg ADDED
Binary file
inc/class-cmp-feedback.php CHANGED
@@ -124,7 +124,7 @@ if ( ! class_exists( 'CMP_Feedback' ) ) :
124
  }
125
 
126
  // If difference between install date and now is greater than time limit, then display notice
127
- if ( ( time() - $install_date ) > $this->time_limit ) {
128
  add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
129
  }
130
 
124
  }
125
 
126
  // If difference between install date and now is greater than time limit, then display notice
127
+ if ( $install_date != false && ( time() - $install_date ) > $this->time_limit ) {
128
  add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
129
  }
130
 
inc/class-cmp-render_html.php CHANGED
@@ -2,12 +2,12 @@
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
  /**
5
- * Create a new table class that will extend the WP_List_Table
6
  */
7
- class cmp_render_html extends niteo_cmp {
8
 
9
  // Render Background
10
- public function cmp_background( $niteoCS_banner, $themeslug, $overlay = false ) {
11
  $size = $this->isMobile() ? 'large' : 'full';
12
  $html = '';
13
  // change background to default image, if image preview background is set
@@ -21,6 +21,7 @@ class cmp_render_html extends niteo_cmp {
21
  case 'orbit':
22
  case 'frame':
23
  case 'eclipse':
 
24
  // default image
25
  $niteoCS_banner = '2';
26
  break;
@@ -47,7 +48,7 @@ class cmp_render_html extends niteo_cmp {
47
 
48
  } else {
49
  // send default image
50
- $banner_url = $this->cmp_themeURL($themeslug).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
51
  }
52
 
53
  $html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
@@ -89,7 +90,7 @@ class cmp_render_html extends niteo_cmp {
89
 
90
  // get raw url from response
91
  if ( isset( $unsplash['response'] ) && $unsplash['response'] == '200' ) {
92
- $body = json_decode($unsplash['body'], true);
93
 
94
  if ( isset( $body[0] ) ) {
95
  foreach ( $body as $item ) {
@@ -98,23 +99,35 @@ class cmp_render_html extends niteo_cmp {
98
  }
99
  } else {
100
  $unsplash_url = $body['urls']['raw'];
101
- $unsplash_download = $item['links']['download_location'];
102
  }
103
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  ob_start(); ?>
105
 
106
  <script>
107
  var unsplash_img = '<?php echo esc_url( $unsplash_url );?>';
108
  var unsplash_download = '<?php echo esc_url( $unsplash_download );?>';
109
 
110
- var width = document.documentElement.clientWidth;
111
- var height = document.documentElement.clientHeight;
112
  var dimension = 'w=' + width;
113
  if ( width < height ) {
114
  dimension = 'h=' + height;
115
  }
116
 
117
- unsplash_img = unsplash_img + '?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&' + dimension;
118
  var banner = '<div id="background-image" class="image" style="background-image:url('+unsplash_img+')"></div>';
119
 
120
  var container = document.getElementById("background-wrapper");
@@ -128,13 +141,13 @@ class cmp_render_html extends niteo_cmp {
128
  // define get function for external URL
129
  function Get(yourUrl){
130
  var Httpreq = new XMLHttpRequest(); // a new request
131
- Httpreq.open("GET",yourUrl,false);
132
  Httpreq.send(null);
133
  return Httpreq.responseText;
134
  }
135
 
136
  // trigger Unsplash download to meet API requirements
137
- var json_obj = JSON.parse(Get(unsplash_download + '?client_id=41f043163758cf2e898e8a868bc142c20bc3f5966e7abac4779ee684088092ab'));
138
 
139
  </script>
140
  <?php
@@ -197,16 +210,16 @@ class cmp_render_html extends niteo_cmp {
197
  break;
198
  }
199
 
200
- if ( $overlay === true ) {
201
- $html .= '<div class="background-overlay"></div>';
202
- }
203
 
204
  return $html;
205
  }
206
 
207
 
208
  // render slider
209
- public function cmp_slider( $themeslug, $overlay = false ) {
210
 
211
  // change to background if preview background is set
212
  if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
@@ -302,13 +315,26 @@ class cmp_render_html extends niteo_cmp {
302
  $imgs[0] = $unsplash_body['urls']['raw'];
303
  }
304
 
305
- $imgs = json_encode( $imgs ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
306
 
307
  <script>
308
  var imgs = <?php echo $imgs;?>;
309
 
310
- var width = document.documentElement.clientWidth;
311
- var height = document.documentElement.clientHeight;
312
  var dimension = 'w=' + width;
313
  if ( width < height ) {
314
  dimension = 'h=' + height;
@@ -336,20 +362,64 @@ class cmp_render_html extends niteo_cmp {
336
  } ?>
337
  </div>
338
 
 
 
 
 
 
 
339
  </div>
340
 
341
  <div class="prev"></div>
342
  <div class="next"></div>
343
 
344
  <?php
345
- // render overlay image if required
346
- if ( $overlay === true ) {
347
- echo '<div class="background-overlay"></div>';
348
- }
349
 
350
  return;
351
  }
352
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  // render Social Icons
354
  public function cmp_social_icons( $mode = 'icon', $title = false, $themeslug = false ) {
355
 
@@ -424,9 +494,9 @@ class cmp_render_html extends niteo_cmp {
424
  if ( $logo_id != '' ) {
425
  $logo_url = wp_get_attachment_image_src( $logo_id, $size );
426
  }
427
- if ( isset($logo_url[0]) ) {
428
- $html = '<div class="logo-wrapper"><img src="'.esc_url( $logo_url[0] ).'" class="graphic-logo" alt="logo"></div>';
429
 
 
 
430
  }
431
  break;
432
 
@@ -434,10 +504,12 @@ class cmp_render_html extends niteo_cmp {
434
  $text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));
435
  $html = '<div class="text-logo-wrapper"><h1 class="text-logo">'.esc_html( $text_logo ).'</h1></div>';
436
  break;
 
437
  case 'disabled':
438
  default:
439
  break;
440
  }
 
441
  return $html;
442
  }
443
 
@@ -464,6 +536,7 @@ class cmp_render_html extends niteo_cmp {
464
  if ( isset( $_GET['theme'] ) ) {
465
  switch ( $_GET['theme'] ) {
466
  case 'eclipse':
 
467
  $niteoCS_subscribe_label = 'SUBSCRIBE US';
468
  break;
469
  default:
@@ -476,7 +549,7 @@ class cmp_render_html extends niteo_cmp {
476
  $translation = json_decode( get_option('niteoCS_translation'), true );
477
  $placeholder = isset($translation[4]['translation']) ? stripslashes( $translation[4]['translation'] ) : 'Insert your email address.';
478
  $placeholder_firstname = isset($translation[10]['translation']) ? stripslashes( $translation[10]['translation'] ) : 'First Name';
479
- $placeholder_lastname = isset($translation[11]['translation']) ? stripslashes( $translation[11]['translation'] ) : 'First Name';
480
  $submit = isset($translation[8]['translation']) ? stripslashes( $translation[8]['translation'] ) : 'Submit';
481
 
482
  // overwrite it with theme specific requirements
@@ -536,9 +609,17 @@ class cmp_render_html extends niteo_cmp {
536
 
537
  httpRequest.onreadystatechange = function(){
538
  if ( this.readyState == 4 && this.status == 200 ) {
539
- selectResult.innerHTML = this.responseText; // Display the result inside result element.
 
540
  emailInput.value = '';
541
  selectForm.classList.add('-subscribed');
 
 
 
 
 
 
 
542
  }
543
 
544
  };
@@ -552,7 +633,6 @@ class cmp_render_html extends niteo_cmp {
552
  }
553
 
554
  selectButton.onclick = function(){ // If clicked on the button.
555
- console.log(emailInput.value);
556
  if ( emailInput.value != '' ) {
557
  XMLhttp();
558
  }
@@ -604,9 +684,9 @@ class cmp_render_html extends niteo_cmp {
604
  // other js code
605
  case 'other':
606
  if ( get_option('niteoCS_analytics_other', '') !== '' ) {
607
- $niteoCS_analytics_other = stripslashes(get_option('niteoCS_analytics_other', '')); ?>
608
  <script>
609
- <?php echo esc_js($niteoCS_analytics_other);?>
610
 
611
  </script>
612
  <?php
@@ -649,6 +729,7 @@ class cmp_render_html extends niteo_cmp {
649
  break;
650
 
651
  case 'fifty':
 
652
  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>';
653
  break;
654
 
@@ -677,37 +758,45 @@ class cmp_render_html extends niteo_cmp {
677
  **/
678
  public function cmp_get_title( $class = '' ) {
679
  global $allowedposttags;
 
680
 
 
681
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
682
- $theme_preview = esc_attr($_GET['theme']);
683
 
684
- switch ( $theme_preview ) {
685
  case 'hardwork':
686
  case 'hardwork_premium':
687
  case 'fifty':
688
- return '<h2>We will be back soon!</h2>';
689
  break;
690
 
691
  case 'eclipse':
692
- return '<h2>Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a></h2>';
693
  break;
694
 
695
  case 'orbit':
696
- return '<h2>WE ARE IN ORBIT ! STAY TUNED ...</h2>';
697
  break;
698
 
699
  case 'stylo':
700
- return '<h2 class="animated '. $class .'">Something Awesome is Coming!</h2>';
 
 
 
 
701
  break;
702
 
703
  default:
704
- return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
705
  break;
706
  }
707
 
708
- } else {
709
- return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
710
  }
 
 
 
 
 
711
  }
712
 
713
  /**
@@ -719,7 +808,32 @@ class cmp_render_html extends niteo_cmp {
719
  **/
720
  public function cmp_get_fonts( $heading_font = array(), $content_font = array() ) {
721
 
722
- return '<link href="https://fonts.googleapis.com/css?family='. esc_attr( str_replace(' ', '+', $heading_font['family']) ) .':'. esc_attr(str_replace('italic', 'i', $heading_font['variant'] )) .'|'. esc_attr( str_replace(' ', '+', $content_font['family']) ) .':'. esc_attr(str_replace('italic', '', $content_font['variant'] )) .','. esc_attr(str_replace('italic', '', $content_font['variant'] )) .'i" rel="stylesheet">';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
723
  }
724
 
725
  /**
@@ -778,8 +892,10 @@ class cmp_render_html extends niteo_cmp {
778
  ob_start();
779
 
780
  // add blur effect if enabled
781
- if ( get_option('niteoCS_effect['. $themeslug .']', 'disabled') == 'blur' ) {
782
- $blur = get_option('niteoCS_effect_blur['. $themeslug .']', '0.5'); ?>
 
 
783
  <style>
784
  #background-image,.slide-background,.video-banner {filter:blur(<?php echo esc_attr($blur);?>px);transform:scale(1.1);}
785
  #background-wrapper, .slick-slider {overflow:hidden;}
@@ -788,13 +904,45 @@ class cmp_render_html extends niteo_cmp {
788
 
789
  <?php
790
  } ?>
791
-
 
792
  <style>
793
  .wp-video {margin: 0 auto;}
794
  .wp-video-shortcode {max-width: 100%;}
795
  </style>
796
-
797
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
798
  $css = ob_get_clean();
799
 
800
  $custom_css = ( get_option('niteoCS_custom_css', '') != '' ) ? '<style>'.stripslashes( wp_filter_nohtml_kses( get_option('niteoCS_custom_css') ) ).'</style>' : '';
@@ -811,8 +959,8 @@ class cmp_render_html extends niteo_cmp {
811
  * @return HTML
812
  **/
813
  public function cmp_get_copyright() {
814
- if ( get_option('niteoCS_copyright', 'Copyright 2017 by NiteoThemes. All rights reserved.' ) !== '' ) {
815
- $copyright = stripslashes(get_option('niteoCS_copyright', 'Copyright 2017 by NiteoThemes. All rights reserved.'));
816
  $allowed_html = array(
817
  'a' => array(
818
  'href' => array(),
@@ -823,7 +971,7 @@ class cmp_render_html extends niteo_cmp {
823
  'strong' => array(),
824
  );
825
 
826
- return '<p class="copyright">'.wp_kses( $copyright, $allowed_html ).'</p>';
827
 
828
  }
829
 
@@ -836,7 +984,8 @@ class cmp_render_html extends niteo_cmp {
836
  if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
837
  $background = esc_attr($_GET['background']);
838
  } ?>
839
-
 
840
  <script>
841
  window.addEventListener("load",function(event) {
842
  init();
@@ -844,17 +993,19 @@ class cmp_render_html extends niteo_cmp {
844
 
845
  function init(){
846
  var image = document.getElementById('background-image');
847
-
848
  if ( image === null ) {
849
  image = document.getElementById('body');
850
  }
851
 
852
  if ( image != null ) {
853
  image.className += " loaded";
 
 
854
  }
855
 
856
- // theme specific function after init
857
  <?php
 
858
  switch ( $themeslug ) {
859
  case 'fifty': ?>
860
  var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
@@ -902,6 +1053,18 @@ class cmp_render_html extends niteo_cmp {
902
  }
903
  // video
904
  $source = get_option('niteoCS_banner_video['.$themeslug.']');
 
 
 
 
 
 
 
 
 
 
 
 
905
 
906
  switch ( $source ) {
907
  case 'YouTube':
@@ -953,7 +1116,7 @@ class cmp_render_html extends niteo_cmp {
953
  case '0':
954
  case '1':
955
 
956
- if ( get_option('niteoCS_slider['.$themeslug.']', '1') == 1 ) {
957
  $slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
958
  $slider_autoplay = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
959
  // render slice effect scripts
@@ -967,7 +1130,7 @@ class cmp_render_html extends niteo_cmp {
967
 
968
  // render slick carousel DOM and scripts
969
  } else { ?>
970
-
971
  <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" Crossorigin="anonymous"></script>
972
  <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.js'></script>
973
  <script>
@@ -1004,8 +1167,8 @@ class cmp_render_html extends niteo_cmp {
1004
  $time = get_option('niteoCS_redirect_time'); ?>
1005
  <script>
1006
  setTimeout(function() {
1007
- window.location.href = "<?php echo esc_url($url);?>";
1008
- }, <?php echo esc_attr($time * 1000);?>);
1009
  </script>
1010
  <?php
1011
  }
@@ -1025,6 +1188,7 @@ class cmp_render_html extends niteo_cmp {
1025
  <?php
1026
  } ?>
1027
 
 
1028
  <script type='text/javascript'>
1029
  /* <![CDATA[ */
1030
  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."}}};
@@ -1036,6 +1200,120 @@ class cmp_render_html extends niteo_cmp {
1036
  <?php
1037
  }
1038
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1039
  return false;
1040
  }
1041
 
@@ -1055,7 +1333,7 @@ class cmp_render_html extends niteo_cmp {
1055
 
1056
  $form_id = get_option('niteoCS_contact_form_id', '');
1057
 
1058
- switch ($form_type) {
1059
  case 'cf7':
1060
 
1061
  $replace = array('<p>', '</p>' );
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
  /**
5
+ * Create a new cmp_render_html class that will extend the CMP_Coming_Soon_and_Maintenance
6
  */
7
+ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Maintenance {
8
 
9
  // Render Background
10
+ public function cmp_background( $niteoCS_banner, $themeslug ) {
11
  $size = $this->isMobile() ? 'large' : 'full';
12
  $html = '';
13
  // change background to default image, if image preview background is set
21
  case 'orbit':
22
  case 'frame':
23
  case 'eclipse':
24
+ case 'element':
25
  // default image
26
  $niteoCS_banner = '2';
27
  break;
48
 
49
  } else {
50
  // send default image
51
+ $banner_url = $this->cmp_themeURL( $themeslug ).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
52
  }
53
 
54
  $html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
90
 
91
  // get raw url from response
92
  if ( isset( $unsplash['response'] ) && $unsplash['response'] == '200' ) {
93
+ $body = json_decode ($unsplash['body'], true );
94
 
95
  if ( isset( $body[0] ) ) {
96
  foreach ( $body as $item ) {
99
  }
100
  } else {
101
  $unsplash_url = $body['urls']['raw'];
102
+ $unsplash_download = $body['links']['download_location'];
103
  }
104
 
105
+ switch ( $themeslug ) {
106
+ case 'element':
107
+ $width = 1;
108
+ $height = 0.6;
109
+ break;
110
+
111
+ default:
112
+ $width = 1;
113
+ $height = 1;
114
+ break;
115
+ }
116
+
117
  ob_start(); ?>
118
 
119
  <script>
120
  var unsplash_img = '<?php echo esc_url( $unsplash_url );?>';
121
  var unsplash_download = '<?php echo esc_url( $unsplash_download );?>';
122
 
123
+ var width = document.documentElement.clientWidth * <?php echo $width;?>;
124
+ var height = document.documentElement.clientHeight * <?php echo $height;?>;
125
  var dimension = 'w=' + width;
126
  if ( width < height ) {
127
  dimension = 'h=' + height;
128
  }
129
 
130
+ unsplash_img = unsplash_img + '?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=crop&' + dimension;
131
  var banner = '<div id="background-image" class="image" style="background-image:url('+unsplash_img+')"></div>';
132
 
133
  var container = document.getElementById("background-wrapper");
141
  // define get function for external URL
142
  function Get(yourUrl){
143
  var Httpreq = new XMLHttpRequest(); // a new request
144
+ Httpreq.open("GET", yourUrl, false);
145
  Httpreq.send(null);
146
  return Httpreq.responseText;
147
  }
148
 
149
  // trigger Unsplash download to meet API requirements
150
+ var json_obj = JSON.parse( Get( unsplash_download + '?client_id=41f043163758cf2e898e8a868bc142c20bc3f5966e7abac4779ee684088092ab' ) );
151
 
152
  </script>
153
  <?php
210
  break;
211
  }
212
 
213
+ $overlay = $this->background_overlay( $themeslug );
214
+
215
+ $html .= $overlay;
216
 
217
  return $html;
218
  }
219
 
220
 
221
  // render slider
222
+ public function cmp_slider( $themeslug ) {
223
 
224
  // change to background if preview background is set
225
  if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
315
  $imgs[0] = $unsplash_body['urls']['raw'];
316
  }
317
 
318
+ $imgs = json_encode( $imgs );
319
+
320
+ switch ( $themeslug ) {
321
+ case 'element':
322
+ $width = 1;
323
+ $height = 0.6;
324
+ break;
325
+
326
+ default:
327
+ $width = 1;
328
+ $height = 1;
329
+ break;
330
+ }
331
+ ?>
332
 
333
  <script>
334
  var imgs = <?php echo $imgs;?>;
335
 
336
+ var width = document.documentElement.clientWidth * <?php echo $width;?>;
337
+ var height = document.documentElement.clientHeight * <?php echo $height;?>;
338
  var dimension = 'w=' + width;
339
  if ( width < height ) {
340
  dimension = 'h=' + height;
362
  } ?>
363
  </div>
364
 
365
+ <?php
366
+
367
+ echo $this->background_overlay( $themeslug );
368
+
369
+ ?>
370
+
371
  </div>
372
 
373
  <div class="prev"></div>
374
  <div class="next"></div>
375
 
376
  <?php
 
 
 
 
377
 
378
  return;
379
  }
380
 
381
+ /**
382
+ * render Overlay element.
383
+ *
384
+ * @since 2.8
385
+ * @return HTML
386
+ **/
387
+ public function background_overlay( $themeslug ) {
388
+
389
+ $overlay = get_option('niteoCS_overlay['.$themeslug.']', 'disabled');
390
+ $opacity = get_option('niteoCS_overlay['.$themeslug.'][opacity]', '0.4');
391
+ $html = '';
392
+
393
+ switch ( $overlay ) {
394
+ case 'solid-color':
395
+ $color = get_option('niteoCS_overlay['.$themeslug.'][color]', '#0a0a0a');
396
+ $html = '<div class="background-overlay solid-color" style="background-color:'.esc_attr( $color ).';opacity:'.esc_attr( $opacity ).'"></div>';
397
+ break;
398
+
399
+ case 'gradient':
400
+ $overlay_gradient = get_option('niteoCS_overlay['.$themeslug.'][gradient]', '#d53369:#cbad6d');
401
+
402
+ if ( $overlay_gradient == 'custom' ) {
403
+ $gradient_one = get_option('niteoCS_overlay['.$themeslug.'][gradient_one]', '#e5e5e5');
404
+ $gradient_two = get_option('niteoCS_overlay['.$themeslug.'][gradient_two]', '#e5e5e5');
405
+
406
+ } else {
407
+ $gradient = explode(":", $overlay_gradient);
408
+ $gradient_one = $gradient[0];
409
+ $gradient_two = $gradient[1];
410
+ }
411
+
412
+
413
+ $html = '<div class="background-overlay gradient" style="background:-moz-linear-gradient(-45deg, '.esc_attr( $gradient_one ).' 0%, '.esc_attr( $gradient_two ).' 100%);background:-webkit-linear-gradient(-45deg, '.esc_attr( $gradient_one ).' 0%, '.esc_attr( $gradient_two ).' 100%);background:linear-gradient(135deg,'.esc_attr( $gradient_one ).' 0%, '.esc_attr( $gradient_two ).' 100%);opacity:'.esc_attr( $opacity ).'"></div>';
414
+ break;
415
+
416
+ default:
417
+ break;
418
+ }
419
+
420
+ return $html;
421
+ }
422
+
423
  // render Social Icons
424
  public function cmp_social_icons( $mode = 'icon', $title = false, $themeslug = false ) {
425
 
494
  if ( $logo_id != '' ) {
495
  $logo_url = wp_get_attachment_image_src( $logo_id, $size );
496
  }
 
 
497
 
498
+ if ( isset($logo_url[0]) ) {
499
+ $html = '<div class="logo-wrapper image"><img src="'.esc_url( $logo_url[0] ).'" class="graphic-logo" alt="logo"></div>';
500
  }
501
  break;
502
 
504
  $text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));
505
  $html = '<div class="text-logo-wrapper"><h1 class="text-logo">'.esc_html( $text_logo ).'</h1></div>';
506
  break;
507
+
508
  case 'disabled':
509
  default:
510
  break;
511
  }
512
+
513
  return $html;
514
  }
515
 
536
  if ( isset( $_GET['theme'] ) ) {
537
  switch ( $_GET['theme'] ) {
538
  case 'eclipse':
539
+ case 'element':
540
  $niteoCS_subscribe_label = 'SUBSCRIBE US';
541
  break;
542
  default:
549
  $translation = json_decode( get_option('niteoCS_translation'), true );
550
  $placeholder = isset($translation[4]['translation']) ? stripslashes( $translation[4]['translation'] ) : 'Insert your email address.';
551
  $placeholder_firstname = isset($translation[10]['translation']) ? stripslashes( $translation[10]['translation'] ) : 'First Name';
552
+ $placeholder_lastname = isset($translation[11]['translation']) ? stripslashes( $translation[11]['translation'] ) : 'Last Name';
553
  $submit = isset($translation[8]['translation']) ? stripslashes( $translation[8]['translation'] ) : 'Submit';
554
 
555
  // overwrite it with theme specific requirements
609
 
610
  httpRequest.onreadystatechange = function(){
611
  if ( this.readyState == 4 && this.status == 200 ) {
612
+ result = JSON.parse( this.responseText );
613
+ selectResult.innerHTML = result.message; // Display the result inside result element.
614
  emailInput.value = '';
615
  selectForm.classList.add('-subscribed');
616
+
617
+ if ( result.status == 1 ) {
618
+ selectForm.classList.remove('-subscribe-failed');
619
+ selectForm.classList.add('-subscribe-successful');
620
+ } else {
621
+ selectForm.classList.add('-subscribe-failed');
622
+ }
623
  }
624
 
625
  };
633
  }
634
 
635
  selectButton.onclick = function(){ // If clicked on the button.
 
636
  if ( emailInput.value != '' ) {
637
  XMLhttp();
638
  }
684
  // other js code
685
  case 'other':
686
  if ( get_option('niteoCS_analytics_other', '') !== '' ) {
687
+ $niteoCS_analytics_other = get_option('niteoCS_analytics_other', ''); ?>
688
  <script>
689
+ <?php echo stripslashes( esc_js( $niteoCS_analytics_other ) );?>
690
 
691
  </script>
692
  <?php
729
  break;
730
 
731
  case 'fifty':
732
+ case 'element':
733
  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>';
734
  break;
735
 
758
  **/
759
  public function cmp_get_title( $class = '' ) {
760
  global $allowedposttags;
761
+ $title = stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') );
762
 
763
+ // rewrite title if required for theme preview
764
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
765
+ $themeslug = esc_attr( $_GET['theme'] );
766
 
767
+ switch ( $themeslug ) {
768
  case 'hardwork':
769
  case 'hardwork_premium':
770
  case 'fifty':
771
+ $title = 'We will be back soon!';
772
  break;
773
 
774
  case 'eclipse':
775
+ $title = 'Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a>';
776
  break;
777
 
778
  case 'orbit':
779
+ $title = 'WE ARE IN ORBIT ! STAY TUNED ...';
780
  break;
781
 
782
  case 'stylo':
783
+ $title = 'Something Awesome is Coming!';
784
+ break;
785
+
786
+ case 'element':
787
+ $title = 'Coming Soon';
788
  break;
789
 
790
  default:
 
791
  break;
792
  }
793
 
 
 
794
  }
795
+
796
+ $title = ( $title == '' ) ? '' : '<h2 class="cmp-title animated '. $class .'">' . wp_kses( $title, $allowedposttags ) . '</h2>';
797
+
798
+ return $title;
799
+
800
  }
801
 
802
  /**
808
  **/
809
  public function cmp_get_fonts( $heading_font = array(), $content_font = array() ) {
810
 
811
+ // get fonts subset
812
+ $google_fonts = $this->cmp_get_google_fonts();
813
+
814
+ $heading_break = FALSE;
815
+ $content_break = FALSE;
816
+
817
+ foreach ( $google_fonts as $font => $val ) {
818
+
819
+ if ( $val['text'] == $heading_font['family'] ) {
820
+ $heading_subsets = $val['subset'];
821
+ $heading_break = TRUE;
822
+ }
823
+
824
+ if ( $val['text'] == $content_font['family'] ) {
825
+ $content_subsets = $val['subset'];
826
+ $content_break = TRUE;
827
+ }
828
+
829
+ if ( $heading_break === TRUE && $content_break === TRUE ) {
830
+ break;
831
+ }
832
+ }
833
+
834
+ $subset = array_unique( array_merge( $heading_subsets, $content_subsets ) );
835
+
836
+ return '<link href="https://fonts.googleapis.com/css?family='. esc_attr( str_replace(' ', '+', $heading_font['family']) ) .':'. esc_attr(str_replace('italic', 'i', $heading_font['variant'] )) .'|'. esc_attr( str_replace(' ', '+', $content_font['family']) ) .':'. esc_attr(str_replace('italic', '', $content_font['variant'] )) .','. esc_attr(str_replace('italic', '', $content_font['variant'] )) .'i&amp;subset=' . implode(',', $subset) . '" rel="stylesheet">';
837
  }
838
 
839
  /**
892
  ob_start();
893
 
894
  // add blur effect if enabled
895
+ $blur = get_option('niteoCS_effect_blur['. $themeslug .']', '0.0');
896
+ if ( $blur != '0.0' ) {
897
+ ?>
898
+ <!-- blur effect -->
899
  <style>
900
  #background-image,.slide-background,.video-banner {filter:blur(<?php echo esc_attr($blur);?>px);transform:scale(1.1);}
901
  #background-wrapper, .slick-slider {overflow:hidden;}
904
 
905
  <?php
906
  } ?>
907
+
908
+ <!-- wp video shortcode -->
909
  <style>
910
  .wp-video {margin: 0 auto;}
911
  .wp-video-shortcode {max-width: 100%;}
912
  </style>
913
+
914
  <?php
915
+
916
+ // check for premium themes special effects
917
+
918
+ if ( in_array( $this->cmp_selectedTheme(), $this->cmp_premium_themes_installed() ) ) {
919
+
920
+ $effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
921
+
922
+ if ( $effect == 'constellation' ) { ?>
923
+ <!-- constellation effect -->
924
+ <style>
925
+ .particles-js-canvas-el {position: absolute; top:0; left:0;}
926
+ <?php
927
+ switch ( $themeslug ) {
928
+ case 'frame': ?>
929
+ .particles-js-canvas-el {z-index: -1;}
930
+ #background-image, .video-banner {z-index: -3;}
931
+ .background-overlay {z-index: -2;}
932
+ <?php
933
+ break;
934
+
935
+ case 'stylo' ?>
936
+ .particles-js-canvas-el {z-index: 1;}
937
+ <?php
938
+ default:
939
+ break;
940
+ } ?>
941
+ </style>
942
+ <?php
943
+ }
944
+ }
945
+
946
  $css = ob_get_clean();
947
 
948
  $custom_css = ( get_option('niteoCS_custom_css', '') != '' ) ? '<style>'.stripslashes( wp_filter_nohtml_kses( get_option('niteoCS_custom_css') ) ).'</style>' : '';
959
  * @return HTML
960
  **/
961
  public function cmp_get_copyright() {
962
+ if ( get_option( 'niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.' ) !== '' ) {
963
+ $copyright = stripslashes( get_option('niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.') );
964
  $allowed_html = array(
965
  'a' => array(
966
  'href' => array(),
971
  'strong' => array(),
972
  );
973
 
974
+ return '<p class="copyright">' . wp_kses( $copyright, $allowed_html ) . '</p>';
975
 
976
  }
977
 
984
  if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
985
  $background = esc_attr($_GET['background']);
986
  } ?>
987
+
988
+ <!-- load background image script -->
989
  <script>
990
  window.addEventListener("load",function(event) {
991
  init();
993
 
994
  function init(){
995
  var image = document.getElementById('background-image');
996
+ var body = document.getElementById('body');
997
  if ( image === null ) {
998
  image = document.getElementById('body');
999
  }
1000
 
1001
  if ( image != null ) {
1002
  image.className += " loaded";
1003
+ body.className += " loaded";
1004
+
1005
  }
1006
 
 
1007
  <?php
1008
+ // theme specific function after init
1009
  switch ( $themeslug ) {
1010
  case 'fifty': ?>
1011
  var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
1053
  }
1054
  // video
1055
  $source = get_option('niteoCS_banner_video['.$themeslug.']');
1056
+
1057
+ // sanitize source
1058
+ switch ( $source ) {
1059
+ case 'youtube':
1060
+ $source = 'YouTube';
1061
+ break;
1062
+ case 'local':
1063
+ $source = 'video/mp4';
1064
+ break;
1065
+ default:
1066
+ break;
1067
+ }
1068
 
1069
  switch ( $source ) {
1070
  case 'YouTube':
1116
  case '0':
1117
  case '1':
1118
 
1119
+ if ( get_option('niteoCS_slider['.$themeslug.']', '0') == 1 ) {
1120
  $slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
1121
  $slider_autoplay = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
1122
  // render slice effect scripts
1130
 
1131
  // render slick carousel DOM and scripts
1132
  } else { ?>
1133
+ <!-- slick carousel script -->
1134
  <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" Crossorigin="anonymous"></script>
1135
  <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.js'></script>
1136
  <script>
1167
  $time = get_option('niteoCS_redirect_time'); ?>
1168
  <script>
1169
  setTimeout(function() {
1170
+ window.location.href = "<?php echo esc_url( $url );?>";
1171
+ }, <?php echo esc_attr( $time * 1000 );?>);
1172
  </script>
1173
  <?php
1174
  }
1188
  <?php
1189
  } ?>
1190
 
1191
+ <!-- CF7 script -->
1192
  <script type='text/javascript'>
1193
  /* <![CDATA[ */
1194
  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."}}};
1200
  <?php
1201
  }
1202
 
1203
+ // special effects
1204
+ if ( in_array( $this->cmp_selectedTheme(), $this->cmp_premium_themes_installed() ) ) {
1205
+
1206
+ $effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
1207
+
1208
+ switch ( $effect ) {
1209
+ case 'constellation': ?>
1210
+ <!-- load external Particles script -->
1211
+ <script type='text/javascript' src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
1212
+ <!-- INI particles -->
1213
+ <script>
1214
+ /* ---- particles.js config ---- */
1215
+ var wrapper = document.getElementById('background-wrapper');
1216
+ var background = ( wrapper === null ) ? 'slider-wrapper' : 'background-wrapper';
1217
+ particlesJS(background, {
1218
+ "particles": {
1219
+ "number": {
1220
+ "value": 100,
1221
+ "density": {
1222
+ "enable": true,
1223
+ "value_area":1000
1224
+ }
1225
+ },
1226
+ "color": {
1227
+ "value": "<?php echo esc_attr( get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff') );?>",
1228
+ },
1229
+
1230
+ "shape": {
1231
+ "type": "circle",
1232
+ "stroke": {
1233
+ "width": 0,
1234
+ "color": "#fff"
1235
+ },
1236
+ "polygon": {
1237
+ "nb_sides": 5
1238
+ },
1239
+ },
1240
+ "opacity": {
1241
+ "value": 0.6,
1242
+ "random": false,
1243
+ "anim": {
1244
+ "enable": false,
1245
+ "speed": 1,
1246
+ "opacity_min": 0.1,
1247
+ "sync": false
1248
+ }
1249
+ },
1250
+ "size": {
1251
+ "value": 2,
1252
+ "random": true,
1253
+ "anim": {
1254
+ "enable": false,
1255
+ "speed": 40,
1256
+ "size_min": 0.1,
1257
+ "sync": false
1258
+ }
1259
+ },
1260
+ "line_linked": {
1261
+ "enable": true,
1262
+ "distance": 120,
1263
+ "color": "<?php echo esc_attr( get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff') );?>",
1264
+ "opacity": 0.4,
1265
+ "width": 1
1266
+ },
1267
+ },
1268
+ "interactivity": {
1269
+ "detect_on": "canvas",
1270
+ "events": {
1271
+ "onhover": {
1272
+ "enable": true,
1273
+ "mode": "grab"
1274
+ },
1275
+ "onclick": {
1276
+ "enable": false
1277
+ },
1278
+ "resize": true
1279
+ },
1280
+ "modes": {
1281
+ "grab": {
1282
+ "distance": 140,
1283
+ "line_linked": {
1284
+ "opacity": 1
1285
+ }
1286
+ },
1287
+ "bubble": {
1288
+ "distance": 400,
1289
+ "size": 40,
1290
+ "duration": 2,
1291
+ "opacity": 8,
1292
+ "speed": 3
1293
+ },
1294
+ "repulse": {
1295
+ "distance": 200,
1296
+ "duration": 0.4
1297
+ },
1298
+ "push": {
1299
+ "particles_nb": 4
1300
+ },
1301
+ "remove": {
1302
+ "particles_nb": 2
1303
+ }
1304
+ }
1305
+ },
1306
+ "retina_detect": true
1307
+ });
1308
+ </script>
1309
+ <?php
1310
+ break;
1311
+
1312
+ default:
1313
+ break;
1314
+ }
1315
+ }
1316
+
1317
  return false;
1318
  }
1319
 
1333
 
1334
  $form_id = get_option('niteoCS_contact_form_id', '');
1335
 
1336
+ switch ( $form_type ) {
1337
  case 'cf7':
1338
 
1339
  $replace = array('<p>', '</p>' );
inc/settings/settings-background.php CHANGED
@@ -1,253 +1,458 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ?>
4
- <div class="table-wrapper theme-setup background-media">
5
- <h3><?php _e('Graphic Background', 'cmp-coming-soon-maintenance');?></h3>
6
- <table class="theme-setup">
7
- <tbody>
8
- <tr>
9
- <th>
10
- <fieldset>
11
- <legend class="screen-reader-text">
12
- <span><?php _e('Banner Settings', 'cmp-coming-soon-maintenance');?></span>
13
- </legend>
14
-
15
- <p>
16
- <label title="Default Banner">
17
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="2"<?php if ( $banner_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
18
- </label>
19
- </p>
20
 
21
- <p>
22
- <label title="Custom banner">
23
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $banner_type == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Custom Images', 'cmp-coming-soon-maintenance');?>
24
- </label>
25
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- <p>
28
- <label title="Unsplash banner">
29
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $banner_type == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Unsplash library', 'cmp-coming-soon-maintenance');?>
30
- </label>
31
- </p>
32
- <p>
33
- <label title="Video Banner">
34
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="5"<?php if ( $banner_type == 5) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Video', 'cmp-coming-soon-maintenance');?>
35
- </label>
36
- </p>
37
- <p>
38
- <label title="Pattern Banner">
39
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="3"<?php if ( $banner_type == 3) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Graphic Pattern', 'cmp-coming-soon-maintenance');?>
40
- </label>
41
- </p>
42
- <p>
43
- <label title="Solid Color Banner">
44
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="4"<?php if ( $banner_type == 4) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Solid Color', 'cmp-coming-soon-maintenance');?>
45
- </label>
46
- </p>
47
- <p>
48
- <label title="Gradient Banner">
49
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="6"<?php if ( $banner_type == 6) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Gradient Color', 'cmp-coming-soon-maintenance');?>
50
- </label>
51
- </p>
52
 
53
- </fieldset>
54
- </th>
55
-
56
- <td class="theme_background">
57
-
58
- <fieldset id="custom_banner">
59
- <input type="hidden" class="widefat" id="niteoCS-images-id" name="niteoCS_banner_id_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_custom_id ); ?>" />
60
- <input id="add-images" type="button" class="button" value="Media Library" />
61
- <p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp-coming-soon-maintenance')?></p>
62
- <div class="images-wrapper">
63
- <?php
64
- if ( isset( $niteoCS_banner_custom_id ) && $niteoCS_banner_custom_id != '' ) {
65
- $ids = explode( ',', $niteoCS_banner_custom_id );
66
- foreach ( $ids as $id ) {
67
- $img = wp_get_attachment_image_src($id, 'large');
68
- if (isset($img[0])) {
69
- echo '<img src="'.$img[0].'" alt="">';
70
- }
71
- }
72
- }
73
- ?>
74
- </div>
75
- <input id="delete-images" type="button" class="button" value="Delete Media" />
76
- </fieldset>
77
 
78
- <fieldset id="unsplash_banner">
 
 
 
79
 
80
- <label for="unsplash_feed_<?php echo esc_attr($themeslug);?>"><?php _e('Choose Unsplash Feed', 'cmp-coming-soon-maintenance');?></label><br>
81
- <select name="unsplash_feed_<?php echo esc_attr($themeslug);?>">
82
 
83
- <option value="3" <?php if ( $niteoCS_unsplash_feed == '3' ) { echo ' selected="selected"'; } ?>><?php _e('Random Photo', 'cmp-coming-soon-maintenance');?></option>
84
 
85
- <option value="0" <?php if ( $niteoCS_unsplash_feed == '0' ) { echo ' selected="selected"'; } ?>><?php _e('Specific Photo', 'cmp-coming-soon-maintenance');?></option>
 
86
 
87
- <option value="2" <?php if ( $niteoCS_unsplash_feed == '2' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Collection', 'cmp-coming-soon-maintenance');?></option>
 
 
 
 
 
 
 
 
 
 
88
 
89
- <option value="1" <?php if ( $niteoCS_unsplash_feed == '1' ) { echo ' selected="selected"'; } ?>><?php _e('Random from User', 'cmp-coming-soon-maintenance');?></option>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
- </select>
 
 
 
92
 
93
- <p class="unsplash-feed" id="unsplash-feed-0">
94
- <label for="niteoCS_unsplash_0_<?php echo esc_attr($themeslug);?>"><?php _e('Enter Unsplash Photo URL or Unsplash Photo ID', 'cmp-coming-soon-maintenance');?></label>
95
- <input type="text" class="widefat" id="niteoCS-unsplash-0" name="niteoCS_unsplash_0_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_unsplash_0); ?>" />
96
- </p>
97
 
98
- <p class="unsplash-feed" id="unsplash-feed-2">
99
- <label for="niteoCS_unsplash_2_<?php echo esc_attr($themeslug);?>"><?php printf(__('Enter <a href="%s">Unsplash Collection</a> URL or Collection ID.', 'cmp-coming-soon-maintenance'), 'https://unsplash.com/collections/');?></label>
100
- <input type="text" class="widefat" id="niteoCS-unsplash-2" name="niteoCS_unsplash_2_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_unsplash_2); ?>" />
101
- </p>
102
 
103
- <p><div class="unsplash-feed" id="unsplash-feed-3">
104
- <label for="niteoCS_unsplash_3_<?php echo esc_attr($themeslug);?>"><?php _e('Limit photos to specific keyword (fashion, nature, technology..)', 'cmp-coming-soon-maintenance');?></label>
105
- <input type="text" class="widefat" id="niteoCS-unsplash-3" name="niteoCS_unsplash_3_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_unsplash_3); ?>" />
 
 
 
106
 
107
- <br><br>
 
108
 
109
- <input type="checkbox" name="niteoCS_unsplash_feat_<?php echo esc_attr($themeslug);?>" id="niteoCS_unsplash_feat" value="1" <?php checked( '1', get_option( 'niteoCS_unsplash_feat['.esc_attr($themeslug).']', '0' ) ); ?> class="regular-text code"><label for="niteoCS_unsplash_feat"><?php _e('Only Unsplash Featured Photos', 'cmp-coming-soon-maintenance');?></label>
110
- </div></p>
111
 
112
- <p class="unsplash-feed" id="unsplash-feed-1">
113
- <label for="niteoCS_unsplash_1_<?php echo esc_attr($themeslug);?>"><?php _e('Enter Unsplash User ID', 'cmp-coming-soon-maintenance');?></label>
114
- <input type="text" class="widefat" id="niteoCS-unsplash-1" name="niteoCS_unsplash_1_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_unsplash_1); ?>" placeholder="@"/>
115
- </p>
116
 
117
- <button id="test-unsplash" class="button" data-security="<?php echo esc_attr($ajax_nonce);?>"><?php _e('Display Unsplash Photo', 'cmp-coming-soon-maintenance');?></button>
118
-
119
- <div id="unsplash-media"></div>
120
-
121
- <p class="unplash-description"><a href="http://unsplash.com" target="_blank">Unsplash</a> <?php _e('is a world leading source for free to use high quality stock images. All of the images that are submitted and published on Unsplash fall under under the <a href="https://unsplash.com/license"> Unsplash license</a>, which means you can use the image for any personal or commercial use.', 'cmp-coming-soon-maintenance');?></p>
122
-
123
- </fieldset>
124
 
125
- <fieldset id="default_banner">
126
- <img src="<?php echo esc_url($this->cmp_themeURL($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg');?>" alt="Default Media">
127
- </fieldset>
128
 
129
- <fieldset id="graphic_pattern">
130
- <label for="niteoCS_banner_pattern_<?php echo esc_attr($themeslug);?>"><?php _e('Select Pattern', 'cmp-coming-soon-maintenance');?></label><br>
131
- <select name="niteoCS_banner_pattern_<?php echo esc_attr($themeslug);?>" data-url="<?php echo esc_url(WP_PLUGIN_URL . '/cmp-coming-soon-maintenance/img/patterns/');?>">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  <?php
133
- foreach ($patterns as $pattern) { ?>
134
- <option value="<?php echo esc_attr($pattern);?>" <?php if ( $niteoCS_banner_pattern == $pattern ) { echo ' selected="selected"'; } ?>><?php echo esc_html(ucfirst(str_replace('_', ' ', $pattern)));?></option>
135
- <?php
136
- } ?>
137
- <option value="custom" <?php if ( $niteoCS_banner_pattern == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Pattern...', 'cmp-coming-soon-maintenance');?></option>
138
- </select><br>
139
-
140
- <input type="hidden" class="widefat" id="niteoCS-pattern-id" name="niteoCS_banner_pattern_custom_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_pattern_custom ); ?>" />
141
 
142
- <input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ($niteoCS_banner_pattern == 'custom') ? 'block' : 'none'?>;"/>
143
-
144
- <div class="pattern-wrapper" style="background-image: url('<?php echo esc_url($pattern_url);?>');"></div>
145
- </fieldset>
146
-
147
- <fieldset id="solid_color">
148
- <label for="niteoCS_banner_color_<?php echo esc_attr($themeslug);?>"><?php _e('Select Color', 'cmp-coming-soon-maintenance');?></label><br>
149
- <input type="text" name="niteoCS_banner_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_banner_color" value="<?php echo esc_attr( $niteoCS_banner_color); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
150
- <div class="color-preview" style="background-color:<?php echo esc_attr( $niteoCS_banner_color); ?>"></div>
151
- </fieldset>
152
-
153
- <fieldset id="video_banner">
154
- <label for="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>"><?php _e('Select Video Source', 'cmp-coming-soon-maintenance');?></label><br>
155
- <select name="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>" class="banner-video-source">
156
- <option value="YouTube" <?php if ( $niteoCS_banner_video == 'YouTube' ) { echo ' selected="selected"'; } ?>><?php _e('YouTube', 'cmp-coming-soon-maintenance');?></option>
157
- <option value="video/mp4" <?php if ( $niteoCS_banner_video == 'video/mp4' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Video File', 'cmp-coming-soon-maintenance');?></option>
158
- <option disabled value="vimeo" <?php if ( $niteoCS_banner_video == 'vimeo' ) { echo ' selected="selected"'; } ?>><?php _e('Vimeo (coming soon...)', 'cmp-coming-soon-maintenance');?></option>
159
- </select><br>
160
-
161
-
162
- <p class="youtube-source-input">
163
- <label for="niteoCS_youtube_url_<?php echo esc_attr($themeslug);?>"><?php _e('Enter Youtube URL', 'cmp-coming-soon-maintenance');?></label>
164
- <input type="text" class="widefat" id="niteoCS-youtube-url" name="niteoCS_youtube_url_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_youtube_url); ?>" />
165
-
166
- </p>
167
-
168
- <p class="vimeo-source-input">
169
- <label for="niteoCS_vimeo_url_<?php echo esc_attr($themeslug);?>"><?php _e('Enter Vimeo URL', 'cmp-coming-soon-maintenance');?></label>
170
- <input type="text" class="widefat" id="niteoCS-vimeo-url" name="niteoCS_vimeo_url_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_vimeo_url); ?>" />
171
- </p>
172
-
173
- <p class="file-source-input">
174
- <label for="niteoCS_file_url_<?php echo esc_attr($themeslug);?>"><?php _e('Select or Upload custom Video file', 'cmp-coming-soon-maintenance');?></label>
175
- <input id="add-video" type="button" class="button" value="Media Library"/>
176
- <input type="hidden" class="widefat" id="niteoCS-video-id" name="niteoCS_video_file_url<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_video_file_url ); ?>" data-url="<?php echo esc_url( wp_get_attachment_url($niteoCS_video_file_url) ); ?>"/>
177
- </p>
178
-
179
- <div class="video-wrapper"></div>
180
-
181
- <p class="file-source-input">
182
- <input id="delete-video" type="button" class="button" value="Remove Video" style="display:none"/>
183
- </p>
184
-
185
- <p><?php _e('Video backgrounds doesn`t work on mobile devices therefore only thumbnail video image will be displayed on mobile devices. Upload custom thumbnail image by pressing button below. ', 'cmp-coming-soon-maintenance');?></p>
186
- <input type="hidden" class="widefat" id="niteoCS-video-thumb-id" name="niteoCS_video_thumb_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_video_thumb ); ?>" />
187
- <input id="add-video-thumb" type="button" class="button" value="<?php _e('Media Library', 'cmp-coming-soon-maintenance');?>" /><br><br>
188
-
189
- <div class="video-thumb-wrapper">
190
- <?php
191
- if ( isset( $niteoCS_video_thumb ) && $niteoCS_video_thumb != '' ) {
192
- $img = wp_get_attachment_image_src($niteoCS_video_thumb, 'large');
193
- if (isset($img[0])) {
194
- echo '<img src="'.$img[0].'" alt="">';
195
- }
196
 
197
- }
198
- ?>
199
- </div>
200
-
201
- <input id="delete-video-thumb" type="button" class="button" value="Remove Thumbnail" />
202
- </fieldset>
203
-
204
- <fieldset id="gradient_background">
205
-
206
- <label for="niteoCS_gradient_<?php echo esc_attr($themeslug);?>"><?php _e('Select Gradient Background', 'cmp-coming-soon-maintenance');?></label><br>
207
-
208
- <select name="niteoCS_gradient_<?php echo esc_attr($themeslug);?>" class="background-gradient">
209
- <option value="#d53369:#cbad6d" <?php if ( $niteoCS_gradient == '#d53369:#cbad6d' ) { echo ' selected="selected"'; } ?>><?php _e('Blury Beach', 'cmp-coming-soon-maintenance');?></option>
210
- <option value="#FC354C:#0ABFBC" <?php if ( $niteoCS_gradient == '#FC354C:#0ABFBC' ) { echo ' selected="selected"'; } ?>><?php _e('Miaka', 'cmp-coming-soon-maintenance');?></option>
211
- <option value="#C04848:#480048" <?php if ( $niteoCS_gradient == '#C04848:#480048' ) { echo ' selected="selected"'; } ?>><?php _e('Influenza', 'cmp-coming-soon-maintenance');?></option>
212
- <option value="#5f2c82:#49a09d" <?php if ( $niteoCS_gradient == '#5f2c82:#49a09d' ) { echo ' selected="selected"'; } ?>><?php _e('Calm Darya', 'cmp-coming-soon-maintenance');?></option>
213
- <option value="#5C258D:#4389A2" <?php if ( $niteoCS_gradient == '#5C258D:#4389A2' ) { echo ' selected="selected"'; } ?>><?php _e('Shroom Haze', 'cmp-coming-soon-maintenance');?></option>
214
- <option value="#1D2B64:#F8CDDA" <?php if ( $niteoCS_gradient == '#1D2B64:#F8CDDA' ) { echo ' selected="selected"'; } ?>><?php _e('Purlple Paradise', 'cmp-coming-soon-maintenance');?></option>
215
- <option value="#1A2980:#26D0CE" <?php if ( $niteoCS_gradient == '#1A2980:#26D0CE' ) { echo ' selected="selected"'; } ?>><?php _e('Aqua Marine', 'cmp-coming-soon-maintenance');?></option>
216
- <option value="#FF512F:#DD2476" <?php if ( $niteoCS_gradient == '#FF512F:#DD2476' ) { echo ' selected="selected"'; } ?>><?php _e('Bloody Mary', 'cmp-coming-soon-maintenance');?></option>
217
- <option value="#E55D87:#5FC3E4" <?php if ( $niteoCS_gradient == '#E55D87:#5FC3E4' ) { echo ' selected="selected"'; } ?>><?php _e('Rose Water', 'cmp-coming-soon-maintenance');?></option>
218
- <option value="#003973:#E5E5BE" <?php if ( $niteoCS_gradient == '#003973:#E5E5BE' ) { echo ' selected="selected"'; } ?>><?php _e('Horizon', 'cmp-coming-soon-maintenance');?></option>
219
- <option value="#e52d27:#b31217" <?php if ( $niteoCS_gradient == '#e52d27:#b31217' ) { echo ' selected="selected"'; } ?>><?php _e('Youtube', 'cmp-coming-soon-maintenance');?></option>
220
- <option value="#FC466B:#3F5EFB" <?php if ( $niteoCS_gradient == '#FC466B:#3F5EFB' ) { echo ' selected="selected"'; } ?>><?php _e('Sublime Vivid', 'cmp-coming-soon-maintenance');?></option>
221
- <option value="#ED5565:#D62739" <?php if ( $niteoCS_gradient == '#ED5565:#D62739' ) { echo ' selected="selected"'; } ?>><?php _e('Red', 'cmp-coming-soon-maintenance');?></option>
222
- <option value="#FC6E51:#DB391E" <?php if ( $niteoCS_gradient == '#FC6E51:#DB391E' ) { echo ' selected="selected"'; } ?>><?php _e('Orange', 'cmp-coming-soon-maintenance');?></option>
223
- <option value="#FFDA7C:#F6A742" <?php if ( $niteoCS_gradient == '#FFDA7C:#F6A742' ) { echo ' selected="selected"'; } ?>><?php _e('Yellow', 'cmp-coming-soon-maintenance');?></option>
224
- <option value="#A0D468:#6EAF26" <?php if ( $niteoCS_gradient == '#A0D468:#6EAF26' ) { echo ' selected="selected"'; } ?>><?php _e('Green', 'cmp-coming-soon-maintenance');?></option>
225
- <option value="#48CFAD:#19A784" <?php if ( $niteoCS_gradient == '#48CFAD:#19A784' ) { echo ' selected="selected"'; } ?>><?php _e('Green Pastel', 'cmp-coming-soon-maintenance');?></option>
226
- <option value="#4FC1E9:#0B9BD0" <?php if ( $niteoCS_gradient == '#4FC1E9:#0B9BD0' ) { echo ' selected="selected"'; } ?>><?php _e('Sky blue', 'cmp-coming-soon-maintenance');?></option>
227
- <option value="#5D9CEC:#0D65D8" <?php if ( $niteoCS_gradient == '#5D9CEC:#0D65D8' ) { echo ' selected="selected"'; } ?>><?php _e('Purple', 'cmp-coming-soon-maintenance');?></option>
228
- <option value="#EC87C0:#BF4C90" <?php if ( $niteoCS_gradient == '#EC87C0:#BF4C90' ) { echo ' selected="selected"'; } ?>><?php _e('Violet', 'cmp-coming-soon-maintenance');?></option>
229
- <option value="#EDF1F7:#C9D7E9" <?php if ( $niteoCS_gradient == '#EDF1F7:#C9D7E9' ) { echo ' selected="selected"'; } ?>><?php _e('Light grey', 'cmp-coming-soon-maintenance');?></option>
230
- <option value="#CCD1D9:#8F9AA8" <?php if ( $niteoCS_gradient == '#CCD1D9:#8F9AA8' ) { echo ' selected="selected"'; } ?>><?php _e('Grey', 'cmp-coming-soon-maintenance');?></option>
231
- <option value="#656D78:#2F3640" <?php if ( $niteoCS_gradient == '#656D78:#2F3640' ) { echo ' selected="selected"'; } ?>><?php _e('Dark grey', 'cmp-coming-soon-maintenance');?></option>
232
- <option value="custom" <?php if ( $niteoCS_gradient == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Gradient', 'cmp-coming-soon-maintenance');?></option>
233
- </select><br>
234
-
235
- <p class="custom-gradient" style="display:<?php echo ( $niteoCS_gradient == 'custom' ) ? 'block' : 'none'; ?>">
236
- <label for="niteoCS_banner_gradient_one_<?php echo esc_attr($themeslug);?>"><?php _e('Select first gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
237
- <input type="text" name="niteoCS_banner_gradient_one_<?php echo esc_attr($themeslug);?>" id="niteoCS_gradient_one" value="<?php echo esc_attr( $niteoCS_gradient_one_custom); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
238
- <label for="niteoCS_banner_gradient_two_<?php echo esc_attr($themeslug);?>"><?php _e('Select second gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
239
- <input type="text" name="niteoCS_banner_gradient_two_<?php echo esc_attr($themeslug);?>" id="niteoCS_gradient_two" value="<?php echo esc_attr( $niteoCS_gradient_two_custom); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
240
- </p>
241
-
242
- <div class="gradient-preview" style="background:-moz-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:-webkit-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:linear-gradient(135deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%)"></div>
243
- </fieldset>
244
-
245
- </td>
246
- </tr>
247
-
248
- <?php echo $this->render_settings->submit(); ?>
249
-
250
- </tbody>
251
- </table>
252
 
253
- </div>
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+
4
+ if ( isset( $_POST['niteoCS_overlay_'.$themeslug] ) ) {
5
+ update_option( 'niteoCS_overlay['.$themeslug.']', sanitize_text_field( $_POST['niteoCS_overlay_'.$themeslug] ) );
6
+ }
7
+
8
+ if ( isset( $_POST['niteoCS_overlay_'.$themeslug.'_color'] ) ) {
9
+ update_option( 'niteoCS_overlay['.$themeslug.'][color]', sanitize_hex_color( $_POST['niteoCS_overlay_'.$themeslug.'_color'] ) );
10
+ }
11
+
12
+
13
+ if ( isset( $_POST['niteoCS_overlay_'.$themeslug.'_opacity'] ) ) {
14
+ update_option( 'niteoCS_overlay['.$themeslug.'][opacity]', sanitize_text_field( $_POST['niteoCS_overlay_'.$themeslug.'_opacity'] ) );
15
+ }
16
+
17
+ if ( isset( $_POST['niteoCS_overlay_'.$themeslug.'_gradient'] ) ) {
18
+ update_option('niteoCS_overlay['.$themeslug.'][gradient]', sanitize_text_field( $_POST['niteoCS_overlay_'.$themeslug.'_gradient'] ) );
19
+ }
20
+
21
+ if ( isset( $_POST['niteoCS_overlay_'.$themeslug.'_gradient_one'] ) ) {
22
+ update_option('niteoCS_overlay['.$themeslug.'][gradient_one]', sanitize_hex_color( $_POST['niteoCS_overlay_'.$themeslug.'_gradient_one'] ) );
23
+ }
24
+
25
+ if ( isset( $_POST['niteoCS_overlay_'.$themeslug.'_gradient_two'] ) ) {
26
+ update_option('niteoCS_overlay['.$themeslug.'][gradient_two]', sanitize_hex_color( $_POST['niteoCS_overlay_'.$themeslug.'_gradient_two'] ) );
27
+ }
28
+
29
+ if (isset($_POST['niteoCS_effect_blur_'.$themeslug]) && is_numeric($_POST['niteoCS_effect_blur_'.$themeslug])) {
30
+ update_option('niteoCS_effect_blur['.$themeslug.']', sanitize_text_field($_POST['niteoCS_effect_blur_'.$themeslug]));
31
+ }
32
+
33
+
34
+ $overlay = get_option('niteoCS_overlay['.$themeslug.']', 'disabled');
35
+ $overlay_color = get_option('niteoCS_overlay['.$themeslug.'][color]', '#0a0a0a');
36
+ $overlay_opa = get_option('niteoCS_overlay['.$themeslug.'][opacity]', '0.4');
37
+ $overlay_gradient = get_option('niteoCS_overlay['.$themeslug.'][gradient]', '#d53369:#cbad6d');
38
+ $overlay_gradient_one_custom = get_option('niteoCS_overlay['.$themeslug.'][gradient_one]', '#e5e5e5');
39
+ $overlay_gradient_two_custom = get_option('niteoCS_overlay['.$themeslug.'][gradient_two]', '#e5e5e5');
40
+ $effect_blur = get_option('niteoCS_effect_blur['.$themeslug.']', '0.0');
41
+
42
+ $gradient_array = array(
43
+ '#d53369:#cbad6d' => __('Blury Beach', 'cmp-coming-soon-maintenance'),
44
+ '#FC354C:#0ABFBC' => __('Miaka', 'cmp-coming-soon-maintenance'),
45
+ '#C04848:#480048' => __('Influenza', 'cmp-coming-soon-maintenance'),
46
+ '#5f2c82:#49a09d' => __('Calm Darya', 'cmp-coming-soon-maintenance'),
47
+ '#5C258D:#4389A2' => __('Shroom Haze', 'cmp-coming-soon-maintenance'),
48
+ '#1D2B64:#F8CDDA' => __('Purlple Paradise', 'cmp-coming-soon-maintenance'),
49
+ '#1A2980:#26D0CE' => __('Aqua Marine', 'cmp-coming-soon-maintenance'),
50
+ '#FF512F:#DD2476' => __('Bloody Mary', 'cmp-coming-soon-maintenance'),
51
+ '#E55D87:#5FC3E4' => __('Rose Water', 'cmp-coming-soon-maintenance'),
52
+ '#003973:#E5E5BE' => __('Horizon', 'cmp-coming-soon-maintenance'),
53
+ '#e52d27:#b31217' => __('Youtube', 'cmp-coming-soon-maintenance'),
54
+ '#FC466B:#3F5EFB' => __('Sublime Vivid', 'cmp-coming-soon-maintenance'),
55
+ '#ED5565:#D62739' => __('Red', 'cmp-coming-soon-maintenance'),
56
+ '#FC6E51:#DB391E' => __('Orange', 'cmp-coming-soon-maintenance'),
57
+ '#FFDA7C:#F6A742' => __('Yellow', 'cmp-coming-soon-maintenance'),
58
+ '#A0D468:#6EAF26' => __('Green', 'cmp-coming-soon-maintenance'),
59
+ '#48CFAD:#19A784' => __('Green Pastel', 'cmp-coming-soon-maintenance'),
60
+ '#4FC1E9:#0B9BD0' => __('Sky blue', 'cmp-coming-soon-maintenance'),
61
+ '#5D9CEC:#0D65D8' => __('Purple', 'cmp-coming-soon-maintenance'),
62
+ '#EC87C0:#BF4C90' => __('Violet', 'cmp-coming-soon-maintenance'),
63
+ '#EDF1F7:#C9D7E9' => __('Light grey', 'cmp-coming-soon-maintenance'),
64
+ '#CCD1D9:#8F9AA8' => __('Grey', 'cmp-coming-soon-maintenance'),
65
+ '#656D78:#2F3640' => __('Dark grey', 'cmp-coming-soon-maintenance'),
66
+ );
67
+
68
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
+ <div class="table-wrapper theme-setup background-media">
71
+ <h3><?php _e('Graphic Background', 'cmp-coming-soon-maintenance');?></h3>
72
+ <table class="theme-setup">
73
+ <tbody>
74
+ <tr>
75
+ <th>
76
+ <fieldset>
77
+ <legend class="screen-reader-text">
78
+ <span><?php _e('Banner Settings', 'cmp-coming-soon-maintenance');?></span>
79
+ </legend>
80
+
81
+ <p>
82
+ <label title="Default Banner">
83
+ <input type="radio" class="background-type" name="niteoCS_banner_<?php echo esc_attr( $themeslug );?>" value="2" <?php checked( '2', $banner_type ); ?>>&nbsp;<?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
84
+ </label>
85
+ </p>
86
+
87
+ <p>
88
+ <label title="Custom banner">
89
+ <input type="radio" class="background-type" name="niteoCS_banner_<?php echo esc_attr( $themeslug );?>" value="0" <?php checked( '0', $banner_type ); ?>>&nbsp;<?php _e('Custom Images', 'cmp-coming-soon-maintenance');?>
90
+ </label>
91
+ </p>
92
+
93
+ <p>
94
+ <label title="Unsplash banner">
95
+ <input type="radio" class="background-type" name="niteoCS_banner_<?php echo esc_attr( $themeslug );?>" value="1" <?php checked( '1', $banner_type ); ?>>&nbsp;<?php _e('Unsplash library', 'cmp-coming-soon-maintenance');?>
96
+ </label>
97
+ </p>
98
+ <p>
99
+ <label title="Video Banner">
100
+ <input type="radio" class="background-type" name="niteoCS_banner_<?php echo esc_attr( $themeslug );?>" value="5" <?php checked( '5', $banner_type ); ?>>&nbsp;<?php _e('Video', 'cmp-coming-soon-maintenance');?>
101
+ </label>
102
+ </p>
103
+ <p>
104
+ <label title="Pattern Banner">
105
+ <input type="radio" class="background-type" name="niteoCS_banner_<?php echo esc_attr( $themeslug );?>" value="3" <?php checked( '3', $banner_type ); ?>>&nbsp;<?php _e('Graphic Pattern', 'cmp-coming-soon-maintenance');?>
106
+ </label>
107
+ </p>
108
+ <p>
109
+ <label title="Solid Color Banner">
110
+ <input type="radio" class="background-type" name="niteoCS_banner_<?php echo esc_attr( $themeslug );?>" value="4" <?php checked( '4', $banner_type ); ?>>&nbsp;<?php _e('Solid Color', 'cmp-coming-soon-maintenance');?>
111
+ </label>
112
+ </p>
113
+ <p>
114
+ <label title="Gradient Banner">
115
+ <input type="radio" class="background-type" name="niteoCS_banner_<?php echo esc_attr( $themeslug );?>" value="6" <?php checked( '6', $banner_type ); ?>>&nbsp;<?php _e('Gradient Color', 'cmp-coming-soon-maintenance');?>
116
+ </label>
117
+ </p>
118
+
119
+ </fieldset>
120
+ </th>
121
+
122
+ <td class="theme_background">
123
+
124
+ <!-- DEFAULT BACKGROUND -->
125
+ <fieldset class="background-type-switch default_banner x2">
126
+ <div class="background-thumb-wrapper">
127
+ <img src="<?php echo esc_url( $this->cmp_themeURL( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg' );?>" alt="Default Media">
128
+ <div class="thumbnail-overlay"></div>
129
+ </div>
130
+ </fieldset>
131
+
132
+ <!-- CUSTOM BACKGROUND -->
133
+ <fieldset class="background-type-switch custom_banner x0">
134
 
135
+ <input type="hidden" class="widefat" id="niteoCS-images-id" name="niteoCS_banner_id_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_custom_id ); ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
+ <input id="add-images" type="button" class="button" value="Media Library" />
138
+
139
+ <p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp-coming-soon-maintenance')?></p>
140
+
141
+ <div class="background-thumb-wrapper">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
+ <?php
144
+ if ( isset( $niteoCS_banner_custom_id ) && $niteoCS_banner_custom_id != '' ) {
145
+ $ids = explode( ',', $niteoCS_banner_custom_id );
146
+ } ?>
147
 
148
+ <div class="images-wrapper custom-gallery gallery-<?php echo ( isset( $ids ) && is_array( $ids ) ? count( $ids ) : '1');?>">
149
+ <?php
150
 
151
+ if ( isset( $ids ) && is_array( $ids ) ) {
152
 
153
+ $i = 0;
154
+ foreach ( $ids as $id ) {
155
 
156
+ if ( $i == 0 ) {
157
+ $img = wp_get_attachment_image_src( $id, 'large' ); ?>
158
+ <div class="big-thumb">
159
+ <div class="thumbnail-overlay"></div>
160
+ <?php
161
+ if ( isset ($img[0] ) ) {
162
+ echo '<img src="' . $img[0] . '" alt="">';
163
+ } ?>
164
+ </div>
165
+
166
+ <?php
167
 
168
+ } else {
169
+ $img = wp_get_attachment_image_src( $id, 'medium' );
170
+ if ( isset ($img[0] ) ) {
171
+ echo '<img src="' . $img[0] . '" alt="" class="no-blur">';
172
+ }
173
+ }
174
+
175
+ $i++;
176
+ }
177
+ } else { ?>
178
+ <div class="big-thumb">
179
+ <div class="thumbnail-overlay"></div>
180
+ </div>
181
+ <?php
182
+ } ?>
183
+ </div>
184
+
185
+ </div>
186
+
187
+ <input id="delete-images" type="button" class="button" value="<?php _e('Delete Images', 'cmp-coming-soon-maintenance');?>" style="display:<?php echo ( isset( $ids ) && is_array( $ids ) ) ? 'block' : 'none';?>"/>
188
+
189
+ </fieldset>
190
+
191
+ <!-- UNSPLASH BACKGROUND -->
192
+ <fieldset class="background-type-switch unsplash_banner x1">
193
+
194
+ <label for="unsplash_feed_<?php echo esc_attr( $themeslug );?>"><?php _e('Choose Unsplash Feed', 'cmp-coming-soon-maintenance');?></label><br>
195
+ <select name="unsplash_feed_<?php echo esc_attr( $themeslug );?>">
196
+
197
+ <option value="3" <?php selected( '3', $niteoCS_unsplash_feed ); ?>><?php _e('Random Photo', 'cmp-coming-soon-maintenance');?></option>
198
+
199
+ <option value="0" <?php selected( '0', $niteoCS_unsplash_feed ); ?>><?php _e('Specific Photo', 'cmp-coming-soon-maintenance');?></option>
200
+
201
+ <option value="2" <?php selected( '2', $niteoCS_unsplash_feed ); ?>><?php _e('Random from Collection', 'cmp-coming-soon-maintenance');?></option>
202
+
203
+ <option value="1" <?php selected( '1', $niteoCS_unsplash_feed ); ?>><?php _e('Random from User', 'cmp-coming-soon-maintenance');?></option>
204
+
205
+ </select>
206
+
207
+ <p class="unsplash-feed" id="unsplash-feed-0">
208
+ <label for="niteoCS_unsplash_0_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Unsplash Photo URL or Unsplash Photo ID', 'cmp-coming-soon-maintenance');?></label>
209
+ <input type="text" class="widefat" id="niteoCS-unsplash-0" name="niteoCS_unsplash_0_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_0 ); ?>" />
210
+ </p>
211
+
212
+ <p class="unsplash-feed" id="unsplash-feed-2">
213
+ <label for="niteoCS_unsplash_2_<?php echo esc_attr( $themeslug );?>"><?php printf(__('Enter <a href="%s">Unsplash Collection</a> URL or Collection ID.', 'cmp-coming-soon-maintenance'), 'https://unsplash.com/collections/');?></label>
214
+ <input type="text" class="widefat" id="niteoCS-unsplash-2" name="niteoCS_unsplash_2_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_2 ); ?>" />
215
+ </p>
216
+
217
+ <p><div class="unsplash-feed" id="unsplash-feed-3">
218
+ <label for="niteoCS_unsplash_3_<?php echo esc_attr( $themeslug );?>"><?php _e('Limit photos to specific keyword (fashion, nature, technology..)', 'cmp-coming-soon-maintenance');?></label>
219
+ <input type="text" class="widefat" id="niteoCS-unsplash-3" name="niteoCS_unsplash_3_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_3 ); ?>" />
220
+
221
+ <br><br>
222
+
223
+ <input type="checkbox" name="niteoCS_unsplash_feat_<?php echo esc_attr( $themeslug );?>" id="niteoCS_unsplash_feat" value="1" <?php checked( '1', get_option( 'niteoCS_unsplash_feat['.esc_attr( $themeslug ).']', '0' ) ); ?> class="regular-text code"><label for="niteoCS_unsplash_feat"><?php _e('Only Unsplash Featured Photos', 'cmp-coming-soon-maintenance');?></label>
224
+ </div></p>
225
+
226
+ <p class="unsplash-feed" id="unsplash-feed-1">
227
+ <label for="niteoCS_unsplash_1_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Unsplash User ID', 'cmp-coming-soon-maintenance');?></label>
228
+ <input type="text" class="widefat" id="niteoCS-unsplash-1" name="niteoCS_unsplash_1_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_1 ); ?>" placeholder="@"/>
229
+ </p>
230
+
231
+ <button id="test-unsplash" class="button" data-security="<?php echo esc_attr( $ajax_nonce );?>"><?php _e('Display Unsplash Photo', 'cmp-coming-soon-maintenance');?></button>
232
+
233
+ <div class="background-thumb-wrapper">
234
+ <div id="unsplash-media">
235
+ <div class="thumbnail-overlay"></div>
236
+ </div>
237
+
238
+ </div>
239
+
240
+ <p class="unplash-description"><a href="http://unsplash.com" target="_blank">Unsplash</a> <?php _e('is a world leading source for free to use high quality stock images. All of the images that are submitted and published on Unsplash fall under under the <a href="https://unsplash.com/license"> Unsplash license</a>, which means you can use the image for any personal or commercial use.', 'cmp-coming-soon-maintenance');?></p>
241
+
242
+ </fieldset>
243
+
244
+
245
+ <!-- VIDEO BACKGROUND -->
246
+ <fieldset class="background-type-switch video_banner x5">
247
+ <label for="niteoCS_banner_video_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Video Source', 'cmp-coming-soon-maintenance');?></label><br>
248
+
249
+ <select name="niteoCS_banner_video_<?php echo esc_attr( $themeslug );?>" class="banner-video-source">
250
+ <option value="youtube" <?php selected( 'youtube', $niteoCS_banner_video ); ?>><?php _e('YouTube', 'cmp-coming-soon-maintenance');?></option>
251
+ <option value="local" <?php selected( 'local', $niteoCS_banner_video ); ?>><?php _e('Custom Video File', 'cmp-coming-soon-maintenance');?></option>
252
+ <option disabled value="vimeo" <?php selected( 'vimeo', $niteoCS_banner_video ); ?>><?php _e('Vimeo (coming soon...)', 'cmp-coming-soon-maintenance');?></option>
253
+ </select><br>
254
+
255
+
256
+ <p class="banner-video-source youtube">
257
+ <label for="niteoCS_youtube_url_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Youtube URL', 'cmp-coming-soon-maintenance');?></label>
258
+ <input type="text" class="widefat" id="niteoCS-youtube-url" name="niteoCS_youtube_url_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_youtube_url ); ?>" />
259
+
260
+ </p>
261
+
262
+ <p class="banner-video-source vimeo">
263
+ <label for="niteoCS_vimeo_url_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Vimeo URL', 'cmp-coming-soon-maintenance');?></label>
264
+ <input type="text" class="widefat" id="niteoCS-vimeo-url" name="niteoCS_vimeo_url_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_vimeo_url ); ?>" />
265
+ </p>
266
+
267
+ <p class="banner-video-source local">
268
+ <label for="niteoCS_file_url_<?php echo esc_attr( $themeslug );?>"><?php _e('Select or Upload custom Video file', 'cmp-coming-soon-maintenance');?></label>
269
+ <input id="add-video-local" type="button" class="button" value="Media Library"/>
270
+ <input type="hidden" class="widefat" id="niteoCS-video-local-id" name="niteoCS_video_file_url<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_video_file_url ); ?>" data-url="<?php echo esc_url( wp_get_attachment_url( $niteoCS_video_file_url ) ); ?>"/>
271
+ </p>
272
+
273
+ <!-- Local video image -->
274
+ <div class="banner-video-source local">
275
+
276
+ <div class="video-local-wrapper background-thumb-wrapper">
277
+ <div class="thumbnail-overlay"></div>
278
+ </div>
279
+
280
+ <p class="file-source-input">
281
+ <input id="delete-video" type="button" class="button" value="Remove Video" style="display:none"/>
282
+ </p>
283
+
284
+ </div>
285
+
286
+ <!-- YouTube video image -->
287
+ <div class="banner-video-source youtube">
288
+ <div class="video-yt-wrapper">
289
+ <div class="video-yt-thumb-wrapper background-thumb-wrapper"></div>
290
+ <div class="thumbnail-overlay"></div>
291
+ </div>
292
+ </div>
293
+
294
+ <!-- Video mobile Thumbnail -->
295
+ <div class="banner-video-source youtube local">
296
+
297
+ <p><?php _e('Video backgrounds doesn`t work on mobile devices therefore only thumbnail video image will be displayed on mobile devices. Upload custom thumbnail image by pressing button below. ', 'cmp-coming-soon-maintenance');?></p>
298
+ <input type="hidden" class="widefat" id="niteoCS-video-thumb-id" name="niteoCS_video_thumb_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_video_thumb ); ?>" />
299
+ <input id="add-video-thumb" type="button" class="button" value="<?php _e('Media Library', 'cmp-coming-soon-maintenance');?>" /><br><br>
300
+
301
+ <div class="video-thumb-wrapper background-thumb-wrapper">
302
+ <?php
303
+ if ( isset( $niteoCS_video_thumb ) && $niteoCS_video_thumb != '' ) {
304
+ $img = wp_get_attachment_image_src( $niteoCS_video_thumb, 'large' );
305
+ if ( isset( $img[0] ) ) {
306
+ echo '<img src="' .$img[0] . '" alt="">';
307
+ }
308
+
309
+ }
310
+ ?>
311
+ <div class="thumbnail-overlay"></div>
312
+ </div>
313
+
314
+ <input id="delete-video-thumb" type="button" class="button" value="Remove Thumbnail" />
315
+ </div>
316
+
317
+ </fieldset>
318
+
319
+ <!-- PATTERN BACKGROUND -->
320
+ <fieldset class="background-type-switch graphic_pattern x3">
321
+ <label for="niteoCS_banner_pattern_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Pattern', 'cmp-coming-soon-maintenance');?></label><br>
322
+ <select name="niteoCS_banner_pattern_<?php echo esc_attr( $themeslug );?>" data-url="<?php echo esc_url(WP_PLUGIN_URL . '/cmp-coming-soon-maintenance/img/patterns/');?>">
323
+ <?php
324
+ foreach ( $patterns as $pattern ) { ?>
325
+ <option value="<?php echo esc_attr( $pattern );?>" <?php selected( $pattern, $niteoCS_banner_pattern ); ?>><?php echo esc_html(ucfirst(str_replace('_', ' ', $pattern)));?></option>
326
+ <?php
327
+ } ?>
328
+ <option value="custom" <?php selected( 'custom', $niteoCS_banner_pattern ); ?>><?php _e('Custom Pattern...', 'cmp-coming-soon-maintenance');?></option>
329
+ </select><br>
330
+
331
+ <input type="hidden" class="widefat" id="niteoCS-pattern-id" name="niteoCS_banner_pattern_custom_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_pattern_custom ); ?>" />
332
+
333
+ <input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ( $niteoCS_banner_pattern == 'custom' ) ? 'block' : 'none'?>;"/>
334
+
335
+ <div class="pattern-wrapper background-thumb-wrapper" style="background-image: url('<?php echo esc_url($pattern_url);?>');">
336
+ <div class="thumbnail-overlay"></div>
337
+ </div>
338
+ </fieldset>
339
+
340
+ <!-- SOLID COLOR BACKGROUND -->
341
+ <fieldset class="background-type-switch solid_color x4">
342
+ <label for="niteoCS_banner_color_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Color', 'cmp-coming-soon-maintenance');?></label><br>
343
+ <input type="text" name="niteoCS_banner_color_<?php echo esc_attr( $themeslug );?>" id="niteoCS_banner_color" value="<?php echo esc_attr( $niteoCS_banner_color ); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
344
+ <div class="color-preview" style="background-color:<?php echo esc_attr( $niteoCS_banner_color); ?>"></div>
345
+ </fieldset>
346
+
347
+ <!-- GRADIENT BACKGROUND -->
348
+ <fieldset class="background-type-switch gradient_background x6">
349
+
350
+ <label for="niteoCS_gradient_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Gradient Background', 'cmp-coming-soon-maintenance');?></label><br>
351
+
352
+ <select name="niteoCS_gradient_<?php echo esc_attr( $themeslug );?>" class="background-gradient">
353
+ <?php
354
 
355
+ foreach ( $gradient_array as $color => $name ) { ?>
356
+ <option value="<?php echo esc_attr( $color );?>" <?php selected ($color, $niteoCS_gradient ); ?>><?php echo esc_attr( $name );?></option>
357
+ <?php
358
+ } ?>
359
 
360
+ <option value="custom" <?php selected('custom', $niteoCS_gradient); ?>><?php _e('Custom Gradient', 'cmp-coming-soon-maintenance');?></option>
 
 
 
361
 
362
+ </select><br>
 
 
 
363
 
364
+ <p class="custom-gradient" style="display:<?php echo ( $niteoCS_gradient == 'custom' ) ? 'block' : 'none'; ?>">
365
+ <label for="niteoCS_banner_gradient_one_<?php echo esc_attr( $themeslug );?>"><?php _e('Select first gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
366
+ <input type="text" name="niteoCS_banner_gradient_one_<?php echo esc_attr( $themeslug );?>" id="niteoCS_gradient_one" value="<?php echo esc_attr( $niteoCS_gradient_one_custom); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
367
+ <label for="niteoCS_banner_gradient_two_<?php echo esc_attr( $themeslug );?>"><?php _e('Select second gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
368
+ <input type="text" name="niteoCS_banner_gradient_two_<?php echo esc_attr( $themeslug );?>" id="niteoCS_gradient_two" value="<?php echo esc_attr( $niteoCS_gradient_two_custom); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
369
+ </p>
370
 
371
+ <div class="gradient-preview" style="background:-moz-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:-webkit-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:linear-gradient(135deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%)"></div>
372
+ </fieldset>
373
 
 
 
374
 
375
+ <!-- BACKGROUND OVERLAY SETTINGS -->
376
+ <div class="background-type-switch x0 x1 x2 x3 x5">
 
 
377
 
378
+ <fieldset>
379
+ <legend class="screen-reader-text">
380
+ <span><?php _e('Background Overlay', 'cmp-coming-soon-maintenance');?></span>
381
+ </legend>
 
 
 
382
 
383
+ <label for="unsplash_feed_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Background Overlay', 'cmp-coming-soon-maintenance');?></label><br>
 
 
384
 
385
+ <select name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>" class="background-overlay">
386
+
387
+ <option value="solid-color" <?php selected( 'solid-color', $overlay ); ?>><?php _e('Solid Color', 'cmp-coming-soon-maintenance');?></option>
388
+
389
+ <option value="gradient" <?php selected( 'gradient', $overlay ); ?>><?php _e('Gradient', 'cmp-coming-soon-maintenance');?></option>
390
+
391
+ <option value="disabled" <?php selected( 'disabled', $overlay ); ?>><?php _e('Disabled', 'cmp-coming-soon-maintenance');?></option>
392
+
393
+ </select>
394
+
395
+ </fieldset>
396
+
397
+
398
+ <!-- BACKGROUND OVERLAY SOLID COLOR -->
399
+ <fieldset class="background-overlay solid-color">
400
+ <p><?php _e('Background Overlay Color', 'cmp-coming-soon-maintenance');?></p>
401
+ <input type="text" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_color" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color ); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
402
+ </fieldset>
403
+
404
+ <!-- BACKGROUND OVERLAY GRADIENT -->
405
+ <fieldset class="background-overlay gradient">
406
+
407
+ <label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient"><?php _e('Select Gradient Overlay', 'cmp-coming-soon-maintenance');?></label><br>
408
+
409
+ <select name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient" class="overlay-gradient">
410
+ <?php
411
+
412
+ foreach ( $gradient_array as $color => $name ) { ?>
413
+ <option value="<?php echo esc_attr( $color );?>" <?php selected ( $color, $overlay_gradient ); ?>><?php echo esc_attr( $name );?></option>
414
  <?php
415
+ } ?>
 
 
 
 
 
 
 
416
 
417
+ <option value="custom" <?php selected('custom', $overlay_gradient); ?>><?php _e('Custom Gradient', 'cmp-coming-soon-maintenance');?></option>
418
+
419
+ </select><br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
 
421
+ <p class="custom-overlay-gradient" style="display:<?php echo ( $overlay_gradient == 'custom' ) ? 'block' : 'none'; ?>">
422
+
423
+ <label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_one"><?php _e('Select first gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
424
+
425
+ <input type="text" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_one" value="<?php echo esc_attr( $overlay_gradient_one_custom); ?>" id="niteoCS_overlay_gradient_one" data-default-color="#e5e5e5" class="regular-text code"><br>
426
+
427
+ <label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_two"><?php _e('Select second gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
428
+
429
+ <input type="text" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_two" value="<?php echo esc_attr( $overlay_gradient_two_custom); ?>" id="niteoCS_overlay_gradient_two" data-default-color="#e5e5e5" class="regular-text code"><br>
430
+
431
+ </p>
432
+
433
+ </fieldset>
434
+ </fieldset>
435
+
436
+ <fieldset class="background-overlay solid-color gradient">
437
+ <label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_opacity"><?php _e('Background Overlay Opacity', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $overlay_opa ); ?></span></label><br>
438
+ <input type="range" class="background-overlay-opacity" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_opacity" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opa ); ?>" />
439
+ </fieldset>
440
+
441
+
442
+ <fieldset class="background-effect blur">
443
+
444
+ <label for="niteoCS_effect_blur_<?php echo esc_attr( $themeslug );?>"><?php _e('Background Blur Amount', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $effect_blur ); ?></span>px</label></br>
445
+ <input type="range" class="blur-range" name="niteoCS_effect_blur_<?php echo esc_attr( $themeslug );?>" min="0.0" max="10" step="0.5" value="<?php echo esc_attr( $effect_blur ); ?>" />
446
+ </fieldset>
447
+
448
+ </div>
449
+
450
+ </td>
451
+ </tr>
452
+
453
+ <?php echo $this->render_settings->submit(); ?>
454
+
455
+ </tbody>
456
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
 
458
+ </div>
inc/settings/settings-background_effects.php DELETED
@@ -1,64 +0,0 @@
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_disabled.php → settings-contact_form-disabled.php} RENAMED
File without changes
inc/settings/settings-contact_form.php CHANGED
@@ -59,7 +59,7 @@ $contact_form_label = get_option('niteoCS_contact_form_label', 'Get in Touch')
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
 
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( stripslashes( $contact_form_label ) );?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
63
  </label>
64
 
65
 
inc/settings/{settings-counter_disabled.php → settings-counter-disabled.php} RENAMED
File without changes
inc/settings/{settings-footer_disabled.php → settings-footer-disabled.php} RENAMED
File without changes
inc/settings/{settings-logo_disabled.php → settings-logo-disabled.php} RENAMED
File without changes
inc/settings/{settings-slider_disabled.php → settings-slider-disabled.php} RENAMED
File without changes
inc/settings/settings-slider.php CHANGED
@@ -8,7 +8,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
8
  }
9
  }
10
 
11
-
12
  if (isset($_POST['niteoCS_slider_'.$themeslug]) && is_numeric($_POST['niteoCS_slider_'.$themeslug])) {
13
  update_option('niteoCS_slider['.$themeslug.']', sanitize_text_field($_POST['niteoCS_slider_'.$themeslug]));
14
  }
@@ -51,13 +50,13 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
51
 
52
  <p>
53
  <label title="Enabled">
54
- <input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $niteoCS_slider == 1 ) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
55
  </label>
56
  </p>
57
 
58
  <p>
59
  <label title="Disabled">
60
- <input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_slider == 0 ) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
61
  </label>
62
  </p>
63
 
@@ -77,18 +76,18 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
77
  <p>
78
  <label for="niteoCS_slider_effect">Slider Effect</label><br>
79
  <label title="Slide Effect">
80
- <input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="false"<?php if ( $niteoCS_slider_effect == 'false') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Slide', 'cmp-coming-soon-maintenance');?>
81
  </label><br>
82
 
83
  <label title="Fade Effect">
84
- <input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="true"<?php if ( $niteoCS_slider_effect == 'true') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Fade', 'cmp-coming-soon-maintenance');?>
85
  </label>
86
 
87
  <?php
88
  // include Slice option for slider
89
  if ( $this->cmp_selectedTheme() == 'fifty' ) { ?>
90
  <br><label title="Slice Effect">
91
- <input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="slice"<?php if ( $niteoCS_slider_effect == 'slice') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Slice', 'cmp-coming-soon-maintenance');?>
92
  </label>
93
  <?php
94
  } ?>
@@ -96,7 +95,7 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
96
  </p>
97
 
98
  <p>
99
- <input type="checkbox" name="niteoCS_slider_auto_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> id="niteoCS_slider_auto" value="1" <?php checked( '1', get_option( 'niteoCS_slider_auto['.$themeslug.']', '0' ) ); ?> class="regular-text code"><label for="niteoCS_slider_auto"><?php _e('Slider Autostart', 'cmp-coming-soon-maintenance');?></label><br>
100
  </p>
101
 
102
  <label for="niteoCS_slider_count"><?php _e('Number of Unplash media Slides (applies only for Unsplash photos)', 'cmp-coming-soon-maintenance');?></label></br>
8
  }
9
  }
10
 
 
11
  if (isset($_POST['niteoCS_slider_'.$themeslug]) && is_numeric($_POST['niteoCS_slider_'.$themeslug])) {
12
  update_option('niteoCS_slider['.$themeslug.']', sanitize_text_field($_POST['niteoCS_slider_'.$themeslug]));
13
  }
50
 
51
  <p>
52
  <label title="Enabled">
53
+ <input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="1"<?php checked ( 1, $niteoCS_slider ); ?>>&nbsp;<?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
54
  </label>
55
  </p>
56
 
57
  <p>
58
  <label title="Disabled">
59
+ <input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="0"<?php checked ( 0, $niteoCS_slider )?>;>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
60
  </label>
61
  </p>
62
 
76
  <p>
77
  <label for="niteoCS_slider_effect">Slider Effect</label><br>
78
  <label title="Slide Effect">
79
+ <input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="false"<?php checked ( 'false', $niteoCS_slider_effect );?>>&nbsp;<?php _e('Slide', 'cmp-coming-soon-maintenance');?>
80
  </label><br>
81
 
82
  <label title="Fade Effect">
83
+ <input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="true"<?php checked ( 'true', $niteoCS_slider_effect );?>>&nbsp;<?php _e('Fade', 'cmp-coming-soon-maintenance');?>
84
  </label>
85
 
86
  <?php
87
  // include Slice option for slider
88
  if ( $this->cmp_selectedTheme() == 'fifty' ) { ?>
89
  <br><label title="Slice Effect">
90
+ <input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="slice"<?php checked ( 'slice', $niteoCS_slider_effect );?>>&nbsp;<?php _e('Slice', 'cmp-coming-soon-maintenance');?>
91
  </label>
92
  <?php
93
  } ?>
95
  </p>
96
 
97
  <p>
98
+ <input type="checkbox" name="niteoCS_slider_auto_<?php echo esc_attr( $themeslug );?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> id="niteoCS_slider_auto" value="1" <?php checked( '1', $niteoCS_slider_auto ); ?> class="regular-text code"><label for="niteoCS_slider_auto"><?php _e('Slider Autostart', 'cmp-coming-soon-maintenance');?></label><br>
99
  </p>
100
 
101
  <label for="niteoCS_slider_count"><?php _e('Number of Unplash media Slides (applies only for Unsplash photos)', 'cmp-coming-soon-maintenance');?></label></br>
inc/settings/settings-special_effects-disabled.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+ ?>
4
+
5
+ <div class="table-wrapper theme-setup wrapper-disabled closed">
6
+ <h3><?php _e('Special Effects', 'cmp-coming-soon-maintenance');?></h3>
7
+ <table class="theme-setup">
8
+ <tbody>
9
+ <tr>
10
+ <th>
11
+ <fieldset>
12
+ <legend class="screen-reader-text">
13
+ <span><?php _e('Special Effects', 'cmp-coming-soon-maintenance');?></span>
14
+ </legend>
15
+
16
+ <p>
17
+ <label title="Constellation">
18
+ <input disabled type="radio" class="special-effect" name="niteoCS_special_effect_<?php echo esc_attr( $themeslug );?>" value="constellation">&nbsp;<?php _e('Constellation', 'cmp-coming-soon-maintenance');?>
19
+ </label>
20
+ </p>
21
+
22
+ <p>
23
+ <label title="Disabled">
24
+ <input disabled type="radio" class="special-effect" name="niteoCS_special_effect_<?php echo esc_attr( $themeslug );?>" checked="checked" value="disabled">&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
25
+ </label>
26
+ </p>
27
+
28
+ </fieldset>
29
+ </th>
30
+
31
+ <td>
32
+ <fieldset class="special-effect-switch disabled">
33
+ <p><?php _e('Special Effects are disabled or they are not supported by selected Theme.', 'cmp-coming-soon-maintenance')?></p>
34
+
35
+ </fieldset>
36
+
37
+ </td>
38
+ </tr>
39
+
40
+ <?php echo $this->render_settings->submit(); ?>
41
+
42
+ </tbody>
43
+ </table>
44
+ </div>
inc/settings/settings-special_effects.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+
4
+ if ( isset( $_POST['niteoCS_special_effect_'.$themeslug] ) ) {
5
+ update_option( 'niteoCS_special_effect['.$themeslug.']', sanitize_text_field($_POST['niteoCS_special_effect_'.$themeslug]) );
6
+ }
7
+
8
+ if ( isset( $_POST['niteoCS_constellation_color_'.$themeslug] ) ) {
9
+ update_option( 'niteoCS_special_effect['.$themeslug.'][constellation][color]', sanitize_text_field($_POST['niteoCS_constellation_color_'.$themeslug]) );
10
+ }
11
+
12
+ $special_effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
13
+ $constellation_color = get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff');
14
+
15
+ ?>
16
+
17
+ <div class="table-wrapper theme-setup special-effects">
18
+ <h3><?php _e('Special Effects', 'cmp-coming-soon-maintenance');?></h3>
19
+ <table class="theme-setup">
20
+ <tbody>
21
+ <tr>
22
+ <th>
23
+ <fieldset>
24
+ <legend class="screen-reader-text">
25
+ <span><?php _e('Special Effects', 'cmp-coming-soon-maintenance');?></span>
26
+ </legend>
27
+
28
+ <p>
29
+ <label title="Constellation">
30
+ <input type="radio" class="special-effect" name="niteoCS_special_effect_<?php echo esc_attr( $themeslug );?>" value="constellation" <?php checked( 'constellation', $special_effect );?>>&nbsp;<?php _e('Constellation', 'cmp-coming-soon-maintenance');?>
31
+ </label>
32
+ </p>
33
+
34
+ <p>
35
+ <label title="Disabled">
36
+ <input type="radio" class="special-effect" name="niteoCS_special_effect_<?php echo esc_attr( $themeslug );?>" value="disabled" <?php checked( 'disabled', $special_effect );?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
37
+ </label>
38
+ </p>
39
+
40
+ </fieldset>
41
+ </th>
42
+
43
+ <td>
44
+ <fieldset class="special-effect-switch disabled">
45
+ <p><?php _e('Disabled', 'cmp-coming-soon-maintenance')?></p>
46
+
47
+ </fieldset>
48
+
49
+ <fieldset class="special-effect-switch constellation">
50
+ <label for="niteoCS_constellation_color_<?php echo esc_attr( $themeslug );?>"><?php _e('Constellation color', 'cmp-coming-soon-maintenance');?></label><br><br>
51
+ <input type="text" name="niteoCS_constellation_color_<?php echo esc_attr( $themeslug );?>" id="niteoCS_constellation_color" value="<?php echo esc_attr( $constellation_color ); ?>" data-default-color="#ffffff" class="regular-text code"><br>
52
+
53
+
54
+ </fieldset>
55
+
56
+ </td>
57
+ </tr>
58
+
59
+ <?php echo $this->render_settings->submit(); ?>
60
+
61
+ </tbody>
62
+ </table>
63
+
64
+ </div>
65
+
66
+ <script>
67
+ jQuery(document).ready(function($){
68
+ // ini color picker
69
+ jQuery('#niteoCS_constellation_color').wpColorPicker();
70
+ });
71
+ </script>
inc/settings/{settings-subscribe_disabled.php → settings-subscribe-disabled.php} RENAMED
@@ -14,8 +14,8 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
14
  </legend>
15
 
16
  <p>
17
- <label title="Niteo Subscribe">
18
- <input disabled type="radio" name="niteoCS_subscribe_type" value="2">&nbsp;<?php _e('Niteo Subscribe', 'cmp-coming-soon-maintenance');?>
19
  </label>
20
  </p>
21
 
14
  </legend>
15
 
16
  <p>
17
+ <label title="CMP Subscribe Form">
18
+ <input disabled type="radio" name="niteoCS_subscribe_type" value="2">&nbsp;<?php _e('CMP Subscribe Form', 'cmp-coming-soon-maintenance');?>
19
  </label>
20
  </p>
21
 
inc/settings/settings-subscribe.php CHANGED
@@ -27,6 +27,15 @@ if (isset($_POST['niteoCS_mailchimp_list_selected'])) {
27
  update_option('niteoCS_mailchimp_list_selected', sanitize_text_field($_POST['niteoCS_mailchimp_list_selected']));
28
  }
29
 
 
 
 
 
 
 
 
 
 
30
 
31
  // delete_option('niteoCS_mailchimp_lists');
32
 
@@ -55,8 +64,8 @@ $mailchimp_lists = json_decode(get_option('niteoCS_mailchimp_lists', false),
55
  </legend>
56
 
57
  <p>
58
- <label title="Niteo Subscribe">
59
- <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');?>
60
  </label>
61
  </p>
62
 
@@ -87,14 +96,7 @@ $mailchimp_lists = json_decode(get_option('niteoCS_mailchimp_lists', false),
87
 
88
  <p><?php _e('You can find Shortode in your Contact Form Plugin settings. Should be something similar to code below: ', 'cmp-coming-soon-maintenance');?><br><code>[contact-form-7 id="8" title='Contact form 1']</code> or <code>[mc4wp_form id='7']</code></p>
89
 
90
- <p><?php _e('Your Subscribe Form should have only one input (type=email) and submit (input=submit). If you have more than one input field, our design will not work and you need to use custom CSS to style your Subscribe form.', 'cmp-coming-soon-maintenance');?></p>
91
- <p><?php _e('Example of Subscribe Form code for ', 'cmp-coming-soon-maintenance');?><a href="https://wordpress.org/plugins/mailchimp-for-wp/">MailChimp</a> plugin:</p>
92
- <code>
93
- &lt;p&gt
94
- &lt;input type="email" name="EMAIL" placeholder="Your email address" required />
95
- &lt;input type="submit" value="Sign up" />
96
- &lt;/p&gt
97
- </code>
98
  </fieldset>
99
  </td>
100
 
@@ -128,30 +130,33 @@ $mailchimp_lists = json_decode(get_option('niteoCS_mailchimp_lists', false),
128
 
129
  <p><?php printf(__('You can find or create new API key in your %s.', 'cmp-coming-soon-maintenance'), '<a href="https://admin.mailchimp.com/account/api/" target="_blank">MailChimp Account</a>'); ?></p>
130
 
 
131
 
132
- <label for="niteoCS_mailchimp_list"><?php _e('Select MailChimp List to store emails.', 'cmp-coming-soon-maintenance');?>
 
 
133
 
134
- <select name="niteoCS_mailchimp_list_selected" id="mailchimp-lists-select">
135
- <?php
136
- if ( is_array( $mailchimp_lists ) ) {
137
-
138
- if ( $mailchimp_lists['response'] == 200 ) {
139
- foreach ( $mailchimp_lists['lists'] as $list) { ?>
140
- <option value="<?php echo esc_attr( $list['id'] );?>" <?php selected( $list['id'], $mailchimp_list_selected ); ?>><?php echo esc_attr( $list['name'] );?></option>
141
- <?php
142
- }
143
- } else { ?>
144
- <option value="error"><?php echo esc_attr( $mailchimp_lists['response'] . ': ' . $mailchimp_lists['message']);?></option>
145
  <?php
146
  }
147
-
148
  } else { ?>
149
- <option value="error"><?php _e('Please insert MailChimp API key to retrieve Lists.', 'cmp-coming-soon-maintenance');?></option>
150
  <?php
151
- } ?>
152
- </select>
 
 
 
 
 
 
 
 
 
153
 
154
- </label>
155
 
156
  </div>
157
 
27
  update_option('niteoCS_mailchimp_list_selected', sanitize_text_field($_POST['niteoCS_mailchimp_list_selected']));
28
  }
29
 
30
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
31
+
32
+ if ( isset($_POST['niteoCS_mailchimp_double_opt']) ) {
33
+ update_option('niteoCS_mailchimp[double-opt]', $this->sanitize_checkbox($_POST['niteoCS_mailchimp_double_opt']));
34
+ } else {
35
+ update_option('niteoCS_mailchimp[double-opt]', false);
36
+ }
37
+ }
38
+
39
 
40
  // delete_option('niteoCS_mailchimp_lists');
41
 
64
  </legend>
65
 
66
  <p>
67
+ <label title="CMP Subscribe Form">
68
+ <input type="radio" class="subscribe" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('CMP Subscribe Form', 'cmp-coming-soon-maintenance');?>
69
  </label>
70
  </p>
71
 
96
 
97
  <p><?php _e('You can find Shortode in your Contact Form Plugin settings. Should be something similar to code below: ', 'cmp-coming-soon-maintenance');?><br><code>[contact-form-7 id="8" title='Contact form 1']</code> or <code>[mc4wp_form id='7']</code></p>
98
 
99
+ <p><?php _e('If you use 3rd party shortcode for subscribe or contact form, you might need to apply custom CSS to style the form correctly.', 'cmp-coming-soon-maintenance');?></p>
 
 
 
 
 
 
 
100
  </fieldset>
101
  </td>
102
 
130
 
131
  <p><?php printf(__('You can find or create new API key in your %s.', 'cmp-coming-soon-maintenance'), '<a href="https://admin.mailchimp.com/account/api/" target="_blank">MailChimp Account</a>'); ?></p>
132
 
133
+ <label for="niteoCS_mailchimp_list"><?php _e('Select MailChimp List to store emails.', 'cmp-coming-soon-maintenance');?>
134
 
135
+ <select name="niteoCS_mailchimp_list_selected" id="mailchimp-lists-select">
136
+ <?php
137
+ if ( is_array( $mailchimp_lists ) ) {
138
 
139
+ if ( $mailchimp_lists['response'] == 200 ) {
140
+ foreach ( $mailchimp_lists['lists'] as $list) { ?>
141
+ <option value="<?php echo esc_attr( $list['id'] );?>" <?php selected( $list['id'], $mailchimp_list_selected ); ?>><?php echo esc_attr( $list['name'] );?></option>
 
 
 
 
 
 
 
 
142
  <?php
143
  }
 
144
  } else { ?>
145
+ <option value="error"><?php echo esc_attr( $mailchimp_lists['response'] . ': ' . $mailchimp_lists['message']);?></option>
146
  <?php
147
+ }
148
+
149
+ } else { ?>
150
+ <option value="error"><?php _e('Please insert MailChimp API key to retrieve Lists.', 'cmp-coming-soon-maintenance');?></option>
151
+ <?php
152
+ } ?>
153
+ </select>
154
+
155
+ </label>
156
+
157
+ <br><br>
158
 
159
+ <label><input type="checkbox" name="niteoCS_mailchimp_double_opt" value="1" <?php checked( '1', get_option( 'niteoCS_mailchimp[double-opt]', '0' ) ); ?> class="regular-text code"><?php _e('Enable MailChimp Double Opt In', 'cmp-coming-soon-maintenance');?></label>
160
 
161
  </div>
162
 
inc/webfonts.php CHANGED
@@ -1,6 +1,5 @@
1
  <?php
2
-
3
- return '[{"id":"Roboto","text":"Roboto","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"]},{"id":"Open Sans","text":"Open Sans","variants":["300","300italic","regular","italic","600","600italic","700","700italic","800","800italic"]},{"id":"Lato","text":"Lato","variants":["100","100italic","300","300italic","regular","italic","700","700italic","900","900italic"]},{"id":"Roboto Condensed","text":"Roboto Condensed","variants":["300","300italic","regular","italic","700","700italic"]},{"id":"Montserrat","text":"Montserrat","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Slabo 27px","text":"Slabo 27px","variants":["regular"]},{"id":"Oswald","text":"Oswald","variants":["200","300","regular","500","600","700"]},{"id":"Source Sans Pro","text":"Source Sans Pro","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900","900italic"]},{"id":"Raleway","text":"Raleway","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"PT Sans","text":"PT Sans","variants":["regular","italic","700","700italic"]},{"id":"Roboto Slab","text":"Roboto Slab","variants":["100","300","regular","700"]},{"id":"Merriweather","text":"Merriweather","variants":["300","300italic","regular","italic","700","700italic","900","900italic"]},{"id":"Open Sans Condensed","text":"Open Sans Condensed","variants":["300","300italic","700"]},{"id":"Lora","text":"Lora","variants":["regular","italic","700","700italic"]},{"id":"Ubuntu","text":"Ubuntu","variants":["300","300italic","regular","italic","500","500italic","700","700italic"]},{"id":"Playfair Display","text":"Playfair Display","variants":["regular","italic","700","700italic","900","900italic"]},{"id":"Noto Sans","text":"Noto Sans","variants":["regular","italic","700","700italic"]},{"id":"Poppins","text":"Poppins","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Titillium Web","text":"Titillium Web","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900"]},{"id":"PT Serif","text":"PT Serif","variants":["regular","italic","700","700italic"]},{"id":"Arimo","text":"Arimo","variants":["regular","italic","700","700italic"]},{"id":"Muli","text":"Muli","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"PT Sans Narrow","text":"PT Sans Narrow","variants":["regular","700"]},{"id":"Indie Flower","text":"Indie Flower","variants":["regular"]},{"id":"Noto Serif","text":"Noto Serif","variants":["regular","italic","700","700italic"]},{"id":"Inconsolata","text":"Inconsolata","variants":["regular","700"]},{"id":"Anton","text":"Anton","variants":["regular"]},{"id":"Nunito","text":"Nunito","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Dosis","text":"Dosis","variants":["200","300","regular","500","600","700","800"]},{"id":"Bitter","text":"Bitter","variants":["regular","italic","700"]},{"id":"Oxygen","text":"Oxygen","variants":["300","regular","700"]},{"id":"Fira Sans","text":"Fira Sans","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Crimson Text","text":"Crimson Text","variants":["regular","italic","600","600italic","700","700italic"]},{"id":"Josefin Sans","text":"Josefin Sans","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"]},{"id":"Libre Baskerville","text":"Libre Baskerville","variants":["regular","italic","700"]},{"id":"Fjalla One","text":"Fjalla One","variants":["regular"]},{"id":"Work Sans","text":"Work Sans","variants":["100","200","300","regular","500","600","700","800","900"]},{"id":"Cabin","text":"Cabin","variants":["regular","italic","500","500italic","600","600italic","700","700italic"]},{"id":"Arvo","text":"Arvo","variants":["regular","italic","700","700italic"]},{"id":"Hind","text":"Hind","variants":["300","regular","500","600","700"]},{"id":"Lobster","text":"Lobster","variants":["regular"]},{"id":"Quicksand","text":"Quicksand","variants":["300","regular","500","700"]},{"id":"Roboto Mono","text":"Roboto Mono","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic"]},{"id":"Exo 2","text":"Exo 2","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Abril Fatface","text":"Abril Fatface","variants":["regular"]},{"id":"Yanone Kaffeesatz","text":"Yanone Kaffeesatz","variants":["200","300","regular","700"]},{"id":"Rubik","text":"Rubik","variants":["300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"]},{"id":"Pacifico","text":"Pacifico","variants":["regular"]},{"id":"Abel","text":"Abel","variants":["regular"]},{"id":"Karla","text":"Karla","variants":["regular","italic","700","700italic"]},{"id":"Bree Serif","text":"Bree Serif","variants":["regular"]},{"id":"Ubuntu Condensed","text":"Ubuntu Condensed","variants":["regular"]},{"id":"Catamaran","text":"Catamaran","variants":["100","200","300","regular","500","600","700","800","900"]},{"id":"Shadows Into Light","text":"Shadows Into Light","variants":["regular"]},{"id":"Varela Round","text":"Varela Round","variants":["regular"]},{"id":"Acme","text":"Acme","variants":["regular"]},{"id":"Libre Franklin","text":"Libre Franklin","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Asap","text":"Asap","variants":["regular","italic","500","500italic","600","600italic","700","700italic"]},{"id":"Merriweather Sans","text":"Merriweather Sans","variants":["300","300italic","regular","italic","700","700italic","800","800italic"]},{"id":"Gloria Hallelujah","text":"Gloria Hallelujah","variants":["regular"]},{"id":"Archivo Narrow","text":"Archivo Narrow","variants":["regular","italic","500","500italic","600","600italic","700","700italic"]},{"id":"Signika","text":"Signika","variants":["300","regular","600","700"]},{"id":"Dancing Script","text":"Dancing Script","variants":["regular","700"]},{"id":"Cormorant Garamond","text":"Cormorant Garamond","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"]},{"id":"Questrial","text":"Questrial","variants":["regular"]},{"id":"Nunito Sans","text":"Nunito Sans","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Source Serif Pro","text":"Source Serif Pro","variants":["regular","600","700"]},{"id":"Source Code Pro","text":"Source Code Pro","variants":["200","300","regular","500","600","700","900"]},{"id":"Maven Pro","text":"Maven Pro","variants":["regular","500","700","900"]},{"id":"Rajdhani","text":"Rajdhani","variants":["300","regular","500","600","700"]},{"id":"Play","text":"Play","variants":["regular","700"]},{"id":"Rokkitt","text":"Rokkitt","variants":["100","200","300","regular","500","600","700","800","900"]},{"id":"Francois One","text":"Francois One","variants":["regular"]},{"id":"Amatic SC","text":"Amatic SC","variants":["regular","700"]},{"id":"Crete Round","text":"Crete Round","variants":["regular","italic"]},{"id":"Berkshire Swash","text":"Berkshire Swash","variants":["regular"]},{"id":"Cairo","text":"Cairo","variants":["200","300","regular","600","700","900"]},{"id":"EB Garamond","text":"EB Garamond","variants":["regular","italic","500","500italic","600","600italic","700","700italic","800","800italic"]},{"id":"PT Sans Caption","text":"PT Sans Caption","variants":["regular","700"]},{"id":"Archivo Black","text":"Archivo Black","variants":["regular"]},{"id":"Comfortaa","text":"Comfortaa","variants":["300","regular","700"]},{"id":"Exo","text":"Exo","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Cuprum","text":"Cuprum","variants":["regular","italic","700","700italic"]},{"id":"Kanit","text":"Kanit","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"id":"Shrikhand","text":"Shrikhand","variants":["regular"]},{"id":"Vollkorn","text":"Vollkorn","variants":["regular","italic","600","600italic","700","700italic","900","900italic"]},{"id":"Cinzel","text":"Cinzel","variants":["regular","700","900"]},{"id":"Patua One","text":"Patua One","variants":["regular"]},{"id":"Ropa Sans","text":"Ropa Sans","variants":["regular","italic"]},{"id":"Domine","text":"Domine","variants":["regular","700"]},{"id":"Poiret One","text":"Poiret One","variants":["regular"]},{"id":"Alegreya","text":"Alegreya","variants":["regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"]},{"id":"Josefin Slab","text":"Josefin Slab","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"]},{"id":"Pathway Gothic One","text":"Pathway Gothic One","variants":["regular"]},{"id":"Satisfy","text":"Satisfy","variants":["regular"]},{"id":"Courgette","text":"Courgette","variants":["regular"]},{"id":"Old Standard TT","text":"Old Standard TT","variants":["regular","italic","700"]},{"id":"Permanent Marker","text":"Permanent Marker","variants":["regular"]},{"id":"Righteous","text":"Righteous","variants":["regular"]},{"id":"Heebo","text":"Heebo","variants":["100","300","regular","500","700","800","900"]},{"id":"Passion One","text":"Passion One","variants":["regular","700","900"]},{"id":"Hind Siliguri","text":"Hind Siliguri","variants":["300","regular","500","600","700"]}]';
4
 
5
 
6
  ?>
1
  <?php
2
+ return '[{"id":"Average Sans","text":"Average Sans","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Roboto","text":"Roboto","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Open Sans","text":"Open Sans","variants":["300","300italic","regular","italic","600","600italic","700","700italic","800","800italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Lato","text":"Lato","variants":["100","100italic","300","300italic","regular","italic","700","700italic","900","900italic"],"subset":["latin-ext","latin"]},{"id":"Montserrat","text":"Montserrat","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Roboto Condensed","text":"Roboto Condensed","variants":["300","300italic","regular","italic","700","700italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Oswald","text":"Oswald","variants":["200","300","regular","500","600","700"],"subset":["latin-ext","cyrillic","latin","vietnamese"]},{"id":"Source Sans Pro","text":"Source Sans Pro","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900","900italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Raleway","text":"Raleway","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["latin-ext","latin"]},{"id":"Slabo 27px","text":"Slabo 27px","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Merriweather","text":"Merriweather","variants":["300","300italic","regular","italic","700","700italic","900","900italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"PT Sans","text":"PT Sans","variants":["regular","italic","700","700italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin"]},{"id":"Roboto Slab","text":"Roboto Slab","variants":["100","300","regular","700"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Open Sans Condensed","text":"Open Sans Condensed","variants":["300","300italic","700"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Poppins","text":"Poppins","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["devanagari","latin-ext","latin"]},{"id":"Noto Sans","text":"Noto Sans","variants":["regular","italic","700","700italic"],"subset":["greek","cyrillic-ext","devanagari","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Ubuntu","text":"Ubuntu","variants":["300","300italic","regular","italic","500","500italic","700","700italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","greek-ext"]},{"id":"Roboto Mono","text":"Roboto Mono","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Playfair Display","text":"Playfair Display","variants":["regular","italic","700","700italic","900","900italic"],"subset":["latin-ext","cyrillic","latin","vietnamese"]},{"id":"Lora","text":"Lora","variants":["regular","italic","700","700italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"PT Serif","text":"PT Serif","variants":["regular","italic","700","700italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin"]},{"id":"Titillium Web","text":"Titillium Web","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900"],"subset":["latin-ext","latin"]},{"id":"Muli","text":"Muli","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Arimo","text":"Arimo","variants":["regular","italic","700","700italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext","hebrew"]},{"id":"PT Sans Narrow","text":"PT Sans Narrow","variants":["regular","700"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin"]},{"id":"Fira Sans","text":"Fira Sans","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Nunito","text":"Nunito","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Noto Serif","text":"Noto Serif","variants":["regular","italic","700","700italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Work Sans","text":"Work Sans","variants":["100","200","300","regular","500","600","700","800","900"],"subset":["latin-ext","latin"]},{"id":"Dosis","text":"Dosis","variants":["200","300","regular","500","600","700","800"],"subset":["latin-ext","latin"]},{"id":"Crimson Text","text":"Crimson Text","variants":["regular","italic","600","600italic","700","700italic"],"subset":["latin"]},{"id":"Nanum Gothic","text":"Nanum Gothic","variants":["regular","700","800"],"subset":["korean","latin"]},{"id":"Inconsolata","text":"Inconsolata","variants":["regular","700"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Indie Flower","text":"Indie Flower","variants":["regular"],"subset":["latin"]},{"id":"Quicksand","text":"Quicksand","variants":["300","regular","500","700"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Josefin Sans","text":"Josefin Sans","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Oxygen","text":"Oxygen","variants":["300","regular","700"],"subset":["latin-ext","latin"]},{"id":"Libre Baskerville","text":"Libre Baskerville","variants":["regular","italic","700"],"subset":["latin-ext","latin"]},{"id":"Bitter","text":"Bitter","variants":["regular","italic","700"],"subset":["latin-ext","latin"]},{"id":"Cabin","text":"Cabin","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Fjalla One","text":"Fjalla One","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Anton","text":"Anton","variants":["regular"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Rubik","text":"Rubik","variants":["300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"],"subset":["latin-ext","cyrillic","latin","hebrew"]},{"id":"Hind","text":"Hind","variants":["300","regular","500","600","700"],"subset":["devanagari","latin-ext","latin"]},{"id":"Lobster","text":"Lobster","variants":["regular"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Arvo","text":"Arvo","variants":["regular","italic","700","700italic"],"subset":["latin"]},{"id":"Exo 2","text":"Exo 2","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["latin-ext","cyrillic","latin"]},{"id":"Libre Franklin","text":"Libre Franklin","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["latin-ext","latin"]},{"id":"Karla","text":"Karla","variants":["regular","italic","700","700italic"],"subset":["latin-ext","latin"]},{"id":"Pacifico","text":"Pacifico","variants":["regular"],"subset":["latin-ext","cyrillic","latin","vietnamese"]},{"id":"Varela Round","text":"Varela Round","variants":["regular"],"subset":["latin-ext","latin","vietnamese","hebrew"]},{"id":"Abel","text":"Abel","variants":["regular"],"subset":["latin"]},{"id":"Yanone Kaffeesatz","text":"Yanone Kaffeesatz","variants":["200","300","regular","700"],"subset":["latin-ext","cyrillic","latin","vietnamese"]},{"id":"Source Serif Pro","text":"Source Serif Pro","variants":["regular","600","700"],"subset":["latin-ext","latin"]},{"id":"Dancing Script","text":"Dancing Script","variants":["regular","700"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Shadows Into Light","text":"Shadows Into Light","variants":["regular"],"subset":["latin"]},{"id":"Kanit","text":"Kanit","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["thai","latin-ext","latin","vietnamese"]},{"id":"Merriweather Sans","text":"Merriweather Sans","variants":["300","300italic","regular","italic","700","700italic","800","800italic"],"subset":["latin-ext","latin"]},{"id":"Nunito Sans","text":"Nunito Sans","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Abril Fatface","text":"Abril Fatface","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Bree Serif","text":"Bree Serif","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Ubuntu Condensed","text":"Ubuntu Condensed","variants":["regular"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","greek-ext"]},{"id":"Hind Siliguri","text":"Hind Siliguri","variants":["300","regular","500","600","700"],"subset":["latin-ext","latin","bengali"]},{"id":"Acme","text":"Acme","variants":["regular"],"subset":["latin"]},{"id":"Asap","text":"Asap","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Questrial","text":"Questrial","variants":["regular"],"subset":["latin"]},{"id":"Archivo Narrow","text":"Archivo Narrow","variants":["regular","italic","500","500italic","600","600italic","700","700italic"],"subset":["latin-ext","latin"]},{"id":"Russo One","text":"Russo One","variants":["regular"],"subset":["latin-ext","cyrillic","latin"]},{"id":"Amatic SC","text":"Amatic SC","variants":["regular","700"],"subset":["latin-ext","cyrillic","latin","vietnamese","hebrew"]},{"id":"Comfortaa","text":"Comfortaa","variants":["300","regular","700"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Exo","text":"Exo","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Play","text":"Play","variants":["regular","700"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Gloria Hallelujah","text":"Gloria Hallelujah","variants":["regular"],"subset":["latin"]},{"id":"Cairo","text":"Cairo","variants":["200","300","regular","600","700","900"],"subset":["latin-ext","latin","arabic"]},{"id":"Teko","text":"Teko","variants":["300","regular","500","600","700"],"subset":["devanagari","latin-ext","latin"]},{"id":"Encode Sans Condensed","text":"Encode Sans Condensed","variants":["100","200","300","regular","500","600","700","800","900"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Maven Pro","text":"Maven Pro","variants":["regular","500","700","900"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Signika","text":"Signika","variants":["300","regular","600","700"],"subset":["latin-ext","latin"]},{"id":"Francois One","text":"Francois One","variants":["regular"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Source Code Pro","text":"Source Code Pro","variants":["200","300","regular","500","600","700","900"],"subset":["latin-ext","latin"]},{"id":"EB Garamond","text":"EB Garamond","variants":["regular","italic","500","500italic","600","600italic","700","700italic","800","800italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Merienda","text":"Merienda","variants":["regular","700"],"subset":["latin-ext","latin"]},{"id":"Rokkitt","text":"Rokkitt","variants":["100","200","300","regular","500","600","700","800","900"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Crete Round","text":"Crete Round","variants":["regular","italic"],"subset":["latin-ext","latin"]},{"id":"Righteous","text":"Righteous","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Catamaran","text":"Catamaran","variants":["100","200","300","regular","500","600","700","800","900"],"subset":["tamil","latin-ext","latin"]},{"id":"PT Sans Caption","text":"PT Sans Caption","variants":["regular","700"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin"]},{"id":"Permanent Marker","text":"Permanent Marker","variants":["regular"],"subset":["latin"]},{"id":"Vollkorn","text":"Vollkorn","variants":["regular","italic","600","600italic","700","700italic","900","900italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Alegreya","text":"Alegreya","variants":["regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Patua One","text":"Patua One","variants":["regular"],"subset":["latin"]},{"id":"Ropa Sans","text":"Ropa Sans","variants":["regular","italic"],"subset":["latin-ext","latin"]},{"id":"Concert One","text":"Concert One","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Cuprum","text":"Cuprum","variants":["regular","italic","700","700italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Courgette","text":"Courgette","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Cinzel","text":"Cinzel","variants":["regular","700","900"],"subset":["latin-ext","latin"]},{"id":"Old Standard TT","text":"Old Standard TT","variants":["regular","italic","700"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Heebo","text":"Heebo","variants":["100","300","regular","500","700","800","900"],"subset":["latin","hebrew"]},{"id":"Domine","text":"Domine","variants":["regular","700"],"subset":["latin-ext","latin"]},{"id":"Poiret One","text":"Poiret One","variants":["regular"],"subset":["latin-ext","cyrillic","latin"]},{"id":"Great Vibes","text":"Great Vibes","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Pathway Gothic One","text":"Pathway Gothic One","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Cardo","text":"Cardo","variants":["regular","italic","700"],"subset":["greek","latin-ext","latin","greek-ext"]},{"id":"Kaushan Script","text":"Kaushan Script","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Noticia Text","text":"Noticia Text","variants":["regular","italic","700","700italic"],"subset":["latin-ext","latin","vietnamese"]},{"id":"ABeeZee","text":"ABeeZee","variants":["regular","italic"],"subset":["latin"]},{"id":"Satisfy","text":"Satisfy","variants":["regular"],"subset":["latin"]},{"id":"Prompt","text":"Prompt","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["thai","latin-ext","latin","vietnamese"]},{"id":"Rajdhani","text":"Rajdhani","variants":["300","regular","500","600","700"],"subset":["devanagari","latin-ext","latin"]},{"id":"Cookie","text":"Cookie","variants":["regular"],"subset":["latin"]},{"id":"Orbitron","text":"Orbitron","variants":["regular","500","700","900"],"subset":["latin"]},{"id":"Fira Sans Condensed","text":"Fira Sans Condensed","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Khand","text":"Khand","variants":["300","regular","500","600","700"],"subset":["devanagari","latin-ext","latin"]},{"id":"Quattrocento Sans","text":"Quattrocento Sans","variants":["regular","italic","700","700italic"],"subset":["latin-ext","latin"]},{"id":"Hind Madurai","text":"Hind Madurai","variants":["300","regular","500","600","700"],"subset":["tamil","latin-ext","latin"]},{"id":"Arapey","text":"Arapey","variants":["regular","italic"],"subset":["latin"]},{"id":"Lobster Two","text":"Lobster Two","variants":["regular","italic","700","700italic"],"subset":["latin"]},{"id":"Monoton","text":"Monoton","variants":["regular"],"subset":["latin"]},{"id":"Alegreya Sans","text":"Alegreya Sans","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Philosopher","text":"Philosopher","variants":["regular","italic","700","700italic"],"subset":["cyrillic-ext","cyrillic","latin","vietnamese"]},{"id":"Assistant","text":"Assistant","variants":["200","300","regular","600","700","800"],"subset":["latin","hebrew"]},{"id":"Monda","text":"Monda","variants":["regular","700"],"subset":["latin-ext","latin"]},{"id":"Istok Web","text":"Istok Web","variants":["regular","italic","700","700italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin"]},{"id":"Amiri","text":"Amiri","variants":["regular","italic","700","700italic"],"subset":["latin-ext","latin","arabic"]},{"id":"Basic","text":"Basic","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Caveat","text":"Caveat","variants":["regular","700"],"subset":["latin-ext","cyrillic","latin"]},{"id":"Volkhov","text":"Volkhov","variants":["regular","italic","700","700italic"],"subset":["latin"]},{"id":"Quattrocento","text":"Quattrocento","variants":["regular","700"],"subset":["latin-ext","latin"]},{"id":"News Cycle","text":"News Cycle","variants":["regular","700"],"subset":["latin-ext","latin"]},{"id":"Josefin Slab","text":"Josefin Slab","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"],"subset":["latin"]},{"id":"Yantramanav","text":"Yantramanav","variants":["100","300","regular","500","700","900"],"subset":["devanagari","latin-ext","latin"]},{"id":"Ultra","text":"Ultra","variants":["regular"],"subset":["latin"]},{"id":"Passion One","text":"Passion One","variants":["regular","700","900"],"subset":["latin-ext","latin"]},{"id":"Archivo Black","text":"Archivo Black","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Cormorant Garamond","text":"Cormorant Garamond","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"],"subset":["cyrillic-ext","latin-ext","cyrillic","latin","vietnamese"]},{"id":"Tinos","text":"Tinos","variants":["regular","italic","700","700italic"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext","hebrew"]},{"id":"Luckiest Guy","text":"Luckiest Guy","variants":["regular"],"subset":["latin"]},{"id":"Fredoka One","text":"Fredoka One","variants":["regular"],"subset":["latin"]},{"id":"Sacramento","text":"Sacramento","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Didact Gothic","text":"Didact Gothic","variants":["regular"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","greek-ext"]},{"id":"Handlee","text":"Handlee","variants":["regular"],"subset":["latin"]},{"id":"Alfa Slab One","text":"Alfa Slab One","variants":["regular"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Pontano Sans","text":"Pontano Sans","variants":["regular"],"subset":["latin-ext","latin"]},{"id":"Kalam","text":"Kalam","variants":["300","regular","700"],"subset":["devanagari","latin-ext","latin"]},{"id":"Cantarell","text":"Cantarell","variants":["regular","italic","700","700italic"],"subset":["latin"]},{"id":"Playfair Display SC","text":"Playfair Display SC","variants":["regular","italic","700","700italic","900","900italic"],"subset":["latin-ext","cyrillic","latin","vietnamese"]},{"id":"Tangerine","text":"Tangerine","variants":["regular","700"],"subset":["latin"]},{"id":"Boogaloo","text":"Boogaloo","variants":["regular"],"subset":["latin"]},{"id":"Nanum Myeongjo","text":"Nanum Myeongjo","variants":["regular","700","800"],"subset":["korean","latin"]},{"id":"Cabin Condensed","text":"Cabin Condensed","variants":["regular","500","600","700"],"subset":["latin-ext","latin","vietnamese"]},{"id":"Gudea","text":"Gudea","variants":["regular","italic","700"],"subset":["latin-ext","latin"]},{"id":"Jura","text":"Jura","variants":["300","regular","500","600","700"],"subset":["greek","cyrillic-ext","latin-ext","cyrillic","latin","vietnamese","greek-ext"]},{"id":"Bangers","text":"Bangers","variants":["regular"],"subset":["latin-ext","latin","vietnamese"]}]';
 
3
 
4
 
5
  ?>
js/cmp-admin-head.js CHANGED
@@ -10,11 +10,11 @@ jQuery(document).ready(function($){
10
  };
11
 
12
 
13
- $.post(ajaxurl, data, function(response) {
14
- if (response == 'success') {
15
- jQuery('.cmp-status input[type=radio]').prop("disabled", (_, val) => !val);
16
- jQuery('#cmp-status').prop("checked", (_, val) => !val);
17
 
 
 
 
18
  }
19
  });
20
 
10
  };
11
 
12
 
13
+ $.post(cmp_ajax.ajax_url, data, function(response) {
 
 
 
14
 
15
+ if (response == 'success') {
16
+ jQuery('.cmp-status input[type=radio]').prop('disabled', function (_, val) { return ! val; });
17
+ jQuery('#cmp-status').prop('checked', function (_, val) { return ! val; });
18
  }
19
  });
20
 
js/settings.js CHANGED
@@ -1,43 +1,40 @@
1
  jQuery(document).ready(function($){
2
 
3
- var formChanged = false;
4
  var tab = document.location.hash.substring(1);
5
  var action = jQuery('#csoptions').attr('action');
6
 
7
  // ini custom css textarea to codeEditor
8
-
9
  if ( wp.codeEditor ) {
10
  wp.codeEditor.initialize('niteoCS_custom_css');
11
  }
12
 
13
-
14
  // function to tab navigation
15
  navtab = function(tab) {
16
- jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');
17
  jQuery('.nav-tab-wrapper .' + tab).addClass('nav-tab-active');
18
 
19
- jQuery('.table-wrapper.' + tab).css('display', 'block');
20
- jQuery('.table-wrapper-css.' + tab).css('display', 'block');
21
- jQuery('.comingsoon.' + tab).css('display', 'block');
22
 
23
- jQuery('.table-wrapper:not(.' + tab + ')').css('display', 'none');
24
- jQuery('.table-wrapper-css:not(.' + tab).css('display', 'none');
25
- jQuery('.comingsoon:not(.' + tab + ')').css('display', 'none');
26
 
27
  if ( tab == 'install' ) {
28
- jQuery('.submit').css('display', 'none');
29
- jQuery('#csoptions').attr('action', action);
30
  } else {
31
- jQuery('.submit').css('display', 'block');
32
  // change form action to display current tab after save
33
- jQuery('#csoptions').attr('action', action + '#' + tab);
34
  }
35
  }
36
 
37
  if ( tab != '' ) {
38
  navtab(tab);
39
  } else {
40
- jQuery('.table-wrapper-css').css('display', 'none');
41
  }
42
 
43
  window.onhashchange = function(){
@@ -45,85 +42,83 @@ jQuery(document).ready(function($){
45
  navtab(tab);
46
  }
47
 
48
- $('.nav-tab:not(.theme-preview)').click(function(e) {
49
  e.preventDefault();
50
  tab = $(this).data('tab');
51
  document.location.hash = tab;
52
  });
53
 
54
  // update range inputs on change
55
- update_range('.blur-range');
56
- update_range('.overlay-opacity');
57
 
58
  // create media upload buttons
59
- media_upload_button('logo', false, 'image');
60
- media_upload_button('favicon', false, 'image');
61
- media_upload_button('images', true, 'image');
62
- media_upload_button('pattern', false, 'image');
63
- media_upload_button('video-thumb', false, 'image');
64
- media_upload_button('video', false, 'video');
 
65
 
66
  // show / hide settings
67
  toggle_settings( 'analytics' );
68
  toggle_settings( 'contact-form' );
69
  toggle_settings( 'subscribe' );
70
  toggle_settings( 'background-effect' );
 
71
  toggle_settings( 'cmp-logo' );
72
-
73
- toggle_select('subscribe-method');
74
-
 
75
 
76
  // change all selects to select2
77
- jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({
78
  width: '100%',
79
  minimumResultsForSearch: -1,
80
-
81
  });
82
 
83
-
84
- jQuery('#cmp-status').click(function(){
85
- jQuery('.cmp-status input[type=radio]').prop("disabled", (_, val) => !val);
86
- jQuery('#cmp-status-menubar').prop("checked", (_, val) => !val);
87
  });
88
 
89
-
90
  cmp_status_inputs();
91
 
92
  function cmp_status_inputs() {
93
 
94
  // Make clickable status radio buttons
95
- jQuery('.cmp-status legend:not(.disabled)').click(function(){
96
- if ( jQuery('#cmp-status').prop('checked') == false ) {
97
  return;
98
  }
99
  var $children = jQuery(this).children('input');
100
  $children.prop("checked", true);
101
- jQuery('.cmp-status legend').removeClass('active');
102
  jQuery(this).addClass('active');
103
 
104
  $children.trigger('change');
105
 
106
  if ( $children.val() == '3' ) {
107
- jQuery('.redirect-inputs').fadeIn('fast');
108
  } else {
109
- jQuery('.redirect-inputs').fadeOut('fast');
110
  }
111
  });
112
  }
113
 
114
-
115
  // expandable tabs
116
- jQuery('.table-wrapper h3').click(function(){
117
  jQuery(this).parent().toggleClass('closed');
118
  });
119
 
120
-
121
  // test unsplash image
122
- jQuery('#test-unsplash').click(function(e){
123
  e.preventDefault();
124
 
125
- var media_wrapper = jQuery('#unsplash-media'),
126
- unsplash_feed = jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),
127
  unsp_url = '',
128
  feat = '',
129
  custom_str = '',
@@ -132,23 +127,23 @@ jQuery(document).ready(function($){
132
  switch( unsplash_feed ) {
133
  // specific photo
134
  case '0':
135
- unsp_url = jQuery('#niteoCS-unsplash-0').val();
136
  break;
137
 
138
  // random from user
139
  case '1':
140
- custom_str = jQuery('#niteoCS-unsplash-1').val();
141
  break;
142
 
143
  // random from collection
144
  case '2':
145
- unsp_url = jQuery('#niteoCS-unsplash-2').val();
146
  break;
147
 
148
  // random photo
149
  case '3':
150
  unsp_url = jQuery('#niteoCS-unsplash-3').val();
151
- if ( jQuery('#niteoCS_unsplash_feat' ).is( ':checked' ) ) {
152
  feat = '1';
153
  } else {
154
  feat = '0';
@@ -166,7 +161,7 @@ jQuery(document).ready(function($){
166
 
167
  jQuery(this).prop('disabled', true);
168
  jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');
169
- media_wrapper.html('');
170
 
171
  var data = {
172
  action: 'niteo_unsplash',
@@ -209,179 +204,97 @@ jQuery(document).ready(function($){
209
  jQuery(this).fadeIn();
210
  jQuery('#test-unsplash').prop('disabled', false);
211
  jQuery('#test-unsplash').text('Display Unsplash Photo');
212
- 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>')
 
213
  clearTimeout(loadingTimeout);
214
  });
215
 
 
 
216
  } else {
217
- jQuery('#test-unsplash').prop('disabled', false);
218
- jQuery('#test-unsplash').text('Display Unsplash Photo');
219
- jQuery('#unsplash-media').html('<p>Error '+unsplash.response+': <span style="text-transform:lowercase;">'+unsplash.body+'</span></p>');
220
  clearTimeout(loadingTimeout);
221
  }
222
 
223
  });
224
  } else {
225
- jQuery('#unsplash_img').remove();
226
  }
227
 
228
  });
229
 
230
 
 
231
  videoPreview = function() {
232
- var source = $('.banner-video-source').val();
233
- $('.video-wrapper').css('padding-top', '0');
234
- if ( source == 'YouTube' ) {
235
- var youtubeLink = $('#niteoCS-youtube-url').val();
236
- if( youtubeLink.match(/(youtube.com)/) ){
237
- var split_c = 'v=';
238
- var split_n = 1;
239
- }
240
 
241
- if( youtubeLink.match(/(youtu.be)/) || youtubeLink.match(/(vimeo.com\/)+[0-9]/) ){
242
- var split_c = '/';
243
- var split_n = 3;
244
- }
245
 
246
- if ( source == 'vimeo' ) {
247
- var youtubeLink = $('#niteoCS-vimeo-url').val();
248
 
249
- if( youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/) ){
250
- var split_c = '/';
251
- var split_n = 5;
252
- }
253
- }
254
 
255
- if ( youtubeLink ) {
256
- var getYouTubeVideoID = youtubeLink.split(split_c)[split_n];
257
- if ( getYouTubeVideoID != undefined ) {
258
- var cleanVideoID = getYouTubeVideoID.replace(/(&)+(.*)/, '');
259
 
260
- if( source == 'banner_youtube' && youtubeLink.match(/(youtu.be)/) || youtubeLink.match(/(youtube.com)/) ){
261
- var videoEmbedLink = 'https://www.youtube.com/embed/'+cleanVideoID+'?autoplay=0';
262
- }
 
263
 
264
- if( source == 'banner_vimeo' && youtubeLink.match(/(vimeo.com\/)+[0-9]/) || youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/) ){
265
- var videoEmbedLink = 'https://player.vimeo.com/video/'+cleanVideoID+'?autoplay=0';
266
- }
 
 
267
 
268
- var $iframe = $('<iframe src="'+videoEmbedLink+'" allowfullscreen></iframe>');
269
- $('.video-wrapper').html($iframe);
270
- var videoRatio = ( $iframe.height() / $iframe.width() ) * 100;
271
-
272
- $iframe.css('position', 'absolute');
273
- $iframe.css('top', '0');
274
- $iframe.css('left', '0');
275
- $iframe.css('width', '100%');
276
- $iframe.css('height', '100%');
277
-
278
- $('.video-wrapper').css('padding-top', videoRatio+'%');
279
- $('#niteoCS-vimeo-url').css('border', '1px solid #ddd');
280
- $('#niteoCS-youtube-url').css('border', '1px solid #ddd');
281
  } else {
282
- $('.video-wrapper').text('Please enter correct ' + source + ' URL.').css('padding-top', '0');
283
- $('#niteoCS-vimeo-url').css('border', '1px solid #d60000');
284
- $('#niteoCS-youtube-url').css('border', '1px solid #d60000');
285
  }
286
-
287
- } else {
288
- $('.video-wrapper').text('Please enter ' + source + ' URL.').css('padding-top', '0');
289
- $('#niteoCS-vimeo-url').css('border', '1px solid #d60000');
290
- $('#niteoCS-youtube-url').css('border', '1px solid #d60000');
291
- }
292
  }
293
 
294
- if ( source == 'video/mp4' ) {
295
- var videoURL = jQuery('#niteoCS-video-id').data('url');
 
 
296
  if ( videoURL != '' ) {
297
- $('.video-wrapper').html('<video width="600" height="400" controls><source src="'+videoURL+'" type="video/mp4">Your browser does not support the video tag.</video>');
298
  }
299
 
300
  }
301
  };
302
 
303
- jQuery('#niteoCS-youtube-url').keyup(function() {
 
 
 
 
304
  videoPreview();
305
- });
306
 
307
- // hiding video source inputs
308
- jQuery('#csoptions .banner-video-source').change(function() {
309
- switch(jQuery('#csoptions .banner-video-source' ).val() ) {
310
- case 'YouTube':
311
- jQuery('.youtube-source-input').css('display','block');
312
- jQuery('.vimeo-source-input').css('display','none');
313
- jQuery('.file-source-input').css('display','none');
314
- break;
315
- case 'vimeo':
316
- jQuery('.youtube-source-input').css('display','none');
317
- jQuery('.vimeo-source-input').css('display','block');
318
- jQuery('.file-source-input').css('display','none');
319
- break;
320
- case 'video/mp4':
321
- jQuery('.youtube-source-input').css('display','none');
322
- jQuery('.vimeo-source-input').css('display','none');
323
- jQuery('.file-source-input').css('display','block');
324
- videoPreview();
325
- break;
326
- default:
327
- jQuery('.file-source-input').css('display','block');
328
- jQuery('.youtube-source-input').css('display','none');
329
- jQuery('.vimeo-source-input').css('display','none');
330
- }
331
-
332
  });
333
- jQuery('#csoptions .banner-video-source').trigger('change');
334
 
335
- // hiding banner on change
336
- jQuery('#csoptions .niteoCS_banner').change(function() {
 
 
337
 
338
- switch(jQuery('#csoptions .niteoCS_banner:checked' ).val() ) {
339
- case '0':
340
- jQuery('#custom_banner').css('display','block');
341
- jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');
342
- break;
343
- case '1':
344
- jQuery('#unsplash_banner').css('display','block');
345
- jQuery('.theme_background fieldset:not(#unsplash_banner)').css('display','none');
346
- break;
347
- case '2':
348
- jQuery('#default_banner').css('display','block');
349
- jQuery('.theme_background fieldset:not(#default_banner)').css('display','none');
350
- break;
351
- case '3':
352
- jQuery('#graphic_pattern').css('display','block');
353
- jQuery('.theme_background fieldset:not(#graphic_pattern)').css('display','none');
354
- break;
355
- case '4':
356
- jQuery('#solid_color').css('display','block');
357
- jQuery('.theme_background fieldset:not(#solid_color)').css('display','none');
358
- break;
359
- case '5':
360
- jQuery('#video_banner').css('display','block');
361
- jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');
362
- videoPreview();
363
- break;
364
- case '6':
365
- jQuery('#gradient_background').css('display','block');
366
- jQuery('.theme_background fieldset:not(#gradient_background)').css('display','none');
367
- break;
368
- default:
369
- jQuery('#custom_banner').css('display','block');
370
- jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');
371
- break;
372
- }
373
  });
374
 
375
- jQuery('#csoptions .niteoCS_banner:first').trigger('change');
376
 
377
  // display selected unsplash feed
378
- var unsplasfeed = jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();
379
- jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
380
 
381
- jQuery('#unsplash_banner select[name^="unsplash_feed"]').on('change', function() {
382
- unsplasfeed = jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();
383
  jQuery('.unsplash-feed').css('display', 'none');
384
- jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
385
  jQuery('#test-unsplash').trigger('click');
386
  });
387
 
@@ -392,82 +305,175 @@ jQuery(document).ready(function($){
392
 
393
 
394
  // preview gradient on select change
395
- jQuery('select.background-gradient').on('change', function() {
396
- var gradient = jQuery('select.background-gradient option:selected').val();
397
 
398
  if ( gradient == 'custom' ) {
399
- jQuery('.custom-gradient').css('display', 'block');
400
- jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
401
  'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
402
  'background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'});
403
  } else {
404
  colors = gradient.split(':');
405
- jQuery('.custom-gradient').css('display', 'none');
406
- jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
407
  'background':'-webkit-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
408
  'background':'linear-gradient(135deg, '+colors[0]+' 0%, '+colors[1]+' 100%)'});
409
  }
410
  }).trigger('change');
411
 
 
 
412
  // banner background colorpicker
413
- jQuery('#niteoCS_banner_color').wpColorPicker({
414
  change: function(event, ui){
415
  jQuery('.color-preview').css('background-color', ui.color.toString());
416
- // jQuery(this).trigger('change');
417
- }
418
  });
419
 
420
- // banner gradient background colorpicker
421
- jQuery('#niteoCS_gradient_one').wpColorPicker({
422
  change: function(event, ui){
423
  jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
424
  'background':'-webkit-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
425
  'background':'linear-gradient(135deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'});
426
- }
427
  });
428
 
429
- // banner gradient background colorpicker
430
- jQuery('#niteoCS_gradient_two').wpColorPicker({
431
  change: function(event, ui){
432
  jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
433
  'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
434
  'background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)'});
435
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
  });
437
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
  // banner pattern on change image preview
439
- jQuery('select[name^="niteoCS_banner_pattern"]').on('change', function() {
440
- var pattern = jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();
441
 
442
  if (pattern != 'custom') {
443
  var pattern_url = jQuery(this).data('url');
444
- jQuery('#add-pattern').css('display', 'none');
445
- jQuery('.pattern-wrapper').css('background-image', 'url(\''+pattern_url+pattern+'.png\')');
446
 
447
  } else {
448
- var pattern_url = jQuery('#niteoCS_banner_pattern_custom').val();
449
- jQuery('#add-pattern').css('display', 'block');
450
- jQuery('.pattern-wrapper').css('background-image', 'url(\''+pattern_url+'\')');
451
 
452
  }
453
  });
454
 
455
  // preview animation
456
- jQuery('.heading-animation').on('change', function() {
457
- heading_anim = jQuery('.heading-animation option:selected').val();
458
- jQuery('#heading-example').removeClass().addClass('animated ' + heading_anim);
459
  });
460
 
461
- jQuery('.content-animation').on('change', function() {
462
- heading_anim = jQuery('.content-animation option:selected').val();
463
- jQuery('#content-example').removeClass().addClass('animated ' + heading_anim);
464
  });
465
 
466
-
467
  // ----------------------- sortable social list -----------------------
468
  // function to update social list
469
  var update_social = function(name, key, val){
470
- var socialmedia = $('#niteoCS_socialmedia').attr('value');
471
  socialmedia = $.parseJSON(socialmedia);
472
 
473
  $.each(socialmedia, function(i, ele){
@@ -476,11 +482,11 @@ jQuery(document).ready(function($){
476
  }
477
  });
478
 
479
- $('#niteoCS_socialmedia').attr('value', JSON.stringify(socialmedia));
480
  };
481
 
482
  // sortable UI
483
- var $sortableList = $('.social-inputs');
484
 
485
  var sortEventHandler = function(event, ui){
486
 
@@ -519,23 +525,23 @@ jQuery(document).ready(function($){
519
  };
520
  })(jQuery);
521
 
522
- jQuery('.social-inputs input[type="text"]').focusout(function(){
523
  var name = jQuery(this).data('name');
524
  var socialurl = jQuery(this).attr('value');
525
  update_social(name, 'url', socialurl);
526
  });
527
 
528
- jQuery('.social-inputs input[type="checkbox"]').click(function(e){
529
  var $this = $(this).siblings('input[type="text"]');
530
  $this.toggleDisabled();
531
  });
532
 
533
  // social icons active/inactive
534
- jQuery('.social-media i').click(function() {
535
  var name = jQuery(this).data('name');
536
  jQuery(this).toggleClass('active');
537
- jQuery('.social-inputs li.' + name).toggleClass('active');
538
- jQuery('.social-inputs li.' + name + ' input').trigger('change');
539
 
540
  if (jQuery(this).hasClass('active')) {
541
  update_social(name, 'hidden', '0');
@@ -543,27 +549,28 @@ jQuery(document).ready(function($){
543
  update_social(name, 'hidden', '1');
544
  }
545
  // hide/show input labels
546
- if (jQuery('.social-media i.active').length) {
547
  jQuery('.social-inputs .label').css('display', 'block');
548
  } else {
549
- jQuery('.social-inputs .label').css('display', 'none');
550
  }
551
  });
 
552
  // hide/show input labels
553
- if (jQuery('.social-media i.active').length) {
554
- jQuery('.social-inputs .label').css('display', 'block');
555
  }
556
 
557
-
558
-
559
  // theme update admin notice view release notes
560
- jQuery('.view-release').click(function(e) {
561
  e.preventDefault();
562
  $this = jQuery(this);
563
  var release_url = $this.attr('href');
 
564
  jQuery.get(release_url, function( release ) {
565
  $this.closest('.notice').find('.release-note .notes').remove();
566
  $this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>');
 
567
  }).fail(function() {
568
  $this.closest('.notice').find('.release-note p').remove();
569
  $this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>');
@@ -571,7 +578,7 @@ jQuery(document).ready(function($){
571
  });
572
 
573
  // theme update via admin notice
574
- jQuery('.update-theme').click(function(e) {
575
  e.preventDefault();
576
  var $this = $(this),
577
  $parent = $this.parents('.notice'),
@@ -595,15 +602,13 @@ jQuery(document).ready(function($){
595
 
596
  $.post(ajaxurl, data, function(response) {
597
  response = response.trim();
598
- if (response == 'success') {
599
  setTimeout(function(){
600
-
601
  $parent.removeClass('notice-warning').addClass('notice-success');
602
  $parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
603
  }, 1500);
604
 
605
  } else {
606
-
607
  response = response.slice(0,-1);
608
  var error = $('p', $(response)).text();
609
  $parent.removeClass('notice-warning').addClass('notice-error');
@@ -614,15 +619,14 @@ jQuery(document).ready(function($){
614
 
615
  // theme-selector scripts
616
  // select theme by click on thumbnail or select button
617
- jQuery('.theme-select').click(function(){
618
- jQuery(this).parent().find('input[name="select_theme"]').prop("checked", true).trigger('change');
619
- jQuery('.theme-select').removeClass('selected');
620
  jQuery(this).parent().find('.theme-select').addClass('selected');
621
  });
622
 
623
-
624
  // theme update via theme button
625
- jQuery('.theme-update.button').one('click',function(e) {
626
  e.preventDefault();
627
  var $this = $(this),
628
  $wrapper = $this.closest('.theme-wrapper'),
@@ -645,7 +649,7 @@ jQuery(document).ready(function($){
645
  $this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');
646
 
647
  $.post(ajaxurl, data, function(response) {
648
- if (response == 'success') {
649
  setTimeout(function(){
650
  $this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');
651
  setTimeout(function(){
@@ -661,7 +665,7 @@ jQuery(document).ready(function($){
661
  });
662
 
663
  // display theme details overlay
664
- jQuery('.theme-details').click(function() {
665
 
666
  var $this = $(this),
667
  $wrapper = $this.closest('.theme-wrapper'),
@@ -690,7 +694,6 @@ jQuery(document).ready(function($){
690
  // parse JSON data to array
691
  response = jQuery.parseJSON(response);
692
 
693
-
694
  if ( response.result == 'true' ) {
695
  // overflow body hidden
696
  jQuery('body').addClass('modal-open');
@@ -708,8 +711,6 @@ jQuery(document).ready(function($){
708
  var newVer = jQuery('.update-theme').data('new_ver');
709
  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>';
710
  }
711
-
712
-
713
  }
714
  }
715
 
@@ -717,14 +718,7 @@ jQuery(document).ready(function($){
717
  if ( purchased != '1' && type == 'premium' ){
718
  var buttonDisabled = 'disabled ';
719
  var buyURL = $wrapper.find('a').attr('href');
720
- // check for freebie
721
- price = (price == 0) ? 'Download' : '$' + price;
722
- 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>';
723
-
724
- if ( freebie ) {
725
- var buyButton = '<p style="font-weight: bold;font-size: 1.2em;margin-bottom: 8px;">Pay what you want</p>'+buyButton;
726
- }
727
-
728
  }
729
 
730
  // get screenshots
@@ -791,7 +785,7 @@ jQuery(document).ready(function($){
791
  jQuery('.theme-overlay.cmp .activate').click(function(e) {
792
  e.preventDefault();
793
  // select theme
794
- jQuery('input[name="select_theme"]').each(function() {
795
  if ( jQuery(this).val() == slug ) {
796
  jQuery(this).prop('checked', true);
797
  jQuery('.theme-select').removeClass('selected');
@@ -832,9 +826,6 @@ jQuery(document).ready(function($){
832
 
833
  });
834
 
835
- // jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');
836
-
837
-
838
  // define functions //
839
  function ucwords (str) {
840
  return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) {
@@ -846,7 +837,7 @@ jQuery(document).ready(function($){
846
  return (str+'').toLowerCase();
847
  }
848
 
849
- function media_upload_button (name, multiple, type) {
850
  // define var
851
  var $container = jQuery('.'+name+'-wrapper');
852
  var $add_button = jQuery('#add-'+name);
@@ -863,7 +854,7 @@ jQuery(document).ready(function($){
863
 
864
  $add_button.click(function(e) {
865
  e.preventDefault();
866
- // If the media frame already exists, reopen it.
867
  if ( media_uploader ) {
868
  media_uploader.open();
869
  return;
@@ -883,9 +874,14 @@ jQuery(document).ready(function($){
883
  // Get media attachment details from the frame state
884
  var attachment = media_uploader.state().get('selection').toJSON();
885
 
886
- if (attachment.length > 0) {
887
- $container.empty();
888
 
 
 
 
 
 
889
  jQuery(attachment).each(function(i) {
890
  if (attachment[i].sizes && attachment[i].sizes.large) {
891
  image = attachment[i].sizes.large.url;
@@ -894,16 +890,40 @@ jQuery(document).ready(function($){
894
  }
895
 
896
  // add image ID and url to comma-separated variable
897
- var comma = i === 0 ? '' : ',';
898
  imgID += ( comma + attachment[i].id );
899
- // Send the attachment URL to our custom image input field.
900
 
901
- if ( name == 'pattern') {
902
- $container.css('background-image', 'url(\''+image+'\')');
903
- } else if ( name == 'video') {
904
- $container.append( '<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>' );
905
- } else {
906
- $container.append( '<img src="' + image + '" alt="" style="max-width:588px"/>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
907
  }
908
 
909
  });
@@ -913,30 +933,25 @@ jQuery(document).ready(function($){
913
 
914
  }
915
  // update hidden input with media id and trigger change
916
- jQuery('#niteoCS-'+name+'-id').val( imgID).trigger('change');
917
 
918
  })
919
- .open();if ( name == 'pattern') {
920
- $container.css('background-image', 'url(\''+image+'\')');
921
- }
922
  });
923
 
924
-
925
  $delete_button.click(function(e) {
926
  jQuery(this).css('display', 'none');
927
- $container.empty();
928
  jQuery('#niteoCS-'+name+'-id').val('');
929
  jQuery('#niteoCS-'+name+'-id').trigger('change');
930
-
931
  });
932
  }
933
 
934
-
935
  // Retrieve Mailchimp lists
936
- jQuery('#connect-mailchimp').click(function(e){
937
  e.preventDefault();
938
 
939
- var apikey = jQuery('input[name="niteoCS_mailchimp_apikey"]').val(),
940
  security = jQuery(this).data('security'),
941
  button = jQuery(this);
942
 
@@ -979,49 +994,53 @@ jQuery(document).ready(function($){
979
  }
980
  });
981
 
982
-
983
  function toggle_settings ( classname ) {
984
  // Logo type inputs
985
- jQuery('.'+classname).change(function() {
986
 
987
- var value = jQuery('.'+classname+':checked' ).val();
988
- value = ( jQuery.isNumeric(value) ) ? 'x'+value : value;
989
 
990
- jQuery('.'+classname+'-switch.'+value).css('display','block');
991
- jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none');
992
 
993
  });
994
 
995
- jQuery('.'+classname).first().trigger('change');
996
-
997
  }
998
 
999
  function toggle_select ( classname ) {
1000
- // Logo type inputs
1001
- jQuery('.'+classname).change(function() {
1002
  var value = jQuery('.'+classname ).val();
1003
 
1004
- value = ( jQuery.isNumeric(value) ) ? 'x'+value : value;
1005
 
1006
- jQuery('.'+classname+ '.'+value).css('display','block');
1007
- jQuery('.'+classname+':not(.'+value+')').css('display','none');
1008
 
1009
  });
1010
 
1011
  jQuery('.'+classname).first().trigger('change');
1012
-
1013
  }
1014
 
1015
  function update_range ( selector ) {
1016
  jQuery( selector ).on('input', function () {
1017
  var value = jQuery(this).val();
1018
-
1019
  // change label value
1020
  jQuery(this).parent().find('span').html(value);
1021
 
1022
  });
1023
  }
1024
 
 
 
 
 
 
 
 
 
1025
  });
1026
 
1027
 
1
  jQuery(document).ready(function($){
2
 
 
3
  var tab = document.location.hash.substring(1);
4
  var action = jQuery('#csoptions').attr('action');
5
 
6
  // ini custom css textarea to codeEditor
 
7
  if ( wp.codeEditor ) {
8
  wp.codeEditor.initialize('niteoCS_custom_css');
9
  }
10
 
 
11
  // function to tab navigation
12
  navtab = function(tab) {
13
+ jQuery('.cmp-coming-soon-maintenance .nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');
14
  jQuery('.nav-tab-wrapper .' + tab).addClass('nav-tab-active');
15
 
16
+ jQuery('.cmp-coming-soon-maintenance .table-wrapper.' + tab).css('display', 'block');
17
+ jQuery('.cmp-coming-soon-maintenance .table-wrapper-css.' + tab).css('display', 'block');
18
+ jQuery('.cmp-coming-soon-maintenance .comingsoon.' + tab).css('display', 'block');
19
 
20
+ jQuery('.cmp-coming-soon-maintenance .table-wrapper:not(.' + tab + ')').css('display', 'none');
21
+ jQuery('.cmp-coming-soon-maintenance .table-wrapper-css:not(.' + tab).css('display', 'none');
22
+ jQuery('.cmp-coming-soon-maintenance .comingsoon:not(.' + tab + ')').css('display', 'none');
23
 
24
  if ( tab == 'install' ) {
25
+ jQuery('.cmp-coming-soon-maintenance .submit').css('display', 'none');
26
+ jQuery('.cmp-coming-soon-maintenance #csoptions').attr('action', action);
27
  } else {
28
+ jQuery('.cmp-coming-soon-maintenance .submit').css('display', 'block');
29
  // change form action to display current tab after save
30
+ jQuery('.cmp-coming-soon-maintenance #csoptions').attr('action', action + '#' + tab);
31
  }
32
  }
33
 
34
  if ( tab != '' ) {
35
  navtab(tab);
36
  } else {
37
+ jQuery('.cmp-coming-soon-maintenance .table-wrapper-css').css('display', 'none');
38
  }
39
 
40
  window.onhashchange = function(){
42
  navtab(tab);
43
  }
44
 
45
+ $('.cmp-coming-soon-maintenance .nav-tab:not(.theme-preview)').click(function(e) {
46
  e.preventDefault();
47
  tab = $(this).data('tab');
48
  document.location.hash = tab;
49
  });
50
 
51
  // update range inputs on change
52
+ update_range('.cmp-coming-soon-maintenance .blur-range');
53
+ update_range('.cmp-coming-soon-maintenance .background-overlay-opacity');
54
 
55
  // create media upload buttons
56
+ // selector, multipe, type, element to render
57
+ media_upload_button('logo', false, 'image', 'img');
58
+ media_upload_button('favicon', false, 'image', 'img');
59
+ media_upload_button('images', true, 'image', 'img');
60
+ media_upload_button('pattern', false, 'image', 'background');
61
+ media_upload_button('video-thumb', false, 'image', 'img');
62
+ media_upload_button('video-local', false, 'video', 'video');
63
 
64
  // show / hide settings
65
  toggle_settings( 'analytics' );
66
  toggle_settings( 'contact-form' );
67
  toggle_settings( 'subscribe' );
68
  toggle_settings( 'background-effect' );
69
+ toggle_settings( 'special-effect' );
70
  toggle_settings( 'cmp-logo' );
71
+ toggle_settings( 'background-type' );
72
+ toggle_select( 'subscribe-method' );
73
+ toggle_select( 'background-overlay' );
74
+ toggle_select( 'banner-video-source');
75
 
76
  // change all selects to select2
77
+ jQuery('.cmp-coming-soon-maintenance select:not(.headings-google-font):not(.content-google-font )').select2({
78
  width: '100%',
79
  minimumResultsForSearch: -1,
 
80
  });
81
 
82
+ jQuery('.cmp-coming-soon-maintenance #cmp-status').click(function(){
83
+ jQuery('.cmp-coming-soon-maintenance .cmp-status input[type=radio]').prop('disabled', function (_, val) { return ! val; });
84
+ jQuery('.cmp-coming-soon-maintenance #cmp-status-menubar').prop('checked', function (_, val) { return ! val; });
 
85
  });
86
 
 
87
  cmp_status_inputs();
88
 
89
  function cmp_status_inputs() {
90
 
91
  // Make clickable status radio buttons
92
+ jQuery('.cmp-coming-soon-maintenance .cmp-status legend:not(.disabled)').click(function(){
93
+ if ( jQuery('.cmp-coming-soon-maintenance #cmp-status').prop('checked') == false ) {
94
  return;
95
  }
96
  var $children = jQuery(this).children('input');
97
  $children.prop("checked", true);
98
+ jQuery('.cmp-coming-soon-maintenance .cmp-status legend').removeClass('active');
99
  jQuery(this).addClass('active');
100
 
101
  $children.trigger('change');
102
 
103
  if ( $children.val() == '3' ) {
104
+ jQuery('.cmp-coming-soon-maintenance .redirect-inputs').fadeIn('fast');
105
  } else {
106
+ jQuery('.cmp-coming-soon-maintenance .redirect-inputs').fadeOut('fast');
107
  }
108
  });
109
  }
110
 
 
111
  // expandable tabs
112
+ jQuery('.cmp-coming-soon-maintenance .table-wrapper h3').click(function(){
113
  jQuery(this).parent().toggleClass('closed');
114
  });
115
 
 
116
  // test unsplash image
117
+ jQuery('.cmp-coming-soon-maintenance #test-unsplash').click(function(e){
118
  e.preventDefault();
119
 
120
+ var media_wrapper = jQuery('.cmp-coming-soon-maintenance #unsplash-media'),
121
+ unsplash_feed = jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(),
122
  unsp_url = '',
123
  feat = '',
124
  custom_str = '',
127
  switch( unsplash_feed ) {
128
  // specific photo
129
  case '0':
130
+ unsp_url = jQuery('.cmp-coming-soon-maintenance #niteoCS-unsplash-0').val();
131
  break;
132
 
133
  // random from user
134
  case '1':
135
+ custom_str = jQuery('.cmp-coming-soon-maintenance #niteoCS-unsplash-1').val();
136
  break;
137
 
138
  // random from collection
139
  case '2':
140
+ unsp_url = jQuery('.cmp-coming-soon-maintenance .cmp-coming-soon-maintenance #niteoCS-unsplash-2').val();
141
  break;
142
 
143
  // random photo
144
  case '3':
145
  unsp_url = jQuery('#niteoCS-unsplash-3').val();
146
+ if ( jQuery('.cmp-coming-soon-maintenance #niteoCS_unsplash_feat' ).is( ':checked' ) ) {
147
  feat = '1';
148
  } else {
149
  feat = '0';
161
 
162
  jQuery(this).prop('disabled', true);
163
  jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');
164
+ // media_wrapper.html('');
165
 
166
  var data = {
167
  action: 'niteo_unsplash',
204
  jQuery(this).fadeIn();
205
  jQuery('#test-unsplash').prop('disabled', false);
206
  jQuery('#test-unsplash').text('Display Unsplash Photo');
207
+ jQuery('#unsplash-media').parent().after('<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>')
208
+ jQuery( '.blur-range' ).trigger('input');
209
  clearTimeout(loadingTimeout);
210
  });
211
 
212
+
213
+
214
  } else {
215
+ jQuery('.cmp-coming-soon-maintenance #test-unsplash').prop('disabled', false);
216
+ jQuery('.cmp-coming-soon-maintenance #test-unsplash').text('Display Unsplash Photo');
217
+ jQuery('.cmp-coming-soon-maintenance #unsplash-media').html('<p>Error '+unsplash.response+': <span style="text-transform:lowercase;">'+unsplash.body+'</span></p>');
218
  clearTimeout(loadingTimeout);
219
  }
220
 
221
  });
222
  } else {
223
+ jQuery('.cmp-coming-soon-maintenance #unsplash_img').remove();
224
  }
225
 
226
  });
227
 
228
 
229
+
230
  videoPreview = function() {
 
 
 
 
 
 
 
 
231
 
232
+ // return of video background is not selected
233
+ if ( jQuery('.cmp-coming-soon-maintenance .background-type:checked' ).val() != '5' ) {
234
+ return;
235
+ }
236
 
237
+ var source = $('.cmp-coming-soon-maintenance .banner-video-source').val();
 
238
 
239
+ if ( source == 'youtube' ) {
 
 
 
 
240
 
241
+ var youtubeURL = $('.cmp-coming-soon-maintenance #niteoCS-youtube-url').val();
 
 
 
242
 
243
+ // get YT thumbnail and append it to wrapper
244
+ if ( youtubeURL != '' ) {
245
+ var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
246
+ var ytID = youtubeURL.match(regExp);
247
 
248
+ if ( ytID && ytID[7].length == 11 ) {
249
+ jQuery('.cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper').html('');
250
+ var ytThumb = 'https://img.youtube.com/vi/' + ytID[7] + '/maxresdefault.jpg';
251
+ jQuery('.cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper').append('<img src="' + ytThumb + '" alt=""/>');
252
+ jQuery( '.cmp-coming-soon-maintenance .blur-range' ).trigger('input');
253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  } else {
255
+ jQuery('.cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper').html('');
 
 
256
  }
257
+ }
 
 
 
 
 
258
  }
259
 
260
+ // append local video
261
+ if ( source == 'local' ) {
262
+ var videoURL = jQuery('#niteoCS-video-local-id').data('url');
263
+
264
  if ( videoURL != '' ) {
265
+ $('.cmp-coming-soon-maintenance .video-local-wrapper').html('<video width="600" height="400" controls><source src="'+videoURL+'" type="video/mp4">Your browser does not support the video tag.</video>');
266
  }
267
 
268
  }
269
  };
270
 
271
+ // display video on load
272
+ videoPreview();
273
+
274
+ // display videos on background change to video type
275
+ jQuery('.cmp-coming-soon-maintenance .background-type').on('change', function() {
276
  videoPreview();
 
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  });
 
279
 
280
+ // display YT video while inserting YT URL
281
+ jQuery('.cmp-coming-soon-maintenance #niteoCS-youtube-url').on('keyup', function() {
282
+ videoPreview();
283
+ });
284
 
285
+ jQuery('.cmp-coming-soon-maintenance .banner-video-source').on('change', function() {
286
+ videoPreview();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  });
288
 
 
289
 
290
  // display selected unsplash feed
291
+ var unsplashfeed = jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val();
292
+ jQuery('#unsplash-feed-' + unsplashfeed).css('display', 'block');
293
 
294
+ jQuery('.unsplash_banner select[name^="unsplash_feed"]').on('change', function() {
295
+ unsplashfeed = jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val();
296
  jQuery('.unsplash-feed').css('display', 'none');
297
+ jQuery('#unsplash-feed-' + unsplashfeed).css('display', 'block');
298
  jQuery('#test-unsplash').trigger('click');
299
  });
300
 
305
 
306
 
307
  // preview gradient on select change
308
+ jQuery('.cmp-coming-soon-maintenance select.background-gradient').on('change', function() {
309
+ var gradient = jQuery('.cmp-coming-soon-maintenance select.background-gradient option:selected').val();
310
 
311
  if ( gradient == 'custom' ) {
312
+ jQuery('.cmp-coming-soon-maintenance .custom-gradient').css('display', 'block');
313
+ jQuery('.cmp-coming-soon-maintenance .gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
314
  'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
315
  'background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'});
316
  } else {
317
  colors = gradient.split(':');
318
+ jQuery('.cmp-coming-soon-maintenance .custom-gradient').css('display', 'none');
319
+ jQuery('.cmp-coming-soon-maintenance .gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
320
  'background':'-webkit-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
321
  'background':'linear-gradient(135deg, '+colors[0]+' 0%, '+colors[1]+' 100%)'});
322
  }
323
  }).trigger('change');
324
 
325
+
326
+
327
  // banner background colorpicker
328
+ jQuery('.cmp-coming-soon-maintenance #niteoCS_banner_color').wpColorPicker({
329
  change: function(event, ui){
330
  jQuery('.color-preview').css('background-color', ui.color.toString());
331
+ }
 
332
  });
333
 
334
+ // banner gradient background colorpicker one
335
+ jQuery('.cmp-coming-soon-maintenance #niteoCS_gradient_one').wpColorPicker({
336
  change: function(event, ui){
337
  jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
338
  'background':'-webkit-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
339
  'background':'linear-gradient(135deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'});
340
+ }
341
  });
342
 
343
+ // banner gradient background colorpicker two
344
+ jQuery('.cmp-coming-soon-maintenance #niteoCS_gradient_two').wpColorPicker({
345
  change: function(event, ui){
346
  jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
347
  'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
348
  'background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)'});
349
+ }
350
+ });
351
+
352
+ // OVERLAY COLOR
353
+ jQuery('.cmp-coming-soon-maintenance #niteoCS_overlay_color').wpColorPicker({
354
+ change: function(event, ui){
355
+ jQuery('.thumbnail-overlay').css('background', ui.color.toString());
356
+ }
357
+ });
358
+
359
+ // get overlay color and apply it to Background thumbnails
360
+ jQuery('.cmp-coming-soon-maintenance .thumbnail-overlay').css('background', jQuery('#niteoCS_overlay_color').val() );
361
+
362
+ // OVERLAY GRADIENT
363
+ jQuery('.cmp-coming-soon-maintenance select.overlay-gradient').on('change', function() {
364
+ var overlay_gradient = jQuery('select.overlay-gradient option:selected').val();
365
+
366
+ if ( overlay_gradient == 'custom' ) {
367
+ jQuery('.cmp-coming-soon-maintenance .custom-overlay-gradient').css('display', 'block');
368
+
369
+ var gradient_one = jQuery('#niteoCS_overlay_gradient_one').val();
370
+ var gradient_two = jQuery('#niteoCS_overlay_gradient_two').val();
371
+
372
+ jQuery('.cmp-coming-soon-maintenance .thumbnail-overlay').css({'background':'-moz-linear-gradient(-45deg, '+ gradient_one +' 0%, '+ gradient_two +' 100%)',
373
+ 'background':'-webkit-linear-gradient(-45deg, '+ gradient_one +' 0%, '+ gradient_two +' 100%)',
374
+ 'background':'linear-gradient(135deg, '+ gradient_one +' 0%, '+ gradient_two +' 100%)'});
375
+ } else {
376
+ colors = overlay_gradient.split(':');
377
+ jQuery('.cmp-coming-soon-maintenance .custom-overlay-gradient').css('display', 'none');
378
+ jQuery('.cmp-coming-soon-maintenance .thumbnail-overlay').css({'background':'-moz-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
379
+ 'background':'-webkit-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
380
+ 'background':'linear-gradient(135deg, '+colors[0]+' 0%, '+colors[1]+' 100%)'});
381
+ }
382
+ });
383
+
384
+ // Overlay gradient colorpicker one
385
+ jQuery('#niteoCS_overlay_gradient_one').wpColorPicker({
386
+ change: function(event, ui){
387
+ jQuery('.thumbnail-overlay').css({'background':'-moz-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_overlay_gradient_two').val()+' 100%)',
388
+ 'background':'-webkit-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_overlay_gradient_two').val()+' 100%)',
389
+ 'background':'linear-gradient(135deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_overlay_gradient_two').val()+' 100%)'});
390
+ }
391
+ });
392
+
393
+ // Overlay gradient colorpicker two
394
+ jQuery('#niteoCS_overlay_gradient_two').wpColorPicker({
395
+ change: function(event, ui){
396
+ jQuery('.thumbnail-overlay').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_overlay_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
397
+ 'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_overlay_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
398
+ 'background':'linear-gradient(135deg, '+jQuery('#niteoCS_overlay_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)'});
399
+ }
400
+ });
401
+
402
+ // OVERLAY OPACITY
403
+ jQuery( '.background-overlay-opacity' ).on('input', function () {
404
+ var value = jQuery(this).val();
405
+ jQuery('.thumbnail-overlay').css('opacity', value);
406
+
407
+ }).trigger('input');
408
+
409
+ // OVERLAY SELECTION
410
+ gradientIni( jQuery('.cmp-coming-soon-maintenance .background-overlay').val() );
411
+
412
+ jQuery('.cmp-coming-soon-maintenance .background-overlay').on('change', function() {
413
+ gradientIni( jQuery(this).val() );
414
+
415
  });
416
 
417
+ function gradientIni( gradient_type ) {
418
+ switch ( gradient_type ) {
419
+ case 'solid-color' :
420
+ console.log( jQuery('.cmp-coming-soon-maintenance #niteoCS_overlay_color').val() );
421
+ jQuery('.thumbnail-overlay').css('background', jQuery('#niteoCS_overlay_color').val() );
422
+ break;
423
+
424
+ case 'gradient' :
425
+ jQuery('.cmp-coming-soon-maintenance select.overlay-gradient').trigger('change');
426
+ break;
427
+
428
+ case 'disabled' :
429
+ jQuery('.cmp-coming-soon-maintenance .thumbnail-overlay').css('background', 'none');
430
+ break;
431
+
432
+ default:
433
+ break;
434
+ }
435
+ }
436
+
437
+
438
+ // BLUR PREVIEW
439
+ jQuery( '.cmp-coming-soon-maintenance .blur-range' ).on('input', function () {
440
+ var value = jQuery(this).val();
441
+ jQuery('.cmp-coming-soon-maintenance .background-thumb-wrapper img:not(.no-blur)').css('filter', 'blur(' + value + 'px)');
442
+
443
+ }).trigger('input');
444
+
445
  // banner pattern on change image preview
446
+ jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"]').on('change', function() {
447
+ var pattern = jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"] option:selected').val();
448
 
449
  if (pattern != 'custom') {
450
  var pattern_url = jQuery(this).data('url');
451
+ jQuery('.cmp-coming-soon-maintenance #add-pattern').css('display', 'none');
452
+ jQuery('.cmp-coming-soon-maintenance .pattern-wrapper').css('background-image', 'url(\''+pattern_url+pattern+'.png\')');
453
 
454
  } else {
455
+ var pattern_url = jQuery('.cmp-coming-soon-maintenance #niteoCS_banner_pattern_custom').val();
456
+ jQuery('.cmp-coming-soon-maintenance #add-pattern').css('display', 'block');
457
+ jQuery('.cmp-coming-soon-maintenance .pattern-wrapper').css('background-image', 'url(\''+pattern_url+'\')');
458
 
459
  }
460
  });
461
 
462
  // preview animation
463
+ jQuery('.cmp-coming-soon-maintenance .heading-animation').on('change', function() {
464
+ heading_anim = jQuery('.cmp-coming-soon-maintenance .heading-animation option:selected').val();
465
+ jQuery('.cmp-coming-soon-maintenance #heading-example').removeClass().addClass('animated ' + heading_anim);
466
  });
467
 
468
+ jQuery('.cmp-coming-soon-maintenance .content-animation').on('change', function() {
469
+ heading_anim = jQuery('.cmp-coming-soon-maintenance .content-animation option:selected').val();
470
+ jQuery('.cmp-coming-soon-maintenance #content-example').removeClass().addClass('animated ' + heading_anim);
471
  });
472
 
 
473
  // ----------------------- sortable social list -----------------------
474
  // function to update social list
475
  var update_social = function(name, key, val){
476
+ var socialmedia = $('.cmp-coming-soon-maintenance #niteoCS_socialmedia').attr('value');
477
  socialmedia = $.parseJSON(socialmedia);
478
 
479
  $.each(socialmedia, function(i, ele){
482
  }
483
  });
484
 
485
+ $('.cmp-coming-soon-maintenance #niteoCS_socialmedia').attr('value', JSON.stringify(socialmedia));
486
  };
487
 
488
  // sortable UI
489
+ var $sortableList = $('.cmp-coming-soon-maintenance .social-inputs');
490
 
491
  var sortEventHandler = function(event, ui){
492
 
525
  };
526
  })(jQuery);
527
 
528
+ jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function(){
529
  var name = jQuery(this).data('name');
530
  var socialurl = jQuery(this).attr('value');
531
  update_social(name, 'url', socialurl);
532
  });
533
 
534
+ jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function(e){
535
  var $this = $(this).siblings('input[type="text"]');
536
  $this.toggleDisabled();
537
  });
538
 
539
  // social icons active/inactive
540
+ jQuery('.cmp-coming-soon-maintenance .social-media i').click(function() {
541
  var name = jQuery(this).data('name');
542
  jQuery(this).toggleClass('active');
543
+ jQuery('.cmp-coming-soon-maintenance .social-inputs li.' + name).toggleClass('active');
544
+ jQuery('.cmp-coming-soon-maintenance .social-inputs li.' + name + ' input').trigger('change');
545
 
546
  if (jQuery(this).hasClass('active')) {
547
  update_social(name, 'hidden', '0');
549
  update_social(name, 'hidden', '1');
550
  }
551
  // hide/show input labels
552
+ if (jQuery('.cmp-coming-soon-maintenance .social-media i.active').length) {
553
  jQuery('.social-inputs .label').css('display', 'block');
554
  } else {
555
+ jQuery('.cmp-coming-soon-maintenance .social-inputs .label').css('display', 'none');
556
  }
557
  });
558
+
559
  // hide/show input labels
560
+ if (jQuery('.cmp-coming-soon-maintenance .social-media i.active').length) {
561
+ jQuery('.cmp-coming-soon-maintenance .social-inputs .label').css('display', 'block');
562
  }
563
 
 
 
564
  // theme update admin notice view release notes
565
+ jQuery('.cmp-coming-soon-maintenance .view-release').click(function(e) {
566
  e.preventDefault();
567
  $this = jQuery(this);
568
  var release_url = $this.attr('href');
569
+
570
  jQuery.get(release_url, function( release ) {
571
  $this.closest('.notice').find('.release-note .notes').remove();
572
  $this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>');
573
+
574
  }).fail(function() {
575
  $this.closest('.notice').find('.release-note p').remove();
576
  $this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>');
578
  });
579
 
580
  // theme update via admin notice
581
+ jQuery('.cmp-coming-soon-maintenance .update-theme').click(function(e) {
582
  e.preventDefault();
583
  var $this = $(this),
584
  $parent = $this.parents('.notice'),
602
 
603
  $.post(ajaxurl, data, function(response) {
604
  response = response.trim();
605
+ if ( response == 'success' ) {
606
  setTimeout(function(){
 
607
  $parent.removeClass('notice-warning').addClass('notice-success');
608
  $parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
609
  }, 1500);
610
 
611
  } else {
 
612
  response = response.slice(0,-1);
613
  var error = $('p', $(response)).text();
614
  $parent.removeClass('notice-warning').addClass('notice-error');
619
 
620
  // theme-selector scripts
621
  // select theme by click on thumbnail or select button
622
+ jQuery('.cmp-coming-soon-maintenance .theme-select').click(function(){
623
+ jQuery(this).parent().find('input[name="niteoCS_select_theme"]').prop("checked", true).trigger('change');
624
+ jQuery('.cmp-coming-soon-maintenance .theme-select').removeClass('selected');
625
  jQuery(this).parent().find('.theme-select').addClass('selected');
626
  });
627
 
 
628
  // theme update via theme button
629
+ jQuery('.cmp-coming-soon-maintenance .theme-update.button').one('click',function(e) {
630
  e.preventDefault();
631
  var $this = $(this),
632
  $wrapper = $this.closest('.theme-wrapper'),
649
  $this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');
650
 
651
  $.post(ajaxurl, data, function(response) {
652
+ if ( response == 'success' ) {
653
  setTimeout(function(){
654
  $this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');
655
  setTimeout(function(){
665
  });
666
 
667
  // display theme details overlay
668
+ jQuery('.cmp-coming-soon-maintenance .theme-details').click(function() {
669
 
670
  var $this = $(this),
671
  $wrapper = $this.closest('.theme-wrapper'),
694
  // parse JSON data to array
695
  response = jQuery.parseJSON(response);
696
 
 
697
  if ( response.result == 'true' ) {
698
  // overflow body hidden
699
  jQuery('body').addClass('modal-open');
711
  var newVer = jQuery('.update-theme').data('new_ver');
712
  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>';
713
  }
 
 
714
  }
715
  }
716
 
718
  if ( purchased != '1' && type == 'premium' ){
719
  var buttonDisabled = 'disabled ';
720
  var buyURL = $wrapper.find('a').attr('href');
721
+ 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>Get Theme</a></button>';
 
 
 
 
 
 
 
722
  }
723
 
724
  // get screenshots
785
  jQuery('.theme-overlay.cmp .activate').click(function(e) {
786
  e.preventDefault();
787
  // select theme
788
+ jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_select_theme"]').each(function() {
789
  if ( jQuery(this).val() == slug ) {
790
  jQuery(this).prop('checked', true);
791
  jQuery('.theme-select').removeClass('selected');
826
 
827
  });
828
 
 
 
 
829
  // define functions //
830
  function ucwords (str) {
831
  return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) {
837
  return (str+'').toLowerCase();
838
  }
839
 
840
+ function media_upload_button (name, multiple, type, element) {
841
  // define var
842
  var $container = jQuery('.'+name+'-wrapper');
843
  var $add_button = jQuery('#add-'+name);
854
 
855
  $add_button.click(function(e) {
856
  e.preventDefault();
857
+ // If the media frame already exists, reopen it.
858
  if ( media_uploader ) {
859
  media_uploader.open();
860
  return;
874
  // Get media attachment details from the frame state
875
  var attachment = media_uploader.state().get('selection').toJSON();
876
 
877
+ if ( attachment.length > 0 ) {
878
+ $container.find('img').remove();
879
 
880
+ // remove and add gallery count class
881
+ $container.attr('class', name + '-wrapper custom-gallery');
882
+ $container.addClass('gallery-' + attachment.length);
883
+
884
+ // get images ID, append thumbnail and store IDs in hidden input
885
  jQuery(attachment).each(function(i) {
886
  if (attachment[i].sizes && attachment[i].sizes.large) {
887
  image = attachment[i].sizes.large.url;
890
  }
891
 
892
  // add image ID and url to comma-separated variable
893
+ var comma = ( i === 0 ) ? '' : ',';
894
  imgID += ( comma + attachment[i].id );
 
895
 
896
+ // Send the attachment URL to our custom image input field.
897
+ switch ( element ) {
898
+ case 'video':
899
+ $container.append( '<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>' );
900
+ break;
901
+
902
+ case 'background':
903
+ $container.css('background-image', 'url(\''+image+'\')');
904
+ break;
905
+
906
+ case 'img':
907
+ default:
908
+ // if gallery - more than one image, it must be a graphic background, attach the first image to big coontainer
909
+ if ( attachment.length > 1 && i == 0 ) {
910
+ jQuery('.big-thumb').append( '<img src="' + image + '" alt=""/>' );
911
+
912
+ // if gallery - more than one image, it must be a graphic background, attach all others images to normal wrapper
913
+ } else if ( attachment.length > 1 && i !== 0 ) {
914
+ $container.append( '<img src="' + image + '" alt="" class="no-blur"/>' );
915
+
916
+ // if single image, and it is a background image, attach it to big container as well
917
+ } else if ( $container.find('.big-thumb').length ) {
918
+ jQuery('.big-thumb').append( '<img src="' + image + '" alt=""/>' );
919
+
920
+ // all others images
921
+ } else {
922
+ $container.append( '<img src="' + image + '" alt=""/>' );
923
+ }
924
+
925
+ jQuery( '.blur-range' ).trigger('input');
926
+ break;
927
  }
928
 
929
  });
933
 
934
  }
935
  // update hidden input with media id and trigger change
936
+ jQuery('#niteoCS-'+name+'-id').val( imgID ).trigger('change');
937
 
938
  })
939
+ .open();
 
 
940
  });
941
 
 
942
  $delete_button.click(function(e) {
943
  jQuery(this).css('display', 'none');
944
+ $container.find('img').remove();
945
  jQuery('#niteoCS-'+name+'-id').val('');
946
  jQuery('#niteoCS-'+name+'-id').trigger('change');
 
947
  });
948
  }
949
 
 
950
  // Retrieve Mailchimp lists
951
+ jQuery('.cmp-coming-soon-maintenance #connect-mailchimp').click(function(e){
952
  e.preventDefault();
953
 
954
+ var apikey = jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(),
955
  security = jQuery(this).data('security'),
956
  button = jQuery(this);
957
 
994
  }
995
  });
996
 
 
997
  function toggle_settings ( classname ) {
998
  // Logo type inputs
999
+ jQuery('.cmp-coming-soon-maintenance .' + classname).change(function() {
1000
 
1001
+ var value = jQuery('.cmp-coming-soon-maintenance .' + classname + ':checked' ).val();
1002
+ value = ( jQuery.isNumeric(value) ) ? 'x' + value : value;
1003
 
1004
+ jQuery('.cmp-coming-soon-maintenance .' + classname + '-switch.' + value).css('display','block');
1005
+ jQuery('.cmp-coming-soon-maintenance .' + classname + '-switch:not(.' + value + ')').css('display','none');
1006
 
1007
  });
1008
 
1009
+ jQuery('.cmp-coming-soon-maintenance .'+classname).first().trigger('change');
 
1010
  }
1011
 
1012
  function toggle_select ( classname ) {
1013
+
1014
+ jQuery('.cmp-coming-soon-maintenance .'+classname).change(function() {
1015
  var value = jQuery('.'+classname ).val();
1016
 
1017
+ value = ( jQuery.isNumeric(value) ) ? 'x' + value : value;
1018
 
1019
+ jQuery('.cmp-coming-soon-maintenance .' + classname + '.' + value).css('display','block');
1020
+ jQuery('.cmp-coming-soon-maintenance .' + classname + ':not(.' + value + ')').css('display','none');
1021
 
1022
  });
1023
 
1024
  jQuery('.'+classname).first().trigger('change');
 
1025
  }
1026
 
1027
  function update_range ( selector ) {
1028
  jQuery( selector ).on('input', function () {
1029
  var value = jQuery(this).val();
 
1030
  // change label value
1031
  jQuery(this).parent().find('span').html(value);
1032
 
1033
  });
1034
  }
1035
 
1036
+ // delete overlay color from premium themes after update 2.8
1037
+ jQuery('.cmp-coming-soon-maintenance .table-wrapper.theme-setup h4').each( function() {
1038
+ if ( jQuery(this).html() == 'Overlay Color' ) {
1039
+ jQuery(this).parents('tr').remove();
1040
+ return false;
1041
+ }
1042
+ });
1043
+
1044
  });
1045
 
1046
 
js/settings.min.js CHANGED
@@ -1,38 +1 @@
1
- jQuery(document).ready(function($){var formChanged=!1;var tab=document.location.hash.substring(1);var action=jQuery('#csoptions').attr('action');if(wp.codeEditor){wp.codeEditor.initialize('niteoCS_custom_css')}
2
- navtab=function(tab){jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');jQuery('.nav-tab-wrapper .'+tab).addClass('nav-tab-active');jQuery('.table-wrapper.'+tab).css('display','block');jQuery('.table-wrapper-css.'+tab).css('display','block');jQuery('.comingsoon.'+tab).css('display','block');jQuery('.table-wrapper:not(.'+tab+')').css('display','none');jQuery('.table-wrapper-css:not(.'+tab).css('display','none');jQuery('.comingsoon:not(.'+tab+')').css('display','none');if(tab=='install'){jQuery('.submit').css('display','none');jQuery('#csoptions').attr('action',action)}else{jQuery('.submit').css('display','block');jQuery('#csoptions').attr('action',action+'#'+tab)}}
3
- if(tab!=''){navtab(tab)}else{jQuery('.table-wrapper-css').css('display','none')}
4
- window.onhashchange=function(){tab=document.location.hash.substring(1);navtab(tab)}
5
- $('.nav-tab:not(.theme-preview)').click(function(e){e.preventDefault();tab=$(this).data('tab');document.location.hash=tab});update_range('.blur-range');update_range('.overlay-opacity');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');toggle_settings('analytics');toggle_settings('contact-form');toggle_settings('subscribe');toggle_settings('background-effect');toggle_settings('cmp-logo');toggle_select('subscribe-method');jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({width:'100%',minimumResultsForSearch:-1,});jQuery('#cmp-status').click(function(){jQuery('.cmp-status input[type=radio]').prop("disabled",(_,val)=>!val);jQuery('#cmp-status-menubar').prop("checked",(_,val)=>!val)});cmp_status_inputs();function cmp_status_inputs(){jQuery('.cmp-status legend:not(.disabled)').click(function(){if(jQuery('#cmp-status').prop('checked')==!1){return}
6
- var $children=jQuery(this).children('input');$children.prop("checked",!0);jQuery('.cmp-status legend').removeClass('active');jQuery(this).addClass('active');$children.trigger('change');if($children.val()=='3'){jQuery('.redirect-inputs').fadeIn('fast')}else{jQuery('.redirect-inputs').fadeOut('fast')}})}
7
- jQuery('.table-wrapper h3').click(function(){jQuery(this).parent().toggleClass('closed')});jQuery('#test-unsplash').click(function(e){e.preventDefault();var media_wrapper=jQuery('#unsplash-media'),unsplash_feed=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),unsp_url='',feat='',custom_str='',security=jQuery(this).data('security');switch(unsplash_feed){case '0':unsp_url=jQuery('#niteoCS-unsplash-0').val();break;case '1':custom_str=jQuery('#niteoCS-unsplash-1').val();break;case '2':unsp_url=jQuery('#niteoCS-unsplash-2').val();break;case '3':unsp_url=jQuery('#niteoCS-unsplash-3').val();if(jQuery('#niteoCS_unsplash_feat').is(':checked')){feat='1'}else{feat='0'}
8
- break;default:break}
9
- 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}
10
- 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>')
11
- 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}
12
- if(youtubeLink.match(/(youtu.be)/)||youtubeLink.match(/(vimeo.com\/)+[0-9]/)){var split_c='/';var split_n=3}
13
- if(source=='vimeo'){var youtubeLink=$('#niteoCS-vimeo-url').val();if(youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/)){var split_c='/';var split_n=5}}
14
- 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'}
15
- 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'}
16
- 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')}}
17
- 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')}
18
- 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'}
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>');$.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]+'\')')}})}})});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
- jQuery('#connect-mailchimp').click(function(e){e.preventDefault();var apikey=jQuery('input[name="niteoCS_mailchimp_apikey"]').val(),security=jQuery(this).data('security'),button=jQuery(this);if(apikey!=''){var params={apikey:apikey,security:security};jQuery(this).prop('disabled',!0);jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');var data={action:'cmp_mailchimp_list_ajax',security:security,params:params,};$.post(ajaxurl,data,function(response){var lists=JSON.parse(response);if(lists.response==200){$('#mailchimp-lists-select').empty().prop('disabled',!1);$.each(lists.lists,function(i,val){$('#mailchimp-lists-select').append('<option value="'+val.id+'">'+val.name+'</option>')})}else{$('#mailchimp-lists-select').empty().prop('disabled',!0).html('<option value="error">'+lists.message+'</option>').trigger('change')}
36
- button.html('Retrieve Lists');button.prop('disabled',!1)}).fail(function(){button.html('Retrieve Lists');button.prop('disabled',!1)})}});function toggle_settings(classname){jQuery('.'+classname).change(function(){var value=jQuery('.'+classname+':checked').val();value=(jQuery.isNumeric(value))?'x'+value:value;jQuery('.'+classname+'-switch.'+value).css('display','block');jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none')});jQuery('.'+classname).first().trigger('change')}
37
- function toggle_select(classname){jQuery('.'+classname).change(function(){var value=jQuery('.'+classname).val();value=(jQuery.isNumeric(value))?'x'+value:value;jQuery('.'+classname+'.'+value).css('display','block');jQuery('.'+classname+':not(.'+value+')').css('display','none')});jQuery('.'+classname).first().trigger('change')}
38
- function update_range(selector){jQuery(selector).on('input',function(){var value=jQuery(this).val();jQuery(this).parent().find('span').html(value)})}})
1
+ jQuery(document).ready(function(e){var n=document.location.hash.substring(1),a=jQuery("#csoptions").attr("action");wp.codeEditor&&wp.codeEditor.initialize("niteoCS_custom_css"),navtab=function(e){jQuery(".cmp-coming-soon-maintenance .nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+e).addClass("nav-tab-active"),jQuery(".cmp-coming-soon-maintenance .table-wrapper."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .table-wrapper-css."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .comingsoon."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .table-wrapper:not(."+e+")").css("display","none"),jQuery(".cmp-coming-soon-maintenance .table-wrapper-css:not(."+e).css("display","none"),jQuery(".cmp-coming-soon-maintenance .comingsoon:not(."+e+")").css("display","none"),"install"==e?(jQuery(".cmp-coming-soon-maintenance .submit").css("display","none"),jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action",a)):(jQuery(".cmp-coming-soon-maintenance .submit").css("display","block"),jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action",a+"#"+e))},""!=n?navtab(n):jQuery(".cmp-coming-soon-maintenance .table-wrapper-css").css("display","none"),window.onhashchange=function(){n=document.location.hash.substring(1),navtab(n)},e(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview)").click(function(a){a.preventDefault(),n=e(this).data("tab"),document.location.hash=n}),p(".cmp-coming-soon-maintenance .blur-range"),p(".cmp-coming-soon-maintenance .background-overlay-opacity"),l("logo",!1,"image","img"),l("favicon",!1,"image","img"),l("images",!0,"image","img"),l("pattern",!1,"image","background"),l("video-thumb",!1,"image","img"),l("video-local",!1,"video","video"),m("analytics"),m("contact-form"),m("subscribe"),m("background-effect"),m("special-effect"),m("cmp-logo"),m("background-type"),u("subscribe-method"),u("background-overlay"),u("banner-video-source"),jQuery(".cmp-coming-soon-maintenance select:not(.headings-google-font):not(.content-google-font )").select2({width:"100%",minimumResultsForSearch:-1}),jQuery(".cmp-coming-soon-maintenance #cmp-status").click(function(){jQuery(".cmp-coming-soon-maintenance .cmp-status input[type=radio]").prop("disabled",function(e,n){return!n}),jQuery(".cmp-coming-soon-maintenance #cmp-status-menubar").prop("checked",function(e,n){return!n})}),jQuery(".cmp-coming-soon-maintenance .cmp-status legend:not(.disabled)").click(function(){if(0!=jQuery(".cmp-coming-soon-maintenance #cmp-status").prop("checked")){var e=jQuery(this).children("input");e.prop("checked",!0),jQuery(".cmp-coming-soon-maintenance .cmp-status legend").removeClass("active"),jQuery(this).addClass("active"),e.trigger("change"),"3"==e.val()?jQuery(".cmp-coming-soon-maintenance .redirect-inputs").fadeIn("fast"):jQuery(".cmp-coming-soon-maintenance .redirect-inputs").fadeOut("fast")}}),jQuery(".cmp-coming-soon-maintenance .table-wrapper h3").click(function(){jQuery(this).parent().toggleClass("closed")}),jQuery(".cmp-coming-soon-maintenance #test-unsplash").click(function(n){n.preventDefault();var a=jQuery(".cmp-coming-soon-maintenance #unsplash-media"),t=jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(),o="",i="",c="",r=jQuery(this).data("security");switch(t){case"0":o=jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-0").val();break;case"1":c=jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-1").val();break;case"2":o=jQuery(".cmp-coming-soon-maintenance .cmp-coming-soon-maintenance #niteoCS-unsplash-2").val();break;case"3":o=jQuery("#niteoCS-unsplash-3").val(),i=jQuery(".cmp-coming-soon-maintenance #niteoCS_unsplash_feat").is(":checked")?"1":"0"}if(3==t||""!=o||""!=c){var s={feed:t,url:o,feat:i,custom_str:c};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');var l={action:"niteo_unsplash",security:r,params:s};e.post(ajaxurl,l,function(e){var n=JSON.parse(e);jQuery("#unsplash_img").remove();var t=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>')},5e3);if("200"==n.response){if((n=jQuery.parseJSON(n.body))[0])var o=n[0].urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",i=n[0].user.name,c=n[0].user.links.html,r=n[0].links.html,s=n[0].id;else o=n.urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",i=n.user.name,c=n.user.links.html,r=n.links.html,s=n.id;jQuery("<img />",{src:o,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(a),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery("#unsplash-media").parent().after('<span><a href="'+r+'" target="_blank">Photo</a> (ID: '+s+') by <a href="'+c+'" target="_blank">'+i+'</a> / <a href="https://unsplash.com/" target="_blank">Unsplash</a></span>'),jQuery(".blur-range").trigger("input"),clearTimeout(t)})}else jQuery(".cmp-coming-soon-maintenance #test-unsplash").prop("disabled",!1),jQuery(".cmp-coming-soon-maintenance #test-unsplash").text("Display Unsplash Photo"),jQuery(".cmp-coming-soon-maintenance #unsplash-media").html("<p>Error "+n.response+': <span style="text-transform:lowercase;">'+n.body+"</span></p>"),clearTimeout(t)})}else jQuery(".cmp-coming-soon-maintenance #unsplash_img").remove()}),videoPreview=function(){if("5"==jQuery(".cmp-coming-soon-maintenance .background-type:checked").val()){var n=e(".cmp-coming-soon-maintenance .banner-video-source").val();if("youtube"==n){var a=e(".cmp-coming-soon-maintenance #niteoCS-youtube-url").val();if(""!=a){var t=a.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);if(t&&11==t[7].length){jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("");var o="https://img.youtube.com/vi/"+t[7]+"/maxresdefault.jpg";jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").append('<img src="'+o+'" alt=""/>'),jQuery(".cmp-coming-soon-maintenance .blur-range").trigger("input")}else jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("")}}if("local"==n){var i=jQuery("#niteoCS-video-local-id").data("url");""!=i&&e(".cmp-coming-soon-maintenance .video-local-wrapper").html('<video width="600" height="400" controls><source src="'+i+'" type="video/mp4">Your browser does not support the video tag.</video>')}}},videoPreview(),jQuery(".cmp-coming-soon-maintenance .background-type").on("change",function(){videoPreview()}),jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").on("keyup",function(){videoPreview()}),jQuery(".cmp-coming-soon-maintenance .banner-video-source").on("change",function(){videoPreview()});var t=jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val();function o(e){switch(e){case"solid-color":console.log(jQuery(".cmp-coming-soon-maintenance #niteoCS_overlay_color").val()),jQuery(".thumbnail-overlay").css("background",jQuery("#niteoCS_overlay_color").val());break;case"gradient":jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").trigger("change");break;case"disabled":jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background","none")}}jQuery("#unsplash-feed-"+t).css("display","block"),jQuery('.unsplash_banner select[name^="unsplash_feed"]').on("change",function(){t=jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+t).css("display","block"),jQuery("#test-unsplash").trigger("click")}),1==jQuery("#csoptions .niteoCS_banner:checked").val()&&jQuery("#test-unsplash").trigger("click"),jQuery(".cmp-coming-soon-maintenance select.background-gradient").on("change",function(){var e=jQuery(".cmp-coming-soon-maintenance select.background-gradient option:selected").val();"custom"==e?(jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display","block"),jQuery(".cmp-coming-soon-maintenance .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%)"})):(colors=e.split(":"),jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display","none"),jQuery(".cmp-coming-soon-maintenance .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(".cmp-coming-soon-maintenance #niteoCS_banner_color").wpColorPicker({change:function(e,n){jQuery(".color-preview").css("background-color",n.color.toString())}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_one").wpColorPicker({change:function(e,n){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_two").wpColorPicker({change:function(e,n){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)"})}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_overlay_color").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css("background",n.color.toString())}}),jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background",jQuery("#niteoCS_overlay_color").val()),jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").on("change",function(){var e=jQuery("select.overlay-gradient option:selected").val();if("custom"==e){jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display","block");var n=jQuery("#niteoCS_overlay_gradient_one").val(),a=jQuery("#niteoCS_overlay_gradient_two").val();jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+n+" 0%, "+a+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n+" 0%, "+a+" 100%)",background:"linear-gradient(135deg, "+n+" 0%, "+a+" 100%)"})}else colors=e.split(":"),jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display","none"),jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").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%)"})}),jQuery("#niteoCS_overlay_gradient_one").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)"})}}),jQuery("#niteoCS_overlay_gradient_two").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)"})}}),jQuery(".background-overlay-opacity").on("input",function(){var e=jQuery(this).val();jQuery(".thumbnail-overlay").css("opacity",e)}).trigger("input"),o(jQuery(".cmp-coming-soon-maintenance .background-overlay").val()),jQuery(".cmp-coming-soon-maintenance .background-overlay").on("change",function(){o(jQuery(this).val())}),jQuery(".cmp-coming-soon-maintenance .blur-range").on("input",function(){var e=jQuery(this).val();jQuery(".cmp-coming-soon-maintenance .background-thumb-wrapper img:not(.no-blur)").css("filter","blur("+e+"px)")}).trigger("input"),jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"]').on("change",function(){var e=jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"] option:selected').val();if("custom"!=e){var n=jQuery(this).data("url");jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display","none"),jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image","url('"+n+e+".png')")}else{n=jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_pattern_custom").val();jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display","block"),jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image","url('"+n+"')")}}),jQuery(".cmp-coming-soon-maintenance .heading-animation").on("change",function(){heading_anim=jQuery(".cmp-coming-soon-maintenance .heading-animation option:selected").val(),jQuery(".cmp-coming-soon-maintenance #heading-example").removeClass().addClass("animated "+heading_anim)}),jQuery(".cmp-coming-soon-maintenance .content-animation").on("change",function(){heading_anim=jQuery(".cmp-coming-soon-maintenance .content-animation option:selected").val(),jQuery(".cmp-coming-soon-maintenance #content-example").removeClass().addClass("animated "+heading_anim)});var i,c=function(n,a,t){var o=e(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value");o=e.parseJSON(o),e.each(o,function(e,o){o.name==n&&(o[a]=t)}),e(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value",JSON.stringify(o))},r=e(".cmp-coming-soon-maintenance .social-inputs"),s=function(n,a){var t=r.find('input[type="text"]');a.item.index();t.each(function(n,a){var t=e(a).data("name");c(t,"order",n)})};function l(e,n,a,t){var o,i=jQuery("."+e+"-wrapper"),c=jQuery("#add-"+e),r=jQuery("#delete-"+e),s="",l=e.replace("-"," ");l=l[0].toUpperCase()+l.slice(1),""!=jQuery("#niteoCS-"+e+"-id").val()&&r.css("display","block"),c.click(function(c){if(c.preventDefault(),m)m.open();else var m=wp.media({title:"Select "+l,button:{text:"Insert "+l},multiple:n,library:{type:[a]}}).on("select",function(){var n=m.state().get("selection").toJSON();n.length>0&&(i.find("img").remove(),i.attr("class",e+"-wrapper custom-gallery"),i.addClass("gallery-"+n.length),jQuery(n).each(function(e){switch(o=n[e].sizes&&n[e].sizes.large?n[e].sizes.large.url:n[e].url,s+=(0===e?"":",")+n[e].id,t){case"video":i.append('<video width="600" height="400" controls><source src="'+o+'" type="video/mp4">Your browser does not support the video tag.</video>');break;case"background":i.css("background-image","url('"+o+"')");break;case"img":default:n.length>1&&0==e?jQuery(".big-thumb").append('<img src="'+o+'" alt=""/>'):n.length>1&&0!==e?i.append('<img src="'+o+'" alt="" class="no-blur"/>'):i.find(".big-thumb").length?jQuery(".big-thumb").append('<img src="'+o+'" alt=""/>'):i.append('<img src="'+o+'" alt=""/>'),jQuery(".blur-range").trigger("input")}}),r.css("display","block")),jQuery("#niteoCS-"+e+"-id").val(s).trigger("change")}).open()}),r.click(function(n){jQuery(this).css("display","none"),i.find("img").remove(),jQuery("#niteoCS-"+e+"-id").val(""),jQuery("#niteoCS-"+e+"-id").trigger("change")})}function m(e){jQuery(".cmp-coming-soon-maintenance ."+e).change(function(){var n=jQuery(".cmp-coming-soon-maintenance ."+e+":checked").val();n=jQuery.isNumeric(n)?"x"+n:n,jQuery(".cmp-coming-soon-maintenance ."+e+"-switch."+n).css("display","block"),jQuery(".cmp-coming-soon-maintenance ."+e+"-switch:not(."+n+")").css("display","none")}),jQuery(".cmp-coming-soon-maintenance ."+e).first().trigger("change")}function u(e){jQuery(".cmp-coming-soon-maintenance ."+e).change(function(){var n=jQuery("."+e).val();n=jQuery.isNumeric(n)?"x"+n:n,jQuery(".cmp-coming-soon-maintenance ."+e+"."+n).css("display","block"),jQuery(".cmp-coming-soon-maintenance ."+e+":not(."+n+")").css("display","none")}),jQuery("."+e).first().trigger("change")}function p(e){jQuery(e).on("input",function(){var e=jQuery(this).val();jQuery(this).parent().find("span").html(e)})}r.sortable({stop:s}),r.on("sortchange",s),(i=jQuery).fn.toggleDisabled=function(){return this.each(function(){var e,n=i(this),a=n.data("name");n.attr("disabled")?(n.prop("disabled",!1),e="1"):(n.prop("disabled",!0),e="0"),c(a,"active",e)})},jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),n=jQuery(this).attr("value");c(e,"url",n)}),jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function(n){e(this).siblings('input[type="text"]').toggleDisabled()}),jQuery(".cmp-coming-soon-maintenance .social-media i").click(function(){var e=jQuery(this).data("name");jQuery(this).toggleClass("active"),jQuery(".cmp-coming-soon-maintenance .social-inputs li."+e).toggleClass("active"),jQuery(".cmp-coming-soon-maintenance .social-inputs li."+e+" input").trigger("change"),jQuery(this).hasClass("active")?c(e,"hidden","0"):c(e,"hidden","1"),jQuery(".cmp-coming-soon-maintenance .social-media i.active").length?jQuery(".social-inputs .label").css("display","block"):jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display","none")}),jQuery(".cmp-coming-soon-maintenance .social-media i.active").length&&jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display","block"),jQuery(".cmp-coming-soon-maintenance .view-release").click(function(e){e.preventDefault(),$this=jQuery(this);var n=$this.attr("href");jQuery.get(n,function(e){$this.closest(".notice").find(".release-note .notes").remove(),$this.closest(".notice").find(".release-note").append('<div class="notes">'+e+"</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(".cmp-coming-soon-maintenance .update-theme").click(function(n){n.preventDefault();var a=e(this),t=a.parents(".notice"),o=a.data("security"),i=a.data("slug"),c=a.data("name"),r={action:"cmp_theme_update_install",security:o,file:{name:i,tmp_name:"",url:jQuery(this).data("remote_url")+"?action=download&slug="+i}};t.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>'),e.post(ajaxurl,r,function(n){if("success"==(n=n.trim()))setTimeout(function(){t.removeClass("notice-warning").addClass("notice-success"),t.find(".message").html("<span> "+c+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500);else{n=n.slice(0,-1);var a=e("p",e(n)).text();t.removeClass("notice-warning").addClass("notice-error"),t.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+a+"</span>")}})}),jQuery(".cmp-coming-soon-maintenance .theme-select").click(function(){jQuery(this).parent().find('input[name="niteoCS_select_theme"]').prop("checked",!0).trigger("change"),jQuery(".cmp-coming-soon-maintenance .theme-select").removeClass("selected"),jQuery(this).parent().find(".theme-select").addClass("selected")}),jQuery(".cmp-coming-soon-maintenance .theme-update.button").one("click",function(n){n.preventDefault();var a=e(this),t=a.closest(".theme-wrapper"),o=t.data("security"),i=t.data("slug"),c={action:"cmp_theme_update_install",security:o,file:{name:i,tmp_name:"",url:t.data("remote_url")+"?action=download&slug="+i}};a.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),e.post(ajaxurl,c,function(e){"success"==e?setTimeout(function(){a.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){a.fadeOut()},1500)},1500):(e=e.slice(0,-1),a.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".cmp-coming-soon-maintenance .theme-details").click(function(){var n=e(this),a=n.closest(".theme-wrapper"),t=a.data("slug"),o=a.data("version"),i=a.data("remote_url"),c=a.data("type"),r=a.data("purchased"),s=(a.data("freebie"),jQuery(".update-theme").data("security")),l=(a.data("price"),0),m={action:"niteo_themeinfo",security:jQuery(".theme-wrapper").data("security"),theme_slug:jQuery(this).parents(".theme-wrapper").data("slug")};e.post(ajaxurl,m,function(m){var u="",p="",d="",g="";if("true"==(m=jQuery.parseJSON(m)).result){if(jQuery("body").addClass("modal-open"),"1"==r&&(d='<span class="theme-version">Version: '+o+"</span>",g='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>',jQuery(".update-theme").length)){var y=jQuery(".update-theme").data("slug");if(t==y){var h=jQuery(".update-theme").data("new_ver");g='<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 '+m.name+' theme available. <a href="'+i+"readme/"+t+'-readme.php" class="view-release">View update '+h+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+t+'" class="update-theme" data-security="'+s+'" data-slug="'+t+'" data-remote_url="'+i+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}if("1"!=r&&"premium"==c)u="disabled ",p='<button type="button" class="theme-purchase button hide"><a href="'+a.find("a").attr("href")+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>';var v=m.screenshots,j="";Object.keys(v).length>1&&(j='<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>');var Q=e(['<div class="theme-backdrop">','\t<div class="theme-wrap">','\t\t<div class="theme-header">','\t\t\t<button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',"\t\t</div>",'\t\t<div class="theme-about">','\t\t\t<div class="theme-screenshots">','\t\t\t\t<div class="screenshot" style="background-image:url(\''+v[0]+"')\">"+j+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+m.name+d+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+m.author_homepage+'" target="_blank">'+m.author+"</a></p>",g,p,'\t\t\t\t<div class="theme-description">'+m.description+"</div>","\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<button type="submit" '+u+'class="button activate" name="Submit" aria-label="Select '+m.name+'">Activate</button>','\t\t\t<a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+t+"&utm_source=cmp&utm_medium=referral&utm_campaign="+t+'" class="button cmp-preview" target="_blank" aria-label="Preview '+m.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(Q),jQuery(".theme-overlay.cmp .view-release").click(function(e){e.preventDefault();var a=(n=jQuery(this)).attr("href");jQuery.get(a,function(e){n.closest(".notice").find(".release-note .notes").remove(),n.closest(".notice").find(".release-note").append('<div class="notes">'+e+"</div>")}).fail(function(){n.closest(".notice").find(".release-note p").remove(),n.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('.cmp-coming-soon-maintenance input[name="niteoCS_select_theme"]').each(function(){jQuery(this).val()==t&&(jQuery(this).prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().addClass("selected"))}),jQuery(this).submit()}),jQuery(".screenshots-nav .right").click(function(){++l==Object.keys(v).length&&(l=0),l in v&&jQuery(".screenshot").css("background-image","url('"+v[l]+"')")}),jQuery(".screenshots-nav .left").click(function(){--l<0&&(l=Object.keys(v).length-1),l in v&&jQuery(".screenshot").css("background-image","url('"+v[l]+"')")})}})}),jQuery(".cmp-coming-soon-maintenance #connect-mailchimp").click(function(n){n.preventDefault();var a=jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(),t=jQuery(this).data("security"),o=jQuery(this);if(""!=a){var i={apikey:a,security:t};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');var c={action:"cmp_mailchimp_list_ajax",security:t,params:i};e.post(ajaxurl,c,function(n){var a=JSON.parse(n);200==a.response?(e("#mailchimp-lists-select").empty().prop("disabled",!1),e.each(a.lists,function(n,a){e("#mailchimp-lists-select").append('<option value="'+a.id+'">'+a.name+"</option>")})):e("#mailchimp-lists-select").empty().prop("disabled",!0).html('<option value="error">'+a.message+"</option>").trigger("change"),o.html("Retrieve Lists"),o.prop("disabled",!1)}).fail(function(){o.html("Retrieve Lists"),o.prop("disabled",!1)})}}),jQuery(".cmp-coming-soon-maintenance .table-wrapper.theme-setup h4").each(function(){if("Overlay Color"==jQuery(this).html())return jQuery(this).parents("tr").remove(),!1})});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/typography.js CHANGED
@@ -1,7 +1,7 @@
1
  jQuery(document).ready(function($){
2
 
3
- headingVariant = jQuery('.headings-google-font-variant').val();
4
- contentVariant = jQuery('.content-google-font-variant').val();
5
 
6
  fontVariant = function( variant ) {
7
  switch(variant) {
@@ -71,12 +71,11 @@ jQuery(document).ready(function($){
71
  }
72
 
73
  var heading_font = fonts.google.filter(function (element) {
74
- return element.id === jQuery('.headings-google-font option:selected').val();
75
  });
76
 
77
-
78
  var content_font = fonts.google.filter(function (element) {
79
- return element.id === jQuery('.content-google-font option:selected').val();
80
  });
81
 
82
  if (heading_font.length) {
@@ -94,24 +93,24 @@ jQuery(document).ready(function($){
94
 
95
 
96
  // ini select2
97
- $HeadingFont = jQuery( '.headings-google-font' ).select2({
98
  data: fonts.google,
99
  width: '100%',
100
  });
101
 
102
  // ini select2
103
- $contentFont = jQuery( '.content-google-font' ).select2({
104
  data: fonts.google,
105
  width: '100%',
106
  });
107
 
108
  // ini select2
109
- $HeadingFontVariant = jQuery('.headings-google-font-variant').select2({
110
  data: heading_font_variant,
111
  })
112
 
113
  // ini select2
114
- $contentFontVariant = jQuery('.content-google-font-variant').select2({
115
  data: content_font_variant,
116
  })
117
 
@@ -232,7 +231,7 @@ jQuery(document).ready(function($){
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();
1
  jQuery(document).ready(function($){
2
 
3
+ headingVariant = jQuery('.cmp-coming-soon-maintenance .headings-google-font-variant').val();
4
+ contentVariant = jQuery('.cmp-coming-soon-maintenance .content-google-font-variant').val();
5
 
6
  fontVariant = function( variant ) {
7
  switch(variant) {
71
  }
72
 
73
  var heading_font = fonts.google.filter(function (element) {
74
+ return element.id === jQuery('.cmp-coming-soon-maintenance .headings-google-font option:selected').val();
75
  });
76
 
 
77
  var content_font = fonts.google.filter(function (element) {
78
+ return element.id === jQuery('.cmp-coming-soon-maintenance .content-google-font option:selected').val();
79
  });
80
 
81
  if (heading_font.length) {
93
 
94
 
95
  // ini select2
96
+ $HeadingFont = jQuery( '.cmp-coming-soon-maintenance .headings-google-font' ).select2({
97
  data: fonts.google,
98
  width: '100%',
99
  });
100
 
101
  // ini select2
102
+ $contentFont = jQuery( '.cmp-coming-soon-maintenance .content-google-font' ).select2({
103
  data: fonts.google,
104
  width: '100%',
105
  });
106
 
107
  // ini select2
108
+ $HeadingFontVariant = jQuery('.cmp-coming-soon-maintenance .headings-google-font-variant').select2({
109
  data: heading_font_variant,
110
  })
111
 
112
  // ini select2
113
+ $contentFontVariant = jQuery('.cmp-coming-soon-maintenance .content-google-font-variant').select2({
114
  data: content_font_variant,
115
  })
116
 
231
 
232
  });
233
 
234
+ jQuery('.cmp-coming-soon-maintenance .font-selector input[type=range]').on('input', function () {
235
  var type = jQuery(this).data('type');
236
  var css = jQuery(this).data('css');
237
  var value = jQuery(this).val();
js/typography.min.js CHANGED
@@ -1,10 +1 @@
1
- jQuery(document).ready(function($){headingVariant=jQuery('.headings-google-font-variant').val();contentVariant=jQuery('.content-google-font-variant').val();fontVariant=function(variant){switch(variant){case '100':return'Thin 100';break;case '100italic':return'Thin 100 Italic';break;case '200':return'Extra-light 200';break;case '200italic':return'Extra-light 200 Italic';break;case '300':return'Light 300';break;case '300italic':return'Light 300 Italic';break;case '400':return'Regular 400';break;case '400italic':return'Regular 400 Italic';break;case '500':return'Medium 500';break;case '500italic':return'Meidum 500 Italic';break;case '600':return'Semi-Bold 600';break;case '600italic':return'Semi-Bold 600 Italic';break;case '700':return'Bold 700';break;case '700italic':return'Bold 700 Italic';break;case '800':return'Extra-Bold 800';break;case '800italic':return'Extra-Bold Italic';break;case '900':return'Black 900';break;case '900italic':return'Black 900 Italic';break;case 'regular':return'Regular 400';break;case 'italic':return'Regular 400 Italic';break;default:break}}
2
- var heading_font=fonts.google.filter(function(element){return element.id===jQuery('.headings-google-font option:selected').val()});var content_font=fonts.google.filter(function(element){return element.id===jQuery('.content-google-font option:selected').val()});if(heading_font.length){var heading_font_variant=jQuery.map(heading_font[0].variants,function(obj){return{id:obj,text:fontVariant(obj)}})}
3
- if(content_font.length){var content_font_variant=jQuery.map(content_font[0].variants,function(obj){return{id:obj,text:fontVariant(obj)}})}
4
- $HeadingFont=jQuery('.headings-google-font').select2({data:fonts.google,width:'100%',});$contentFont=jQuery('.content-google-font').select2({data:fonts.google,width:'100%',});$HeadingFontVariant=jQuery('.headings-google-font-variant').select2({data:heading_font_variant,})
5
- $contentFontVariant=jQuery('.content-google-font-variant').select2({data:content_font_variant,})
6
- $HeadingFont.on('select2:select',function(e){var selected=$HeadingFontVariant.select2('data');var heading_font_variant=jQuery.map(e.params.data.variants,function(obj){return{id:obj,text:fontVariant(obj)}});$HeadingFontVariant.empty();$HeadingFontVariant.select2({data:heading_font_variant});if(selected[0].id){if(jQuery.inArray(selected[0].id,e.params.data.variants)=='-1'){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight','400').css('font-style','normal')}else{$HeadingFontVariant.val(selected[0].id).trigger('change.select2')}}
7
- WebFont.load({google:{families:[e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){jQuery('#heading-example, #niteoCS-text-logo').css('font-family',e.params.data.text)},})});$HeadingFontVariant.on('select2:select',function(e){headingVariant=e.params.data.id;if(jQuery.isNumeric(headingVariant)){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight',headingVariant).css('font-style','normal')}else if(headingVariant=='regular'){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight','400').css('font-style','normal')}else if(headingVariant=='italic'){jQuery('#heading-example, #niteoCS-text-logo').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(headingVariant,10);jQuery('#heading-example, #niteoCS-text-logo').css('font-weight',fontweight).css('font-style','italic')}});$contentFont.on('select2:select',function(e){var selected=$contentFontVariant.select2('data');var content_font_variant=jQuery.map(e.params.data.variants,function(obj){return{id:obj,text:fontVariant(obj)}});$contentFontVariant.empty();$contentFontVariant.select2({data:content_font_variant});if(selected[0].id){if(jQuery.inArray(selected[0].id,e.params.data.variants)=='-1'){jQuery('#content-example').css('font-weight','400').css('font-style','normal')}else{$contentFontVariant.val(selected[0].id).trigger('change.select2')}}
8
- WebFont.load({google:{families:[e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){jQuery('#content-example').css('font-family',e.params.data.text)},})});$contentFontVariant.on('select2:select',function(e){contentVariant=e.params.data.id;if(jQuery.isNumeric(contentVariant)){jQuery('#content-example').css('font-weight',contentVariant).css('font-style','normal')}else if(contentVariant=='regular'){jQuery('#content-example').css('font-weight','400').css('font-style','normal')}else if(contentVariant=='italic'){jQuery('#content-example').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(contentVariant,10);jQuery('#content-example').css('font-weight',fontweight).css('font-style','italic')}});jQuery('.font-selector input[type=range]').on('input',function(){var type=jQuery(this).data('type');var css=jQuery(this).data('css');var value=jQuery(this).val();jQuery(this).parent().find('span').html(value);value=(css=='line-height')?value:value+'px';if(type=='heading'){jQuery('#heading-example').css(css,value)}else{jQuery('#content-example').css(css,value)}});if(heading_font.length&&content_font.length){WebFont.load({google:{families:[heading_font[0].id+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic',content_font[0].id+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){if(jQuery.isNumeric(headingVariant)){jQuery('#heading-example').css('font-weight',headingVariant).css('font-style','normal')}else if(headingVariant=='regular'){jQuery('#heading-example').css('font-weight','400').css('font-style','normal')}else if(headingVariant=='italic'){jQuery('#heading-example').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(headingVariant,10);jQuery('#heading-example').css('font-weight',fontweight).css('font-style','italic')}
9
- if(jQuery.isNumeric(contentVariant)){jQuery('#content-example').css('font-weight',contentVariant).css('font-style','normal')}else if(contentVariant=='regular'){jQuery('#content-example').css('font-weight','400').css('font-style','normal')}else if(contentVariant=='italic'){jQuery('#content-example').css('font-style','italic').css('font-weight','400')}else{fontweight=parseInt(contentVariant,10);jQuery('#content-example').css('font-weight',fontweight).css('font-style','italic')}
10
- jQuery('#heading-example, #niteoCS-text-logo').css('font-family',heading_font[0].id);jQuery('#content-example').css('font-family',content_font[0].id)},})}})
1
+ jQuery(document).ready(function(t){headingVariant=jQuery(".cmp-coming-soon-maintenance .headings-google-font-variant").val(),contentVariant=jQuery(".cmp-coming-soon-maintenance .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(".cmp-coming-soon-maintenance .headings-google-font option:selected").val()}),n=fonts.google.filter(function(t){return t.id===jQuery(".cmp-coming-soon-maintenance .content-google-font option:selected").val()});if(e.length)var a=jQuery.map(e[0].variants,function(t){return{id:t,text:fontVariant(t)}});if(n.length)var i=jQuery.map(n[0].variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFont=jQuery(".cmp-coming-soon-maintenance .headings-google-font").select2({data:fonts.google,width:"100%"}),$contentFont=jQuery(".cmp-coming-soon-maintenance .content-google-font").select2({data:fonts.google,width:"100%"}),$HeadingFontVariant=jQuery(".cmp-coming-soon-maintenance .headings-google-font-variant").select2({data:a}),$contentFontVariant=jQuery(".cmp-coming-soon-maintenance .content-google-font-variant").select2({data:i}),$HeadingFont.on("select2:select",function(t){var e=$HeadingFontVariant.select2("data"),n=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFontVariant.empty(),$HeadingFontVariant.select2({data:n}),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"),n=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$contentFontVariant.empty(),$contentFontVariant.select2({data:n}),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(".cmp-coming-soon-maintenance .font-selector input[type=range]").on("input",function(){var t=jQuery(this).data("type"),e=jQuery(this).data("css"),n=jQuery(this).val();jQuery(this).parent().find("span").html(n),n="line-height"==e?n:n+"px","heading"==t?jQuery("#heading-example").css(e,n):jQuery("#content-example").css(e,n)}),e.length&&n.length&&WebFont.load({google:{families:[e[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic",n[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",n[0].id)}})});
 
 
 
 
 
 
 
 
 
languages/coming-soon-default.mo CHANGED
Binary file
languages/coming-soon-default.po CHANGED
@@ -1,481 +1,1424 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: cmp\n"
4
- "POT-Creation-Date: 2017-09-28 22:25+0200\n"
5
- "PO-Revision-Date: 2017-09-28 22:25+0200\n"
6
  "Last-Translator: \n"
7
- "Language-Team: \n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.0.1\n"
13
- "X-Poedit-Basepath: ../../../..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: _e;__\n"
16
- "X-Poedit-SearchPath-0: cmp-coming-soon-maintenance/tags/1.4.0\n"
17
- "X-Poedit-SearchPath-1: cmp-premium-themes\n"
18
 
19
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:272
20
- msgid "<p class=\"cmp-success\">Successfully installed new Theme!</p>"
21
  msgstr ""
22
 
23
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:275
24
- msgid "<p class=\"cmp-error\">There was an error unzipping the file!</p>"
25
  msgstr ""
26
 
27
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:279
28
- msgid "<p class=\"cmp-error\">Error creating Theme subdirectory!</p>"
29
  msgstr ""
30
 
31
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  msgid ""
33
  "JavaScript appears to be disabled in your browser. For this plugin to work "
34
  "correctly, please enable JavaScript or switch to a more modern browser."
35
  msgstr ""
36
 
37
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:318
38
  msgid "Settings"
39
  msgstr ""
40
 
41
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:319
42
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:642
43
- msgid "Content"
 
 
 
44
  msgstr ""
45
 
46
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:320
47
  msgid "SEO"
48
  msgstr ""
49
 
50
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:321
51
  msgid "Custom CSS"
52
  msgstr ""
53
 
54
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:322
55
  msgid "Preview"
56
  msgstr ""
57
 
58
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:323
59
- msgid "Install New Theme"
60
- msgstr ""
61
-
62
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:327
63
  msgid "General Settings"
64
  msgstr ""
65
 
66
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:330
67
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:334
68
  msgid "Status"
69
  msgstr ""
70
 
71
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:337
72
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:682
73
- msgid "Disabled"
 
 
 
74
  msgstr ""
75
 
76
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:338
77
  msgid ""
78
- "Disable plugin and display standard WordPress page to all users and indexing "
79
- "engines."
80
  msgstr ""
81
 
82
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:341
83
  msgid "Maintanance Mode"
84
  msgstr ""
85
 
86
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:342
87
  msgid ""
88
  "Returns 503 HTTP Service unavailable code to indexing robots. Set this "
89
  "option if your site is down due to maintanance and you want to display "
90
  "Maintanance page."
91
  msgstr ""
92
 
93
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:345
94
- msgid "Coming Soon"
95
  msgstr ""
96
 
97
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:346
98
  msgid ""
99
- "Returns standard 200 HTTP OK response code to indexing robots. Set this "
100
- "option if you want to use our plugin as \"Coming Soon\" page."
 
 
 
101
  msgstr ""
102
 
103
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:354
104
- msgid "Select Theme"
105
  msgstr ""
106
 
107
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:357
108
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:361
109
  msgid "Free Themes"
110
  msgstr ""
111
 
112
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:385
113
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:389
114
- msgid "Premium Themes"
115
  msgstr ""
116
 
117
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:421
118
- msgid "Logo"
119
  msgstr ""
120
 
121
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:424
122
- msgid "Upload or select Logo"
123
  msgstr ""
124
 
125
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:445
126
- msgid "Graphic Banner"
127
  msgstr ""
128
 
129
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:451
130
- msgid "Banner Settings"
131
  msgstr ""
132
 
133
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:456
134
- msgid "Custom Media"
135
  msgstr ""
136
 
137
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:462
138
- msgid "Unsplash library"
139
  msgstr ""
140
 
141
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:468
142
- msgid "Default Media"
143
  msgstr ""
144
 
145
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:480
146
- msgid ""
147
- "Pro Tip! You can select multiple Media from your library by holding CTRL"
148
- "+click (Command+click if you sit on MacOS) while selecting photos."
149
  msgstr ""
150
 
151
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:498
152
- msgid "Choose Unsplash Feed"
 
153
  msgstr ""
154
 
155
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:500
156
- msgid "Specific Photo"
157
  msgstr ""
158
 
159
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:501
160
- msgid "Random from Category"
161
  msgstr ""
162
 
163
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:502
164
- msgid "Random from Collection"
165
  msgstr ""
166
 
167
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:503
168
- msgid "Random Photo"
169
  msgstr ""
170
 
171
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:507
172
- msgid "Enter Unsplash Photo URL or Photo ID"
173
  msgstr ""
174
 
175
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:512
176
- msgid "Select Category"
177
  msgstr ""
178
 
179
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:514
180
- msgid "Buildings"
181
  msgstr ""
182
 
183
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:515
184
- msgid "Food"
185
  msgstr ""
186
 
187
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:516
188
- msgid "Nature"
189
  msgstr ""
190
 
191
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:517
192
- msgid "People"
193
  msgstr ""
194
 
195
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:518
196
- msgid "Technology"
197
  msgstr ""
198
 
199
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:519
200
- msgid "Objects"
201
  msgstr ""
202
 
203
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:522
204
- msgid "You can limit Category to Specific Keyword"
205
  msgstr ""
206
 
207
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:527
208
- msgid ""
209
- "Enter Unsplash Collection URL or Collection ID. Doesn`t work for Curated "
210
- "Collections."
211
  msgstr ""
212
 
213
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:532
214
- msgid "Specify search terms"
215
  msgstr ""
216
 
217
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:536
218
- msgid "Limit search only to Featured/Curated Photos"
219
  msgstr ""
220
 
221
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:562
222
- msgid "Customize Fonts"
223
  msgstr ""
224
 
225
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:566
226
- msgid "Headings Font"
227
  msgstr ""
228
 
229
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:569
230
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:602
231
- msgid "Select from predefined Google Fonts or insert Custom font"
232
  msgstr ""
233
 
234
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:587
235
- msgid "Custom font..."
236
  msgstr ""
237
 
238
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:591
239
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:625
240
- msgid "Enter name of "
241
  msgstr ""
242
 
243
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:599
 
 
 
 
244
  msgid "Content Font"
245
  msgstr ""
246
 
247
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:620
248
- msgid "Custom Font..."
249
  msgstr ""
250
 
251
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:645
252
- msgid "Body Title"
253
  msgstr ""
254
 
255
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:654
256
- msgid "Body Message"
257
  msgstr ""
258
 
259
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:671
260
- msgid "Subscribe Form"
261
  msgstr ""
262
 
263
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:677
264
- msgid "Subscribe Form Options"
265
  msgstr ""
266
 
267
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:688
268
- msgid "3rd Party Plugin"
269
  msgstr ""
270
 
271
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:694
272
- msgid "Niteo Subscribe"
273
  msgstr ""
274
 
275
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:702
276
- msgid "Subscribe Form is disabled."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  msgstr ""
278
 
279
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:711
280
  msgid ""
281
- "You can find Shortode in your Contact Form Plugin settings. Should be "
282
- "something similar to code below: "
 
 
 
 
283
  msgstr ""
284
 
285
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:713
 
286
  msgid ""
287
- "Your Subscribe Form should have only one input (type=email) and submit "
288
- "(input=submit). If you have more than one input field, our design will not "
289
- "work and you need to use custom CSS to style your Subscribe form."
290
  msgstr ""
291
 
292
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:714
293
- msgid "Example of Subscribe Form code for "
294
  msgstr ""
295
 
296
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:726
297
  msgid ""
298
- "Default subscribe form will be displayed to visitors. Only export of email "
299
- "addresses to .csv file is supported. Mailing List will be deleted after "
300
- "deletion of CMP plugin."
301
  msgstr ""
302
 
303
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:732
304
- msgid "Total Subscribers: "
305
  msgstr ""
306
 
307
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:733
308
- msgid "Since last export: "
309
  msgstr ""
310
 
311
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:734
312
- msgid "Last Export Date: "
 
 
 
313
  msgstr ""
314
 
315
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:734
316
- msgid "Never exported"
317
  msgstr ""
318
 
319
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:735
320
- msgid "Generate CSV"
321
  msgstr ""
322
 
323
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:745
324
- msgid "Social Media"
325
  msgstr ""
326
 
327
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:749
328
- msgid "Social Section Title"
 
 
329
  msgstr ""
330
 
331
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:758
332
- msgid "Social Media Icons"
333
  msgstr ""
334
 
335
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:802
336
- msgid "profile"
337
  msgstr ""
338
 
339
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:829
340
- msgid "Footer Content"
 
341
  msgstr ""
342
 
343
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:833
344
- msgid "Copyright"
345
  msgstr ""
346
 
347
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:845
348
- msgid "SEO Settings"
 
349
  msgstr ""
350
 
351
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:849
352
- msgid "Header Title"
353
  msgstr ""
354
 
355
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:858
356
- msgid "Description"
 
357
  msgstr ""
358
 
359
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:866
360
- msgid "Google Analytics Tracking ID"
361
  msgstr ""
362
 
363
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:877
364
- msgid "Enter Custom CSS"
 
365
  msgstr ""
366
 
367
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:891
368
- msgid "Save Changes"
369
  msgstr ""
370
 
371
- #: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:901
372
- msgid "Install New Coming Soon Theme"
 
373
  msgstr ""
374
 
375
- #: cmp-coming-soon-maintenance/tags/1.4.0/niteo-cmp.php:244
376
- msgid "Maintenance Mode Active"
377
  msgstr ""
378
 
379
- #: cmp-coming-soon-maintenance/tags/1.4.0/niteo-cmp.php:246
380
- msgid "Coming Soon Mode Active"
 
381
  msgstr ""
382
 
383
- #: cmp-coming-soon-maintenance/tags/1.4.0/niteo-cmp.php:436
384
- #: cmp-coming-soon-maintenance/tags/1.4.0/niteo-cmp.php:444
385
- msgid "Thank you, your sign-up request was successful!"
386
  msgstr ""
387
 
388
- #: cmp-coming-soon-maintenance/tags/1.4.0/niteo-cmp.php:447
389
- msgid "This email address has already been on our subscriber list."
390
  msgstr ""
391
 
392
- #: cmp-coming-soon-maintenance/tags/1.4.0/niteo-cmp.php:452
393
- msgid "Please insert valid email."
394
  msgstr ""
395
 
396
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:37
397
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:52
398
- #: cmp-premium-themes/fifty/fifty-settings.php:33
399
- #: cmp-premium-themes/frame/frame-settings.php:48
400
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:36
401
- msgid "Customize Colors"
402
  msgstr ""
403
 
404
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:40
405
- #: cmp-premium-themes/fifty/fifty-settings.php:55
406
- #: cmp-premium-themes/frame/frame-settings.php:51
407
- msgid "Active Color"
408
  msgstr ""
409
 
410
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:44
411
- msgid "Headings and active elements color (buttons, hover links, etc)."
412
  msgstr ""
413
 
414
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:49
415
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:56
416
- #: cmp-premium-themes/fifty/fifty-settings.php:37
417
- #: cmp-premium-themes/frame/frame-settings.php:61
418
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:40
419
- msgid "Font Color"
420
  msgstr ""
421
 
422
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:57
423
- #: cmp-premium-themes/fifty/fifty-settings.php:46
424
- msgid "Background Color"
425
  msgstr ""
426
 
427
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:64
428
- #: cmp-premium-themes/frame/frame-settings.php:80
429
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:48
430
- msgid "Overlay Color"
431
  msgstr ""
432
 
433
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:67
434
- msgid "Enable Overlay Color"
435
  msgstr ""
436
 
437
- #: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:73
438
- #: cmp-premium-themes/frame/frame-settings.php:86
439
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:53
440
- msgid "Overlay Opacity"
441
  msgstr ""
442
 
443
- #: cmp-premium-themes/fifty/fifty-settings.php:65
444
- #: cmp-premium-themes/frame/frame-settings.php:94
445
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:62
446
- msgid "Save All Changes"
447
  msgstr ""
448
 
449
- #: cmp-premium-themes/fifty/fifty-social_settings.php:20
450
- msgid "Social Icons Location"
451
  msgstr ""
452
 
453
- #: cmp-premium-themes/fifty/fifty-social_settings.php:24
454
- msgid "Below Content (big icons)"
455
  msgstr ""
456
 
457
- #: cmp-premium-themes/fifty/fifty-social_settings.php:25
458
- msgid "Footer (small icons)"
459
  msgstr ""
460
 
461
- #: cmp-premium-themes/fifty/fifty-theme.php:194
462
- #: cmp-premium-themes/fifty/fifty-theme.php:206
463
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:138
464
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:150
465
- msgid ""
466
- "To Display Graphic Media please upgrade CMP Plugin to latest version. You "
467
- "can download latest version on "
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  msgstr ""
469
 
470
- #: cmp-premium-themes/fifty/fifty-theme.php:194
471
- #: cmp-premium-themes/fifty/fifty-theme.php:206
472
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:138
473
- #: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474
  msgid ""
475
- "or you can use automatic plugin update in WP-Admin > Plugins > CMP - Coming "
476
- "Soon & Maintenance Plugin > Update Now."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
477
  msgstr ""
478
 
479
- #: cmp-premium-themes/frame/frame-settings.php:70
480
- msgid "Frame Color"
481
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: cmp-coming-soon-maintenance\n"
4
+ "POT-Creation-Date: 2018-08-03 11:48+0200\n"
5
+ "PO-Revision-Date: 2018-08-03 11:48+0200\n"
6
  "Last-Translator: \n"
7
+ "Language-Team: Niteothemes <info@niteothemes.com>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.12\n"
13
+ "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: _e;__\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: cmp-advanced.php:156
20
+ msgid "CMP Page Whitelist and Blacklist Settings"
21
  msgstr ""
22
 
23
+ #: cmp-advanced.php:164 cmp-advanced.php:333
24
+ msgid "Whitelist Settings"
25
  msgstr ""
26
 
27
+ #: cmp-advanced.php:169
28
+ msgid "Page Whitelist"
29
  msgstr ""
30
 
31
+ #: cmp-advanced.php:175
32
+ msgid "Page Blacklist"
33
+ msgstr ""
34
+
35
+ #: cmp-advanced.php:181 cmp-advanced.php:344 cmp-settings.php:1054
36
+ #: cmp-settings.php:1055 inc/settings/settings-background.php:391
37
+ #: inc/settings/settings-contact_form-disabled.php:24
38
+ #: inc/settings/settings-contact_form.php:46
39
+ #: inc/settings/settings-counter-disabled.php:19
40
+ #: inc/settings/settings-counter.php:68
41
+ #: inc/settings/settings-footer-disabled.php:6
42
+ #: inc/settings/settings-logo-disabled.php:28
43
+ #: inc/settings/settings-logo-disabled.php:29 inc/settings/settings-logo.php:28
44
+ #: inc/settings/settings-logo.php:29
45
+ #: inc/settings/settings-slider-disabled.php:22
46
+ #: inc/settings/settings-slider.php:59
47
+ #: inc/settings/settings-special_effects-disabled.php:24
48
+ #: inc/settings/settings-special_effects.php:36
49
+ #: inc/settings/settings-special_effects.php:45
50
+ #: inc/settings/settings-subscribe-disabled.php:30
51
+ #: inc/settings/settings-subscribe.php:80
52
+ msgid "Disabled"
53
+ msgstr ""
54
+
55
+ #: cmp-advanced.php:190
56
+ msgid ""
57
+ "CMP Whitelist - Select the specific page(s) to display CMP Landing Page."
58
+ msgstr ""
59
+
60
+ #: cmp-advanced.php:192 cmp-advanced.php:207
61
+ msgid "Homepage"
62
+ msgstr ""
63
+
64
+ #: cmp-advanced.php:200
65
+ msgid ""
66
+ "By default CMP is enabled on all pages. Leave this field empty to use "
67
+ "default settings."
68
+ msgstr ""
69
+
70
+ #: cmp-advanced.php:205
71
+ msgid "CMP Blacklist - Select the pages to NOT display CMP landing page."
72
+ msgstr ""
73
+
74
+ #: cmp-advanced.php:215
75
+ msgid "If you want to exclude some pages from CMP you can select them here."
76
+ msgstr ""
77
+
78
+ #: cmp-advanced.php:219
79
+ msgid ""
80
+ "CMP landing page is displayed on all pages by default. You can enable Page "
81
+ "Whitelist to display CMP only on specific page(s) or Page Blacklist to "
82
+ "exclude CMP landing page on specific page(s) by enabling Page Whitelist or "
83
+ "Page Blacklist here."
84
+ msgstr ""
85
+
86
+ #: cmp-advanced.php:233
87
+ msgid "CMP User Roles Settings"
88
+ msgstr ""
89
+
90
+ #: cmp-advanced.php:240
91
+ msgid "User Roles Settings"
92
+ msgstr ""
93
+
94
+ #: cmp-advanced.php:244
95
+ msgid "Bypass User Roles"
96
+ msgstr ""
97
+
98
+ #: cmp-advanced.php:252
99
+ msgid "Select User Roles to bypass CMP landing page."
100
+ msgstr ""
101
+
102
+ #: cmp-advanced.php:271
103
+ msgid "Administrator role always bypass CMP by default."
104
+ msgstr ""
105
+
106
+ #: cmp-advanced.php:282 cmp-advanced.php:286
107
+ msgid "Top Bar Switch Access"
108
+ msgstr ""
109
+
110
+ #: cmp-advanced.php:294
111
+ msgid "Select User Roles which can access Top Bar CMP switch mode."
112
+ msgstr ""
113
+
114
+ #: cmp-advanced.php:311
115
+ msgid "Administrator role can always access Top Bar Switch."
116
+ msgstr ""
117
+
118
+ #: cmp-advanced.php:325
119
+ msgid "CMP Bypass URL"
120
+ msgstr ""
121
+
122
+ #: cmp-advanced.php:338 inc/settings/settings-counter-disabled.php:13
123
+ #: inc/settings/settings-counter.php:62
124
+ #: inc/settings/settings-slider-disabled.php:16
125
+ #: inc/settings/settings-slider.php:53
126
+ msgid "Enabled"
127
+ msgstr ""
128
+
129
+ #: cmp-advanced.php:355
130
+ msgid "Bypass URL"
131
+ msgstr ""
132
+
133
+ #: cmp-advanced.php:358
134
+ msgid ""
135
+ "You can use this URL to bypass CMP maintenance page. Once you access your "
136
+ "website with this URL, CMP Cookie will be set with default expiration of 2 "
137
+ "days. If the cookie expires, you need to access your website again with this "
138
+ "URL."
139
+ msgstr ""
140
+
141
+ #: cmp-advanced.php:360
142
+ msgid "Set Bypass Passphrase"
143
+ msgstr ""
144
+
145
+ #: cmp-advanced.php:363
146
+ msgid ""
147
+ "You can use passphrase which contains letters, numbers, underscores or "
148
+ "dashes only."
149
+ msgstr ""
150
+
151
+ #: cmp-advanced.php:365
152
+ msgid "Set bypass cookie Expiration Time in seconds"
153
+ msgstr ""
154
+
155
+ #: cmp-advanced.php:368
156
+ msgid ""
157
+ "You can set custom Bypass CMP Cookie expiration time in seconds (1hour = "
158
+ "3600). Default expiration time is 2 days (172800)."
159
+ msgstr ""
160
+
161
+ #: cmp-advanced.php:370
162
+ msgid ""
163
+ "Please note this solution is using browser cookies which might not work "
164
+ "correctly if you are using caching plugins."
165
+ msgstr ""
166
+
167
+ #: cmp-advanced.php:374
168
+ msgid ""
169
+ "You can Enable CMP Bypass where you can set custom URL parameter to bypass "
170
+ "CMP page. You can send this URL to anyone who would like to sneak peak into "
171
+ "your Website while it is under development or maintanence."
172
+ msgstr ""
173
+
174
+ #: cmp-help.php:12
175
+ msgid ""
176
+ "Thank you for using our CMP - Coming Soon, Maintenance & Landing Page "
177
+ "NiteoThemes`s plugin for Wordpress"
178
+ msgstr ""
179
+
180
+ #: cmp-help.php:13
181
+ msgid ""
182
+ "If you have any question or issue feel free to ask Wordpress Community or "
183
+ "for our expert support on Wordpress Support Forum!"
184
+ msgstr ""
185
+
186
+ #: cmp-help.php:15
187
+ msgid "GET SUPPORT!"
188
+ msgstr ""
189
+
190
+ #: cmp-settings.php:400
191
  msgid ""
192
  "JavaScript appears to be disabled in your browser. For this plugin to work "
193
  "correctly, please enable JavaScript or switch to a more modern browser."
194
  msgstr ""
195
 
196
+ #: cmp-settings.php:419
197
  msgid "Settings"
198
  msgstr ""
199
 
200
+ #: cmp-settings.php:421
201
+ msgid "Global Content"
202
+ msgstr ""
203
+
204
+ #: cmp-settings.php:423
205
+ msgid "Theme Setup"
206
  msgstr ""
207
 
208
+ #: cmp-settings.php:425
209
  msgid "SEO"
210
  msgstr ""
211
 
212
+ #: cmp-settings.php:427
213
  msgid "Custom CSS"
214
  msgstr ""
215
 
216
+ #: cmp-settings.php:429
217
  msgid "Preview"
218
  msgstr ""
219
 
220
+ #: cmp-settings.php:438
 
 
 
 
221
  msgid "General Settings"
222
  msgstr ""
223
 
224
+ #: cmp-settings.php:442
 
225
  msgid "Status"
226
  msgstr ""
227
 
228
+ #: cmp-settings.php:456
229
+ msgid "Mode"
230
+ msgstr ""
231
+
232
+ #: cmp-settings.php:461
233
+ msgid "Coming Soon & Landing Page"
234
  msgstr ""
235
 
236
+ #: cmp-settings.php:462
237
  msgid ""
238
+ "Returns standard 200 HTTP OK response code to indexing robots. Set this "
239
+ "option if you want to use our plugin as \"Coming Soon\" page."
240
  msgstr ""
241
 
242
+ #: cmp-settings.php:466
243
  msgid "Maintanance Mode"
244
  msgstr ""
245
 
246
+ #: cmp-settings.php:467
247
  msgid ""
248
  "Returns 503 HTTP Service unavailable code to indexing robots. Set this "
249
  "option if your site is down due to maintanance and you want to display "
250
  "Maintanance page."
251
  msgstr ""
252
 
253
+ #: cmp-settings.php:471
254
+ msgid "Redirect Mode"
255
  msgstr ""
256
 
257
+ #: cmp-settings.php:472
258
  msgid ""
259
+ "Choose Redirect Mode if you want to redirect your website to another URL."
260
+ msgstr ""
261
+
262
+ #: cmp-settings.php:475
263
+ msgid "Delay Time in Seconds"
264
  msgstr ""
265
 
266
+ #: cmp-settings.php:492
267
+ msgid "Available Themes"
268
  msgstr ""
269
 
270
+ #: cmp-settings.php:498
 
271
  msgid "Free Themes"
272
  msgstr ""
273
 
274
+ #: cmp-settings.php:531 cmp-settings.php:543 cmp-settings.php:742
275
+ msgid "Active"
 
276
  msgstr ""
277
 
278
+ #: cmp-settings.php:531
279
+ msgid "Select"
280
  msgstr ""
281
 
282
+ #: cmp-settings.php:534 cmp-settings.php:591
283
+ msgid "PREVIEW"
284
  msgstr ""
285
 
286
+ #: cmp-settings.php:536 cmp-settings.php:593
287
+ msgid "DETAILS"
288
  msgstr ""
289
 
290
+ #: cmp-settings.php:567
291
+ msgid "Download more CMP Themes"
292
  msgstr ""
293
 
294
+ #: cmp-settings.php:574
295
+ msgid "Premium Themes"
296
  msgstr ""
297
 
298
+ #: cmp-settings.php:589
299
+ msgid "Get Theme"
300
  msgstr ""
301
 
302
+ #: cmp-settings.php:619 inc/settings/settings-footer.php:67
303
+ msgid "Content"
304
  msgstr ""
305
 
306
+ #: cmp-settings.php:623
307
+ msgid "Title"
 
 
308
  msgstr ""
309
 
310
+ #: cmp-settings.php:626 inc/settings/settings-contact_form.php:62
311
+ #: inc/settings/settings-subscribe.php:108
312
+ msgid "Leave empty to disable"
313
  msgstr ""
314
 
315
+ #: cmp-settings.php:632
316
+ msgid "Message"
317
  msgstr ""
318
 
319
+ #: cmp-settings.php:688
320
+ msgid "Social Media"
321
  msgstr ""
322
 
323
+ #: cmp-settings.php:692
324
+ msgid "Social Section Title"
325
  msgstr ""
326
 
327
+ #: cmp-settings.php:701
328
+ msgid "Social Media Icons"
329
  msgstr ""
330
 
331
+ #: cmp-settings.php:703
332
+ msgid "Click on Social Icons below to enable Social Media settings."
333
  msgstr ""
334
 
335
+ #: cmp-settings.php:721 cmp-settings.php:752
336
+ msgid "Email Address"
337
  msgstr ""
338
 
339
+ #: cmp-settings.php:724 cmp-settings.php:727 cmp-settings.php:764
340
+ msgid "Phone Number"
341
  msgstr ""
342
 
343
+ #: cmp-settings.php:742
344
+ msgid "Position"
345
  msgstr ""
346
 
347
+ #: cmp-settings.php:742
348
+ msgid "Website URL"
349
  msgstr ""
350
 
351
+ #: cmp-settings.php:768
352
+ msgid "Whatsapp Phone Number"
353
  msgstr ""
354
 
355
+ #: cmp-settings.php:876
356
+ msgid "Customize Fonts"
357
  msgstr ""
358
 
359
+ #: cmp-settings.php:880
360
+ msgid "Headings Font"
361
  msgstr ""
362
 
363
+ #: cmp-settings.php:883
364
+ msgid "Font Family from "
365
  msgstr ""
366
 
367
+ #: cmp-settings.php:890 cmp-settings.php:939
368
+ msgid "Variant"
 
 
369
  msgstr ""
370
 
371
+ #: cmp-settings.php:897 cmp-settings.php:946
372
+ msgid "Font Size"
373
  msgstr ""
374
 
375
+ #: cmp-settings.php:902 cmp-settings.php:951
376
+ msgid "Letter Spacing"
377
  msgstr ""
378
 
379
+ #: cmp-settings.php:911
380
+ msgid "Animation"
381
  msgstr ""
382
 
383
+ #: cmp-settings.php:913 cmp-settings.php:966
384
+ msgid "No animation"
385
  msgstr ""
386
 
387
+ #: cmp-settings.php:914 cmp-settings.php:967
388
+ msgid "Fade In Down"
 
389
  msgstr ""
390
 
391
+ #: cmp-settings.php:915 cmp-settings.php:968
392
+ msgid "Fade In Up"
393
  msgstr ""
394
 
395
+ #: cmp-settings.php:916 cmp-settings.php:969
396
+ msgid "Fade In Left"
 
397
  msgstr ""
398
 
399
+ #: cmp-settings.php:917 cmp-settings.php:970
400
+ msgid "Fade In Right"
401
+ msgstr ""
402
+
403
+ #: cmp-settings.php:927
404
  msgid "Content Font"
405
  msgstr ""
406
 
407
+ #: cmp-settings.php:931
408
+ msgid "Select Font Family from "
409
  msgstr ""
410
 
411
+ #: cmp-settings.php:956
412
+ msgid "Line Height"
413
  msgstr ""
414
 
415
+ #: cmp-settings.php:964
416
+ msgid "Select Animation"
417
  msgstr ""
418
 
419
+ #: cmp-settings.php:976
420
+ msgid "Fonts preview"
421
  msgstr ""
422
 
423
+ #: cmp-settings.php:994
424
+ msgid "SEO Settings"
425
  msgstr ""
426
 
427
+ #: cmp-settings.php:999
428
+ msgid "Favicon"
429
  msgstr ""
430
 
431
+ #: cmp-settings.php:1018
432
+ msgid "Header Title"
433
  msgstr ""
434
 
435
+ #: cmp-settings.php:1027
436
+ msgid "Description"
437
+ msgstr ""
438
+
439
+ #: cmp-settings.php:1042
440
+ msgid "Website Analytics"
441
+ msgstr ""
442
+
443
+ #: cmp-settings.php:1050
444
+ msgid "Analytics"
445
+ msgstr ""
446
+
447
+ #: cmp-settings.php:1060 cmp-settings.php:1061
448
+ msgid "Google Analytics"
449
+ msgstr ""
450
+
451
+ #: cmp-settings.php:1066 cmp-settings.php:1067
452
+ msgid "Other"
453
+ msgstr ""
454
+
455
+ #: cmp-settings.php:1076
456
+ msgid "Analytics is disabled"
457
+ msgstr ""
458
+
459
+ #: cmp-settings.php:1079
460
+ msgid "Insert Google Analytics Tracking ID"
461
+ msgstr ""
462
+
463
+ #: cmp-settings.php:1086
464
+ msgid "Insert your Analytics Javascript code. Script tags will be stripped."
465
+ msgstr ""
466
+
467
+ #: cmp-settings.php:1104
468
+ msgid "Enter Custom CSS"
469
+ msgstr ""
470
+
471
+ #: cmp-sidebar.php:4
472
+ msgid "Selected CMP Theme"
473
  msgstr ""
474
 
475
+ #: cmp-sidebar.php:19
476
  msgid ""
477
+ "If you really love our CMP plugin you can also donate few bucks by clicking "
478
+ "Donate button below."
479
+ msgstr ""
480
+
481
+ #: cmp-sidebar.php:32
482
+ msgid "Thank you for rating us with five stars!"
483
  msgstr ""
484
 
485
+ #: cmp-sidebar.php:33
486
+ #, php-format
487
  msgid ""
488
+ "If you find our CMP plugin useful, please show us some love and give 5%s "
489
+ "feedback by pressing button below."
 
490
  msgstr ""
491
 
492
+ #: cmp-sidebar.php:36
493
+ msgid "Leave Feedback"
494
  msgstr ""
495
 
496
+ #: cmp-sidebar.php:43
497
  msgid ""
498
+ "Also don`t forget you can ask Wordpress Community or our NiteoThemes expert "
499
+ "support. For a help simply visit link below."
 
500
  msgstr ""
501
 
502
+ #: cmp-sidebar.php:43
503
+ msgid "Wordpress Support Forum"
504
  msgstr ""
505
 
506
+ #: cmp-sidebar.php:50
507
+ msgid "Request new features"
508
  msgstr ""
509
 
510
+ #: cmp-sidebar.php:51
511
+ #, php-format
512
+ msgid ""
513
+ "Do you miss some feature or do you have idea how to improve CMP plugin? You "
514
+ "can %s on official Wordpress Support Forum."
515
  msgstr ""
516
 
517
+ #: cmp-subscribers.php:24
518
+ msgid "View / Edit Subscribers"
519
  msgstr ""
520
 
521
+ #: cmp-subscribers.php:29
522
+ msgid "Export All Subscribers"
523
  msgstr ""
524
 
525
+ #: cmp-translate.php:68
526
+ msgid "Edit Translation Variables"
527
  msgstr ""
528
 
529
+ #: cmp-translate.php:73 inc/class-cmp-render_settings.php:36
530
+ #: themes/countdown/countdown-settings.php:38
531
+ #: themes/hardwork/hardwork-settings.php:42
532
+ msgid "Save All Changes"
533
  msgstr ""
534
 
535
+ #: cmp-upload.php:17
536
+ msgid "Install New CMP Coming Soon & Maintenance Theme"
537
  msgstr ""
538
 
539
+ #: cmp-upload.php:22
540
+ msgid "Select Theme ZIP file to upload"
541
  msgstr ""
542
 
543
+ #: inc/class-cmp-feedback.php:65
544
+ #, php-format
545
+ msgid "%s years"
546
  msgstr ""
547
 
548
+ #: inc/class-cmp-feedback.php:67
549
+ msgid "a year"
550
  msgstr ""
551
 
552
+ #: inc/class-cmp-feedback.php:73
553
+ #, php-format
554
+ msgid "%s weeks"
555
  msgstr ""
556
 
557
+ #: inc/class-cmp-feedback.php:75
558
+ msgid "a week"
559
  msgstr ""
560
 
561
+ #: inc/class-cmp-feedback.php:81
562
+ #, php-format
563
+ msgid "%s days"
564
  msgstr ""
565
 
566
+ #: inc/class-cmp-feedback.php:83
567
+ msgid "a day"
568
  msgstr ""
569
 
570
+ #: inc/class-cmp-feedback.php:89
571
+ #, php-format
572
+ msgid "%s hours"
573
  msgstr ""
574
 
575
+ #: inc/class-cmp-feedback.php:91
576
+ msgid "an hour"
577
  msgstr ""
578
 
579
+ #: inc/class-cmp-feedback.php:97
580
+ #, php-format
581
+ msgid "%s minutes"
582
  msgstr ""
583
 
584
+ #: inc/class-cmp-feedback.php:99
585
+ msgid "a minute"
586
  msgstr ""
587
 
588
+ #: inc/class-cmp-feedback.php:105
589
+ #, php-format
590
+ msgid "%s seconds"
591
  msgstr ""
592
 
593
+ #: inc/class-cmp-feedback.php:107
594
+ msgid "a second"
 
595
  msgstr ""
596
 
597
+ #: inc/class-cmp-feedback.php:161
598
+ msgid "Do you like CMP - Coming soon & Maintenace Plugin?"
599
  msgstr ""
600
 
601
+ #: inc/class-cmp-feedback.php:196
602
+ msgid "CMP - Coming Soon & Maintenance"
603
  msgstr ""
604
 
605
+ #: inc/class-cmp-render_html.php:457
606
+ msgid "Phone"
 
 
 
 
607
  msgstr ""
608
 
609
+ #: inc/class-cmp-subscribers.php:15
610
+ msgid "subscriber"
 
 
611
  msgstr ""
612
 
613
+ #: inc/class-cmp-subscribers.php:16
614
+ msgid "subscribers"
615
  msgstr ""
616
 
617
+ #: inc/class-cmp-subscribers.php:65
618
+ msgid "Delete Selected"
 
 
 
 
619
  msgstr ""
620
 
621
+ #: inc/class-cmp-subscribers.php:80
622
+ msgid "Delete"
 
623
  msgstr ""
624
 
625
+ #: inc/class-cmp-subscribers.php:169
626
+ msgid "ID"
 
 
627
  msgstr ""
628
 
629
+ #: inc/class-cmp-subscribers.php:170
630
+ msgid "First Name"
631
  msgstr ""
632
 
633
+ #: inc/class-cmp-subscribers.php:171
634
+ msgid "Last Name"
 
 
635
  msgstr ""
636
 
637
+ #: inc/class-cmp-subscribers.php:172 niteo-cmp.php:1305
638
+ msgid "Email"
 
 
639
  msgstr ""
640
 
641
+ #: inc/class-cmp-subscribers.php:173
642
+ msgid "Time"
643
  msgstr ""
644
 
645
+ #: inc/class-cmp-subscribers.php:174
646
+ msgid "IP Address"
647
  msgstr ""
648
 
649
+ #: inc/class-cmp-subscribers.php:258
650
+ msgid "No subscribers yet!"
651
  msgstr ""
652
 
653
+ #: inc/class-cmp-translate.php:19
654
+ msgid "Translation string"
655
+ msgstr ""
656
+
657
+ #: inc/class-cmp-translate.php:20
658
+ msgid "Tranlation String"
659
+ msgstr ""
660
+
661
+ #: inc/class-cmp-translate.php:48
662
+ msgid "String"
663
+ msgstr ""
664
+
665
+ #: inc/class-cmp-translate.php:49 niteo-cmp.php:262
666
+ msgid "Translation"
667
+ msgstr ""
668
+
669
+ #: inc/class-cmp-translate.php:94
670
+ msgid "No Translation Variables!"
671
+ msgstr ""
672
+
673
+ #: inc/settings/settings-background.php:43
674
+ msgid "Blury Beach"
675
+ msgstr ""
676
+
677
+ #: inc/settings/settings-background.php:44
678
+ msgid "Miaka"
679
+ msgstr ""
680
+
681
+ #: inc/settings/settings-background.php:45
682
+ msgid "Influenza"
683
+ msgstr ""
684
+
685
+ #: inc/settings/settings-background.php:46
686
+ msgid "Calm Darya"
687
+ msgstr ""
688
+
689
+ #: inc/settings/settings-background.php:47
690
+ msgid "Shroom Haze"
691
+ msgstr ""
692
+
693
+ #: inc/settings/settings-background.php:48
694
+ msgid "Purlple Paradise"
695
+ msgstr ""
696
+
697
+ #: inc/settings/settings-background.php:49
698
+ msgid "Aqua Marine"
699
+ msgstr ""
700
+
701
+ #: inc/settings/settings-background.php:50
702
+ msgid "Bloody Mary"
703
+ msgstr ""
704
+
705
+ #: inc/settings/settings-background.php:51
706
+ msgid "Rose Water"
707
+ msgstr ""
708
+
709
+ #: inc/settings/settings-background.php:52
710
+ msgid "Horizon"
711
+ msgstr ""
712
+
713
+ #: inc/settings/settings-background.php:53
714
+ msgid "Youtube"
715
+ msgstr ""
716
+
717
+ #: inc/settings/settings-background.php:54
718
+ msgid "Sublime Vivid"
719
+ msgstr ""
720
+
721
+ #: inc/settings/settings-background.php:55
722
+ msgid "Red"
723
  msgstr ""
724
 
725
+ #: inc/settings/settings-background.php:56
726
+ msgid "Orange"
727
+ msgstr ""
728
+
729
+ #: inc/settings/settings-background.php:57
730
+ msgid "Yellow"
731
+ msgstr ""
732
+
733
+ #: inc/settings/settings-background.php:58
734
+ msgid "Green"
735
+ msgstr ""
736
+
737
+ #: inc/settings/settings-background.php:59
738
+ msgid "Green Pastel"
739
+ msgstr ""
740
+
741
+ #: inc/settings/settings-background.php:60
742
+ msgid "Sky blue"
743
+ msgstr ""
744
+
745
+ #: inc/settings/settings-background.php:61
746
+ msgid "Purple"
747
+ msgstr ""
748
+
749
+ #: inc/settings/settings-background.php:62
750
+ msgid "Violet"
751
+ msgstr ""
752
+
753
+ #: inc/settings/settings-background.php:63
754
+ msgid "Light grey"
755
+ msgstr ""
756
+
757
+ #: inc/settings/settings-background.php:64
758
+ msgid "Grey"
759
+ msgstr ""
760
+
761
+ #: inc/settings/settings-background.php:65
762
+ msgid "Dark grey"
763
+ msgstr ""
764
+
765
+ #: inc/settings/settings-background.php:71
766
+ msgid "Graphic Background"
767
+ msgstr ""
768
+
769
+ #: inc/settings/settings-background.php:78
770
+ msgid "Banner Settings"
771
+ msgstr ""
772
+
773
+ #: inc/settings/settings-background.php:83
774
+ msgid "Default Media"
775
+ msgstr ""
776
+
777
+ #: inc/settings/settings-background.php:89
778
+ msgid "Custom Images"
779
+ msgstr ""
780
+
781
+ #: inc/settings/settings-background.php:95
782
+ msgid "Unsplash library"
783
+ msgstr ""
784
+
785
+ #: inc/settings/settings-background.php:100
786
+ msgid "Video"
787
+ msgstr ""
788
+
789
+ #: inc/settings/settings-background.php:105
790
+ msgid "Graphic Pattern"
791
+ msgstr ""
792
+
793
+ #: inc/settings/settings-background.php:110
794
+ #: inc/settings/settings-background.php:387
795
+ msgid "Solid Color"
796
+ msgstr ""
797
+
798
+ #: inc/settings/settings-background.php:115
799
+ msgid "Gradient Color"
800
+ msgstr ""
801
+
802
+ #: inc/settings/settings-background.php:139
803
  msgid ""
804
+ "Pro Tip! You can select multiple Media from your library by holding CTRL"
805
+ "+click (Command+click if you sit on MacOS) while selecting photos."
806
+ msgstr ""
807
+
808
+ #: inc/settings/settings-background.php:187
809
+ msgid "Delete Images"
810
+ msgstr ""
811
+
812
+ #: inc/settings/settings-background.php:194
813
+ msgid "Choose Unsplash Feed"
814
+ msgstr ""
815
+
816
+ #: inc/settings/settings-background.php:197
817
+ msgid "Random Photo"
818
+ msgstr ""
819
+
820
+ #: inc/settings/settings-background.php:199
821
+ msgid "Specific Photo"
822
+ msgstr ""
823
+
824
+ #: inc/settings/settings-background.php:201
825
+ msgid "Random from Collection"
826
+ msgstr ""
827
+
828
+ #: inc/settings/settings-background.php:203
829
+ msgid "Random from User"
830
+ msgstr ""
831
+
832
+ #: inc/settings/settings-background.php:208
833
+ msgid "Enter Unsplash Photo URL or Unsplash Photo ID"
834
+ msgstr ""
835
+
836
+ #: inc/settings/settings-background.php:213
837
+ #, php-format
838
+ msgid "Enter <a href=\"%s\">Unsplash Collection</a> URL or Collection ID."
839
+ msgstr ""
840
+
841
+ #: inc/settings/settings-background.php:218
842
+ msgid "Limit photos to specific keyword (fashion, nature, technology..)"
843
+ msgstr ""
844
+
845
+ #: inc/settings/settings-background.php:223
846
+ msgid "Only Unsplash Featured Photos"
847
+ msgstr ""
848
+
849
+ #: inc/settings/settings-background.php:227
850
+ msgid "Enter Unsplash User ID"
851
+ msgstr ""
852
+
853
+ #: inc/settings/settings-background.php:231
854
+ msgid "Display Unsplash Photo"
855
+ msgstr ""
856
+
857
+ #: inc/settings/settings-background.php:240
858
+ msgid ""
859
+ "is a world leading source for free to use high quality stock images. All of "
860
+ "the images that are submitted and published on Unsplash fall under under the "
861
+ "<a href=\"https://unsplash.com/license\"> Unsplash license</a>, which means "
862
+ "you can use the image for any personal or commercial use."
863
+ msgstr ""
864
+
865
+ #: inc/settings/settings-background.php:247
866
+ msgid "Select Video Source"
867
+ msgstr ""
868
+
869
+ #: inc/settings/settings-background.php:250
870
+ msgid "YouTube"
871
+ msgstr ""
872
+
873
+ #: inc/settings/settings-background.php:251
874
+ msgid "Custom Video File"
875
+ msgstr ""
876
+
877
+ #: inc/settings/settings-background.php:252
878
+ msgid "Vimeo (coming soon...)"
879
+ msgstr ""
880
+
881
+ #: inc/settings/settings-background.php:257
882
+ msgid "Enter Youtube URL"
883
+ msgstr ""
884
+
885
+ #: inc/settings/settings-background.php:263
886
+ msgid "Enter Vimeo URL"
887
+ msgstr ""
888
+
889
+ #: inc/settings/settings-background.php:268
890
+ msgid "Select or Upload custom Video file"
891
+ msgstr ""
892
+
893
+ #: inc/settings/settings-background.php:297
894
+ msgid ""
895
+ "Video backgrounds doesn`t work on mobile devices therefore only thumbnail "
896
+ "video image will be displayed on mobile devices. Upload custom thumbnail "
897
+ "image by pressing button below. "
898
+ msgstr ""
899
+
900
+ #: inc/settings/settings-background.php:299
901
+ msgid "Media Library"
902
+ msgstr ""
903
+
904
+ #: inc/settings/settings-background.php:321
905
+ msgid "Select Pattern"
906
+ msgstr ""
907
+
908
+ #: inc/settings/settings-background.php:328
909
+ msgid "Custom Pattern..."
910
+ msgstr ""
911
+
912
+ #: inc/settings/settings-background.php:342
913
+ msgid "Select Color"
914
+ msgstr ""
915
+
916
+ #: inc/settings/settings-background.php:350
917
+ msgid "Select Gradient Background"
918
+ msgstr ""
919
+
920
+ #: inc/settings/settings-background.php:360
921
+ #: inc/settings/settings-background.php:417
922
+ msgid "Custom Gradient"
923
+ msgstr ""
924
+
925
+ #: inc/settings/settings-background.php:365
926
+ #: inc/settings/settings-background.php:423
927
+ msgid "Select first gradient color:"
928
+ msgstr ""
929
+
930
+ #: inc/settings/settings-background.php:367
931
+ #: inc/settings/settings-background.php:427
932
+ msgid "Select second gradient color:"
933
+ msgstr ""
934
+
935
+ #: inc/settings/settings-background.php:380
936
+ msgid "Background Overlay"
937
+ msgstr ""
938
+
939
+ #: inc/settings/settings-background.php:383
940
+ msgid "Select Background Overlay"
941
+ msgstr ""
942
+
943
+ #: inc/settings/settings-background.php:389
944
+ msgid "Gradient"
945
+ msgstr ""
946
+
947
+ #: inc/settings/settings-background.php:400
948
+ msgid "Background Overlay Color"
949
+ msgstr ""
950
+
951
+ #: inc/settings/settings-background.php:407
952
+ msgid "Select Gradient Overlay"
953
+ msgstr ""
954
+
955
+ #: inc/settings/settings-background.php:437
956
+ msgid "Background Overlay Opacity"
957
+ msgstr ""
958
+
959
+ #: inc/settings/settings-background.php:444
960
+ msgid "Background Blur Amount"
961
+ msgstr ""
962
+
963
+ #: inc/settings/settings-contact_form-disabled.php:6
964
+ #: inc/settings/settings-contact_form.php:27
965
+ msgid "Contact Form"
966
+ msgstr ""
967
+
968
+ #: inc/settings/settings-contact_form-disabled.php:13
969
+ #: inc/settings/settings-contact_form.php:35
970
+ msgid "Contact Form Options"
971
+ msgstr ""
972
+
973
+ #: inc/settings/settings-contact_form-disabled.php:18
974
+ #: inc/settings/settings-contact_form.php:40
975
+ msgid "3rd Party"
976
+ msgstr ""
977
+
978
+ #: inc/settings/settings-contact_form-disabled.php:32
979
+ msgid "Contact Form is disabled or is not supported by selected Theme."
980
+ msgstr ""
981
+
982
+ #: inc/settings/settings-contact_form.php:55
983
+ #: inc/settings/settings-subscribe.php:88
984
+ msgid "Subscribe Form is disabled."
985
+ msgstr ""
986
+
987
+ #: inc/settings/settings-contact_form.php:61
988
+ msgid "Contact Form label"
989
+ msgstr ""
990
+
991
+ #: inc/settings/settings-contact_form.php:66
992
+ msgid "Select your contact form"
993
+ msgstr ""
994
+
995
+ #: inc/settings/settings-contact_form.php:81
996
+ msgid "No contact forms detected. Please create a new Contact Form 7."
997
+ msgstr ""
998
+
999
+ #: inc/settings/settings-contact_form.php:85
1000
+ msgid "Please install Contact Form 7 plugin to select contact form."
1001
+ msgstr ""
1002
+
1003
+ #: inc/settings/settings-contact_form.php:107
1004
+ #, php-format
1005
+ msgid ""
1006
+ "If the list is empty, please make sure you have installed %s plugin and you "
1007
+ "have created a Contact Form. If not, you can create new Contact Form in %s > "
1008
+ "Contact > New"
1009
+ msgstr ""
1010
+
1011
+ #: inc/settings/settings-counter-disabled.php:2
1012
+ #: inc/settings/settings-counter.php:51
1013
+ msgid "Countdown Timer Setup"
1014
+ msgstr ""
1015
+
1016
+ #: inc/settings/settings-counter-disabled.php:8
1017
+ #: inc/settings/settings-counter.php:57 inc/settings/settings-counter.php:94
1018
+ msgid "Counter setup"
1019
+ msgstr ""
1020
+
1021
+ #: inc/settings/settings-counter-disabled.php:27
1022
+ msgid "Countdown Timer is disabled or is not supported by selected Theme."
1023
+ msgstr ""
1024
+
1025
+ #: inc/settings/settings-counter.php:76
1026
+ msgid "Countdown Timer is disabled."
1027
+ msgstr ""
1028
+
1029
+ #: inc/settings/settings-counter.php:84
1030
+ msgid "Counter Heading"
1031
+ msgstr ""
1032
+
1033
+ #: inc/settings/settings-counter.php:90
1034
+ msgid "Click on date input and set a date & time for a Countdown timer."
1035
+ msgstr ""
1036
+
1037
+ #: inc/settings/settings-counter.php:97
1038
+ msgid "Select Date.."
1039
+ msgstr ""
1040
+
1041
+ #: inc/settings/settings-counter.php:99
1042
+ msgid "Countdown action:"
1043
+ msgstr ""
1044
+
1045
+ #: inc/settings/settings-counter.php:103
1046
+ msgid "No action"
1047
+ msgstr ""
1048
+
1049
+ #: inc/settings/settings-counter.php:104
1050
+ msgid "Disable CMP Plugin Page"
1051
+ msgstr ""
1052
+
1053
+ #: inc/settings/settings-counter.php:105
1054
+ msgid "URL redirect"
1055
+ msgstr ""
1056
+
1057
+ #: inc/settings/settings-counter.php:109
1058
+ msgid "Enter custom text"
1059
+ msgstr ""
1060
+
1061
+ #: inc/settings/settings-counter.php:113
1062
+ msgid "Enter redirect URL"
1063
+ msgstr ""
1064
+
1065
+ #: inc/settings/settings-footer-disabled.php:2
1066
+ #: inc/settings/settings-footer.php:12
1067
+ msgid "Footer Content"
1068
+ msgstr ""
1069
+
1070
+ #: inc/settings/settings-footer-disabled.php:8
1071
+ msgid "Footer is not supported by selected Theme."
1072
+ msgstr ""
1073
+
1074
+ #: inc/settings/settings-footer.php:16
1075
+ msgid "Copyright"
1076
+ msgstr ""
1077
+
1078
+ #: inc/settings/settings-footer.php:26 inc/settings/settings-footer.php:85
1079
+ msgid "Contact Email"
1080
+ msgstr ""
1081
+
1082
+ #: inc/settings/settings-footer.php:63
1083
+ msgid "Extended Footer Content"
1084
+ msgstr ""
1085
+
1086
+ #: inc/settings/settings-footer.php:76
1087
+ msgid "Contacts Title"
1088
+ msgstr ""
1089
+
1090
+ #: inc/settings/settings-footer.php:94
1091
+ msgid "Contact Phone"
1092
+ msgstr ""
1093
+
1094
+ #: inc/settings/settings-logo-disabled.php:5 inc/settings/settings-logo.php:5
1095
+ msgid "Logo Setup"
1096
+ msgstr ""
1097
+
1098
+ #: inc/settings/settings-logo-disabled.php:12 inc/settings/settings-logo.php:12
1099
+ msgid "Logo setup"
1100
+ msgstr ""
1101
+
1102
+ #: inc/settings/settings-logo-disabled.php:16
1103
+ #: inc/settings/settings-logo-disabled.php:17 inc/settings/settings-logo.php:16
1104
+ #: inc/settings/settings-logo.php:17
1105
+ msgid "Text Logo"
1106
+ msgstr ""
1107
+
1108
+ #: inc/settings/settings-logo-disabled.php:22
1109
+ #: inc/settings/settings-logo-disabled.php:23 inc/settings/settings-logo.php:22
1110
+ #: inc/settings/settings-logo.php:23
1111
+ msgid "Graphic Logo"
1112
+ msgstr ""
1113
+
1114
+ #: inc/settings/settings-logo-disabled.php:36
1115
+ msgid "Logo settings is disabled or is not supported by selected Theme."
1116
+ msgstr ""
1117
+
1118
+ #: inc/settings/settings-logo.php:39
1119
+ msgid "Click to set.."
1120
+ msgstr ""
1121
+
1122
+ #: inc/settings/settings-logo.php:58
1123
+ msgid "Logo is disabled"
1124
+ msgstr ""
1125
+
1126
+ #: inc/settings/settings-slider-disabled.php:5
1127
+ #: inc/settings/settings-slider.php:42
1128
+ msgid "Image Slider Setup"
1129
+ msgstr ""
1130
+
1131
+ #: inc/settings/settings-slider-disabled.php:11
1132
+ #: inc/settings/settings-slider.php:48 inc/settings/settings-slider.php:74
1133
+ msgid "Slider setup"
1134
+ msgstr ""
1135
+
1136
+ #: inc/settings/settings-slider-disabled.php:30
1137
+ msgid "Slider settings is disabled or is not supported by selected Theme."
1138
+ msgstr ""
1139
+
1140
+ #: inc/settings/settings-slider.php:67
1141
+ msgid "Slider is disabled."
1142
+ msgstr ""
1143
+
1144
+ #: inc/settings/settings-slider.php:71
1145
+ msgid ""
1146
+ "To display Slider on CMP Landing page make sure you inserted two or more "
1147
+ "Custom Photos from Media Library. Slider is also disabled when Specific "
1148
+ "Unsplash photo or Default Media is selected."
1149
+ msgstr ""
1150
+
1151
+ #: inc/settings/settings-slider.php:79
1152
+ msgid "Slide"
1153
+ msgstr ""
1154
+
1155
+ #: inc/settings/settings-slider.php:83
1156
+ msgid "Fade"
1157
+ msgstr ""
1158
+
1159
+ #: inc/settings/settings-slider.php:90
1160
+ msgid "Slice"
1161
+ msgstr ""
1162
+
1163
+ #: inc/settings/settings-slider.php:98
1164
+ msgid "Slider Autostart"
1165
+ msgstr ""
1166
+
1167
+ #: inc/settings/settings-slider.php:101
1168
+ msgid "Number of Unplash media Slides (applies only for Unsplash photos)"
1169
+ msgstr ""
1170
+
1171
+ #: inc/settings/settings-special_effects-disabled.php:6
1172
+ #: inc/settings/settings-special_effects-disabled.php:13
1173
+ #: inc/settings/settings-special_effects.php:18
1174
+ #: inc/settings/settings-special_effects.php:25
1175
+ msgid "Special Effects"
1176
+ msgstr ""
1177
+
1178
+ #: inc/settings/settings-special_effects-disabled.php:18
1179
+ #: inc/settings/settings-special_effects.php:30
1180
+ msgid "Constellation"
1181
+ msgstr ""
1182
+
1183
+ #: inc/settings/settings-special_effects-disabled.php:33
1184
+ msgid ""
1185
+ "Special Effects are disabled or they are not supported by selected Theme."
1186
+ msgstr ""
1187
+
1188
+ #: inc/settings/settings-special_effects.php:50
1189
+ msgid "Constellation color"
1190
+ msgstr ""
1191
+
1192
+ #: inc/settings/settings-subscribe-disabled.php:6
1193
+ #: inc/settings/settings-subscribe.php:56
1194
+ msgid "Subscribe Form"
1195
+ msgstr ""
1196
+
1197
+ #: inc/settings/settings-subscribe-disabled.php:13
1198
+ #: inc/settings/settings-subscribe.php:63
1199
+ msgid "Subscribe Form Options"
1200
+ msgstr ""
1201
+
1202
+ #: inc/settings/settings-subscribe-disabled.php:18
1203
+ #: inc/settings/settings-subscribe.php:68
1204
+ msgid "CMP Subscribe Form"
1205
+ msgstr ""
1206
+
1207
+ #: inc/settings/settings-subscribe-disabled.php:24
1208
+ #: inc/settings/settings-subscribe.php:74
1209
+ msgid "3rd Party Plugin"
1210
+ msgstr ""
1211
+
1212
+ #: inc/settings/settings-subscribe-disabled.php:38
1213
+ msgid "Subscribe Form is disabled or is not supported by selected Theme."
1214
+ msgstr ""
1215
+
1216
+ #: inc/settings/settings-subscribe.php:97
1217
+ msgid ""
1218
+ "You can find Shortode in your Contact Form Plugin settings. Should be "
1219
+ "something similar to code below: "
1220
+ msgstr ""
1221
+
1222
+ #: inc/settings/settings-subscribe.php:99
1223
+ msgid ""
1224
+ "If you use 3rd party shortcode for subscribe or contact form, you might need "
1225
+ "to apply custom CSS to style the form correctly."
1226
+ msgstr ""
1227
+
1228
+ #: inc/settings/settings-subscribe.php:105
1229
+ msgid ""
1230
+ "CMP custom subscribe form will be used. It is guaranteed to always match "
1231
+ "selected Theme's style."
1232
+ msgstr ""
1233
+
1234
+ #: inc/settings/settings-subscribe.php:107
1235
+ msgid "Subscribe form Label"
1236
+ msgstr ""
1237
+
1238
+ #: inc/settings/settings-subscribe.php:111
1239
+ msgid "Select how to store your Subscribers"
1240
+ msgstr ""
1241
+
1242
+ #: inc/settings/settings-subscribe.php:113
1243
+ msgid "CMP Custom Subscribe List"
1244
+ msgstr ""
1245
+
1246
+ #: inc/settings/settings-subscribe.php:114
1247
+ msgid "MailChimp Integration"
1248
+ msgstr ""
1249
+
1250
+ #: inc/settings/settings-subscribe.php:119
1251
+ msgid ""
1252
+ "Emails will be stored in custom CMP list with CSV export support. If you "
1253
+ "ever delete CMP plugin then subscriber list will be purged as well."
1254
+ msgstr ""
1255
+
1256
+ #: inc/settings/settings-subscribe.php:120
1257
+ msgid "Total Subscribers: "
1258
+ msgstr ""
1259
+
1260
+ #: inc/settings/settings-subscribe.php:125
1261
+ msgid "MailChimp API key"
1262
+ msgstr ""
1263
+
1264
+ #: inc/settings/settings-subscribe.php:126
1265
+ msgid "MailChimp API Key"
1266
+ msgstr ""
1267
+
1268
+ #: inc/settings/settings-subscribe.php:129
1269
+ msgid "Retrieve Lists"
1270
+ msgstr ""
1271
+
1272
+ #: inc/settings/settings-subscribe.php:131
1273
+ #, php-format
1274
+ msgid "You can find or create new API key in your %s."
1275
+ msgstr ""
1276
+
1277
+ #: inc/settings/settings-subscribe.php:133
1278
+ msgid "Select MailChimp List to store emails."
1279
+ msgstr ""
1280
+
1281
+ #: inc/settings/settings-subscribe.php:150
1282
+ msgid "Please insert MailChimp API key to retrieve Lists."
1283
+ msgstr ""
1284
+
1285
+ #: inc/settings/settings-subscribe.php:159
1286
+ msgid "Enable MailChimp Double Opt In"
1287
+ msgstr ""
1288
+
1289
+ #: niteo-cmp.php:254 niteo-cmp.php:673
1290
+ msgid "CMP Settings"
1291
+ msgstr ""
1292
+
1293
+ #: niteo-cmp.php:256
1294
+ msgid "Content Settings"
1295
+ msgstr ""
1296
+
1297
+ #: niteo-cmp.php:260
1298
+ msgid "Subscribers"
1299
+ msgstr ""
1300
+
1301
+ #: niteo-cmp.php:264
1302
+ msgid "Upload New Theme"
1303
+ msgstr ""
1304
+
1305
+ #: niteo-cmp.php:266
1306
+ msgid "Help"
1307
+ msgstr ""
1308
+
1309
+ #: niteo-cmp.php:637
1310
+ msgid "Maintenance Mode:"
1311
+ msgstr ""
1312
+
1313
+ #: niteo-cmp.php:641
1314
+ msgid "Coming Soon Mode:"
1315
+ msgstr ""
1316
+
1317
+ #: niteo-cmp.php:645
1318
+ msgid "Redirect Mode:"
1319
+ msgstr ""
1320
+
1321
+ #: niteo-cmp.php:681
1322
+ msgid "CMP Preview"
1323
+ msgstr ""
1324
+
1325
+ #: niteo-cmp.php:821
1326
+ #, php-format
1327
+ msgid "There is a <b>recommended</b> update of <b>CMP Theme %s</b> available:"
1328
+ msgstr ""
1329
+
1330
+ #: niteo-cmp.php:821
1331
+ msgid " update now"
1332
+ msgstr ""
1333
+
1334
+ #: niteo-cmp.php:821
1335
+ #, php-format
1336
+ msgid "view update %s notes."
1337
+ msgstr ""
1338
+
1339
+ #: niteo-cmp.php:880
1340
+ msgid " theme was successfully installed!"
1341
+ msgstr ""
1342
+
1343
+ #: niteo-cmp.php:884 niteo-cmp.php:968
1344
+ msgid "There was an error unzipping the file!"
1345
+ msgstr ""
1346
+
1347
+ #: niteo-cmp.php:889 niteo-cmp.php:977
1348
+ msgid "Error creating Theme subdirectory!"
1349
+ msgstr ""
1350
+
1351
+ #: niteo-cmp.php:902
1352
+ msgid "Unable to upload new Theme file ."
1353
+ msgstr ""
1354
+
1355
+ #: niteo-cmp.php:902
1356
+ msgid ""
1357
+ " file extension is not supported. Please upload ZIP file containing CMP "
1358
+ "Theme."
1359
+ msgstr ""
1360
+
1361
+ #: niteo-cmp.php:985
1362
+ msgid "Error during updating Theme files:"
1363
+ msgstr ""
1364
+
1365
+ #: niteo-cmp.php:993
1366
+ msgid "General Error during updating Theme files."
1367
+ msgstr ""
1368
+
1369
+ #: niteo-cmp.php:1305
1370
+ msgid "Date"
1371
+ msgstr ""
1372
+
1373
+ #: niteo-cmp.php:1349
1374
+ msgid "CMP Settings Saved"
1375
+ msgstr ""
1376
+
1377
+ #: themes/construct/construct-settings.php:6
1378
+ #: themes/countdown/countdown-settings.php:13
1379
+ #: themes/hardwork/hardwork-settings.php:11
1380
+ msgid "Customize Colors"
1381
+ msgstr ""
1382
+
1383
+ #: themes/construct/construct-settings.php:9
1384
+ #: themes/countdown/countdown-settings.php:16
1385
+ msgid "Active Color"
1386
+ msgstr ""
1387
+
1388
+ #: themes/construct/construct-settings.php:13
1389
+ msgid "Headings and active elements color (buttons, hover links, etc)."
1390
+ msgstr ""
1391
+
1392
+ #: themes/construct/construct-settings.php:19
1393
+ #: themes/countdown/countdown-settings.php:26
1394
+ #: themes/hardwork/hardwork-settings.php:15
1395
+ msgid "Font Color"
1396
+ msgstr ""
1397
+
1398
+ #: themes/construct/construct-settings.php:28
1399
+ msgid "Background Color"
1400
+ msgstr ""
1401
+
1402
+ #: themes/construct/construct-settings.php:37
1403
+ msgid "Social Background Color"
1404
+ msgstr ""
1405
+
1406
+ #: themes/countdown/countdown-social_settings.php:6
1407
+ msgid "Social Icons Location"
1408
+ msgstr ""
1409
+
1410
+ #: themes/countdown/countdown-social_settings.php:10
1411
+ msgid "Below Content (big icons)"
1412
+ msgstr ""
1413
+
1414
+ #: themes/countdown/countdown-social_settings.php:11
1415
+ msgid "Footer (small icons)"
1416
+ msgstr ""
1417
+
1418
+ #: themes/hardwork/hardwork-settings.php:24
1419
+ msgid "Footer Background Color"
1420
  msgstr ""
1421
 
1422
+ #: themes/hardwork/hardwork-settings.php:31
1423
+ msgid "Footer Background Opacity"
1424
  msgstr ""
niteo-cmp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: CMP - Coming Soon & Maintenance Plugin
4
  Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
5
  Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
6
- Version: 2.6.6
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -13,1778 +13,1988 @@
13
  */
14
 
15
 
16
- class niteo_cmp {
 
 
 
17
 
18
- public function __construct() {
19
- $this->author = 'NiteoThemes';
20
- $this->author_homepage = 'https://niteothemes.com';
21
- $this->version = '2.6.6';
22
- $this->dev = false;
23
- $this->plugins_dir_path = plugin_dir_path( __DIR__ );
24
- if ( $this->plugins_dir_path == './') {
25
- $this->plugins_dir_path = WP_PLUGIN_DIR . '/';
26
- }
27
- $this->premium_installed = array();
28
- // 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));
33
-
34
- // check for installed premium themes
35
- if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/') ) {
36
- $this->premium_installed = array_map('basename', glob( $this->plugins_dir_path . 'cmp-premium-themes/*', GLOB_ONLYDIR));
37
- $this->theme_array = array_merge($this->themes_standard, $this->premium_installed);
38
- } else {
39
- $this->theme_array = $this->themes_standard;
40
- }
41
 
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
- }
 
49
 
50
- public function cmp() {
51
- $this->__construct();
52
- }
53
 
54
- public function init() {
55
- add_action( 'admin_notices', array($this, 'cmp_admin_notice') );
56
- add_action( 'template_redirect', array($this, 'cmp_displayPage') );
57
- add_action( 'wp_login', array($this, 'cmp_admin_override') );
58
- add_action( 'wp_before_admin_bar_render',array( $this, 'cmp_admin_bar' ));
59
- add_action( 'wp_ajax_niteo_themeinfo', array($this, 'niteo_themeinfo') );
60
- add_action( 'wp_ajax_niteo_unsplash', array($this, 'niteo_unsplash') );
61
- add_action( 'wp_ajax_niteo_export_csv', array($this, 'niteo_export_csv') );
62
- add_action( 'wp_ajax_cmp_theme_update_install', array($this, 'cmp_theme_update_install') );
63
- add_action( 'wp_ajax_cmp_toggle_activation', array($this, 'cmp_toggle_activation') );
64
- add_action( 'wp_ajax_nopriv_niteo_subscribe', array($this, 'niteo_subscribe') );
65
- add_action( 'wp_ajax_niteo_subscribe', array($this, 'niteo_subscribe') );
66
- add_action( 'wp_ajax_cmp_mailchimp_list_ajax', array($this, 'cmp_mailchimp_list_ajax') );
67
- add_action( 'plugins_loaded', array($this, 'cmp_textDomain') );
68
- add_action( 'admin_menu', array($this, 'cmp_adminMenu'), 10 );
69
- add_action( 'admin_init', array($this, 'cmp_adminInit') ) ;
70
- add_action( 'admin_init', array($this, 'cmp_admin_override') );
71
- add_action( 'admin_enqueue_scripts', array($this,'cmp_add_admin_style') );
72
- add_action( 'wp_enqueue_scripts', array($this,'cmp_add_admin_style') );
73
- add_action( 'upgrader_process_complete', array($this, 'cmp_plugin_update' ), 10, 2 );
74
-
75
- register_activation_hook( __FILE__, array($this, 'cmp_activate') );
76
- register_deactivation_hook( __FILE__, array($this, 'cmp_deactivate') );
77
-
78
- add_filter( 'style_loader_src', array($this,'sdt_remove_ver_css_js'), 9999, 2 );
79
- add_filter( 'script_loader_src', array($this,'sdt_remove_ver_css_js'), 9999, 2 );
80
- add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this,'add_action_links') );
81
-
82
- // include feedback class
83
- require_once('inc/class-cmp-feedback.php');
84
 
85
- }
86
-
87
- public function cmp_adminInit() {
88
- $current_user = wp_get_current_user();
89
- if ( user_can( $current_user, 'administrator' ) ) {
90
- // ini render-settings class
91
- require_once('inc/class-cmp-render_settings.php');
92
- $this->render_settings = new cmp_render_settings();
93
-
94
- if ( function_exists( 'wp_enqueue_code_editor' ) ) {
95
- wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
 
 
 
96
  }
97
-
98
- wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version );
99
- wp_enqueue_style( 'cmp-style' );
100
- wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
101
- wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
102
- wp_register_style( 'animate-css', plugins_url('/css/animate'.$this->minified.'.css', __FILE__) );
103
- wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
104
-
105
- wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
106
- wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
107
- wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
108
- wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont', 'select2-js'), $this->version );
109
- wp_register_script( 'countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
110
- }
111
-
112
- }
113
 
114
- // enqueue admin css and scripts only if admin is logged in
115
- public function cmp_add_admin_style() {
116
 
117
- $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
- // push WP administrator to roles array, since it is default
120
- array_push( $roles_topbar, 'administrator' );
 
 
 
 
 
 
 
 
 
121
 
122
- $current_user = wp_get_current_user();
 
 
 
123
 
 
 
 
 
124
 
125
- // check for roles array length
126
- if ( count( $current_user->roles ) > 0 ) {
127
- // if current user cannot access topbar, return
128
- foreach ( $current_user->roles as $role ) {
129
- if ( in_array( $role, $roles_topbar ) ) {
130
- wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', $this->version);
131
- wp_enqueue_style( 'cmp_admin_style' );
132
- wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), $this->version);
133
- wp_enqueue_script( 'cmp_admin_script' );
134
- break;
135
  }
136
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
- // this one is for broken wp admin, where current user does not have any roles
139
- } else {
140
- wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', $this->version);
141
- wp_enqueue_style( 'cmp_admin_style' );
142
- wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), $this->version);
143
- wp_enqueue_script( 'cmp_admin_script' );
 
 
144
  }
145
 
 
 
 
 
 
 
 
 
 
146
 
147
- }
 
 
 
 
 
 
 
 
148
 
 
 
 
 
 
 
 
 
 
149
 
150
- // remove default wp version from handles
151
- public function sdt_remove_ver_css_js( $src, $handle ) {
152
- $handles_remove_ver = array('font_awesome', 'webfont', 'countdown_flatpicker_js', 'countdown_flatpicker_css', 'select2'); // <-- Adjust to your needs!
153
- if ( in_array( $handle, $handles_remove_ver, true ) && strpos( $src, 'ver=' ) )
154
- $src = remove_query_arg( 'ver', $src );
 
 
 
 
155
 
156
- return $src;
157
- }
 
 
158
 
 
 
 
159
 
160
- //register scripts and load styles
161
- public function cmp_adminMenu() {
162
- /* Register our plugin page */
163
- $page = add_menu_page('CMP Settings', __('CMP Settings', 'cmp-coming-soon-maintenance'), 'activate_plugins', 'cmp-settings', array($this, 'cmp_settings_page'), plugins_url('/img/cmp.png', __FILE__));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
 
165
- add_submenu_page('cmp-settings', 'Content Settings', __('Content Settings', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-settings' );
 
 
 
 
 
 
166
 
167
- add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
168
 
169
- add_submenu_page('cmp-settings', 'Subscribers', __('Subscribers', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
 
 
 
 
 
170
 
171
- add_submenu_page('cmp-settings', 'Translation', __('Translation', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-translate', array($this, 'cmp_translate_page') );
 
 
 
 
172
 
173
- add_submenu_page('cmp-settings', 'Upload New Theme', __('Upload New Theme', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-upload-theme', array($this, 'cmp_upload_page') );
 
 
 
 
 
174
 
175
- add_submenu_page('cmp-settings', 'Help', __('Help', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-help', array($this, 'cmp_help_page') );
176
 
177
- /* Using registered $page handle to hook script load */
178
- add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
 
 
 
 
179
 
180
- }
181
 
 
182
 
183
- // enqueue styles and scripts when navigated to CMP Settings page
184
- public function cmp_enqueueScripts() {
185
- wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
186
- wp_enqueue_script('cmp_settings_js');
187
- wp_enqueue_script('cmp-typography');
188
- wp_enqueue_script( 'wp-color-picker');
189
- wp_enqueue_script( 'webfont' );
190
- wp_enqueue_script( 'select2-js');
191
- wp_enqueue_media();
192
- wp_enqueue_style( 'wp-color-picker');
193
- wp_enqueue_style( 'select2');
194
- wp_enqueue_style( 'font_awesome');
195
- if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) ) {
196
- wp_enqueue_style('animate-css');
197
- }
198
- }
199
 
200
- public function cmp_settings_page() {
201
- // include default options page
202
- // check for them updates, not sure where else this to put
203
- $this->cmp_check_update( $this->cmp_selectedTheme() );
204
- require_once ('cmp-settings.php');
205
- }
206
 
207
- public function cmp_advanced_page() {
208
- wp_enqueue_script('select2-js');
209
- wp_enqueue_style('select2');
210
- require_once ('cmp-advanced.php');
211
- }
212
 
213
- public function cmp_subs_page() {
214
- require_once ('cmp-subscribers.php');
215
- }
216
 
217
- public function cmp_translate_page() {
218
- require_once ('cmp-translate.php');
219
- }
220
 
221
- public function cmp_upload_page() {
222
- require_once ('cmp-upload.php');
223
- }
224
 
225
- public function cmp_help_page() {
226
- require_once ('cmp-help.php');
227
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
 
 
 
 
 
 
 
 
 
 
229
 
230
- public function cmp_asset_url( $filepath ) {
231
- return plugins_url( $filepath, __FILE__ );
232
- }
 
 
 
 
 
233
 
 
 
 
 
 
 
234
 
235
- // override wp login page if cmp is enabled
236
- public function cmp_admin_override(){
 
 
 
 
237
 
238
- // if admin or CMP disabled, return
239
- if( is_admin() || $this->cmp_status() == 0 ){
240
- return;
 
 
241
  }
242
 
243
- if( is_user_logged_in() ){
 
 
 
 
 
244
 
245
- // force redirect if logged-in user role is not set to bypass CMP
246
- if( !$this->cmp_roles_filter() ){
247
- wp_logout();
248
- wp_redirect( get_bloginfo('url') );
249
- exit();
250
- }
 
 
 
 
251
  }
252
- }
253
 
254
- // function to display CMP landing page
255
- public function cmp_displayPage() {
 
 
 
 
256
 
257
- // check if preview is set
258
- if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
 
 
259
 
260
- // register html class for rendering of HTML elements in Themes
261
- require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
262
- $html = new cmp_render_html();
263
 
264
- // iframe preview with sidebar controls cmp_preview=true&selector=true - nt.com only
265
- if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
266
- if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/preview-selector.php') ) {
267
- require_once ($this->plugins_dir_path . 'cmp-premium-themes/preview-selector.php');
268
- die();
269
- }
270
- }
271
-
272
- // preview for specific theme cmp_preview=true&theme=slug used in niteothemes
273
- if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
274
- $theme_preview = esc_attr($_GET['theme']);
275
-
276
- if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
277
- require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
278
- die();
279
  }
 
 
280
 
281
- }
 
282
 
283
- // preview for specific theme cmp_preview=true&template=slug used in
284
- if ( isset($_GET['cmp_theme']) && !empty($_GET['cmp_theme']) ) {
285
- $theme_preview = esc_attr($_GET['cmp_theme']);
286
-
287
- if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
288
- require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
289
- die();
290
- }
291
 
292
- }
 
293
 
294
- // finally render theme preview cmp_preview=true
295
- if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
296
- require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
297
- die();
298
- }
299
- }
 
 
 
 
 
 
 
 
 
 
300
 
301
- // bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
302
- if ( isset($_GET['cmp_bypass']) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
303
- nocache_headers();
304
- header('Cache-Control: max-age=0; private');
305
- setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
306
- return;
307
- }
308
 
309
- // if bypass Cookie is set, return
310
- if ( isset($_COOKIE['cmp_bypass']) && $_COOKIE['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() ) ) && get_option('niteoCS_bypass', '0') == '1' ) {
311
- return;
312
- }
 
 
313
 
314
- // Render CMP Theme mode if is activated and not in immediate redirect mode
315
- if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
316
-
317
- // check if user logged in, page filters and access role
318
- if ( !is_user_logged_in() && $this->cmp_page_filter() ) {
319
-
320
- // register html class for rendering of HTML elements in Themes
321
- require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
322
- $html = new cmp_render_html();
323
-
324
- // if themes with countdown timer
325
- if ( in_array($this->cmp_selectedTheme(), $this->countdown_themes) ){
326
- // if counter is enabled
327
- if ( get_option('niteoCS_counter', '1') == '1' ) {
328
- // if countdown date is set
329
- if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
330
- // if timer < timestamp do set action
331
- if ( get_option('niteoCS_counter_date' ) < time() ) {
332
- // if action set to disable cmp
333
- if ( get_option('niteoCS_countdown_action') == 'disable-cmp' ) {
334
- update_option('niteoCS_activation', '0');
335
- }
336
 
337
- // if action set to redirect
338
- if ( get_option('niteoCS_countdown_action') == 'redirect' ) {
339
- $redirect_url = esc_url(get_option('niteoCS_countdown_redirect'));
340
- header('Location: '.$redirect_url);
341
- die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  }
343
  }
344
  }
345
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  }
 
347
 
348
- // if maintanance mode send correct 503 headers
349
- if ( $this->cmp_status() == '1' ){
350
- header('HTTP/1.1 503 Service Temporarily Unavailable');
351
- header('Status: 503 Service Temporarily Unavailable');
352
- header('Retry-After: 86400'); // retry in a day
353
- }
354
 
355
- // render selected CMP theme
356
- if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
357
- require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
 
358
  die();
359
  }
360
  }
361
  }
362
 
363
- // if CMP in redirect mode with 0 timeout
364
- if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() && $this->cmp_page_filter() ) {
365
 
366
- $redirect_url = get_option('niteoCS_URL_redirect');
367
- // redirect to URL
368
- if ( $redirect_url != '') {
369
- header('Location: '.esc_url( $redirect_url ));
370
- die();
 
 
 
 
 
371
  }
372
  }
373
- }
374
 
 
 
 
 
375
 
376
- // return CMP activation status and it`s states
377
- public function cmp_status() {
 
 
 
 
 
 
 
 
 
 
378
 
379
- if ( !get_option('niteoCS_status') ||
380
- get_option('niteoCS_status') == '' ||
381
- get_option('niteoCS_status') == false ) {
382
- return '0';
 
383
 
384
- } else {
385
- return get_option( 'niteoCS_activation', '2' );
 
386
  }
387
- }
388
 
389
- // function to toggle CMP activation for admin menu icon
390
- public function cmp_toggle_activation () {
391
- // check for ajax
392
- if ( isset( $_POST['payload'] ) ) {
393
- // verify nonce
394
- check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
395
- // verify user rights
396
- if( !current_user_can('publish_pages') ) {
397
- die('Sorry, but this request is invalid');
398
- }
399
 
400
- if ( get_option('niteoCS_status', '') == '' ) {
401
- update_option('niteoCS_status', '1');
402
- } else {
403
- update_option('niteoCS_status', '');
404
- }
405
 
406
- echo 'success';
407
- wp_die();
408
- return;
409
- }
410
- }
411
 
412
- // check selected theme
413
- public function cmp_selectedTheme() {
414
- return get_option('niteoCS_theme', 'hardwork');
415
- }
416
 
 
 
 
 
 
417
 
418
- // return installed theme path
419
- public function cmp_themePath( $slug ) {
420
- if ( in_array($slug, $this->themes_standard) ) {
421
- return dirname(__FILE__) . '/themes/';
 
422
 
423
- } else {
424
- return $this->plugins_dir_path . 'cmp-premium-themes/';
 
425
  }
426
- }
427
 
428
- // return installed theme dir
429
- public function cmp_themeURL( $slug ) {
430
- if ( in_array($slug, $this->themes_standard) ) {
431
- return plugins_url( '/themes/', __FILE__ );
432
 
433
- } else {
434
- return plugins_url( '/cmp-premium-themes/');
435
-
436
- }
437
- }
438
 
439
- // older version of cmp_themeURL public function - migration after 1.9 version.
440
- //can be deleted in future...
441
- public function cmp_themeDirPath() {
442
- if ( $this->niteo_in_array_r( $this->cmp_selectedTheme(), $this->cmp_premium_themes(), true ) ) {
443
- return plugins_url( '/cmp-premium-themes/');
444
 
445
- } else {
446
- return plugins_url( '/themes/', __FILE__ );
447
- }
448
- }
 
 
 
 
 
 
449
 
450
- // display admin topbar notice
451
- public function cmp_admin_bar(){
 
 
452
 
453
- // check onces and wordpress rights, else DIE
454
- if ( $_SERVER['REQUEST_METHOD'] == 'POST' && (get_current_screen() && get_current_screen()->id == 'toplevel_page_cmp-settings' ) ) {
 
455
 
456
- //verify nonce and user rights
457
- if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
458
- die('Sorry, but this request is invalid');
459
- }
460
 
461
- if ( isset($_POST['activate']) && is_numeric($_POST['activate']) ) {
462
- update_option('niteoCS_activation', sanitize_text_field($_POST['activate']));
463
- }
464
 
465
- if ( isset($_POST['cmp_status']) ) {
466
- update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
467
- } else {
 
 
 
 
468
 
469
- update_option('niteoCS_status', false);
470
  }
471
 
472
- }
473
 
474
- require_once(ABSPATH . 'wp-admin/includes/screen.php');
 
475
 
476
- $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
477
 
478
- // push WP administrator to roles array, since it is default
479
- array_push( $roles_topbar, 'administrator' );
480
 
481
- $current_user = wp_get_current_user();
482
 
483
- // if current user cannot access topbar, return
484
- foreach ( $current_user->roles as $role ) {
485
 
 
 
 
 
486
 
487
- if ( !in_array( $role, $roles_topbar ) ) {
488
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
489
  }
490
- };
491
-
492
-
493
- global $wp_admin_bar;
494
-
495
- $class = '';
496
- $msg= '';
497
-
498
-
499
- switch ( get_option( 'niteoCS_activation', '2' ) ) {
500
- case '1':
501
- $msg = __('Maintenance Mode:','cmp-coming-soon-maintenance');
502
- $class = ' maintenance';
503
- break;
504
- case '2':
505
- $msg = __('Coming Soon Mode:','cmp-coming-soon-maintenance');
506
- $class = ' coming-soon';
507
- break;
508
- case '3':
509
- $msg = __('Redirect Mode:','cmp-coming-soon-maintenance');
510
- $class = ' redirect';
511
- break;
512
- default:
513
- break;
514
- }
515
-
516
- $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
517
-
518
- $msg = '<img src="'.plugins_url('/img/cmp.png', __FILE__).'" alt="CMP Logo" class="cmp-logo"><span class="cmp-status-msg">'.$msg.'</span>';
519
- $msg .='<div class="toggle-wrapper">
520
- <input type="checkbox" id="cmp-status-menubar" class="toggle-checkbox"'.checked( '1', get_option('niteoCS_status', false), false ).' name="cmp_status_menu" data-security="'. esc_attr($ajax_nonce).'">
521
- <label for="cmp-status-menubar" class="toggle"><span class="toggle_handler"></span></label>
522
- </div>';
523
-
524
- //Add the main siteadmin menu item
525
- $wp_admin_bar->add_menu( array(
526
- 'id' => 'cmp-admin-notice',
527
- 'href' => admin_url().'admin.php?page=cmp-settings',
528
- 'parent' => 'top-secondary',
529
- 'title' => $msg,
530
- 'meta' => array( 'class' => 'cmp-notice'.$class ),
531
- ) );
532
-
533
- // Display CMP Settings in topbar only for administrator
534
- if ( user_can( $current_user, 'administrator' ) ) {
535
  $wp_admin_bar->add_node( array(
536
- 'id' => 'cmp-settings',
537
- 'title' => __('CMP Settings', 'cmp-coming-soon-maintenancee'),
538
- 'href' => admin_url('admin.php?page=cmp-settings'),
539
- 'parent' => 'cmp-admin-notice'
 
540
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
541
  }
542
 
543
- $wp_admin_bar->add_node( array(
544
- 'id' => 'cmp-preview',
545
- 'title' => __('CMP Preview', 'cmp-coming-soon-maintenancee'),
546
- 'href' => get_site_url().'/?cmp_preview=true',
547
- 'parent'=> 'cmp-admin-notice',
548
- 'meta' => array('target' => '_blank' )
549
- ));
 
 
 
 
 
550
 
551
- }
 
552
 
553
- public function cmp_activate() {
 
 
554
 
555
- if ( get_option('niteoCS_archive') ) {
556
- //get all the options back from the archive
557
- $options = get_option('niteoCS_archive');
558
- // update options
559
- foreach ($options as $option) {
560
- update_option($option['name'], $option['value']);
561
  }
562
 
563
- // delete archive
564
- delete_option('niteoCS_archive');
565
  }
566
- }
567
 
568
- // archive plugin stuff when plugin is deactivated
569
- public function cmp_deactivate() {
570
- //get all the options. store them in an array
571
- $options = array();
572
-
573
- global $wpdb;
574
- $saved_options = $wpdb->get_results( "SELECT * FROM $wpdb->options WHERE option_name LIKE 'niteoCS_%'", OBJECT );
575
- $i = 0;
576
- foreach ($saved_options as $option) {
577
- $options[$i] = array('name' => $option->option_name, 'value' => get_option( $option->option_name) );
578
- $i++;
579
  }
580
 
581
- //store the options all in one record, in case we ever reactivate the plugin
582
- update_option('niteoCS_archive', $options);
 
 
583
 
584
- //delete the separate ones
585
- foreach ( $options as $option ) {
586
- delete_option($option['name']);
587
 
588
- }
589
 
590
- }
591
 
592
- // clean plugin stuff when plugin is deleted
593
- public function cmp_plugin_delete() {
594
- delete_option('niteoCS_archive');
595
- }
596
 
597
- // returns list of premium themes => manually defined
598
- public function cmp_premium_themes() {
599
-
600
- $premium_themes = array();
601
- 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') );
602
- 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') );
603
- 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') );
604
- 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') );
605
- 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') );
606
- 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') );
607
- 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') );
608
-
609
- return $premium_themes;
610
- }
611
 
612
- /**
613
- * Difference between Premium Themes installed and Premium Themes available sets in cmp_premium_themes() function.
614
- *
615
- * @since 2.2
616
- * @access public
617
- * @return array
618
- */
619
- public function cmp_downloadable_themes() {
620
- $downloadable_themes = array();
621
 
622
- foreach ( $this->cmp_premium_themes() as $premium ) {
623
- if ( !in_array($premium['name'], $this->premium_installed) ) {
624
- array_push( $downloadable_themes, $premium );
625
- }
626
- }
627
 
628
- return $downloadable_themes;
629
- }
630
 
631
- // theme updates function
632
- public function cmp_check_update( $theme_slug ) {
633
 
634
- if ( !in_array( $theme_slug, $this->premium_installed ) ) {
635
- return;
636
  }
637
 
638
- // check for current theme version
639
- $remote_version = '';
640
- $current_version = '';
 
 
 
 
 
 
 
 
 
 
 
 
641
 
642
- if ( $this->dev == true ) {
643
- delete_transient( $theme_slug.'_updatecheck' );
644
  }
645
 
646
- // check if update check transient is set
647
- if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
648
-
649
- $current_version = $this->cmp_theme_version($theme_slug);
650
- // get remote version from remote server
651
- $request = wp_remote_post( $this->remoteServer.'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')) );
652
-
653
- // if no error, retrivee body
654
- if ( !is_wp_error( $request ) ) {
655
-
656
- // decode to json
657
- $remote_version = json_decode( $request['body'], true );
658
 
659
- // get remove version key
660
- if ( isset($remote_version['version']) ) {
661
-
662
- $remote_version = $remote_version['version'];
663
 
664
- // if remote version is bigger than current, display info about new version
665
- if ( (float)$remote_version > (float)$current_version ) {
 
666
 
667
- $title = ucwords(str_replace('_', ' ', $theme_slug));
 
 
668
 
669
- // create nonce
670
- $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
 
 
 
 
 
 
 
671
 
672
- // if admin screen is not in updating theme
673
- if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
674
 
675
- $transient = '<div class="update-nag notice notice-warning"><p class="message">'.sprintf(__('There is a <b>recommended</b> update of <b>CMP Theme %s</b> available:', 'cmp-coming-soon-maintenance'), $title).' <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type=premium" class="update-theme" data-type="premium" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-name="'.esc_attr($title).'" data-remote_url="'.esc_url($this->remoteServer).'" data-new_ver="'.esc_attr($remote_version).'">'.__(' update now','cmp-coming-soon-maintenance').'</a> or <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('view update %s notes.','cmp-coming-soon-maintenance'), $remote_version).'</a></p><div class="release-note"></div></div>';
 
676
 
677
- // set transient with 12 hour expire
678
- set_transient( $theme_slug.'_updatecheck', $transient, 60*60*12 );
679
 
680
- echo $transient;
681
- }
682
 
683
- } else {
684
- // set transient no update available with 12 hours expire
685
- set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
686
- }
687
 
688
- }
689
- }
690
 
691
- } else if ( $updatecheck_transient != '' ) {
692
- echo $updatecheck_transient;
693
- }
694
 
695
- return;
696
- }
697
 
698
- public function cmp_theme_upload($zip) {
699
- // allow zip file to upload
700
- add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
701
 
702
- // load PHP WP FILE
703
- if ( ! function_exists( 'wp_handle_upload' ) ) {
704
- require_once realpath('../../../wp-admin/includes/file.php');
705
- }
706
 
707
- $uploadedfile = $zip;
708
- $filename = $uploadedfile['name'];
709
- /* You can use wp_check_filetype() public function to check the
710
- file type and go on wit the upload or stop it.*/
711
- $filetype = wp_check_filetype( $filename );
712
-
713
- if ( $filetype['ext'] == 'zip' ) {
714
- // Upload file
715
- $movefile = wp_handle_upload( $uploadedfile, array('test_form' => FALSE) );
716
-
717
- if ( $movefile && !isset( $movefile['error'] ) ) {
718
-
719
- WP_Filesystem();
720
- $source_path = $movefile['file'];
721
- $theme_name = str_replace('.zip', '', $filename);
722
- $destination_path = $this->plugins_dir_path . 'cmp-premium-themes/';
723
-
724
- // create new theme DIR
725
- if ( wp_mkdir_p( $destination_path ) ) {
726
- // Unzip FILE into that DIR
727
- $unzipfile = unzip_file( $source_path, $destination_path);
728
-
729
- if ( $unzipfile ) {
730
- // delete FILE
731
- wp_delete_file( $source_path );
732
- $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
733
- $this->theme_array = array_merge( $this->themes_standard, $this->premium_installed );
734
- echo '<div class="notice notice-success is-dismissible"><p class="message">'.ucwords(str_replace('_', ' ', $theme_name)).' '.__(' theme was successfully installed!', 'cmp-coming-soon-maintenance').'</p></div>';
735
- return;
736
 
737
- } else {
738
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
739
- return;
740
- }
741
 
742
- } else {
743
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
744
- return;
745
- }
746
-
747
- } else {
748
- /**
749
- * Error generated by _wp_handle_upload()
750
- * @see _wp_handle_upload() in wp-admin/includes/file.php
751
- */
752
- echo '<div class="notice notice-error is-dismissible"><p>'.$movefile['error'].'</p></div>';
753
- return;
754
  }
755
- } else {
756
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Unable to upload new Theme file .', 'cmp-coming-soon-maintenance'). strtoupper($filetype['ext']) .__(' file extension is not supported. Please upload ZIP file containing CMP Theme.', 'cmp-coming-soon-maintenance').'</p></div>';
757
  return;
758
  }
759
 
760
- add_filter('upload_mimes', array($this, 'niteo_remove_zip_mime'));
761
- return;
762
- }
763
-
764
- public function cmp_theme_update_install( $file ) {
765
- $ajax = false;
766
- // check for ajax
767
- if ( isset( $_POST['file'] ) ) {
768
- // verify nonce
769
- check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
770
- // verify user rights
771
- if( !current_user_can('publish_pages') ) {
772
- die('Sorry, but this request is invalid');
773
- }
774
-
775
- // sanitize array
776
- $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
777
 
778
- if ( !empty( $_POST['file'] ) ) {
779
- $file = $_POST['file'];
780
- $ajax = true;
781
  }
782
- }
783
 
784
- // load PHP WP FILE
785
- if ( ! empty( $file ) ) {
786
- // Download file to temp location.
787
- $file['tmp_name'] = download_url( $file['url'] );
788
-
789
- // If error storing temporarily, return the error.
790
- if ( !is_wp_error( $file['tmp_name'] ) ) {
791
- WP_Filesystem();
792
-
793
- $source_path = $file['tmp_name'];
794
- $theme_name = $file['name'];
795
-
796
- $destination_path = $this->plugins_dir_path . 'cmp-premium-themes/';
797
-
798
- // create new theme DIR
799
- if ( wp_mkdir_p( $destination_path ) ) {
800
- // Unzip FILE into that DIR
801
- $unzipfile = unzip_file( $source_path, $destination_path);
802
-
803
- if ( $unzipfile ) {
804
-
805
- // delete FILE
806
- wp_delete_file( $source_path );
807
- // reload premium installed themes
808
- $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
809
- // add it to all installed themes array
810
- $this->theme_array = array_merge( $this->themes_standard, $this->premium_installed );
811
- // reply response
812
- // set transient no update available with 24 hours expire
813
- set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
814
- // die
815
- if ( $ajax ) {
816
- wp_die('success');
817
  return;
818
- } else {
819
- echo '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp-coming-soon-maintenance').'</p></div>';
820
- return;
821
- }
822
-
823
- } else {
824
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
825
- if ( $ajax ) {
826
- wp_die();
827
- return;
828
- } else {
829
- return;
830
- }
831
- }
832
 
833
- } else {
834
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
835
- if ( $ajax ) {
836
- wp_die();
837
- return;
838
  } else {
 
839
  return;
840
  }
841
- }
842
 
843
- } else {
844
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp-coming-soon-maintenance').' '.$file['tmp_name']->get_error_message().'</p></div>';
845
- if ( $ajax === true ) {
846
- wp_die();
847
  } else {
848
- return;
 
 
 
 
 
849
  }
850
- }
851
- } else {
852
-
853
- echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
854
- if ( $ajax === true ) {
855
- wp_die();
856
  } else {
 
857
  return;
858
  }
 
 
 
859
  }
860
- }
861
 
862
- public function cmp_textDomain() {
863
- load_plugin_textdomain( 'cmp-coming-soon-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
864
- }
 
 
 
 
 
 
 
865
 
866
- // build unsplash api
867
- public function cmp_unsplash_api ( $query ) {
868
 
869
- $api_url = 'https://api.unsplash.com/'.$query.'&client_id=41f043163758cf2e898e8a868bc142c20bc3f5966e7abac4779ee684088092ab' ;
870
-
871
- if ( function_exists( 'wp_remote_get' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
872
 
873
- $response = wp_remote_get( $api_url );
 
 
 
874
 
875
- if ( !is_object( $response ) && isset( $response['body'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876
 
877
- $body = $response['body'];
878
- $data = array( 'response' => $response['response']['code'], 'body' => $body );
879
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
880
  } else {
881
- $data = array( 'response' => 'Unplash API', 'body' => 'Not responding after 5000ms' );
 
 
 
 
 
882
  }
883
 
884
- } else {
885
- $data = array( 'response' => '500', 'body' => 'You have neither cUrl installed nor allow_url_fopen activated. Ask your server hosting provider to allow on of those options.' );
886
  }
887
 
888
- return $data;
889
- }
 
890
 
891
- // prepare unsplash url and get unsplash photo via cmp_unsplash_api()
892
- public function niteo_unsplash( $params ) {
893
- $ajax = false;
894
-
895
- // check for ajax
896
- if ( isset( $_POST['params'] ) ) {
897
- // verify nonce
898
- check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
899
- // verify user rights
900
- if( !current_user_can('publish_pages') ) {
901
- die('Sorry, but this request is invalid');
902
- }
903
 
904
- // sanitize array
905
- $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
 
906
 
907
- if ( !empty( $_POST['params'] ) ) {
908
- $params = $_POST['params'];
909
- $ajax = true;
910
- }
911
- }
912
 
913
- array_key_exists ('feed', $params) ? $feed = $params['feed'] : $feed = '';
914
- array_key_exists ('url', $params) ? $url = $params['url'] : $url = '';
915
- array_key_exists ('feat', $params) ? $feat = $params['feat'] : $feat = '';
916
- array_key_exists ('custom_str', $params) ? $custom_str = $params['custom_str'] : $custom_str = '';
917
- array_key_exists ('count', $params) ? $count = $params['count'] : $count = '1';
918
-
919
- switch ( $feed ) {
920
- // specific unsplash photo by url/id
921
- case '0':
922
- $id = '';
923
- // check if $query contains unsplash.com url
924
- if ( strpos( $url, 'unsplash.com' ) !== false ) {
925
- $parts = parse_url( $url );
926
- // check for photo parameter in URL
927
- if ( isset($parts['query'])) {
928
- parse_str($parts['query'], $query);
929
- $id = $query['photo'];
930
- }
931
- // if no ID found, get last part of URL containing ID
932
- if ( $id == '' ) {
933
 
934
- $pathFragments = explode('/', $parts['path']);
935
- $id = end($pathFragments);
936
- }
937
 
938
- // $query is ID
939
  } else {
940
- $id = $url;
941
  }
942
 
943
- // prepare query for single image
944
- $api_query = 'photos/'.$id.'?';
945
- break;
946
 
947
- // random from user
948
- case '1':
949
 
950
- if ( $custom_str[0] == '@' ) {
951
- $custom_str = substr($custom_str, 1);
 
 
 
 
 
 
 
 
 
952
  }
953
 
954
- // prepare query for random photo from collection
955
- $api_query = 'photos/random/?username='.$custom_str.'&count='.$count;
956
- break;
957
 
958
- // random from collection
959
- case '2':
960
- if ( is_numeric( $url ) ) {
961
- $collection = $url;
962
- } else {
963
- $collection = filter_var($url, FILTER_SANITIZE_NUMBER_INT);
964
- $collection = str_replace('-', '', $collection );
965
  }
 
966
 
967
- // prepare query for random photo from collection
968
- $api_query = 'photos/random/?collections='.$collection.'&count='.$count;
969
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
970
 
971
- // random photo
972
- case '3':
 
973
 
974
- // featured
975
- if ( $feat == '0' || $feat == '') {
976
- $featured = 'false';
977
- } else {
978
- $featured = 'true';
979
- }
980
 
981
- // category
982
- $search = str_replace(' ', ',', $url);
 
983
 
984
- if ( $search !== '' ) {
985
- $search = 'query='.$search.'&';
986
- }
987
- // prepare query for random photo
988
- $api_query = 'photos/random/?orientation=landscape&featured='.$featured.'&'.$search.'count='.$count;
989
- break;
990
 
991
- default:
992
- $api_query = 'photos/random/?orientation=landscape&count='.$count;
993
- break;
994
- }
995
 
996
- $unsplash_img = $this->cmp_unsplash_api( $api_query );
 
 
997
 
998
- if ( $ajax === true ) {
999
- echo json_encode($unsplash_img);
1000
- wp_die();
 
 
 
 
 
1001
 
1002
- } else {
1003
- return $unsplash_img;
1004
- }
1005
- }
1006
-
1007
- // check value in multidimensional array
1008
- public function niteo_in_array_r($needle, $haystack, $strict = false) {
1009
- foreach ( $haystack as $item ) {
1010
- if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
1011
- return true;
1012
- }
1013
- }
1014
 
1015
- return false;
1016
- }
1017
 
1018
- // save subscribe function
1019
- // $check must be true, to avoid duplicated requests after update to 2.1
1020
- public function niteo_subscribe( $check ) {
 
 
 
1021
 
1022
- $subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
 
1023
 
1024
- $response = '';
1025
- $response_invalid = 'Please insert valid Email address.';
1026
- $ajax = false;
 
 
 
1027
 
1028
- // check for ajax request
1029
- if ( isset( $_POST['check'] ) && $_POST['check'] == true ) {
1030
- $check = true;
1031
- $ajax = true;
1032
- }
1033
 
1034
- if ( $check === true ) :
1035
-
1036
- if ( $_SERVER['REQUEST_METHOD'] == 'POST'
1037
- && isset( $_POST['form_honeypot'] )
1038
- && $_POST['form_honeypot'] === ''
1039
- && isset( $_POST['email'] ) )
1040
- {
1041
-
1042
- if ( is_email( $_POST['email'] ) ) {
1043
- // email already passed is_email, no need to sanitize
1044
- $email = $_POST['email'];
1045
-
1046
- // sanitize all inputs
1047
- $ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
1048
- $firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
1049
- $lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
1050
- $timestamp = time();
1051
-
1052
- // get translation lists
1053
- if ( get_option('niteoCS_translation') ) {
1054
- $translation = json_decode( get_option('niteoCS_translation'), true );
1055
- $response_ok = $translation[7]['translation'];
1056
- $response_duplicate = $translation[5]['translation'];
1057
- $response_invalid = $translation[6]['translation'];
1058
-
1059
- } else {
1060
- $response_ok = 'Thank you, your sign-up request was successful!';
1061
- $response_duplicate = 'This Email address has already been on our subscriber list.';
1062
- $response_invalid = 'Please insert valid Email address.';
1063
- }
1064
-
1065
- switch ( $subscribe_method ) {
1066
- // default custom CMP method
1067
- case 'cmp':
1068
- // get subscribe list
1069
- $subscribe_list = get_option('niteoCS_subscribers_list');
1070
 
1071
- // if no subscribe list yet, create first item and insert it into DB
1072
- if ( !$subscribe_list ) {
1073
- $new_list = array();
1074
- $new_email = array( 'id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1075
- array_push( $new_list, $new_email );
1076
- update_option( 'niteoCS_subscribers_list', $new_list );
1077
- $response = $response_ok;
1078
-
1079
- } else {
1080
- // check if email don`t already exists
1081
- if ( !$this->niteo_in_array_r( $email, $subscribe_list, true ) ) {
1082
- $count = count( $subscribe_list );
1083
- $new_email = array( 'id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1084
- array_push( $subscribe_list, $new_email );
1085
- update_option('niteoCS_subscribers_list', $subscribe_list);
1086
- $response = $response_ok;
1087
-
1088
- // if email exists return duplicate response
1089
- } else {
1090
- $response = $response_duplicate;
1091
- }
1092
- }
1093
- break;
1094
-
1095
- // mailchimp API call
1096
- case 'mailchimp':
1097
- $api_key = esc_attr( get_option('niteoCS_mailchimp_apikey') );
1098
- $list_id = esc_attr( get_option('niteoCS_mailchimp_list_selected') );
1099
- $email = $_POST['email'];
1100
- $status = 'subscribed'; // subscribed, cleaned, pending
1101
-
1102
- $args = array(
1103
- 'method' => 'PUT',
1104
- 'headers' => array(
1105
- 'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
1106
- ),
1107
- 'body' => json_encode(array(
1108
- 'email_address' => $email,
1109
- 'status' => $status
1110
- ))
1111
- );
1112
-
1113
- $mailchimp = wp_remote_post( 'https://' . substr($api_key,strpos($api_key,'-')+1) . '.api.mailchimp.com/3.0/lists/'. $list_id .'/members/' . md5(strtolower($email)), $args );
1114
-
1115
- if ( !is_wp_error( $mailchimp ) ) {
1116
 
1117
- $body = json_decode( $mailchimp['body'] );
 
 
 
 
 
 
 
 
 
 
 
1118
 
1119
- if ( $mailchimp['response']['code'] == 200 && $body->status == $status ) {
1120
- $response = $response_ok;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1121
 
1122
  } else {
1123
- $response = 'Error ' . $mailchimp['response']['code'] . ' ' . $body->title . ': ' . $body->detail;
 
 
 
 
 
 
 
 
 
 
 
1124
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1125
 
1126
- } else {
1127
- $response = $mailchimp->get_error_message();
1128
- }
 
1129
 
1130
- break;
1131
 
1132
- default:
1133
- break;
1134
- }
1135
 
1136
- // if not email, set response invalid
1137
- } else {
1138
- $response = $response_invalid;
1139
- }
1140
- }
1141
 
1142
- endif; // $check !== true
1143
 
1144
- if ( $ajax === true ) {
1145
- echo $response;
1146
- wp_die();
1147
 
1148
- } else {
1149
- return $response;
 
 
1150
  }
1151
-
1152
- }
1153
 
1154
- public function niteo_export_csv() {
1155
- // load subscribers array
1156
- $subscribers = get_option('niteoCS_subscribers_list');
1157
-
1158
- if( !empty($subscribers) ) {
1159
- $filename = 'subscribers-list-' . date('Y-m-d') . '.csv';
1160
- header('Content-Type: text/csv');
1161
- header('Content-Disposition: attachment;filename='.$filename);
1162
- $fp = fopen('php://output', 'w');
1163
- fputcsv($fp, array(__('Date','cmp-coming-soon-maintenance'),__('Email','cmp-coming-soon-maintenance')));
1164
- foreach ($subscribers as $key => $value) {
1165
- if ( isset( $value['ip_address'] ) ) {
1166
- unset($subscribers[$key]['ip_address']);
1167
- }
1168
- if ( isset( $value['id'] ) ) {
1169
- unset($subscribers[$key]['id']);
 
 
 
 
 
 
1170
  }
1171
 
1172
- if ( isset( $value['timestamp'] ) ) {
1173
- $format="Y-m-d H:i:s";
1174
- $subscribers[$key]['timestamp'] = date_i18n($format, $subscribers[$key]['timestamp']);
1175
  }
 
1176
  }
 
 
1177
 
1178
- foreach ( $subscribers as $key => $value ) {
1179
- fputcsv($fp, $value, $delimiter = ',', $enclosure = '"' );
1180
- }
1181
- fclose($fp);
 
 
1182
  }
1183
- die();
1184
- }
1185
 
1186
- public function niteo_allow_zip_mime( $existing_mimes = array() ) {
1187
- // add your own extension here - as many as you like
1188
- $existing_mimes['zip'] = 'application/zip';
1189
 
1190
- // return amended array
1191
- return $existing_mimes;
1192
- }
1193
-
1194
- public function niteo_remove_zip_mime( $existing_mimes = array() ) {
1195
- // remove zip mime
1196
- unset ($existing_mimes['zip']);
1197
-
1198
- // return amended array
1199
- return $existing_mimes;
1200
- }
1201
 
1202
 
1203
- public function cmp_admin_notice() {
1204
- if ( isset($_GET['page']) && ($_GET['page'] == 'cmp-settings' || $_GET['page'] == 'cmp-translate' || $_GET['page'] == 'cmp-advanced') ) {
1205
- if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
1206
- $status = 'success';
1207
- $message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
1208
 
1209
- echo '<div class="notice notice-'.$status.' is-dismissible"><p>'.$message.'.</p></div>';
 
1210
  }
1211
- }
1212
- return;
1213
- }
1214
-
1215
- // convert hex to rgba
1216
- public function hex2rgba ( $hex, $opacity ) {
1217
- list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
1218
-
1219
- $rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
1220
 
1221
- return $rgba;
1222
- }
 
1223
 
1224
- // convert hex to hsl css
1225
- public function hex2hsl( $hex, $opacity ) {
1226
 
1227
- if ( $hex[0] != '#' ) {
1228
- $rgba = explode( ',', $hex);
1229
- $rgba[3] = str_replace(')', '', $rgba[3]);
1230
- $rgba[3] = $rgba[3] - ( $opacity / 100 );
1231
- $rgba = $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')';
1232
  return $rgba;
1233
  }
1234
 
1235
- list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
 
1236
 
1237
- $r = $red / 255.0;
1238
- $g = $green / 255.0;
1239
- $b = $blue / 255.0;
1240
- $H = 0;
1241
- $S = 0;
1242
- $V = 0;
1243
-
1244
- $min = min( $r, $g, $b );
1245
- $max = max( $r, $g, $b );
1246
- $delta = ( $max - $min );
1247
 
1248
- $L = ( $max + $min ) / 2.0;
1249
 
1250
- if( $delta == 0 ) {
 
 
1251
  $H = 0;
1252
  $S = 0;
1253
- } else {
1254
- $S = $L > 0.5 ? $delta / ( 2 - $max - $min ) : $delta / ( $max + $min );
1255
-
1256
- $dR = ( ( ( $max - $r ) / 6) + ( $delta / 2 ) ) / $delta;
1257
- $dG = ( ( ( $max - $g ) / 6) + ( $delta / 2 ) ) / $delta;
1258
- $dB = ( ( ( $max - $b ) / 6) + ( $delta / 2 ) ) / $delta;
1259
-
1260
- if ( $r == $max )
1261
- $H = $dB - $dG;
1262
- else if( $g == $max )
1263
- $H = ( 1/3 ) + $dR - $dB;
1264
- else
1265
- $H = ( 2/3 ) + $dG - $dR;
1266
-
1267
- if ( $H < 0 )
1268
- $H += 1;
1269
- if ( $H > 1 )
1270
- $H -= 1;
1271
- }
1272
 
1273
- $HSL = array( 'hue' => round( ($H*360), 0 ), 'saturation'=> round( ($S*100), 0 ), 'luminosity' => round( ( $L*100 ), 0) );
 
 
1274
 
1275
- // if color is white {
1276
- if ( $HSL['hue'] == 0 && $HSL['saturation'] == 0) {
1277
- $requested_lumi = $HSL['luminosity'] + $opacity;
1278
- } else {
1279
- $requested_lumi = $HSL['luminosity'] - $opacity;
1280
- }
1281
-
1282
- $requested_lumi = (int)round($requested_lumi);
1283
 
1284
- if ( $requested_lumi > 90 ) {
1285
-
1286
- $requested_lumi = 90;
1287
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1288
 
1289
- $HSL = 'hsl( '. $HSL['hue'] .', '.( $HSL['saturation']) .'%, '. $requested_lumi . '%)';
1290
- return $HSL;
1291
- }
1292
 
1293
- // check if mobile
1294
- public function isMobile() {
1295
- if ( isset($_SERVER["HTTP_USER_AGENT"]) ) {
1296
- return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
 
 
 
 
1297
 
1298
- } else {
1299
- return false;
 
 
 
 
 
1300
  }
1301
- }
1302
 
1303
- // sanitize function
1304
- public function sanitize_checkbox( $input ) {
1305
- return ( ( isset( $input ) && true == $input ) ? '1' : '0' );
1306
- }
1307
 
1308
- // sanitize function
1309
- public function niteo_sanitize_html( $html ) {
1310
- global $allowedposttags;
1311
- return wp_kses( $html, $allowedposttags );
1312
- }
1313
 
1314
- // public function to sort social icons
1315
- public function sort_social($a, $b){
1316
- if ( $a['hidden'] == $b['hidden'] ) {
1317
- if( $a['order'] == $b['order'] ) {
1318
- return 0;
1319
- }
1320
- return $a['order'] < $b['order'] ? -1 : 1;
1321
- } else {
1322
- return $a['hidden'] > $b['hidden'] ? 1 : -1;
1323
- }
1324
- }
1325
-
1326
- // public function to shift multidimensional array
1327
- public function customShift($array, $name){
1328
- // var_dump($array);
1329
- foreach($array as $key => $val){ // loop all elements
1330
- if($val['name'] == $name){ // check for id $id
1331
- unset($array[$key]); // unset the $array with id $id
1332
- array_unshift($array, $val); // unshift the array with $val to push in the beginning of array
1333
- return $array; // return new $array
1334
- }
1335
- }
1336
- }
1337
 
1338
- public function get_youtube_img( $youtube_url ) {
1339
- $youtube = preg_match('/.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/', $youtube_url, $url);
 
 
1340
 
1341
- if ( isset( $url[7] ) && $url[7] != '') {
1342
- $youtube_image = 'http://img.youtube.com/vi/' . $url[7] . '/hqdefault.jpg';
1343
- return $youtube_image;
1344
  }
1345
- }
1346
 
1347
- public function cmp_get_pages() {
1348
- $page_titles = array();
1349
- $pages = array();
1350
- $page_ids = get_all_page_ids();
 
 
 
 
 
 
 
1351
 
1352
- foreach ($page_ids as $page_id ) {
1353
- array_push( $page_titles, get_the_title($page_id) );
 
 
 
 
 
 
 
 
1354
  }
1355
 
1356
- foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
1357
- $pages[] = array('id' => $id, 'name' => $name);
 
 
 
 
 
1358
  }
1359
 
1360
- return $pages;
1361
- }
 
 
1362
 
1363
- // send json data for theme info overlay AJAX request
1364
- public function niteo_themeinfo( ) {
 
1365
 
1366
- // check for ajax
1367
- if ( isset( $_POST['theme_slug'] ) ) {
1368
- // verify nonce
1369
- check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
1370
- // verify user rights
1371
- if( !current_user_can('publish_pages') ) {
1372
- die('Sorry, but this request is invalid');
1373
  }
1374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1375
 
1376
- // sanitize $post
1377
- $theme_slug = sanitize_text_field( $_POST['theme_slug'] );
1378
- $data = array( 'result' => 'true', 'author_homepage' => $this->author_homepage, 'author' => $this->author );
1379
-
1380
- if ( !empty( $theme_slug ) ) {
1381
- $headers = array('Theme Name', 'Description');
1382
- $theme_info = get_file_data(plugin_dir_path( __FILE__ ).'/themes/'. $theme_slug. '.txt', $headers, '');
1383
 
1384
- $screenshots = array_map( 'basename', glob( plugin_dir_path( __FILE__ ) . 'img/thumbnails/'.$theme_slug.'/*' ) );
 
 
1385
 
1386
- foreach ( $screenshots as $key => $screenshot ) {
1387
- $screenshots[$key] = plugins_url('img/thumbnails/'.$theme_slug.'/'.$screenshot, __FILE__ );
 
 
 
 
 
 
 
 
 
 
 
1388
  }
1389
 
1390
- $data['name'] = $theme_info[0];
1391
- $data['description'] = $theme_info[1];
1392
- $data['screenshots'] = $screenshots;
1393
- }
1394
 
1395
- echo json_encode ($data);
1396
- wp_die();
 
1397
  }
1398
- }
1399
 
1400
- // legacy function for premium themes redirect
1401
- public function niteo_redirect() {
1402
- return;
1403
- }
1404
-
1405
- // returns array of google fonts from /inc/webfonts.php
1406
- public function cmp_get_google_fonts() {
1407
- $fonts = include_once wp_normalize_path( dirname( __FILE__ ) . '/inc/webfonts.php' );
1408
- $google_fonts = json_decode( $fonts, true);
1409
-
1410
- return $google_fonts;
1411
- }
1412
-
1413
- public function cmp_google_variant_title( $variant ) {
1414
-
1415
- switch( $variant ) {
1416
- case '100':
1417
- return 'Thin 100';
1418
- break;
1419
- case '100italic':
1420
- return 'Thin 100 Italic';
1421
- break;
1422
- case '200':
1423
- return 'Extra-light 200';
1424
- break;
1425
- case '200italic':
1426
- return 'Extra-light 200 Italic';
1427
- break;
1428
- case '300':
1429
- return 'Light 300';
1430
- break;
1431
- case '300italic':
1432
- return 'Light 300 Italic';
1433
- break;
1434
- case '400':
1435
- return 'Regular 400';
1436
- break;
1437
- case '400italic':
1438
- return 'Regular 400 Italic';
1439
- break;
1440
- case '500':
1441
- return 'Medium 500';
1442
- break;
1443
- case '500italic':
1444
- return 'Meidum 500 Italic';
1445
- break;
1446
- case '600':
1447
- return 'Semi-Bold 600';
1448
- break;
1449
- case '600italic':
1450
- return 'Semi-Bold 600 Italic';
1451
- break;
1452
- case '700':
1453
- return 'Bold 700';
1454
- break;
1455
- case '700italic':
1456
- return 'Bold 700 Italic';
1457
- break;
1458
- case '800':
1459
- return 'Extra-Bold 800';
1460
- break;
1461
- case '800italic':
1462
- return 'Extra-Bold Italic';
1463
- break;
1464
- case '900':
1465
- return 'Black 900';
1466
- break;
1467
- case '900italic':
1468
- return 'Black 900 Italic';
1469
- break;
1470
- case 'regular':
1471
- return 'Regular 400';
1472
- break;
1473
- case 'italic':
1474
- return 'Regular 400 Italic';
1475
- break;
1476
- default:
1477
- break;
1478
- }
1479
- }
1480
 
1481
- // returns true if current page is in page array (blacklist or whitelist)
1482
- // since 2.2
1483
- public function cmp_page_filter() {
1484
- $page_id = get_the_ID();
1485
 
1486
- // change manually page_id to -1 if homepage is displayed
1487
- if ( is_home() || is_front_page() ) {
1488
- $page_id = '-1';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1489
  }
1490
 
1491
- switch ( get_option('niteoCS_page_filter', '0') ) {
1492
- // disabled return true
1493
- case '0':
1494
- return true;
1495
- break;
 
 
 
 
 
 
 
 
 
 
 
 
1496
 
1497
- // whitelist
1498
- case '1':
1499
- $page_list = json_decode( get_option('niteoCS_page_whitelist', '[]'), true );
1500
-
1501
- if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
1502
  return true;
 
1503
 
1504
- } else {
1505
- return false;
1506
- }
1507
- break;
1508
 
1509
- // blacklist
1510
- case '2':
1511
- $page_list = json_decode( get_option('niteoCS_page_blacklist', '[]'), true );
1512
 
1513
-
1514
- if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
1515
- return false;
 
1516
 
1517
- } else {
1518
- return true;
1519
- }
 
 
 
1520
 
1521
- break;
 
 
1522
 
1523
- default:
1524
- return true;
1525
- break;
 
 
 
 
 
1526
  }
1527
 
1528
- return true;
1529
- }
 
 
 
 
1530
 
1531
- // returns true if logged in user meet CMP roles filter
1532
- // since 2.2
1533
- public function cmp_roles_filter() {
1534
- $roles = json_decode( get_option('niteoCS_roles', '[]'), true );
1535
- // push WP administrator to roles array, since it is default
1536
- array_push( $roles, 'administrator' );
1537
 
1538
- $current_user = wp_get_current_user();
 
 
 
 
1539
 
1540
- foreach ( $current_user->roles as $role ) {
1541
- if ( in_array($role, $roles) ) {
1542
- return true;
1543
- }
1544
- };
1545
 
1546
- return false;
1547
- }
1548
 
 
 
 
 
 
 
 
 
 
 
 
1549
 
1550
- public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
1551
- if ( is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra) ) {
1552
- if ($hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins'])) {
1553
- $this_plugin = plugin_basename(__FILE__);
1554
- foreach ($hook_extra['plugins'] as $key => $plugin) {
1555
- if ($this_plugin == $plugin) {
1556
- $this_plugin_updated = true;
1557
- break;
1558
- }
1559
- }// endforeach;
1560
- unset($key, $plugin, $this_plugin);
1561
- if (isset($this_plugin_updated) && $this_plugin_updated === true) {
1562
-
1563
- // migrate google analytics options
1564
- if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
1565
- update_option('niteoCS_analytics_status', 'google');
1566
- }
1567
 
1568
- // add social icons to social settings
1569
- if ( get_option('niteoCS_socialmedia') ) {
1570
- $niteoCS_socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
1571
- $socialmedia = json_decode( $niteoCS_socialmedia, true );
1572
- $update = false;
1573
-
1574
- // add soundcloud and phone social media in 2.2 update
1575
- if ( !$this->niteo_in_array_r( 'soundcloud', $socialmedia, true ) ) {
1576
- $soundcloud = array(
1577
- 'name' => 'soundcloud',
1578
- 'url' => '',
1579
- 'active' => '1',
1580
- 'hidden' => '1',
1581
- 'order' => '17',
1582
- );
1583
- array_push( $socialmedia, $soundcloud );
1584
- $update = true;
1585
  }
1586
 
1587
- // add whatsapp and phone social media in 2.3 update
1588
- if ( !$this->niteo_in_array_r( 'whatsapp', $socialmedia, true ) ) {
1589
- $whatsapp = array(
1590
- 'name' => 'whatsapp',
1591
- 'url' => '',
1592
- 'active' => '1',
1593
- 'hidden' => '1',
1594
- 'order' => '18',
1595
- );
1596
- array_push( $socialmedia, $whatsapp );
1597
-
1598
- $phone = array(
1599
- 'name' => 'phone',
1600
- 'url' => '',
1601
- 'active' => '1',
1602
- 'hidden' => '1',
1603
- 'order' => '19',
1604
- );
1605
- array_push( $socialmedia, $phone );
1606
- $update = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1607
  }
1608
 
1609
- // add telegram social media in 2.6.6 update
1610
- if ( !$this->niteo_in_array_r( 'telegram', $socialmedia, true ) ) {
1611
- $telegram = array(
1612
- 'name' => 'telegram',
1613
- 'url' => '',
1614
- 'active' => '1',
1615
- 'hidden' => '1',
1616
- 'order' => '20',
1617
- );
1618
- array_push( $socialmedia, $telegram );
1619
- $update = true;
 
 
 
 
 
 
 
 
 
1620
  }
1621
 
1622
- if ( $update == true ) {
1623
- update_option('niteoCS_socialmedia', json_encode( $socialmedia) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1624
  }
1625
- }
1626
 
1627
- // add new strings to translation
1628
- if ( get_option('niteoCS_translation') ) {
1629
- $translation = json_decode( get_option('niteoCS_translation'), true );
1630
- if ( !isset($translation[9]) ) {
1631
- array_push( $translation, array('id' => 9, 'string' => 'Scroll', 'translation' => 'Scroll') );
1632
- }
1633
 
1634
- if ( !isset($translation[10]) ) {
1635
- array_push( $translation, array('id' => 10, 'string' => 'First Name', 'translation' => 'First Name') );
1636
- }
1637
 
1638
- if ( !isset($translation[11]) ) {
1639
- array_push( $translation, array('id' => 11, 'string' => 'Last Name', 'translation' => 'Last Name') );
1640
- }
1641
 
1642
- update_option('niteoCS_translation', wp_json_encode($translation));
1643
- }
 
1644
 
 
 
 
 
1645
 
1646
- // check for < 1.8 version where subscriber ID was not set
1647
- if ( get_option('niteoCS_subscribers_list') ) {
1648
- $subscribe_list = get_option('niteoCS_subscribers_list');
1649
-
1650
- if ( is_array($subscribe_list) && count($subscribe_list) > 0 && !array_key_exists ('id', $subscribe_list[0]) ) {
1651
- $i = 1;
1652
- foreach( $subscribe_list as &$sub ){
1653
- $sub['id'] = $i;
1654
- $sub = array('id' => $sub['id']) + $sub;
1655
- // check if ip address is set
1656
- if (!array_key_exists('ip_address', $sub)) {
1657
- $sub['ip_address'] = 'nodata';
1658
- }
1659
- $i++;
1660
  }
1661
- update_option('niteoCS_subscribers_list', $subscribe_list);
 
 
 
1662
  }
1663
- }
1664
 
1665
- // delete transients for theme updates, to ensure the updates for latest cmp versions runs again
1666
- foreach ( $this->premium_installed as $theme_slug ) {
1667
- delete_transient( $theme_slug.'_updatecheck' );
1668
- }
1669
- }// endif; $this_plugin_updated
1670
- }// endif update plugin and plugins not empty.
1671
- }// endif; $hook_extra
1672
- }// updatePlugin
1673
 
1674
 
1675
- public function add_action_links ( $links ) {
1676
- $settings = array(
1677
- '<a href="' . admin_url( 'admin.php?page=cmp-settings' ) . '">CMP Settings</a>',
1678
- );
1679
- return array_merge( $settings, $links );
1680
- }
 
1681
 
 
 
 
1682
 
1683
- // returns version of selected CMP theme
1684
- public function cmp_theme_version( $theme_slug ) {
1685
- // if premium theme style.css exists get its version
 
1686
 
1687
- if ( in_array( $theme_slug, $this->premium_installed ) ) {
1688
- if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
1689
- $version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', array('Version'), '');
1690
  }
1691
 
1692
- } else {
1693
- $version = $this->version;
1694
- }
 
1695
 
1696
- // if we have local version of theme and not in updating theme
1697
- if ( is_array($version) ) {
1698
- $version = $version[0];
1699
  }
1700
 
1701
- return $version;
1702
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1703
 
1704
- /**
1705
- * Connect to Mailchimp via API and retrieve Mailchimp lists
1706
- *
1707
- * @since 2.6
1708
- * @access public
1709
- * @return Object
1710
- */
1711
- public function cmp_mailchimp_list_ajax( $apikey ) {
1712
-
1713
- // check for ajax
1714
- if ( isset( $_POST['params'] ) ) {
1715
- // verify nonce
1716
- check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
1717
- // verify user rights
1718
- if( !current_user_can('publish_pages') ) {
1719
- die('Sorry, but this request is invalid');
1720
- }
1721
 
1722
- // sanitize array
1723
- $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
 
 
1724
 
1725
- // check params
1726
- if ( !empty( $_POST['params'] ) ) {
1727
- $params = $_POST['params'];
1728
- }
1729
 
1730
- $api_key = $params['apikey'];
1731
 
1732
- $dc = substr($api_key,strpos($api_key,'-')+1); // datacenter, it is the part of your api key - us5, us8 etc
 
 
 
 
1733
 
1734
- $args = array(
1735
- 'headers' => array(
1736
- 'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
1737
- )
1738
- );
1739
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1740
 
1741
- // retrieve response from mailchimp
1742
- $response = wp_remote_get( 'https://'.$dc.'.api.mailchimp.com/3.0/lists/', $args );
1743
-
1744
- // if we have it, create new array with lists id and name, else push error messages into array
1745
- if ( !is_wp_error( $response ) ) {
1746
- $lists_array = array();
1747
-
1748
- $body = json_decode( $response['body'], true);
1749
-
1750
- if ( $response['response']['code'] == 200 ) {
1751
- $lists_array['response'] = 200;
1752
- $i = 0;
1753
- foreach ( $body['lists'] as $list ) {
1754
- $lists_array['lists'][$i]['id'] = $list['id'];
1755
- $lists_array['lists'][$i]['name'] = $list['name'];
1756
- $i++;
1757
  }
1758
 
1759
  } else {
1760
- $lists_array['response'] = $response['response']['code'];
1761
- $lists_array['message'] = $body['title'] . ': ' . $body['detail'];
1762
  }
1763
 
1764
- } else {
1765
- $lists_array['response'] = '500';
1766
- $lists_array['message'] = $response->get_error_message();
1767
- }
1768
 
1769
- // json encode response
1770
- $lists_json = json_encode( $lists_array );
1771
 
1772
- // save it
1773
- update_option('niteoCS_mailchimp_lists', $lists_json);
1774
 
1775
- // delete selected old mailchimp list because we do not want it
1776
- delete_option('niteoCS_mailchimp_list_selected');
1777
-
1778
- // echo ajax result
1779
- echo $lists_json;
1780
- wp_die();
1781
 
1782
- }
1783
 
 
1784
  }
 
 
 
 
 
 
 
 
 
1785
  }
1786
 
1787
- $cmpPlugin = new niteo_cmp();
 
 
1788
 
1789
  register_uninstall_hook( __FILE__, array('niteo_cmp', 'cmp_plugin_delete') );
1790
 
3
  Plugin Name: CMP - Coming Soon & Maintenance Plugin
4
  Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
5
  Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
6
+ Version: 2.8.3
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
13
  */
14
 
15
 
16
+ // Exit if accessed directly.
17
+ if ( ! defined( 'ABSPATH' ) ) {
18
+ exit;
19
+ }
20
 
21
+ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
+ /**
24
+ * Main CMP Coming Soon and Maintenance class.
25
+ *
26
+ * @since 2.8
27
+ */
28
+ class CMP_Coming_Soon_and_Maintenance {
29
+
30
+ /**
31
+ * CMP_Coming_Soon_and_Maintenance The one true CMP_Coming_Soon_and_Maintenance
32
+ *
33
+ * @var string $instance
34
+ */
35
+ private static $instance;
36
+
37
+ /**
38
+ * Main CMP_Coming_Soon_and_Maintenance Instance.
39
+ *
40
+ * Insures that only one instance of CMP_Coming_Soon_and_Maintenance exists in memory at any one
41
+ * time. Also prevents needing to define globals all over the place.
42
+ *
43
+ * Thanks Rich Tabor for teaching things about Singleton
44
+ * @since 2.8
45
+ * @static
46
+ * @static var array $instance
47
+ * @uses CMP_Coming_Soon_and_Maintenance::init() Initiate actions and filters.
48
+ * @uses CMP_Coming_Soon_and_Maintenance::cmp_assets_suffix() Include .min version based on CMP_DEBUG
49
+ * @uses CMP_Coming_Soon_and_Maintenance::load_textdomain() load the language files.
50
+ * @return object|CMP_Coming_Soon_and_Maintenance
51
+ */
52
+ public static function instance() {
53
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof CMP_Coming_Soon_and_Maintenance ) ) {
54
+ self::$instance = new CMP_Coming_Soon_and_Maintenance();
55
+ self::$instance->constants();
56
+ self::$instance->init();
57
+ self::$instance->cmp_assets_suffix();
58
+ self::$instance->load_textdomain();
59
 
60
+ }
61
 
62
+ return self::$instance;
63
+ }
64
 
 
 
 
65
 
66
+ private function constants() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
+ // define constants
69
+ $this->define( 'CMP_VERSION', '2.8.3' );
70
+ $this->define( 'CMP_DEBUG', FALSE );
71
+ $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
72
+ $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
73
+ $this->define( 'CMP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
74
+ $this->define( 'CMP_PREMIUM_THEMES_DIR', plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/' );
75
+ $this->define( 'CMP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
76
+ $this->define( 'CMP_PLUGIN_FILE', __FILE__ );
77
+ ( CMP_DEBUG === TRUE ) ? $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates-test/' ) : $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates/' );
78
+
79
+ // set option for plugin update process
80
+ if ( !get_option( 'niteoCS_version' ) ) {
81
+ update_option( 'niteoCS_version', CMP_VERSION );
82
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
+ }
 
85
 
86
+ /**
87
+ * Inits and hooks
88
+ */
89
+ public function init() {
90
+ add_action( 'admin_notices', array( $this, 'cmp_admin_notice' ) );
91
+ add_action( 'template_redirect', array( $this, 'cmp_displayPage' ) );
92
+ add_action( 'wp_login', array( $this, 'cmp_admin_override' ) );
93
+ add_action( 'wp_before_admin_bar_render', array( $this, 'cmp_admin_bar' ) );
94
+ add_action( 'wp_ajax_niteo_themeinfo', array( $this, 'niteo_themeinfo' ) );
95
+ add_action( 'wp_ajax_niteo_unsplash', array( $this, 'niteo_unsplash' ) );
96
+ add_action( 'wp_ajax_niteo_export_csv', array( $this, 'niteo_export_csv' ) );
97
+ add_action( 'wp_ajax_cmp_theme_update_install', array( $this, 'cmp_theme_update_install' ) );
98
+ add_action( 'wp_ajax_cmp_toggle_activation', array( $this, 'cmp_toggle_activation') );
99
+ add_action( 'wp_ajax_nopriv_niteo_subscribe', array( $this, 'niteo_subscribe' ) );
100
+ add_action( 'wp_ajax_niteo_subscribe', array( $this, 'niteo_subscribe' ) );
101
+ add_action( 'wp_ajax_cmp_mailchimp_list_ajax', array( $this, 'cmp_mailchimp_list_ajax' ) );
102
+ add_action( 'admin_menu', array( $this, 'cmp_adminMenu' ), 10 );
103
+ add_action( 'admin_init', array( $this, 'cmp_adminInit' ) ) ;
104
+ add_action( 'admin_init', array( $this, 'cmp_admin_override' ) );
105
+ add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
106
+ add_action( 'wp_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
107
+ add_action( 'upgrader_process_complete', array( $this, 'cmp_plugin_update' ), 10, 2 );
108
+
109
+ add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this,'add_action_links' ) );
110
+
111
+ register_activation_hook( __FILE__, array( $this, 'cmp_activate' ) );
112
+ register_deactivation_hook( __FILE__, array( $this, 'cmp_deactivate' ) );
113
+
114
+ // include feedback class
115
+ require_once( 'inc/class-cmp-feedback.php' );
116
+ require_once( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
117
+ }
118
 
119
+ /**
120
+ * Define constant if not already set.
121
+ *
122
+ * @param string|string $name Name of the definition.
123
+ * @param string|bool $value Default value.
124
+ */
125
+ private function define( $name, $value ) {
126
+ if ( ! defined( $name ) ) {
127
+ define( $name, $value );
128
+ }
129
+ }
130
 
131
+ /**
132
+ * Admin Init - register and enqueue scripts nad styles
133
+ */
134
+ public function cmp_adminInit() {
135
 
136
+ if ( current_user_can('administrator') ) {
137
+ // ini render-settings class
138
+ require_once('inc/class-cmp-render_settings.php');
139
+ $this->render_settings = new cmp_render_settings();
140
 
141
+ if ( function_exists( 'wp_enqueue_code_editor' ) ) {
142
+ wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
 
 
 
 
 
 
 
 
143
  }
144
+
145
+ wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.CMP_ASSET_SUFFIX.'.css', __FILE__),'', CMP_VERSION );
146
+ wp_enqueue_style( 'cmp-style' );
147
+ wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
148
+ wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
149
+ wp_register_style( 'animate-css', plugins_url('/css/animate'.CMP_ASSET_SUFFIX.'.css', __FILE__) );
150
+ wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
151
+
152
+ wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
153
+ wp_register_script( 'cmp-select2-js', plugins_url('/js/select2.min.js', __FILE__) );
154
+ wp_register_script( 'cmp-typography', plugins_url('/js/typography'.CMP_ASSET_SUFFIX.'.js', __FILE__), array('cmp-select2-js' ), CMP_VERSION );
155
+ wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.CMP_ASSET_SUFFIX.'.js', __FILE__), array('webfont', 'cmp-select2-js'), CMP_VERSION );
156
+ wp_register_script( 'countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
157
+ }
158
+
159
+ }
160
 
161
+ /**
162
+ * Define Bundled CMP themes and return them in array
163
+ *
164
+ * @since 2.8.3
165
+ * @return array
166
+ */
167
+ public function cmp_themes_bundled() {
168
+ return array('construct', 'countdown', 'hardwork');
169
  }
170
 
171
+ /**
172
+ * Define CMP Using Countdown scripts
173
+ *
174
+ * @since 2.8.3
175
+ * @return array
176
+ */
177
+ public function cmp_countdown_themes() {
178
+ return array( 'frame', 'countdown', 'postery', 'countdown2', 'stylo', 'element', 'apollo' );
179
+ }
180
 
181
+ /**
182
+ * Define CMP Using Font Animation styles
183
+ *
184
+ * @since 2.8.3
185
+ * @return array
186
+ */
187
+ public function cmp_font_animation_themes() {
188
+ return array( 'hardwork_premium', 'fifty', 'orbit', 'stylo', 'apollo' );
189
+ }
190
 
191
+ /**
192
+ * Returns CMP Premium themes from PREMIUM tHEMES DIR
193
+ *
194
+ * @since 2.8.3
195
+ * @return array
196
+ */
197
+ public function cmp_premium_themes_installed() {
198
+ return array_map( 'basename', glob( CMP_PREMIUM_THEMES_DIR . '*', GLOB_ONLYDIR ) );
199
+ }
200
 
201
+ /**
202
+ * Merge and return bundled themes with premium installed themes
203
+ *
204
+ * @since 2.8.3
205
+ * @return array
206
+ */
207
+ public function cmp_themes_available() {
208
+ return array_merge( $this->cmp_themes_bundled(), $this->cmp_premium_themes_installed() );
209
+ }
210
 
211
+ /**
212
+ * Enqueue scripts and styles for topbar CMP icon
213
+ */
214
+ public function cmp_add_admin_style() {
215
 
216
+ if ( !is_user_logged_in() ) {
217
+ return;
218
+ }
219
 
220
+ $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
221
+
222
+ // push WP administrator to roles array, since it is default
223
+ array_push( $roles_topbar, 'administrator' );
224
+
225
+ // get current user
226
+ $current_user = wp_get_current_user();
227
+
228
+ // check for roles array length
229
+ if ( count( $current_user->roles ) > 0 ) {
230
+ // enqueue topbar script and style only, if current user is allowed to display topbar, or is admin
231
+ foreach ( $current_user->roles as $role ) {
232
+ if ( in_array( $role, $roles_topbar ) ) {
233
+ wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', CMP_VERSION);
234
+ wp_enqueue_style( 'cmp_admin_style' );
235
+ wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
236
+ wp_enqueue_script( 'cmp_admin_script' );
237
+ wp_localize_script( 'cmp_admin_script', 'cmp_ajax', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
238
+ break;
239
+ }
240
+ };
241
 
242
+ // this one is for broken wp admin, where current user does not have any roles
243
+ } else {
244
+ wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', CMP_VERSION);
245
+ wp_enqueue_style( 'cmp_admin_style' );
246
+ wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
247
+ wp_enqueue_script( 'cmp_admin_script' );
248
+ }
249
 
250
+ }
251
 
252
+ /**
253
+ * Set Plugin assets minified or full path based on DEBUG mode
254
+ *
255
+ * @since 2.8.1
256
+ */
257
+ public function cmp_assets_suffix() {
258
 
259
+ // If there's no debug mode, use the minified assets supplied.
260
+ if ( ! defined( 'CMP_DEBUG' ) ) {
261
+ define( 'CMP_ASSET_SUFFIX', '.min' );
262
+ return;
263
+ }
264
 
265
+ if ( true === CMP_DEBUG ) {
266
+ define( 'CMP_ASSET_SUFFIX', null );
267
+ } else {
268
+ define( 'CMP_ASSET_SUFFIX', '.min' );
269
+ }
270
+ }
271
 
 
272
 
273
+ /**
274
+ * Register CMP menus pages
275
+ */
276
+ public function cmp_adminMenu() {
277
+ /* Register our plugin page */
278
+ $page = add_menu_page('CMP Settings', __('CMP Settings', 'cmp-coming-soon-maintenance'), 'activate_plugins', 'cmp-settings', array($this, 'cmp_settings_page'), plugins_url('/img/cmp.png', __FILE__));
279
 
280
+ add_submenu_page('cmp-settings', 'Content Settings', __('Content Settings', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-settings' );
281
 
282
+ add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
283
 
284
+ add_submenu_page('cmp-settings', 'Subscribers', __('Subscribers', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
 
286
+ add_submenu_page('cmp-settings', 'Translation', __('Translation', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-translate', array($this, 'cmp_translate_page') );
 
 
 
 
 
287
 
288
+ add_submenu_page('cmp-settings', 'Upload New Theme', __('Upload New Theme', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-upload-theme', array($this, 'cmp_upload_page') );
 
 
 
 
289
 
290
+ add_submenu_page('cmp-settings', 'Help', __('Help', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-help', array($this, 'cmp_help_page') );
 
 
291
 
292
+ /* Using registered $page handle to hook script load */
293
+ add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueAdminScripts'));
 
294
 
295
+ }
 
 
296
 
297
+ /**
298
+ * enqueue styles and scripts when navigated to CMP Settings page
299
+ */
300
+ public function cmp_enqueueAdminScripts() {
301
+ wp_enqueue_media();
302
+ wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
303
+ wp_enqueue_script( 'cmp_settings_js' );
304
+ wp_enqueue_script( 'cmp-typography' );
305
+ wp_enqueue_script( 'wp-color-picker' );
306
+ wp_enqueue_script( 'webfont' );
307
+ wp_enqueue_script( 'cmp-select2-js' );
308
+ wp_enqueue_style( 'wp-color-picker' );
309
+ wp_enqueue_style( 'select2' );
310
+ wp_enqueue_style( 'font_awesome' );
311
+
312
+ if ( in_array( $this->cmp_selectedTheme(), $this->cmp_font_animation_themes() ) ) {
313
+ wp_enqueue_style('animate-css');
314
+ }
315
+ }
316
 
317
+ /**
318
+ * Render CMP Settings Page
319
+ */
320
+ public function cmp_settings_page() {
321
+ // include default options page
322
+ // check for selected theme update, not sure where else this to put
323
+ $this->cmp_check_update( $this->cmp_selectedTheme() );
324
+ require_once ('cmp-settings.php');
325
+ }
326
 
327
+ /**
328
+ * Render CMP Advanced Settings Sub Page
329
+ */
330
+ public function cmp_advanced_page() {
331
+ wp_enqueue_script( 'cmp-select2-js' );
332
+ wp_enqueue_style('select2');
333
+ require_once ('cmp-advanced.php');
334
+ }
335
 
336
+ /**
337
+ * Render CMP Subscribers Sub Page
338
+ */
339
+ public function cmp_subs_page() {
340
+ require_once ('cmp-subscribers.php');
341
+ }
342
 
343
+ /**
344
+ * Render CMP Translation Sub Page
345
+ */
346
+ public function cmp_translate_page() {
347
+ require_once ('cmp-translate.php');
348
+ }
349
 
350
+ /**
351
+ * Render CMP Upload new Theme Sub Page
352
+ */
353
+ public function cmp_upload_page() {
354
+ require_once ('cmp-upload.php');
355
  }
356
 
357
+ /**
358
+ * Render CMP Help and About Sub Page
359
+ */
360
+ public function cmp_help_page() {
361
+ require_once ('cmp-help.php');
362
+ }
363
 
364
+ /**
365
+ * returns bundled plugin`s assets URL for Premium Themes
366
+ *
367
+ * @since 2.6
368
+ * @access public
369
+ * @param string
370
+ * @return URL string
371
+ */
372
+ public function cmp_asset_url( $filepath ) {
373
+ return plugins_url( $filepath, __FILE__ );
374
  }
 
375
 
376
+ /**
377
+ * Overrides wp login page, Loggout current user and wp redirect, if cmp is enabled
378
+ *
379
+ * @access public
380
+ */
381
+ public function cmp_admin_override(){
382
 
383
+ // if admin or CMP disabled, return
384
+ if ( current_user_can('administrator') || $this->cmp_status() == 0 ) {
385
+ return;
386
+ }
387
 
388
+ if ( is_user_logged_in() ) {
 
 
389
 
390
+ // logout and force redirect if logged-in user role is not set to bypass CMP
391
+ if ( !$this->cmp_roles_filter() ) {
392
+ wp_logout();
393
+ wp_redirect( get_bloginfo('url') );
394
+ exit();
 
 
 
 
 
 
 
 
 
 
395
  }
396
+ }
397
+ }
398
 
399
+ // function to display CMP landing page
400
+ public function cmp_displayPage() {
401
 
402
+ // register html class for rendering of HTML elements in Themes
403
+ $html = new CMP_Coming_Soon_and_Maintenance_Render_HTML();
 
 
 
 
 
 
404
 
405
+ // check if preview is set
406
+ if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
407
 
408
+ // iframe preview with sidebar controls cmp_preview=true&selector=true - nt.com only
409
+ if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
410
+ if ( file_exists( CMP_PREMIUM_THEMES_DIR .'preview-selector.php' ) ) {
411
+ require_once ( CMP_PREMIUM_THEMES_DIR . 'preview-selector.php' );
412
+ die();
413
+ }
414
+ }
415
+
416
+ // preview specific CMP theme
417
+ if ( (isset( $_GET['theme'] ) && !empty( $_GET['theme'] )) || (isset( $_GET['cmp_theme'] ) && !empty( $_GET['cmp_theme'] )) ) {
418
+ $theme_preview = ( isset( $_GET['theme'] ) ) ? esc_attr($_GET['theme']) : esc_attr($_GET['cmp_theme']);
419
+
420
+ if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
421
+ require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
422
+ die();
423
+ }
424
 
425
+ }
 
 
 
 
 
 
426
 
427
+ // finally render theme preview cmp_preview=true
428
+ if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
429
+ require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
430
+ die();
431
+ }
432
+ }
433
 
434
+ // bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
435
+ if ( isset($_GET['cmp_bypass']) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
436
+ nocache_headers();
437
+ header('Cache-Control: max-age=0; private');
438
+ setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
439
+ return;
440
+ }
441
+
442
+ // if bypass Cookie is set, return
443
+ if ( isset($_COOKIE['cmp_bypass']) && $_COOKIE['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() ) ) && get_option('niteoCS_bypass', '0') == '1' ) {
444
+ return;
445
+ }
 
 
 
 
 
 
 
 
 
 
446
 
447
+ // Render CMP Theme mode if is activated and not in immediate redirect mode
448
+ if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
449
+
450
+ // check if user logged in, page filters and access role
451
+ if ( !is_user_logged_in() && $this->cmp_page_filter() ) {
452
+
453
+ // if themes with countdown timer
454
+ if ( in_array($this->cmp_selectedTheme(), $this->cmp_countdown_themes()) ){
455
+ // if counter is enabled
456
+ if ( get_option('niteoCS_counter', '1') == '1' ) {
457
+ // if countdown date is set
458
+ if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
459
+ // if timer < timestamp do set action
460
+ if ( get_option('niteoCS_counter_date' ) < time() ) {
461
+ // if action set to disable cmp
462
+ if ( get_option('niteoCS_countdown_action') == 'disable-cmp' ) {
463
+ update_option('niteoCS_activation', '0');
464
+ }
465
+
466
+ // if action set to redirect
467
+ if ( get_option('niteoCS_countdown_action') == 'redirect' ) {
468
+ $redirect_url = esc_url(get_option('niteoCS_countdown_redirect'));
469
+ header('Location: '.$redirect_url);
470
+ die();
471
+ }
472
  }
473
  }
474
  }
475
  }
476
+
477
+ // if maintanance mode send correct 503 headers
478
+ if ( $this->cmp_status() == '1' ){
479
+ header('HTTP/1.1 503 Service Temporarily Unavailable');
480
+ header('Status: 503 Service Temporarily Unavailable');
481
+ header('Retry-After: 86400'); // retry in a day
482
+ }
483
+
484
+ // render selected CMP theme
485
+ if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
486
+ require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
487
+ die();
488
+ }
489
  }
490
+ }
491
 
492
+ // if CMP in redirect mode with 0 timeout
493
+ if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() && $this->cmp_page_filter() ) {
 
 
 
 
494
 
495
+ $redirect_url = get_option('niteoCS_URL_redirect');
496
+ // redirect to URL
497
+ if ( $redirect_url != '') {
498
+ header('Location: '.esc_url( $redirect_url ));
499
  die();
500
  }
501
  }
502
  }
503
 
 
 
504
 
505
+ // return CMP activation status and it`s states
506
+ public function cmp_status() {
507
+
508
+ if ( !get_option('niteoCS_status') ||
509
+ get_option('niteoCS_status') == '' ||
510
+ get_option('niteoCS_status') == false ) {
511
+ return '0';
512
+
513
+ } else {
514
+ return get_option( 'niteoCS_activation', '2' );
515
  }
516
  }
 
517
 
518
+ // function to toggle CMP activation for admin menu icon
519
+ public function cmp_toggle_activation () {
520
+ // check for ajax
521
+ if ( isset( $_POST['payload'] ) && $_POST['payload'] == 'toggle_cmp_status' ) {
522
 
523
+ // verify nonce
524
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
525
+ // verify user rights
526
+ if( !current_user_can('publish_pages') ) {
527
+ die('Sorry, but this request is invalid');
528
+ }
529
+
530
+ if ( get_option('niteoCS_status', '') == '' ) {
531
+ update_option('niteoCS_status', '1');
532
+ } else {
533
+ update_option('niteoCS_status', '');
534
+ }
535
 
536
+ echo 'success';
537
+ wp_die();
538
+ return;
539
+ }
540
+ }
541
 
542
+ // check selected theme
543
+ public function cmp_selectedTheme() {
544
+ return get_option('niteoCS_theme', 'hardwork');
545
  }
 
546
 
 
 
 
 
 
 
 
 
 
 
547
 
548
+ // return installed theme path
549
+ public function cmp_themePath( $slug ) {
550
+ if ( in_array( $slug, $this->cmp_themes_bundled() ) ) {
551
+ return CMP_PLUGIN_DIR . 'themes/';
 
552
 
553
+ } else {
554
+ return CMP_PREMIUM_THEMES_DIR;
555
+ }
556
+ }
 
557
 
558
+ // return installed theme dir
559
+ public function cmp_themeURL( $slug ) {
560
+ if ( in_array( $slug, $this->cmp_themes_bundled() ) ) {
561
+ return plugins_url( '/themes/', __FILE__ );
562
 
563
+ } else {
564
+ return plugins_url( '/cmp-premium-themes/');
565
+
566
+ }
567
+ }
568
 
569
+ // older version of cmp_themeURL public function - migration after 1.9 version.
570
+ //can be deleted in future...
571
+ public function cmp_themeDirPath() {
572
+ if ( $this->niteo_in_array_r( $this->cmp_selectedTheme(), $this->cmp_premium_themes(), true ) ) {
573
+ return plugins_url( '/cmp-premium-themes/');
574
 
575
+ } else {
576
+ return plugins_url( '/themes/', __FILE__ );
577
+ }
578
  }
 
579
 
580
+ // display admin topbar notice
581
+ public function cmp_admin_bar(){
 
 
582
 
583
+ // CMP PLUGIN ACTIVATION AND STATUS CHANGE SETTINGS!
584
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && ( get_current_screen() && get_current_screen()->id == 'toplevel_page_cmp-settings' ) ) {
 
 
 
585
 
586
+ // verify nonce and user rights
587
+ if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
588
+ die('Sorry, but this request is invalid');
589
+ }
 
590
 
591
+ if ( isset($_POST['activate']) && is_numeric($_POST['activate']) ) {
592
+ update_option('niteoCS_activation', sanitize_text_field($_POST['activate']));
593
+ }
594
+
595
+ if ( isset($_POST['cmp_status']) ) {
596
+ update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
597
+ } else {
598
+
599
+ update_option('niteoCS_status', false);
600
+ }
601
 
602
+ // purge cache in 3rd party plugins
603
+ if ( function_exists( 'w3tc_pgcache_flush' ) ) {
604
+ w3tc_pgcache_flush();
605
+ }
606
 
607
+ if ( function_exists( 'wp_cache_clear_cache' ) ) {
608
+ wp_cache_clear_cache();
609
+ }
610
 
611
+ if ( class_exists( 'Endurance_Page_Cache' ) ) {
612
+ $epc = new Endurance_Page_Cache;
613
+ $epc->purge_all();
614
+ }
615
 
616
+ if ( class_exists( 'SG_CachePress_Supercacher' ) && method_exists( 'SG_CachePress_Supercacher', 'purge_cache' ) ) {
617
+ SG_CachePress_Supercacher::purge_cache (true );
618
+ }
619
 
620
+ if ( isset( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
621
+ $GLOBALS['wp_fastest_cache']->deleteCache( true );
622
+ }
623
+
624
+ if ( is_callable( array( 'Swift_Performance_Cache', 'clear_all_cache' ) ) ) {
625
+ Swift_Performance_Cache::clear_all_cache();
626
+ }
627
 
 
628
  }
629
 
 
630
 
631
+ // Display admin TOPBAR
632
+ require_once(ABSPATH . 'wp-admin/includes/screen.php');
633
 
634
+ $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
635
 
636
+ // push WP administrator to roles array, since it is default
637
+ array_push( $roles_topbar, 'administrator' );
638
 
639
+ $current_user = wp_get_current_user();
640
 
641
+ // if current user cannot access topbar, return
642
+ foreach ( $current_user->roles as $role ) {
643
 
644
+ if ( !in_array( $role, $roles_topbar ) ) {
645
+ return false;
646
+ }
647
+ };
648
 
649
+ global $wp_admin_bar;
650
+
651
+ $class = '';
652
+ $msg= '';
653
+
654
+ switch ( get_option( 'niteoCS_activation', '2' ) ) {
655
+ case '1':
656
+ $msg = __('Maintenance Mode:','cmp-coming-soon-maintenance');
657
+ $class = ' maintenance';
658
+ break;
659
+ case '2':
660
+ $msg = __('Coming Soon Mode:','cmp-coming-soon-maintenance');
661
+ $class = ' coming-soon';
662
+ break;
663
+ case '3':
664
+ $msg = __('Redirect Mode:','cmp-coming-soon-maintenance');
665
+ $class = ' redirect';
666
+ break;
667
+ default:
668
+ break;
669
+ }
670
+
671
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
672
+
673
+ $msg = '<img src="'.plugins_url('/img/cmp.png', __FILE__).'" alt="CMP Logo" class="cmp-logo"><span class="cmp-status-msg">'.$msg.'</span>';
674
+ $msg .='<div class="toggle-wrapper">
675
+ <input type="checkbox" id="cmp-status-menubar" class="toggle-checkbox"'.checked( '1', get_option('niteoCS_status', false), false ).' name="cmp_status_menu" data-security="'. esc_attr($ajax_nonce).'">
676
+ <label for="cmp-status-menubar" class="toggle"><span class="toggle_handler"></span></label>
677
+ </div>';
678
+
679
+ //Add the main siteadmin menu item
680
+ $wp_admin_bar->add_menu( array(
681
+ 'id' => 'cmp-admin-notice',
682
+ 'href' => admin_url().'admin.php?page=cmp-settings',
683
+ 'parent' => 'top-secondary',
684
+ 'title' => $msg,
685
+ 'meta' => array( 'class' => 'cmp-notice'.$class ),
686
+ ) );
687
+
688
+ // Display CMP Settings in topbar only for administrator
689
+ if ( user_can( $current_user, 'administrator' ) ) {
690
+ $wp_admin_bar->add_node( array(
691
+ 'id' => 'cmp-settings',
692
+ 'title' => __('CMP Settings', 'cmp-coming-soon-maintenancee'),
693
+ 'href' => admin_url('admin.php?page=cmp-settings'),
694
+ 'parent' => 'cmp-admin-notice'
695
+ ));
696
  }
697
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
698
  $wp_admin_bar->add_node( array(
699
+ 'id' => 'cmp-preview',
700
+ 'title' => __('CMP Preview', 'cmp-coming-soon-maintenancee'),
701
+ 'href' => get_site_url().'/?cmp_preview=true',
702
+ 'parent'=> 'cmp-admin-notice',
703
+ 'meta' => array('target' => '_blank' )
704
  ));
705
+
706
+ }
707
+
708
+ public function cmp_activate() {
709
+
710
+ if ( get_option('niteoCS_archive') ) {
711
+ //get all the options back from the archive
712
+ $options = get_option('niteoCS_archive');
713
+ // update options
714
+ foreach ($options as $option) {
715
+ update_option($option['name'], $option['value']);
716
+ }
717
+
718
+ // delete archive
719
+ delete_option('niteoCS_archive');
720
+ }
721
  }
722
 
723
+ // archive plugin stuff when plugin is deactivated
724
+ public function cmp_deactivate() {
725
+ //get all the options. store them in an array
726
+ $options = array();
727
+
728
+ global $wpdb;
729
+ $saved_options = $wpdb->get_results( "SELECT * FROM $wpdb->options WHERE option_name LIKE 'niteoCS_%'", OBJECT );
730
+ $i = 0;
731
+ foreach ($saved_options as $option) {
732
+ $options[$i] = array('name' => $option->option_name, 'value' => get_option( $option->option_name) );
733
+ $i++;
734
+ }
735
 
736
+ //store the options all in one record, in case we ever reactivate the plugin
737
+ update_option('niteoCS_archive', $options);
738
 
739
+ //delete the separate ones
740
+ foreach ( $options as $option ) {
741
+ delete_option($option['name']);
742
 
 
 
 
 
 
 
743
  }
744
 
 
 
745
  }
 
746
 
747
+ // clean plugin stuff when plugin is deleted
748
+ public function cmp_plugin_delete() {
749
+ delete_option('niteoCS_archive');
 
 
 
 
 
 
 
 
750
  }
751
 
752
+ // returns list of premium themes => manually defined
753
+ public function cmp_premium_themes() {
754
+
755
+ $premium_themes = array();
756
 
757
+ // array_push( $premium_themes, array('name' => 'apollo', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=apollo', 'apollo' => '10') );
 
 
758
 
759
+ array_push( $premium_themes, array('name' => 'element', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=element', 'price' => '10') );
760
 
761
+ 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') );
762
 
763
+ 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') );
 
 
 
764
 
765
+ array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=hardwork_premium', 'price' => '10') );
 
 
 
 
 
 
 
 
 
 
 
 
 
766
 
767
+ array_push( $premium_themes, array('name' => 'postery', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=postery', 'price' => '10') );
 
 
 
 
 
 
 
 
768
 
769
+ array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes&utm_source=cmp&utm_medium=referral&utm_campaign=frame', 'price' => '10') );
 
 
 
 
770
 
771
+ 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') );
 
772
 
773
+ 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') );
 
774
 
775
+ return $premium_themes;
 
776
  }
777
 
778
+ /**
779
+ * Difference between Premium Themes installed and Premium Themes available sets in cmp_premium_themes() function.
780
+ *
781
+ * @since 2.2
782
+ * @access public
783
+ * @return array
784
+ */
785
+ public function cmp_downloadable_themes() {
786
+ $downloadable_themes = array();
787
+
788
+ foreach ( $this->cmp_premium_themes() as $premium ) {
789
+ if ( !in_array($premium['name'], $this->cmp_premium_themes_installed()) ) {
790
+ array_push( $downloadable_themes, $premium );
791
+ }
792
+ }
793
 
794
+ return $downloadable_themes;
 
795
  }
796
 
797
+ // theme updates function
798
+ public function cmp_check_update( $theme_slug ) {
 
 
 
 
 
 
 
 
 
 
799
 
800
+ if ( !in_array( $theme_slug, $this->cmp_premium_themes_installed() ) ) {
801
+ return;
802
+ }
 
803
 
804
+ // check for current theme version
805
+ $remote_version = '';
806
+ $current_version = '';
807
 
808
+ if ( CMP_DEBUG === TRUE ) {
809
+ delete_transient( $theme_slug.'_updatecheck' );
810
+ }
811
 
812
+ // check if update check transient is set
813
+ if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
814
+
815
+ $current_version = $this->cmp_theme_version($theme_slug);
816
+ // get remote version from remote server
817
+ $request = wp_remote_post( CMP_UPDATE_URL .'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')) );
818
+
819
+ // if no error, retrivee body
820
+ if ( !is_wp_error( $request ) ) {
821
 
822
+ // decode to json
823
+ $remote_version = json_decode( $request['body'], true );
824
 
825
+ // get remove version key
826
+ if ( isset($remote_version['version']) ) {
827
 
828
+ $remote_version = $remote_version['version'];
 
829
 
830
+ // if remote version is bigger than current, display info about new version
831
+ if ( (float)$remote_version > (float)$current_version ) {
832
 
833
+ $title = ucwords(str_replace('_', ' ', $theme_slug));
 
 
 
834
 
835
+ // create nonce
836
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
837
 
838
+ // if admin screen is not in updating theme
839
+ if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
 
840
 
841
+ $transient = '<div class="update-nag notice notice-warning"><p class="message">'.sprintf(__('There is a <b>recommended</b> update of <b>CMP Theme %s</b> available:', 'cmp-coming-soon-maintenance'), $title).' <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type=premium" class="update-theme" data-type="premium" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-name="'.esc_attr($title).'" data-remote_url="' . esc_url( CMP_UPDATE_URL ) . '" data-new_ver="' . esc_attr( $remote_version ) . '">'.__(' update now','cmp-coming-soon-maintenance').'</a> or <a href="' . esc_url( CMP_UPDATE_URL ).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('view update %s notes.','cmp-coming-soon-maintenance'), $remote_version).'</a></p><div class="release-note"></div></div>';
 
842
 
843
+ // set transient with 12 hour expire
844
+ set_transient( $theme_slug.'_updatecheck', $transient, 60*60*12 );
 
845
 
846
+ echo $transient;
847
+ }
 
 
848
 
849
+ } else {
850
+ // set transient no update available with 12 hours expire
851
+ set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
852
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
853
 
854
+ }
855
+ }
 
 
856
 
857
+ } else if ( $updatecheck_transient != '' ) {
858
+ echo $updatecheck_transient;
 
 
 
 
 
 
 
 
 
 
859
  }
860
+
 
861
  return;
862
  }
863
 
864
+ public function cmp_theme_upload($zip) {
865
+ // allow zip file to upload
866
+ add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
867
 
868
+ // load PHP WP FILE
869
+ if ( ! function_exists( 'wp_handle_upload' ) ) {
870
+ require_once realpath('../../../wp-admin/includes/file.php');
871
  }
 
872
 
873
+ $uploadedfile = $zip;
874
+ $filename = $uploadedfile['name'];
875
+ /* You can use wp_check_filetype() public function to check the
876
+ file type and go on wit the upload or stop it.*/
877
+ $filetype = wp_check_filetype( $filename );
878
+
879
+ if ( $filetype['ext'] == 'zip' ) {
880
+ // Upload file
881
+ $movefile = wp_handle_upload( $uploadedfile, array('test_form' => FALSE) );
882
+
883
+ if ( $movefile && !isset( $movefile['error'] ) ) {
884
+
885
+ WP_Filesystem();
886
+ $source_path = $movefile['file'];
887
+ $theme_name = str_replace('.zip', '', $filename);
888
+ $destination_path = CMP_PREMIUM_THEMES_DIR;
889
+
890
+ // create new theme DIR
891
+ if ( wp_mkdir_p( $destination_path ) ) {
892
+ // Unzip FILE into that DIR
893
+ $unzipfile = unzip_file( $source_path, $destination_path);
894
+
895
+ if ( $unzipfile ) {
896
+ // delete FILE
897
+ wp_delete_file( $source_path );
898
+ echo '<div class="notice notice-success is-dismissible"><p class="message">'.ucwords(str_replace('_', ' ', $theme_name)).' '.__(' theme was successfully installed!', 'cmp-coming-soon-maintenance').'</p></div>';
 
 
 
 
 
 
 
899
  return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
900
 
901
+ } else {
902
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
903
+ return;
904
+ }
905
+
906
  } else {
907
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
908
  return;
909
  }
 
910
 
 
 
 
 
911
  } else {
912
+ /**
913
+ * Error generated by _wp_handle_upload()
914
+ * @see _wp_handle_upload() in wp-admin/includes/file.php
915
+ */
916
+ echo '<div class="notice notice-error is-dismissible"><p>'.$movefile['error'].'</p></div>';
917
+ return;
918
  }
 
 
 
 
 
 
919
  } else {
920
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Unable to upload new Theme file .', 'cmp-coming-soon-maintenance'). strtoupper($filetype['ext']) .__(' file extension is not supported. Please upload ZIP file containing CMP Theme.', 'cmp-coming-soon-maintenance').'</p></div>';
921
  return;
922
  }
923
+
924
+ add_filter('upload_mimes', array($this, 'niteo_remove_zip_mime'));
925
+ return;
926
  }
 
927
 
928
+ public function cmp_theme_update_install( $file ) {
929
+ $ajax = false;
930
+ // check for ajax
931
+ if ( isset( $_POST['file'] ) ) {
932
+ // verify nonce
933
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
934
+ // verify user rights
935
+ if( !current_user_can('publish_pages') ) {
936
+ die('Sorry, but this request is invalid');
937
+ }
938
 
939
+ // sanitize array
940
+ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
941
 
942
+ if ( !empty( $_POST['file'] ) ) {
943
+ $file = $_POST['file'];
944
+ $ajax = true;
945
+ }
946
+ }
947
+
948
+ // load PHP WP FILE
949
+ if ( ! empty( $file ) ) {
950
+ // Download file to temp location.
951
+ $file['tmp_name'] = download_url( $file['url'] );
952
+
953
+
954
+ // If error storing temporarily, return the error.
955
+ if ( !is_wp_error( $file['tmp_name'] ) ) {
956
+ WP_Filesystem();
957
 
958
+ // create new theme DIR
959
+ if ( wp_mkdir_p( CMP_PREMIUM_THEMES_DIR ) ) {
960
+ // Unzip FILE into that DIR
961
+ $unzipfile = unzip_file( $file['tmp_name'], CMP_PREMIUM_THEMES_DIR );
962
 
963
+ if ( !is_wp_error( $unzipfile ) ) {
964
+
965
+ // delete FILE
966
+ wp_delete_file( $file['tmp_name'] );
967
+
968
+ // reply response
969
+ // set transient no update available with 24 hours expire
970
+ set_transient( $file['name'] . '_updatecheck', '', 60*60*24 );
971
+ // die
972
+ if ( $ajax ) {
973
+ wp_die('success');
974
+ return;
975
+
976
+ } else {
977
+ echo '<div class="notice notice-success is-dismissible"><p>'. ucwords( str_replace( '_', ' ', $file['name'] ) ) .' '. __( CMP_PREMIUM_THEMES_DIR, 'cmp-coming-soon-maintenance' ).'</p></div>';
978
+ return;
979
+ }
980
+
981
+ } else {
982
 
983
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
 
984
 
985
+ if ( $ajax ) {
986
+ wp_die('error');
987
+ return;
988
+ }
989
+ }
990
+
991
+ } else {
992
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
993
+ if ( $ajax ) {
994
+ wp_die('error');
995
+ return;
996
+ }
997
+ }
998
+
999
+ } else {
1000
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp-coming-soon-maintenance').' '.$file['tmp_name']->get_error_message().'</p></div>';
1001
+ if ( $ajax === true ) {
1002
+ wp_die('error');
1003
+ return;
1004
+ }
1005
+ }
1006
  } else {
1007
+
1008
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
1009
+ if ( $ajax === true ) {
1010
+ wp_die('error');
1011
+ return;
1012
+ }
1013
  }
1014
 
1015
+ return;
 
1016
  }
1017
 
1018
+ public function load_textdomain() {
1019
+ load_plugin_textdomain( 'cmp-coming-soon-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
1020
+ }
1021
 
1022
+ // build unsplash api
1023
+ public function cmp_unsplash_api ( $query ) {
 
 
 
 
 
 
 
 
 
 
1024
 
1025
+ $api_url = 'https://api.unsplash.com/'.$query.'&client_id=41f043163758cf2e898e8a868bc142c20bc3f5966e7abac4779ee684088092ab' ;
1026
+
1027
+ if ( function_exists( 'wp_remote_get' ) ) {
1028
 
1029
+ $response = wp_remote_get( $api_url );
 
 
 
 
1030
 
1031
+ if ( !is_object( $response ) && isset( $response['body'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1032
 
1033
+ $body = $response['body'];
1034
+ $data = array( 'response' => $response['response']['code'], 'body' => $body );
 
1035
 
 
1036
  } else {
1037
+ $data = array( 'response' => 'Unplash API', 'body' => 'Not responding after 5000ms' );
1038
  }
1039
 
1040
+ } else {
1041
+ $data = array( 'response' => '500', 'body' => 'You have neither cUrl installed nor allow_url_fopen activated. Ask your server hosting provider to allow on of those options.' );
1042
+ }
1043
 
1044
+ return $data;
1045
+ }
1046
 
1047
+ // prepare unsplash url and get unsplash photo via cmp_unsplash_api()
1048
+ public function niteo_unsplash( $params ) {
1049
+ $ajax = false;
1050
+
1051
+ // check for ajax
1052
+ if ( isset( $_POST['params'] ) ) {
1053
+ // verify nonce
1054
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
1055
+ // verify user rights
1056
+ if( !current_user_can('publish_pages') ) {
1057
+ die('Sorry, but this request is invalid');
1058
  }
1059
 
1060
+ // sanitize array
1061
+ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
 
1062
 
1063
+ if ( !empty( $_POST['params'] ) ) {
1064
+ $params = $_POST['params'];
1065
+ $ajax = true;
 
 
 
 
1066
  }
1067
+ }
1068
 
1069
+ array_key_exists ('feed', $params) ? $feed = $params['feed'] : $feed = '';
1070
+ array_key_exists ('url', $params) ? $url = $params['url'] : $url = '';
1071
+ array_key_exists ('feat', $params) ? $feat = $params['feat'] : $feat = '';
1072
+ array_key_exists ('custom_str', $params) ? $custom_str = $params['custom_str'] : $custom_str = '';
1073
+ array_key_exists ('count', $params) ? $count = $params['count'] : $count = '1';
1074
+
1075
+ switch ( $feed ) {
1076
+ // specific unsplash photo by url/id
1077
+ case '0':
1078
+ $id = '';
1079
+ // check if $query contains unsplash.com url
1080
+ if ( strpos( $url, 'unsplash.com' ) !== false ) {
1081
+ $parts = parse_url( $url );
1082
+ // check for photo parameter in URL
1083
+ if ( isset($parts['query'])) {
1084
+ parse_str($parts['query'], $query);
1085
+ $id = $query['photo'];
1086
+ }
1087
+ // if no ID found, get last part of URL containing ID
1088
+ if ( $id == '' ) {
1089
 
1090
+ $pathFragments = explode('/', $parts['path']);
1091
+ $id = end($pathFragments);
1092
+ }
1093
 
1094
+ // $query is ID
1095
+ } else {
1096
+ $id = $url;
1097
+ }
 
 
1098
 
1099
+ // prepare query for single image
1100
+ $api_query = 'photos/'.$id.'?';
1101
+ break;
1102
 
1103
+ // random from user
1104
+ case '1':
 
 
 
 
1105
 
1106
+ if ( $custom_str[0] == '@' ) {
1107
+ $custom_str = substr($custom_str, 1);
1108
+ }
 
1109
 
1110
+ // prepare query for random photo from collection
1111
+ $api_query = 'photos/random/?username='.$custom_str.'&count='.$count;
1112
+ break;
1113
 
1114
+ // random from collection
1115
+ case '2':
1116
+ if ( is_numeric( $url ) ) {
1117
+ $collection = $url;
1118
+ } else {
1119
+ $collection = filter_var($url, FILTER_SANITIZE_NUMBER_INT);
1120
+ $collection = str_replace('-', '', $collection );
1121
+ }
1122
 
1123
+ // prepare query for random photo from collection
1124
+ $api_query = 'photos/random/?collections='.$collection.'&count='.$count;
1125
+ break;
 
 
 
 
 
 
 
 
 
1126
 
1127
+ // random photo
1128
+ case '3':
1129
 
1130
+ // featured
1131
+ if ( $feat == '0' || $feat == '') {
1132
+ $featured = 'false';
1133
+ } else {
1134
+ $featured = 'true';
1135
+ }
1136
 
1137
+ // category
1138
+ $search = str_replace(' ', ',', $url);
1139
 
1140
+ if ( $search !== '' ) {
1141
+ $search = 'query='.$search.'&';
1142
+ }
1143
+ // prepare query for random photo
1144
+ $api_query = 'photos/random/?orientation=landscape&featured='.$featured.'&'.$search.'count='.$count;
1145
+ break;
1146
 
1147
+ default:
1148
+ $api_query = 'photos/random/?orientation=landscape&count='.$count;
1149
+ break;
1150
+ }
 
1151
 
1152
+ $unsplash_img = $this->cmp_unsplash_api( $api_query );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1153
 
1154
+ if ( $ajax === true ) {
1155
+ echo json_encode($unsplash_img);
1156
+ wp_die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1157
 
1158
+ } else {
1159
+ return $unsplash_img;
1160
+ }
1161
+ }
1162
+
1163
+ // check value in multidimensional array
1164
+ public function niteo_in_array_r($needle, $haystack, $strict = false) {
1165
+ foreach ( $haystack as $item ) {
1166
+ if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
1167
+ return true;
1168
+ }
1169
+ }
1170
 
1171
+ return false;
1172
+ }
1173
+
1174
+ // save subscribe function
1175
+ // $check must be true, to avoid duplicated requests after update to 2.1
1176
+ public function niteo_subscribe( $check ) {
1177
+
1178
+ $subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
1179
+
1180
+ $response = '';
1181
+ // get translation lists
1182
+ if ( get_option('niteoCS_translation') ) {
1183
+ $translation = json_decode( get_option('niteoCS_translation'), true );
1184
+ $response_ok = $translation[7]['translation'];
1185
+ $response_duplicate = $translation[5]['translation'];
1186
+ $response_invalid = $translation[6]['translation'];
1187
+
1188
+ } else {
1189
+ $response_ok = 'Thank you, your sign-up request was successful!';
1190
+ $response_duplicate = 'This Email address has already been on our subscriber list.';
1191
+ $response_invalid = 'Please insert valid Email address.';
1192
+ }
1193
+
1194
+ $ajax = false;
1195
+
1196
+ // check for ajax request
1197
+ if ( isset( $_POST['check'] ) && $_POST['check'] == true ) {
1198
+ $check = true;
1199
+ $ajax = true;
1200
+ }
1201
+
1202
+ if ( $check === true ) :
1203
+
1204
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST'
1205
+ && isset( $_POST['form_honeypot'] )
1206
+ && $_POST['form_honeypot'] === ''
1207
+ && isset( $_POST['email'] ) )
1208
+ {
1209
+
1210
+ if ( is_email( $_POST['email'] ) ) {
1211
+ // email already passed is_email, no need to sanitize
1212
+ $email = $_POST['email'];
1213
+
1214
+ // sanitize all inputs
1215
+ $ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
1216
+ $firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
1217
+ $lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
1218
+ $timestamp = time();
1219
+
1220
+ switch ( $subscribe_method ) {
1221
+ // default custom CMP method
1222
+ case 'cmp':
1223
+ // get subscribe list
1224
+ $subscribe_list = get_option('niteoCS_subscribers_list');
1225
+
1226
+ // if no subscribe list yet, create first item and insert it into DB
1227
+ if ( !$subscribe_list ) {
1228
+ $new_list = array();
1229
+ $new_email = array( 'id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1230
+ array_push( $new_list, $new_email );
1231
+ update_option( 'niteoCS_subscribers_list', $new_list );
1232
+ $response = array( 'status' => '1', 'message' => $response_ok);
1233
 
1234
  } else {
1235
+ // check if email don`t already exists
1236
+ if ( !$this->niteo_in_array_r( $email, $subscribe_list, true ) ) {
1237
+ $count = count( $subscribe_list );
1238
+ $new_email = array( 'id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1239
+ array_push( $subscribe_list, $new_email );
1240
+ update_option('niteoCS_subscribers_list', $subscribe_list);
1241
+ $response = array( 'status' => '1', 'message' => $response_ok);
1242
+
1243
+ // if email exists return duplicate response
1244
+ } else {
1245
+ $response = array( 'status' => '0', 'message' => $response_duplicate);
1246
+ }
1247
  }
1248
+ break;
1249
+
1250
+ // mailchimp API call
1251
+ case 'mailchimp':
1252
+ $api_key = esc_attr( get_option('niteoCS_mailchimp_apikey') );
1253
+ $list_id = esc_attr( get_option('niteoCS_mailchimp_list_selected') );
1254
+ $email = $_POST['email'];
1255
+ $double_opt = get_option( 'niteoCS_mailchimp[double-opt]', '0' );
1256
+ $status = ( $double_opt == '1') ? 'pending' : 'subscribed'; // subscribed, cleaned, pending
1257
+
1258
+ $args = array(
1259
+ 'method' => 'PUT',
1260
+ 'headers' => array(
1261
+ 'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
1262
+ ),
1263
+ 'body' => json_encode(array(
1264
+ 'email_address' => $email,
1265
+ 'status' => $status
1266
+ ))
1267
+ );
1268
+
1269
+ $mailchimp = wp_remote_post( 'https://' . substr($api_key,strpos($api_key,'-')+1) . '.api.mailchimp.com/3.0/lists/'. $list_id .'/members/' . md5(strtolower($email)), $args );
1270
+
1271
+ if ( !is_wp_error( $mailchimp ) ) {
1272
+
1273
+ $body = json_decode( $mailchimp['body'] );
1274
+
1275
+ if ( $mailchimp['response']['code'] == 200 && $body->status == $status ) {
1276
+ $response = array( 'status' => '1', 'message' => $response_ok);
1277
+
1278
+ } else {
1279
+ $response = array( 'status' => '0', 'message' => 'Error ' . $mailchimp['response']['code'] . ' ' . $body->title . ': ' . $body->detail);
1280
+ }
1281
 
1282
+ } else {
1283
+ $error = $mailchimp->get_error_message();
1284
+ $response = array( 'status' => '0', 'message' => $error);
1285
+ }
1286
 
1287
+ break;
1288
 
1289
+ default:
1290
+ break;
1291
+ }
1292
 
1293
+ // if not email, set response invalid
1294
+ } else {
1295
+ $response = array( 'status' => '0', 'message' => $response_invalid);
1296
+ }
1297
+ }
1298
 
1299
+ endif; // $check !== true
1300
 
1301
+ if ( $ajax === true ) {
1302
+ echo json_encode( $response );
1303
+ wp_die();
1304
 
1305
+ } else {
1306
+ return ( $response == '' ) ? $response : json_encode( $response );
1307
+ }
1308
+
1309
  }
 
 
1310
 
1311
+ public function niteo_export_csv() {
1312
+ // load subscribers array
1313
+ $subscribers = get_option('niteoCS_subscribers_list');
1314
+
1315
+ if( !empty($subscribers) ) {
1316
+ $filename = 'subscribers-list-' . date('Y-m-d') . '.csv';
1317
+ header('Content-Type: text/csv');
1318
+ header('Content-Disposition: attachment;filename='.$filename);
1319
+ $fp = fopen('php://output', 'w');
1320
+ fputcsv($fp, array(__('Date','cmp-coming-soon-maintenance'),__('Email','cmp-coming-soon-maintenance')));
1321
+ foreach ($subscribers as $key => $value) {
1322
+ if ( isset( $value['ip_address'] ) ) {
1323
+ unset($subscribers[$key]['ip_address']);
1324
+ }
1325
+ if ( isset( $value['id'] ) ) {
1326
+ unset($subscribers[$key]['id']);
1327
+ }
1328
+
1329
+ if ( isset( $value['timestamp'] ) ) {
1330
+ $format="Y-m-d H:i:s";
1331
+ $subscribers[$key]['timestamp'] = date_i18n($format, $subscribers[$key]['timestamp']);
1332
+ }
1333
  }
1334
 
1335
+ foreach ( $subscribers as $key => $value ) {
1336
+ fputcsv($fp, $value, $delimiter = ',', $enclosure = '"' );
 
1337
  }
1338
+ fclose($fp);
1339
  }
1340
+ die();
1341
+ }
1342
 
1343
+ public function niteo_allow_zip_mime( $existing_mimes = array() ) {
1344
+ // add your own extension here - as many as you like
1345
+ $existing_mimes['zip'] = 'application/zip';
1346
+
1347
+ // return amended array
1348
+ return $existing_mimes;
1349
  }
 
 
1350
 
1351
+ public function niteo_remove_zip_mime( $existing_mimes = array() ) {
1352
+ // remove zip mime
1353
+ unset ($existing_mimes['zip']);
1354
 
1355
+ // return amended array
1356
+ return $existing_mimes;
1357
+ }
 
 
 
 
 
 
 
 
1358
 
1359
 
1360
+ public function cmp_admin_notice() {
1361
+ if ( isset($_GET['page']) && ($_GET['page'] == 'cmp-settings' || $_GET['page'] == 'cmp-translate' || $_GET['page'] == 'cmp-advanced') ) {
1362
+ if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
1363
+ $status = 'success';
1364
+ $message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
1365
 
1366
+ echo '<div class="notice notice-'.$status.' is-dismissible"><p>'.$message.'.</p></div>';
1367
+ }
1368
  }
1369
+ return;
1370
+ }
 
 
 
 
 
 
 
1371
 
1372
+ // convert hex to rgba
1373
+ public function hex2rgba ( $hex, $opacity ) {
1374
+ list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
1375
 
1376
+ $rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
 
1377
 
 
 
 
 
 
1378
  return $rgba;
1379
  }
1380
 
1381
+ // convert hex to hsl css
1382
+ public function hex2hsl( $hex, $opacity ) {
1383
 
1384
+ if ( $hex[0] != '#' ) {
1385
+ $rgba = explode( ',', $hex);
1386
+ $rgba[3] = str_replace(')', '', $rgba[3]);
1387
+ $rgba[3] = $rgba[3] - ( $opacity / 100 );
1388
+ $rgba = $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')';
1389
+ return $rgba;
1390
+ }
 
 
 
1391
 
1392
+ list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
1393
 
1394
+ $r = $red / 255.0;
1395
+ $g = $green / 255.0;
1396
+ $b = $blue / 255.0;
1397
  $H = 0;
1398
  $S = 0;
1399
+ $V = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1400
 
1401
+ $min = min( $r, $g, $b );
1402
+ $max = max( $r, $g, $b );
1403
+ $delta = ( $max - $min );
1404
 
1405
+ $L = ( $max + $min ) / 2.0;
 
 
 
 
 
 
 
1406
 
1407
+ if( $delta == 0 ) {
1408
+ $H = 0;
1409
+ $S = 0;
1410
+ } else {
1411
+ $S = $L > 0.5 ? $delta / ( 2 - $max - $min ) : $delta / ( $max + $min );
1412
+
1413
+ $dR = ( ( ( $max - $r ) / 6) + ( $delta / 2 ) ) / $delta;
1414
+ $dG = ( ( ( $max - $g ) / 6) + ( $delta / 2 ) ) / $delta;
1415
+ $dB = ( ( ( $max - $b ) / 6) + ( $delta / 2 ) ) / $delta;
1416
+
1417
+ if ( $r == $max )
1418
+ $H = $dB - $dG;
1419
+ else if( $g == $max )
1420
+ $H = ( 1/3 ) + $dR - $dB;
1421
+ else
1422
+ $H = ( 2/3 ) + $dG - $dR;
1423
+
1424
+ if ( $H < 0 )
1425
+ $H += 1;
1426
+ if ( $H > 1 )
1427
+ $H -= 1;
1428
+ }
1429
 
1430
+ $HSL = array( 'hue' => round( ($H*360), 0 ), 'saturation'=> round( ($S*100), 0 ), 'luminosity' => round( ( $L*100 ), 0) );
 
 
1431
 
1432
+ // if color is white {
1433
+ if ( $HSL['hue'] == 0 && $HSL['saturation'] == 0) {
1434
+ $requested_lumi = $HSL['luminosity'] + $opacity;
1435
+ } else {
1436
+ $requested_lumi = $HSL['luminosity'] - $opacity;
1437
+ }
1438
+
1439
+ $requested_lumi = (int)round($requested_lumi);
1440
 
1441
+ if ( $requested_lumi > 90 ) {
1442
+
1443
+ $requested_lumi = 90;
1444
+ }
1445
+
1446
+ $HSL = 'hsl( '. $HSL['hue'] .', '.( $HSL['saturation']) .'%, '. $requested_lumi . '%)';
1447
+ return $HSL;
1448
  }
 
1449
 
1450
+ // check if mobile
1451
+ public function isMobile() {
1452
+ if ( isset($_SERVER["HTTP_USER_AGENT"]) ) {
1453
+ return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
1454
 
1455
+ } else {
1456
+ return false;
1457
+ }
1458
+ }
 
1459
 
1460
+ // sanitize function
1461
+ public function sanitize_checkbox( $input ) {
1462
+ return ( ( isset( $input ) && true == $input ) ? '1' : '0' );
1463
+ }
1464
+
1465
+ // sanitize function
1466
+ public function niteo_sanitize_html( $html ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1467
 
1468
+ if ( !current_user_can( 'unfiltered_html' ) ) {
1469
+ $allowed = wp_kses_allowed_html( 'post' );
1470
+ $html = wp_kses( $html, $allowed );
1471
+ }
1472
 
1473
+ return $html;
 
 
1474
  }
 
1475
 
1476
+ // public function to sort social icons
1477
+ public function sort_social($a, $b){
1478
+ if ( $a['hidden'] == $b['hidden'] ) {
1479
+ if( $a['order'] == $b['order'] ) {
1480
+ return 0;
1481
+ }
1482
+ return $a['order'] < $b['order'] ? -1 : 1;
1483
+ } else {
1484
+ return $a['hidden'] > $b['hidden'] ? 1 : -1;
1485
+ }
1486
+ }
1487
 
1488
+ // public function to shift multidimensional array
1489
+ public function customShift($array, $name){
1490
+
1491
+ foreach($array as $key => $val){ // loop all elements
1492
+ if($val['name'] == $name){ // check for id $id
1493
+ unset($array[$key]); // unset the $array with id $id
1494
+ array_unshift($array, $val); // unshift the array with $val to push in the beginning of array
1495
+ return $array; // return new $array
1496
+ }
1497
+ }
1498
  }
1499
 
1500
+ public function get_youtube_img( $youtube_url ) {
1501
+ $youtube = preg_match('/.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/', $youtube_url, $url);
1502
+
1503
+ if ( isset( $url[7] ) && $url[7] != '') {
1504
+ $youtube_image = 'http://img.youtube.com/vi/' . $url[7] . '/hqdefault.jpg';
1505
+ return $youtube_image;
1506
+ }
1507
  }
1508
 
1509
+ public function cmp_get_pages() {
1510
+ $page_titles = array();
1511
+ $pages = array();
1512
+ $page_ids = get_all_page_ids();
1513
 
1514
+ foreach ($page_ids as $page_id ) {
1515
+ array_push( $page_titles, get_the_title($page_id) );
1516
+ }
1517
 
1518
+ foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
1519
+ $pages[] = array('id' => $id, 'name' => $name);
 
 
 
 
 
1520
  }
1521
 
1522
+ return $pages;
1523
+ }
1524
+
1525
+ // send json data for theme info overlay AJAX request
1526
+ public function niteo_themeinfo( ) {
1527
+
1528
+ // check for ajax
1529
+ if ( isset( $_POST['theme_slug'] ) ) {
1530
+ // verify nonce
1531
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
1532
+ // verify user rights
1533
+ if( !current_user_can('publish_pages') ) {
1534
+ die('Sorry, but this request is invalid');
1535
+ }
1536
 
 
 
 
 
 
 
 
1537
 
1538
+ // sanitize $post
1539
+ $theme_slug = sanitize_text_field( $_POST['theme_slug'] );
1540
+ $data = array( 'result' => 'true', 'author_homepage' => CMP_AUTHOR_HOMEPAGE, 'author' => CMP_AUTHOR );
1541
 
1542
+ if ( !empty( $theme_slug ) ) {
1543
+ $headers = array('Theme Name', 'Description');
1544
+ $theme_info = get_file_data(plugin_dir_path( __FILE__ ).'/themes/'. $theme_slug. '.txt', $headers, '');
1545
+
1546
+ $screenshots = array_map( 'basename', glob( plugin_dir_path( __FILE__ ) . 'img/thumbnails/'.$theme_slug.'/*' ) );
1547
+
1548
+ foreach ( $screenshots as $key => $screenshot ) {
1549
+ $screenshots[$key] = plugins_url('img/thumbnails/'.$theme_slug.'/'.$screenshot, __FILE__ );
1550
+ }
1551
+
1552
+ $data['name'] = $theme_info[0];
1553
+ $data['description'] = $theme_info[1];
1554
+ $data['screenshots'] = $screenshots;
1555
  }
1556
 
1557
+ echo json_encode ($data);
1558
+ wp_die();
1559
+ }
1560
+ }
1561
 
1562
+ // legacy function for premium themes redirect
1563
+ public function niteo_redirect() {
1564
+ return;
1565
  }
 
1566
 
1567
+ // returns array of google fonts from /inc/webfonts.php
1568
+ public function cmp_get_google_fonts() {
1569
+ $fonts = include_once wp_normalize_path( dirname( __FILE__ ) . '/inc/webfonts.php' );
1570
+ $google_fonts = json_decode( $fonts, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1571
 
1572
+ return $google_fonts;
1573
+ }
 
 
1574
 
1575
+ public function cmp_google_variant_title( $variant ) {
1576
+
1577
+ switch( $variant ) {
1578
+ case '100':
1579
+ return 'Thin 100';
1580
+ break;
1581
+ case '100italic':
1582
+ return 'Thin 100 Italic';
1583
+ break;
1584
+ case '200':
1585
+ return 'Extra-light 200';
1586
+ break;
1587
+ case '200italic':
1588
+ return 'Extra-light 200 Italic';
1589
+ break;
1590
+ case '300':
1591
+ return 'Light 300';
1592
+ break;
1593
+ case '300italic':
1594
+ return 'Light 300 Italic';
1595
+ break;
1596
+ case '400':
1597
+ return 'Regular 400';
1598
+ break;
1599
+ case '400italic':
1600
+ return 'Regular 400 Italic';
1601
+ break;
1602
+ case '500':
1603
+ return 'Medium 500';
1604
+ break;
1605
+ case '500italic':
1606
+ return 'Meidum 500 Italic';
1607
+ break;
1608
+ case '600':
1609
+ return 'Semi-Bold 600';
1610
+ break;
1611
+ case '600italic':
1612
+ return 'Semi-Bold 600 Italic';
1613
+ break;
1614
+ case '700':
1615
+ return 'Bold 700';
1616
+ break;
1617
+ case '700italic':
1618
+ return 'Bold 700 Italic';
1619
+ break;
1620
+ case '800':
1621
+ return 'Extra-Bold 800';
1622
+ break;
1623
+ case '800italic':
1624
+ return 'Extra-Bold Italic';
1625
+ break;
1626
+ case '900':
1627
+ return 'Black 900';
1628
+ break;
1629
+ case '900italic':
1630
+ return 'Black 900 Italic';
1631
+ break;
1632
+ case 'regular':
1633
+ return 'Regular 400';
1634
+ break;
1635
+ case 'italic':
1636
+ return 'Regular 400 Italic';
1637
+ break;
1638
+ default:
1639
+ break;
1640
+ }
1641
  }
1642
 
1643
+ // returns true if current page is in page array (blacklist or whitelist)
1644
+ // since 2.2
1645
+ public function cmp_page_filter() {
1646
+
1647
+ if ( is_front_page() && is_home() ) {
1648
+ // default homepage
1649
+ $page_id = '-1';
1650
+ } elseif ( is_front_page() ) {
1651
+ // static homepage
1652
+ $page_id = '-1';
1653
+ } elseif ( is_home() ) {
1654
+ // posts page
1655
+ $page_id = get_option( 'page_for_posts' );
1656
+ } else {
1657
+ //everyting else
1658
+ $page_id = get_the_ID();
1659
+ }
1660
 
1661
+
1662
+ switch ( get_option('niteoCS_page_filter', '0') ) {
1663
+ // disabled return true
1664
+ case '0':
 
1665
  return true;
1666
+ break;
1667
 
1668
+ // whitelist
1669
+ case '1':
1670
+ $page_list = json_decode( get_option('niteoCS_page_whitelist', '[]'), true );
 
1671
 
1672
+ if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
1673
+ return true;
 
1674
 
1675
+ } else {
1676
+ return false;
1677
+ }
1678
+ break;
1679
 
1680
+ // blacklist
1681
+ case '2':
1682
+ $page_list = json_decode( get_option('niteoCS_page_blacklist', '[]'), true );
1683
+
1684
+ if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
1685
+ return false;
1686
 
1687
+ } else {
1688
+ return true;
1689
+ }
1690
 
1691
+ break;
1692
+
1693
+ default:
1694
+ return true;
1695
+ break;
1696
+ }
1697
+
1698
+ return true;
1699
  }
1700
 
1701
+ // returns true if logged in user meet CMP roles filter
1702
+ // since 2.2
1703
+ public function cmp_roles_filter() {
1704
+ $roles = json_decode( get_option('niteoCS_roles', '[]'), true );
1705
+ // push WP administrator to roles array, since it is default
1706
+ array_push( $roles, 'administrator' );
1707
 
1708
+ $current_user = wp_get_current_user();
 
 
 
 
 
1709
 
1710
+ foreach ( $current_user->roles as $role ) {
1711
+ if ( in_array( $role, $roles ) ) {
1712
+ return true;
1713
+ }
1714
+ };
1715
 
1716
+ return false;
1717
+ }
 
 
 
1718
 
 
 
1719
 
1720
+ public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
1721
+ if ( is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra) ) {
1722
+ if ( $hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins']) ) {
1723
+ $this_plugin = plugin_basename(__FILE__);
1724
+ foreach ( $hook_extra['plugins'] as $key => $plugin ) {
1725
+ if ( $this_plugin == $plugin ) {
1726
+ $this_plugin_updated = true;
1727
+ break;
1728
+ }
1729
+ }// endforeach;
1730
+ unset( $key, $plugin, $this_plugin );
1731
 
1732
+ if ( isset( $this_plugin_updated ) && $this_plugin_updated === true ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1733
 
1734
+ // migrate google analytics options
1735
+ if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
1736
+ update_option('niteoCS_analytics_status', 'google');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1737
  }
1738
 
1739
+ // add social icons to social settings
1740
+ if ( get_option('niteoCS_socialmedia') ) {
1741
+ $niteoCS_socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
1742
+ $socialmedia = json_decode( $niteoCS_socialmedia, true );
1743
+ $update = false;
1744
+
1745
+ // add soundcloud and phone social media in 2.2 update
1746
+ if ( !$this->niteo_in_array_r( 'soundcloud', $socialmedia, true ) ) {
1747
+ $soundcloud = array(
1748
+ 'name' => 'soundcloud',
1749
+ 'url' => '',
1750
+ 'active' => '1',
1751
+ 'hidden' => '1',
1752
+ 'order' => '17',
1753
+ );
1754
+ array_push( $socialmedia, $soundcloud );
1755
+ $update = true;
1756
+ }
1757
+
1758
+ // add whatsapp and phone social media in 2.3 update
1759
+ if ( !$this->niteo_in_array_r( 'whatsapp', $socialmedia, true ) ) {
1760
+ $whatsapp = array(
1761
+ 'name' => 'whatsapp',
1762
+ 'url' => '',
1763
+ 'active' => '1',
1764
+ 'hidden' => '1',
1765
+ 'order' => '18',
1766
+ );
1767
+ array_push( $socialmedia, $whatsapp );
1768
+
1769
+ $phone = array(
1770
+ 'name' => 'phone',
1771
+ 'url' => '',
1772
+ 'active' => '1',
1773
+ 'hidden' => '1',
1774
+ 'order' => '19',
1775
+ );
1776
+ array_push( $socialmedia, $phone );
1777
+ $update = true;
1778
+ }
1779
+
1780
+ // add telegram social media in 2.6.6 update
1781
+ if ( !$this->niteo_in_array_r( 'telegram', $socialmedia, true ) ) {
1782
+ $telegram = array(
1783
+ 'name' => 'telegram',
1784
+ 'url' => '',
1785
+ 'active' => '1',
1786
+ 'hidden' => '1',
1787
+ 'order' => '20',
1788
+ );
1789
+ array_push( $socialmedia, $telegram );
1790
+ $update = true;
1791
+ }
1792
+
1793
+ if ( $update == true ) {
1794
+ update_option('niteoCS_socialmedia', json_encode( $socialmedia) );
1795
+ }
1796
  }
1797
 
1798
+ // migrate overlay color and opacity settings after update 2.8
1799
+
1800
+ $current_theme = get_option('niteoCS_theme');
1801
+
1802
+ if ( $current_theme ) {
1803
+ $overlay_color = get_option('niteoCS_overlay_color['.$current_theme.']');
1804
+ $overlay_opacity = get_option('niteoCS_overlay_opacity['.$current_theme.']');
1805
+
1806
+ if ( $overlay_color ) {
1807
+ update_option( 'niteoCS_overlay['.$current_theme.']', 'solid-color' );
1808
+ update_option( 'niteoCS_overlay['.$current_theme.'][color]', $overlay_color );
1809
+ }
1810
+
1811
+ if ( $overlay_opacity ) {
1812
+ update_option( 'niteoCS_overlay['.$current_theme.'][opacity]', $overlay_opacity );
1813
+ }
1814
+
1815
+ delete_option('niteoCS_overlay_color['.$current_theme.']');
1816
+ delete_option('niteoCS_overlay_opacity['.$current_theme.']');
1817
+
1818
  }
1819
 
1820
+
1821
+ // check for < 1.8 version where subscriber ID was not set
1822
+ if ( get_option('niteoCS_subscribers_list') ) {
1823
+ $subscribe_list = get_option('niteoCS_subscribers_list');
1824
+
1825
+ if ( is_array( $subscribe_list ) && count( $subscribe_list ) > 0 && !array_key_exists ('id', $subscribe_list[0]) ) {
1826
+ $i = 1;
1827
+ foreach( $subscribe_list as &$sub ){
1828
+ $sub['id'] = $i;
1829
+ $sub = array('id' => $sub['id']) + $sub;
1830
+ // check if ip address is set
1831
+ if (!array_key_exists('ip_address', $sub)) {
1832
+ $sub['ip_address'] = 'nodata';
1833
+ }
1834
+ $i++;
1835
+ }
1836
+ update_option('niteoCS_subscribers_list', $subscribe_list);
1837
+ }
1838
  }
 
1839
 
1840
+ // delete transients for theme updates, to ensure the updates for latest cmp versions runs again
1841
+ foreach ( $this->cmp_premium_themes_installed() as $theme_slug ) {
1842
+ delete_transient( $theme_slug.'_updatecheck' );
1843
+ }
 
 
1844
 
1845
+ // migrate overlay color and opacity settings after update 2.8
 
 
1846
 
1847
+ $current_theme = get_option('niteoCS_theme');
 
 
1848
 
1849
+ if ( $current_theme ) {
1850
+ $overlay_color = get_option('niteoCS_overlay_color['.$current_theme.']');
1851
+ $overlay_opacity = get_option('niteoCS_overlay_opacity['.$current_theme.']');
1852
 
1853
+ if ( $overlay_color ) {
1854
+ update_option( 'niteoCS_overlay['.$current_theme.']', 'color' );
1855
+ update_option( 'niteoCS_overlay['.$current_theme.'][color]', $overlay_color );
1856
+ }
1857
 
1858
+ if ( $overlay_opacity ) {
1859
+ update_option( 'niteoCS_overlay['.$current_theme.'][opacity]', $overlay_opacity );
 
 
 
 
 
 
 
 
 
 
 
 
1860
  }
1861
+
1862
+ delete_option('niteoCS_overlay_color['.$current_theme.']');
1863
+ delete_option('niteoCS_overlay_opacity['.$current_theme.']');
1864
+
1865
  }
 
1866
 
1867
+ }// endif; $this_plugin_updated
1868
+ }// endif update plugin and plugins not empty.
1869
+ }// endif; $hook_extra
1870
+ }// updatePlugin
 
 
 
 
1871
 
1872
 
1873
+ public function add_action_links ( $links ) {
1874
+ $settings = array(
1875
+ '<a href="' . admin_url( 'admin.php?page=cmp-settings' ) . '">CMP Settings</a>',
1876
+ );
1877
+ return array_merge( $settings, $links );
1878
+ }
1879
+
1880
 
1881
+ // returns version of selected CMP theme
1882
+ public function cmp_theme_version( $theme_slug ) {
1883
+ // if premium theme style.css exists get its version
1884
 
1885
+ if ( in_array( $theme_slug, $this->cmp_premium_themes_installed() ) ) {
1886
+ if ( file_exists( CMP_PREMIUM_THEMES_DIR . $theme_slug . '/style.css' ) ) {
1887
+ $version = get_file_data( CMP_PREMIUM_THEMES_DIR . $theme_slug . '/style.css', array('Version'), '' );
1888
+ }
1889
 
1890
+ } else {
1891
+ $version = CMP_VERSION;
 
1892
  }
1893
 
1894
+ // if we have local version of theme and not in updating theme
1895
+ if ( is_array( $version ) ) {
1896
+ $version = $version[0];
1897
+ }
1898
 
1899
+ return $version;
 
 
1900
  }
1901
 
1902
+ /**
1903
+ * Connect to Mailchimp via API and retrieve Mailchimp lists
1904
+ *
1905
+ * @since 2.6
1906
+ * @access public
1907
+ * @return Object
1908
+ */
1909
+ public function cmp_mailchimp_list_ajax( $apikey ) {
1910
+
1911
+ // check for ajax
1912
+ if ( isset( $_POST['params'] ) ) {
1913
+ // verify nonce
1914
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
1915
+ // verify user rights
1916
+ if( !current_user_can('publish_pages') ) {
1917
+ die('Sorry, but this request is invalid');
1918
+ }
1919
 
1920
+ // sanitize array
1921
+ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1922
 
1923
+ // check params
1924
+ if ( !empty( $_POST['params'] ) ) {
1925
+ $params = $_POST['params'];
1926
+ }
1927
 
1928
+ $api_key = $params['apikey'];
 
 
 
1929
 
1930
+ $dc = substr( $api_key,strpos($api_key,'-') + 1 ); // datacenter, it is the part of your api key - us5, us8 etc
1931
 
1932
+ $args = array(
1933
+ 'headers' => array(
1934
+ 'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
1935
+ )
1936
+ );
1937
 
 
 
 
 
 
1938
 
1939
+ // retrieve response from mailchimp
1940
+ $response = wp_remote_get( 'https://'.$dc.'.api.mailchimp.com/3.0/lists/', $args );
1941
+
1942
+ // if we have it, create new array with lists id and name, else push error messages into array
1943
+ if ( !is_wp_error( $response ) ) {
1944
+ $lists_array = array();
1945
+
1946
+ $body = json_decode( $response['body'], true);
1947
+
1948
+ if ( $response['response']['code'] == 200 ) {
1949
+ $lists_array['response'] = 200;
1950
+ $i = 0;
1951
+ foreach ( $body['lists'] as $list ) {
1952
+ $lists_array['lists'][$i]['id'] = $list['id'];
1953
+ $lists_array['lists'][$i]['name'] = $list['name'];
1954
+ $i++;
1955
+ }
1956
 
1957
+ } else {
1958
+ $lists_array['response'] = $response['response']['code'];
1959
+ $lists_array['message'] = $body['title'] . ': ' . $body['detail'];
 
 
 
 
 
 
 
 
 
 
 
 
 
1960
  }
1961
 
1962
  } else {
1963
+ $lists_array['response'] = '500';
1964
+ $lists_array['message'] = $response->get_error_message();
1965
  }
1966
 
1967
+ // json encode response
1968
+ $lists_json = json_encode( $lists_array );
 
 
1969
 
1970
+ // save it
1971
+ update_option('niteoCS_mailchimp_lists', $lists_json);
1972
 
1973
+ // delete selected old mailchimp list because we do not want it
1974
+ delete_option('niteoCS_mailchimp_list_selected');
1975
 
1976
+ // echo ajax result
1977
+ echo $lists_json;
1978
+ wp_die();
 
 
 
1979
 
1980
+ }
1981
 
1982
+ }
1983
  }
1984
+
1985
+ endif;
1986
+
1987
+ /*
1988
+ * @since 2.8.1
1989
+ * @return object|Login_Designer The one true Login_Designer Instance.
1990
+ */
1991
+ function cmp_coming_soon_and_maintenance() {
1992
+ return CMP_Coming_Soon_and_Maintenance::instance();
1993
  }
1994
 
1995
+ // Get the things running
1996
+ cmp_coming_soon_and_maintenance();
1997
+
1998
 
1999
  register_uninstall_hook( __FILE__, array('niteo_cmp', 'cmp_plugin_delete') );
2000
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
4
  Tags: coming soon, landing page, launch page, maintenance mode, under construction
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
- Stable tag: 2.6.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -112,6 +112,52 @@ CMP – Coming Soon & Maintenance plugin has all premium features you ever wishe
112
  <p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
113
 
114
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  <h4>CMP 2.6.6 update</h4>
116
  <ul>
117
  <li>Added Telegram to Social icons - requested by @nicollem</li>
4
  Tags: coming soon, landing page, launch page, maintenance mode, under construction
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
+ Stable tag: 2.8.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
112
  <p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
113
 
114
  == Changelog ==
115
+ <h4>CMP 2.8.3 update</h4>
116
+ <ul>
117
+ <li>Resolved compatibility issues with Ronneby Theme - reported by @basile67.</li>
118
+ <li>Google Fonts loads all subsets by default now - requested by @basile67.</li>
119
+ </ul>
120
+
121
+
122
+ <h4>CMP 2.8.2 maintenance update</h4>
123
+ <ul>
124
+ <li>Throttle CMP Premium themes updates check to every 24 hours.</li>
125
+ <li>Added Stripslashes function for Contact Form Button Label.</li>
126
+ </ul>
127
+
128
+ <h4>CMP 2.8.1 small update</h4>
129
+ <ul>
130
+ <li>New feature: Support of Mailchimp Double Opt In integration.</li>
131
+ <li>Internally rewritten CMP Class for a better plugin security.</li>
132
+ </ul>
133
+
134
+
135
+ <h4>CMP 2.8 update</h4>
136
+ <ul>
137
+ <li>New Feature: Background Gradient Overlay. You can now set a beautiful gradient over your Background images or videos!</li>
138
+ <li>New Feature: Support for every major 3rd party chaching plugins. Website caching caused many support questions so hopefully it is resolved now.</li>
139
+ <li>Change: Moved Color Overlay Setup to Background media section.</li>
140
+ <li>Bug Resolved: Formating of MailChimp Email Successful Subscription message.</li>
141
+ <li>Bug Resolved: Translation phrase "Please insert valid Email address." bug. - thanks @70ph!</li>
142
+
143
+ <p>*** please note we recommend to upgrade your Premium or Freebies themes after this update! *** </p>
144
+ </ul>
145
+
146
+
147
+ <h4>CMP 2.7.1 update</h4>
148
+ <ul>
149
+ <li>Resolved issue with bypassing CMP by selected roles - reported by @bundag, thanks!</li>
150
+ </ul>
151
+
152
+ <h4>CMP 2.7 update</h4>
153
+ <ul>
154
+ <li>New Premium CMP Theme: Element. We hope you enjoy it guys!</li>
155
+ <li>New Special effect for your backgrounds: Constellation. This one is for premium themes only.</li>
156
+ <li>Resolved issue with added slashes in custom analytics scripts - reported by @christophklin</li>
157
+ <li>Resolved issue with Content editor trimmmig custom HTML tags - reported by @damen02</li>
158
+ <li>Resolved issue with (not)saving settings in Microsoft IE and Edge</li>
159
+ </ul>
160
+
161
  <h4>CMP 2.6.6 update</h4>
162
  <ul>
163
  <li>Added Telegram to Social icons - requested by @nicollem</li>
themes/apollo.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*
2
+ Theme Name: Apollo
3
+ Description: <p>Fifty is Premium theme for CMP Plugin. As name suggests it divides page into two equal halfs. On the left half you can set custom logo, any text content, subscribe form and Social icons with two predefined desings: bigger colorful icons in body or smaller icons in Fifty`s footer.</p><p>Second half is predefined for your media. It can be a single image, random images per each website load or image slider.</p><h4>Main Features</h4><ul><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> Fade in/out Text Effects</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> 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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</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> 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> Background Blur Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
4
+
themes/coder.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*
2
+ Theme Name: Coder
3
+ Description: <p>Hardwork is our default theme for CMP plugin. By default it is set to modern white screen with only one heading to display clear message: "This website is under construction, please come back later".</p><p>Set a fullscreen custom image or use any from thousands Unsplash Library media, set social icons, add custom texts with overlay color and you have beautiful colorful landing page both for Under construction or Coming soon page.</p><h4>Supported Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe 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="not-supported"><i class="fa fa-times" 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>
4
+
5
+
6
+
themes/construct.txt CHANGED
@@ -1,4 +1,4 @@
1
  /*
2
  Theme Name: Construct
3
- Description: <p>Construct is clean and modern designed theme for CMP plugin. Construct features big paralax banner which can be set to any custom graphic, pattern or Unsplash library media. Add subscribe form, your customized social media icons and it can be used both Coming soon or Under Construction landing page.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Parallax Effect</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</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> 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>
4
 
1
  /*
2
  Theme Name: Construct
3
+ Description: <p>Construct is clean and modern designed theme for CMP plugin. Construct features big paralax banner which can be set to any custom graphic, pattern or Unsplash library media. Add subscribe form, your customized social media icons and it can be used both Coming soon or Under Construction landing page.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Parallax Effect</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</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> 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> Background Blur Effect</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
4
 
themes/construct/construct-defaults.php CHANGED
@@ -2,12 +2,13 @@
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
  $theme_supports = array(
5
- 'logo' => true,
6
- 'slider' => false,
7
- 'counter' => false,
8
- 'subscribe' => true,
9
- 'social' => true,
10
- 'footer' => true,
 
11
  );
12
 
13
  if ( isset($_POST['niteoCS_active_color_'.$themeslug]) ) {
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
  $theme_supports = array(
5
+ 'logo' => true,
6
+ 'slider' => false,
7
+ 'counter' => false,
8
+ 'subscribe' => true,
9
+ 'social' => true,
10
+ 'footer' => true,
11
+ 'special_effects' => false,
12
  );
13
 
14
  if ( isset($_POST['niteoCS_active_color_'.$themeslug]) ) {
themes/construct/construct-theme.php CHANGED
@@ -27,7 +27,7 @@
27
 
28
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
29
 
30
- <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version;?>" type="text/css" media="all">
31
 
32
 
33
  <style>
@@ -67,7 +67,7 @@
67
 
68
  </head>
69
 
70
- <body>
71
  <section class="section section-logo">
72
  <?php
73
  // display logo
27
 
28
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
29
 
30
+ <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.CMP_VERSION;?>" type="text/css" media="all">
31
 
32
 
33
  <style>
67
 
68
  </head>
69
 
70
+ <body id="body">
71
  <section class="section section-logo">
72
  <?php
73
  // display logo
themes/construct/style.css CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  Theme Name: Construct
3
- Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=construct
4
  Author: NiteoThemes
5
  Author URI: https://niteothemes.com
6
 
@@ -59,6 +59,7 @@ h1,h2,h3,h4,h5,h6{font-weight: 400;}
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;}
1
  /*
2
  Theme Name: Construct
3
+ Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme=construct
4
  Author: NiteoThemes
5
  Author URI: https://niteothemes.com
6
 
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-overlay{position: absolute;top: 0;right: 0;bottom: 0;left: 0;}
63
  #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;}
64
  #background-image {opacity: 0; -webkit-transition: opacity 400ms; transition: opacity 400ms;}
65
  #background-image.loaded {opacity: 1;}
themes/countdown.txt CHANGED
@@ -1,3 +1,3 @@
1
  /*
2
  Theme Name: Countdown
3
- Description: <p>Countdown theme attracts attention with big counting clocks, which you can set to any expiration date. When timer hits zero you can set following actions: do-nothing, redirect to set URL or disable CMP plugin and display your normal page to visitors.</p><p>Social icons can be set to a footer with transparent icons or inside Countdown body with big beautiful eye attacting icons.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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>
1
  /*
2
  Theme Name: Countdown
3
+ Description: <p>Countdown theme attracts attention with big counting clocks, which you can set to any expiration date. When timer hits zero you can set following actions: do-nothing, redirect to set URL or disable CMP plugin and display your normal page to visitors.</p><p>Social icons can be set to a footer with transparent icons or inside Countdown body with big beautiful eye attacting icons.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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> Background Blur Effect</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
themes/countdown/countdown-defaults.php CHANGED
@@ -2,12 +2,13 @@
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
  $theme_supports = array(
5
- 'logo' => true,
6
- 'slider' => false,
7
- 'counter' => true,
8
- 'subscribe' => true,
9
- 'social' => true,
10
- 'footer' => true,
 
11
  );
12
 
13
 
@@ -19,13 +20,6 @@ if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
19
  update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
20
  }
21
 
22
- if (isset($_POST['niteoCS_overlay_color_'.$themeslug])) {
23
- update_option('niteoCS_overlay_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_overlay_color_'.$themeslug]));
24
- }
25
-
26
- if (isset($_POST['niteoCS_overlay_opacity_'.$themeslug])) {
27
- update_option('niteoCS_overlay_opacity['.$themeslug.']', sanitize_text_field($_POST['niteoCS_overlay_opacity_'.$themeslug]));
28
- }
29
 
30
  if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location']) {
31
  update_option('niteoCS_social_location', sanitize_text_field($_POST['niteoCS_social_location']));
@@ -38,8 +32,6 @@ $banner_type = get_option('niteoCS_banner['.$themeslug.']', '1');
38
 
39
  $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
40
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
41
- $overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
42
- $overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
43
 
44
  $social_location = get_option('niteoCS_social_location', 'footer');
45
 
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
  $theme_supports = array(
5
+ 'logo' => true,
6
+ 'slider' => false,
7
+ 'counter' => true,
8
+ 'subscribe' => true,
9
+ 'social' => true,
10
+ 'footer' => true,
11
+ 'special_effects' => false,
12
  );
13
 
14
 
20
  update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
21
  }
22
 
 
 
 
 
 
 
 
23
 
24
  if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location']) {
25
  update_option('niteoCS_social_location', sanitize_text_field($_POST['niteoCS_social_location']));
32
 
33
  $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
34
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
 
 
35
 
36
  $social_location = get_option('niteoCS_social_location', 'footer');
37
 
themes/countdown/countdown-settings.php CHANGED
@@ -31,21 +31,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
31
  </fieldset>
32
  </td>
33
  </tr>
34
- <tr>
35
- <th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
36
- <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>
48
- </tr>
49
  <tr><th>
50
  <p class="cmp-submit">
51
  <?php wp_nonce_field('save_options','save_options_field'); ?>
@@ -64,7 +50,6 @@ jQuery(document).ready(function($){
64
  jQuery('#niteoCS_font_color').wpColorPicker();
65
  jQuery('#niteoCS_background_color').wpColorPicker();
66
  jQuery('#niteoCS_active_color').wpColorPicker();
67
- jQuery('#niteoCS_overlay_color').wpColorPicker();
68
 
69
  });
70
  </script>
31
  </fieldset>
32
  </td>
33
  </tr>
 
 
 
 
 
 
 
34
 
 
 
 
 
 
 
 
35
  <tr><th>
36
  <p class="cmp-submit">
37
  <?php wp_nonce_field('save_options','save_options_field'); ?>
50
  jQuery('#niteoCS_font_color').wpColorPicker();
51
  jQuery('#niteoCS_background_color').wpColorPicker();
52
  jQuery('#niteoCS_active_color').wpColorPicker();
 
53
 
54
  });
55
  </script>
themes/countdown/countdown-theme.php CHANGED
@@ -26,9 +26,7 @@
26
  $themeslug = 'countdown';
27
 
28
  // get theme related settings
29
-
30
- $font_color_light = $this->hex2hsl($font_color, '20');
31
- $background_overlay = $this->hex2rgba($overlay_color, $overlay_opacity);
32
 
33
  // get global settings
34
  $niteoCS_counter = get_option('niteoCS_counter', '1');
@@ -39,7 +37,7 @@
39
 
40
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
41
 
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 ); ?>;}
@@ -55,7 +53,6 @@
55
  ::-moz-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
56
  .input-icon:before,input[type="email"],input[type="text"]{color: <?php echo esc_attr( $font_color_light );?>;}
57
  /* input[type="email"],input[type="text"] {border:1px solid <?php echo esc_attr( $font_color_light );?>;} */
58
- .background-overlay{background-color:<?php echo esc_attr( $background_overlay );?>;}
59
  footer, footer a {color: <?php echo esc_attr( $font_color_light );?>;}
60
  .social-list.body a {background-color: <?php echo esc_attr( $font_color ); ?>;}
61
  .social-list.body a:hover {background-color: <?php echo esc_attr( $active_color ); ?>;}
@@ -91,10 +88,8 @@
91
 
92
  <div id="background-wrapper">
93
  <?php
94
- $overlay = ( $overlay_opacity == '0' ) ? false : true;
95
-
96
  if ( method_exists ( $html, 'cmp_background' ) ) {
97
- echo $html->cmp_background( $banner_type, $themeslug, $overlay );
98
 
99
  } ?>
100
  </div>
26
  $themeslug = 'countdown';
27
 
28
  // get theme related settings
29
+ $font_color_light = $this->hex2hsl( $font_color, '20' );
 
 
30
 
31
  // get global settings
32
  $niteoCS_counter = get_option('niteoCS_counter', '1');
37
 
38
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
39
 
40
+ <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.CMP_VERSION;?>" type="text/css" media="all">
41
 
42
  <style>
43
  body,input, select, textarea, button {font-family:'<?php echo esc_attr( $content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
53
  ::-moz-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
54
  .input-icon:before,input[type="email"],input[type="text"]{color: <?php echo esc_attr( $font_color_light );?>;}
55
  /* input[type="email"],input[type="text"] {border:1px solid <?php echo esc_attr( $font_color_light );?>;} */
 
56
  footer, footer a {color: <?php echo esc_attr( $font_color_light );?>;}
57
  .social-list.body a {background-color: <?php echo esc_attr( $font_color ); ?>;}
58
  .social-list.body a:hover {background-color: <?php echo esc_attr( $active_color ); ?>;}
88
 
89
  <div id="background-wrapper">
90
  <?php
 
 
91
  if ( method_exists ( $html, 'cmp_background' ) ) {
92
+ echo $html->cmp_background( $banner_type, $themeslug );
93
 
94
  } ?>
95
  </div>
themes/countdown/style.css CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  Theme Name: Countdown
3
- Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=countdown
4
  Author: NiteoThemes
5
  Author URI: https//niteothemes.com
6
 
@@ -321,6 +321,10 @@ h1,h2,h3,h4,h5,h6 {
321
  }
322
 
323
 
 
 
 
 
324
 
325
  #background-image.pattern {
326
  background-repeat: repeat;
1
  /*
2
  Theme Name: Countdown
3
+ Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme=countdown
4
  Author: NiteoThemes
5
  Author URI: https//niteothemes.com
6
 
321
  }
322
 
323
 
324
+ .background-overlay {
325
+ z-index: 10;
326
+ }
327
+
328
 
329
  #background-image.pattern {
330
  background-repeat: repeat;
themes/eclipse.txt CHANGED
@@ -1,3 +1,3 @@
1
  /*
2
  Theme Name: Countdown
3
- Description: <p>Countdown theme attracts attention with big counting clocks, which you can set to any expiration date. When timer hits zero you can set following actions: do-nothing, redirect to set URL or disable CMP plugin and display your normal page to visitors.</p><p>Social icons can be set to a footer with transparent icons or inside Countdown body with big beautiful eye attacting icons.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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>
1
  /*
2
  Theme Name: Countdown
3
+ Description: <p>Countdown theme attracts attention with big counting clocks, which you can set to any expiration date. When timer hits zero you can set following actions: do-nothing, redirect to set URL or disable CMP plugin and display your normal page to visitors.</p><p>Social icons can be set to a footer with transparent icons or inside Countdown body with big beautiful eye attacting icons.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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> Background Blur Effect</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
themes/element.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*
2
+ Theme Name: Element
3
+ Description: <p>Element is elegant Theme for your Coming soon, quick maintenance or simple landing page. It features Two columns for content and subscribe form. Together with beautiful image or image slider on Top of your page it makes perfect landing page for your upcoming website.</p><h4>Main Features</h4><ul><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> 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> Countdown Timer</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> 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><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Blur Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Special Effects</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</li></ul>
themes/fifty.txt CHANGED
@@ -1,4 +1,4 @@
1
  /*
2
  Theme Name: Fifty
3
- Description: <p>Fifty is Premium theme for CMP Plugin. As name suggests it divides page into two equal halfs. On the left half you can set custom logo, any text content, subscribe form and Social icons with two predefined desings: bigger colorful icons in body or smaller icons in Fifty`s footer.</p><p>Second half is predefined for your media. It can be a single image, random images per each website load or image slider.</p><h4>Main Features</h4><ul><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> Fade in/out Text Effects</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> 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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</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> 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>
4
 
1
  /*
2
  Theme Name: Fifty
3
+ Description: <p>Fifty is Premium theme for CMP Plugin. As name suggests it divides page into two equal halfs. On the left half you can set custom logo, any text content, subscribe form and Social icons with two predefined desings: bigger colorful icons in body or smaller icons in Fifty`s footer.</p><p>Second half is predefined for your media. It can be a single image, random images per each website load or image slider.</p><h4>Main Features</h4><ul><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> Fade in/out Text Effects</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> 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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</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> 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> Background Blur Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
4
 
themes/frame.txt CHANGED
@@ -1,3 +1,3 @@
1
  /*
2
  Theme Name: Frame
3
- Description: <p>Frame is Premium theme for CMP plugin. Frame can be configured with outside and inside frame on your landing page where you can set beautiful digital counter with three predefined actions when timer hits zero: do-nothing, redirect to custom URL or disable CMP plugin and display your normal page to visitors.</p><p>Frame is usually used as Coming soon page but can serve as Maintenance landing page too. You can set custom image background, use any from predefined patterns or just plain color to keep things simple.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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="not-supported"><i class="fa fa-times" 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>
1
  /*
2
  Theme Name: Frame
3
+ Description: <p>Frame is Premium theme for CMP plugin. Frame can be configured with outside and inside frame on your landing page where you can set beautiful digital counter with three predefined actions when timer hits zero: do-nothing, redirect to custom URL or disable CMP plugin and display your normal page to visitors.</p><p>Frame is usually used as Coming soon page but can serve as Maintenance landing page too. You can set custom image background, use any from predefined patterns or just plain color to keep things simple.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Blur Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
themes/hardwork.txt CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  Theme Name: Hardwork
3
- Description: <p>Hardwork is our default theme for CMP plugin. By default it is set to modern white screen with only one heading to display clear message: "This website is under construction, please come back later".</p><p>Set a fullscreen custom image or use any from thousands Unsplash Library media, set social icons, add custom texts with overlay color and you have beautiful colorful landing page both for Under construction or Coming soon page.</p><h4>Supported Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe 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="not-supported"><i class="fa fa-times" 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>
4
 
5
 
6
 
1
  /*
2
  Theme Name: Hardwork
3
+ Description: <p>Hardwork is our default theme for CMP plugin. By default it is set to modern white screen with only one heading to display clear message: "This website is under construction, please come back later".</p><p>Set a fullscreen custom image or use any from thousands Unsplash Library media, set social icons, add custom texts with overlay color and you have beautiful colorful landing page both for Under construction or Coming soon page.</p><h4>Supported Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe 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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Blur Effect</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
4
 
5
 
6
 
themes/hardwork/hardwork-defaults.php CHANGED
@@ -5,33 +5,32 @@ if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
5
  update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
6
  }
7
 
8
-
9
- if (isset($_POST['niteoCS_overlay_color_'.$themeslug])) {
10
- update_option('niteoCS_overlay_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_overlay_color_'.$themeslug]));
11
- }
12
-
13
- if (isset($_POST['niteoCS_overlay_opacity_'.$themeslug])) {
14
- update_option('niteoCS_overlay_opacity['.$themeslug.']', sanitize_text_field($_POST['niteoCS_overlay_opacity_'.$themeslug]));
15
  }
16
 
17
 
 
 
 
18
 
19
- $theme_supports = array(
20
- 'logo' => true,
21
- 'slider' => false,
22
- 'counter' => false,
23
- 'subscribe' => false,
24
- 'social' => true,
25
- 'footer' => false,
 
26
  );
27
 
28
  $banner_type = get_option('niteoCS_banner['.$themeslug.']', '4');
29
 
30
  $banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
31
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
32
- $overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
33
- $overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0');
34
 
 
 
35
 
36
  $heading_font = array(
37
  'family' => get_option('niteoCS_font_headings['.$themeslug.']', 'Playfair Display'),
5
  update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
6
  }
7
 
8
+ if ( isset($_POST['niteoCS_footer_background_'.$themeslug]) ) {
9
+ update_option('niteoCS_footer_background['.$themeslug.']', sanitize_hex_color( $_POST['niteoCS_footer_background_'.$themeslug]) );
 
 
 
 
 
10
  }
11
 
12
 
13
+ if ( isset($_POST['niteoCS_footer_background_opacity_'.$themeslug]) ) {
14
+ update_option('niteoCS_footer_background_opacity['.$themeslug.']', sanitize_text_field( $_POST['niteoCS_footer_background_opacity_'.$themeslug]) );
15
+ }
16
 
17
+ $theme_supports = array(
18
+ 'logo' => true,
19
+ 'slider' => false,
20
+ 'counter' => false,
21
+ 'subscribe' => false,
22
+ 'social' => true,
23
+ 'footer' => false,
24
+ 'special_effects' => false,
25
  );
26
 
27
  $banner_type = get_option('niteoCS_banner['.$themeslug.']', '4');
28
 
29
  $banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
30
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
 
 
31
 
32
+ $footer_background = get_option('niteoCS_footer_background['.$themeslug.']', '#000000');
33
+ $footer_opacity = get_option('niteoCS_footer_background_opacity['.$themeslug.']', '0.4');
34
 
35
  $heading_font = array(
36
  'family' => get_option('niteoCS_font_headings['.$themeslug.']', 'Playfair Display'),
themes/hardwork/hardwork-settings.php CHANGED
@@ -19,19 +19,23 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
19
  </fieldset>
20
  </td>
21
  </tr>
 
22
  <tr>
23
- <th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
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>
 
35
  <tr><th>
36
  <p class="cmp-submit">
37
  <?php wp_nonce_field('save_options','save_options_field'); ?>
@@ -47,16 +51,12 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
47
  jQuery(document).ready(function($){
48
  // ini color picker
49
  jQuery('#niteoCS_font_color').wpColorPicker();
50
- jQuery('#niteoCS_overlay_color').wpColorPicker();
51
-
52
- // hiding subscribe from on change
53
- jQuery('#niteoCS_overlay_checkbox').change(function() {
 
54
 
55
- if( jQuery(this)[0].checked ) {
56
- jQuery('#overlay-color').css('display','block')
57
- } else {
58
- jQuery('#overlay-color').css('display','none')
59
- }
60
- });
61
  });
62
  </script>
19
  </fieldset>
20
  </td>
21
  </tr>
22
+
23
  <tr>
24
+ <th><h4><?php _e('Footer Background Color', 'cmp-coming-soon-maintenance');?></h4></th>
25
  <td>
26
+ <fieldset>
27
+ <input type="text" name="niteoCS_footer_background_<?php echo esc_attr($themeslug);?>" id="niteoCS_footer_background_<?php echo esc_attr($themeslug);?>" value="<?php echo esc_attr( $footer_background); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
28
  </fieldset>
29
 
30
  <fieldset>
31
+ <label for="niteoCS_footer_background_opacity_<?php echo esc_attr( $themeslug );?>"><?php _e('Footer Background Opacity', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $footer_opacity ); ?></span></label><br>
32
+
33
+ <input type="range" class="footer-opacity-<?php echo esc_attr( $themeslug );?>" name="niteoCS_footer_background_opacity_<?php echo esc_attr( $themeslug );?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $footer_opacity ); ?>" />
34
  </fieldset>
35
  </td>
36
+
37
  </tr>
38
+
39
  <tr><th>
40
  <p class="cmp-submit">
41
  <?php wp_nonce_field('save_options','save_options_field'); ?>
51
  jQuery(document).ready(function($){
52
  // ini color picker
53
  jQuery('#niteoCS_font_color').wpColorPicker();
54
+ jQuery('#niteoCS_footer_background_<?php echo esc_attr($themeslug);?>').wpColorPicker();
55
+ jQuery( '.footer-opacity-<?php echo esc_attr( $themeslug );?>' ).on('input', function () {
56
+ var value = jQuery(this).val();
57
+ // change label value
58
+ jQuery(this).parent().find('span').html(value);
59
 
60
+ });
 
 
 
 
 
61
  });
62
  </script>
themes/hardwork/hardwork-theme.php CHANGED
@@ -26,16 +26,15 @@
26
  ?>
27
 
28
 
29
- <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version ;?>" type="text/css" media="all">
30
 
31
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
32
 
33
  <style>
34
  body,input {font-family:'<?php echo esc_attr($content_font['family']);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
35
  <?php
36
- if ( $overlay_opacity != '0' ) { ?>
37
- .background-overlay {background-color:<?php echo esc_attr( $overlay_color ); ?>;opacity:<?php echo esc_attr( $overlay_opacity ); ?>;}
38
- .social-list{background-color: <?php echo $this->hex2rgba( esc_attr( $overlay_color ), 0.4);?>;}
39
  <?php
40
  } ?>
41
  a {color:<?php echo esc_attr( $font_color ); ?>;}
@@ -70,10 +69,8 @@
70
  <div id="background-wrapper">
71
 
72
  <?php
73
- $overlay = ( $overlay_opacity == '0' ) ? false : true;
74
-
75
  if ( method_exists ( $html, 'cmp_background' ) ) {
76
- echo $html->cmp_background( $banner_type, $themeslug, $overlay );
77
 
78
  } ?>
79
 
26
  ?>
27
 
28
 
29
+ <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.CMP_VERSION ;?>" type="text/css" media="all">
30
 
31
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
32
 
33
  <style>
34
  body,input {font-family:'<?php echo esc_attr($content_font['family']);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
35
  <?php
36
+ if ( $footer_opacity != '0' ) { ?>
37
+ .social-list {background-color: <?php echo esc_attr( $this->hex2rgba( $footer_background, $footer_opacity ) );?>;}
 
38
  <?php
39
  } ?>
40
  a {color:<?php echo esc_attr( $font_color ); ?>;}
69
  <div id="background-wrapper">
70
 
71
  <?php
 
 
72
  if ( method_exists ( $html, 'cmp_background' ) ) {
73
+ echo $html->cmp_background( $banner_type, $themeslug );
74
 
75
  } ?>
76
 
themes/hardwork/style.css CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  Theme Name: Hardwork
3
- Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork
4
  Author: NiteoThemes
5
  Author URI: https://niteothemes.com
6
 
@@ -39,7 +39,7 @@ img {
39
  -webkit-box-flex: 1;
40
  -ms-flex-positive: 1;
41
  flex-grow: 1;
42
- padding: 0 2em;
43
  text-align: center;
44
  position: relative;
45
  }
@@ -60,12 +60,13 @@ img {
60
  flex-grow: 10;
61
  width: 70%;
62
  max-width: 1170px;
 
63
  margin: 0 auto;
64
- min-height: calc(100vh - 3em);
65
  }
66
 
67
 
68
 
 
69
  .graphic-logo {
70
  width: auto;
71
  max-width: 500px;
@@ -203,8 +204,8 @@ img {
203
  }
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;}
1
  /*
2
  Theme Name: Hardwork
3
+ Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme=hardwork
4
  Author: NiteoThemes
5
  Author URI: https://niteothemes.com
6
 
39
  -webkit-box-flex: 1;
40
  -ms-flex-positive: 1;
41
  flex-grow: 1;
42
+ padding: 2em;
43
  text-align: center;
44
  position: relative;
45
  }
60
  flex-grow: 10;
61
  width: 70%;
62
  max-width: 1170px;
63
+ min-height: calc(100vh - 7em);
64
  margin: 0 auto;
 
65
  }
66
 
67
 
68
 
69
+
70
  .graphic-logo {
71
  width: auto;
72
  max-width: 500px;
204
  }
205
 
206
  @media only screen and (max-width : 560px) {
207
+ .section {padding: 4em 1em; min-height: calc(100vh - 11em);}
208
+ .section-body {width: auto;}
209
  .graphic-logo {max-height: 200px;padding-bottom: 0;max-width: 100%;}
210
  .section-body,
211
  .social-list {font-size: 14px!important;}
themes/hardwork_premium.txt CHANGED
@@ -1,3 +1,3 @@
1
  /*
2
  Theme Name: Hardwork Premium
3
- Description: <p>Hardwork Premium is our first Premium theme for CMP Plugin. Premium version extends free Hardwork theme with fullscreen image Slider. It is a best choice for Photographers who want to display teaser photos while their website is cooking up or is under maintenance.</p><h4>Main Features</h4><ul><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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</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> 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>
1
  /*
2
  Theme Name: Hardwork Premium
3
+ Description: <p>Hardwork Premium is our first Premium theme for CMP Plugin. Premium version extends free Hardwork theme with fullscreen image Slider. It is a best choice for Photographers who want to display teaser photos while their website is cooking up or is under maintenance.</p><h4>Main Features</h4><ul><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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</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> 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> Background Blur Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
themes/orbit.txt CHANGED
@@ -1,4 +1,4 @@
1
  /*
2
  Theme Name: Orbit
3
- Description: <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><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Fade in/out Text Effects</li><li class="not-supported"><i class="fa fa-times" 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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe 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>
4
 
1
  /*
2
  Theme Name: Orbit
3
+ Description: <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><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Fade in/out Text Effects</li><li class="not-supported"><i class="fa fa-times" 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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe 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> Background Blur Effect</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
4
 
themes/postery.txt CHANGED
@@ -1,3 +1,3 @@
1
  /*
2
  Theme Name: Postery
3
- Description: <p>Postery is modern theme with trendy 3D animation and "poster-like" typography. You can set countdown timer, subscriber form, custom social icons or just insert custom text to keep things simple.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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="not-supported"><i class="fa fa-times" 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>
1
  /*
2
  Theme Name: Postery
3
+ Description: <p>Postery is modern theme with trendy 3D animation and "poster-like" typography. You can set countdown timer, subscriber form, custom social icons or just insert custom text to keep things simple.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</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> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><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> Subscribe 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="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Blur Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
themes/stylo.txt CHANGED
@@ -1,3 +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>
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> Background Blur Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Background Special Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>