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

Version Description

Download this release

Release Info

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

Code changes from version 2.8.1 to 2.6.6

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