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

Version Description

Download this release

Release Info

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

Code changes from version 2.8.1 to 2.7.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]))) {
@@ -256,7 +257,7 @@ $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
256
  // get Content Settings
257
  $niteoCS_body_title = stripslashes(get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!'));
258
  $niteoCS_body = stripslashes(get_option('niteoCS_body'));
259
- $niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.'));
260
  $niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
261
 
262
 
@@ -380,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>
@@ -743,9 +744,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 +778,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
@@ -839,8 +840,13 @@ add_thickbox();
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' ) ) {
@@ -870,7 +876,8 @@ add_thickbox();
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 +912,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 +965,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 +980,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,7 +1090,7 @@ add_thickbox();
1083
  </p>
1084
 
1085
  <p class="analytics-switch other">
1086
- <label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code. 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>
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', 'stylo');
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]))) {
257
  // get Content Settings
258
  $niteoCS_body_title = stripslashes(get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!'));
259
  $niteoCS_body = stripslashes(get_option('niteoCS_body'));
260
+ $niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', 'Copyright '.date("Y").' NiteoThemes. All rights reserved.'));
261
  $niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
262
 
263
 
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&selector=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>
744
  <?php
745
  foreach ( $socialmedia as $social ) {
746
 
747
+ ($social['hidden'] == '0') ? $active = 'active ' : $active = '';
748
 
749
+ ($social['active'] == '0') ? $disabled = 'disabled ' : $disabled = '';
750
 
751
  switch ( $social['name'] ) {
752
  case 'envelope-o':
778
  $url = 'https://'.$social['name'].'.com/profile';
779
  break;
780
  } ?>
781
+ <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
782
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
783
+ <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo esc_html($title);?></label>
784
 
785
+ <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;?>">
786
 
787
+ <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'] ); ?>>
788
  </p>
789
  </li>
790
  <?php
840
  require ( dirname(__FILE__) . '/inc/settings/settings-background.php' );
841
  }
842
 
843
+ // get background effects settings
844
+ if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-background_effects.php') ) {
845
+ require ( dirname(__FILE__) . '/inc/settings/settings-background_effects.php' );
846
+ }
847
+
848
  // special effects for premium themes
849
+ if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
850
 
851
  // get background effects settings
852
  if ( file_exists(dirname(__FILE__) . '/inc/settings/settings-special_effects.php' ) ) {
876
  // include theme related settings
877
  if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php' ) ) {
878
  require ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php' );
879
+ }
880
+ ?>
881
 
882
  <div class="table-wrapper theme-setup font-selector">
883
  <h3><?php _e('Customize Fonts', 'cmp-coming-soon-maintenance');?></h3>
912
 
913
  <?php
914
  // include theme animation settings
915
+ if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
916
 
917
  <fieldset>
918
  <label for="niteoCS_heading_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Animation', 'cmp-coming-soon-maintenance');?></label></br>
965
  </fieldset>
966
  <?php
967
  // include theme animation settings
968
+ if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
969
 
970
  <fieldset>
971
  <label for="niteoCS_content_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Animation', 'cmp-coming-soon-maintenance');?></label></br>
980
  <?php
981
  } ?>
982
 
983
+ <p style="margin-bottom:0">Fonts preview</p>
984
  <div id="font-example-wrapper">
985
  <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>
986
  <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>
1090
  </p>
1091
 
1092
  <p class="analytics-switch other">
1093
+ <label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code', 'cmp-coming-soon-maintenance');?></label><br>
1094
  <textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo stripslashes( esc_js( $niteoCS_analytics_other ) ); ?></textarea>
1095
  </p>
1096
  </fieldset>
cmp-sidebar.php CHANGED
@@ -1,9 +1,7 @@
1
  <div class="cmp-sidebar-wrapper">
2
 
3
  <div class="selected-theme widget">
4
- <h3 class="title"><?php _e('Selected CMP Theme', 'cmp-coming-soon-maintenance');?>: <?php echo ucwords( esc_html( str_replace( '_', ' ', $this->cmp_selectedTheme() ) ) );?></h3>
5
-
6
- <img src="<?php echo esc_url( plugins_url('/img/thumbnails/'. $this->cmp_selectedTheme() . '_thumbnail.jpg', __FILE__) );?>" style="max-width:100%" alt="">
7
 
8
  </div>
9
 
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
 
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 {
@@ -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 {
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,.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%}@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)}}
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
@@ -210,16 +210,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']) ) {
@@ -362,64 +362,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 +450,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 +460,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
 
@@ -758,45 +712,41 @@ 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,9 +817,9 @@ 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);}
@@ -887,35 +837,29 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
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();
@@ -934,8 +878,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 +890,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
 
@@ -979,8 +923,8 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
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 +972,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':
@@ -1142,8 +1074,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
  }
@@ -1177,116 +1109,114 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
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;
@@ -1308,7 +1238,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
210
  break;
211
  }
212
 
213
+ if ( $overlay === true ) {
214
+ $html .= '<div class="background-overlay"></div>';
215
+ }
216
 
217
  return $html;
218
  }
219
 
220
 
221
  // render slider
222
+ public function cmp_slider( $themeslug, $overlay = false ) {
223
 
224
  // change to background if preview background is set
225
  if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
362
  } ?>
363
  </div>
364
 
 
 
 
 
 
 
365
  </div>
366
 
367
  <div class="prev"></div>
368
  <div class="next"></div>
369
 
370
  <?php
371
+ // render overlay image if required
372
+ if ( $overlay === true ) {
373
+ echo '<div class="background-overlay"></div>';
374
+ }
375
 
376
  return;
377
  }
378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
  // render Social Icons
380
  public function cmp_social_icons( $mode = 'icon', $title = false, $themeslug = false ) {
381
 
450
  if ( $logo_id != '' ) {
451
  $logo_url = wp_get_attachment_image_src( $logo_id, $size );
452
  }
 
453
  if ( isset($logo_url[0]) ) {
454
  $html = '<div class="logo-wrapper image"><img src="'.esc_url( $logo_url[0] ).'" class="graphic-logo" alt="logo"></div>';
455
+
456
  }
457
  break;
458
 
460
  $text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));
461
  $html = '<div class="text-logo-wrapper"><h1 class="text-logo">'.esc_html( $text_logo ).'</h1></div>';
462
  break;
 
463
  case 'disabled':
464
  default:
465
  break;
466
  }
 
467
  return $html;
468
  }
469
 
712
  **/
713
  public function cmp_get_title( $class = '' ) {
714
  global $allowedposttags;
 
715
 
 
716
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
717
+ $theme_preview = esc_attr($_GET['theme']);
718
 
719
+ switch ( $theme_preview ) {
720
  case 'hardwork':
721
  case 'hardwork_premium':
722
  case 'fifty':
723
+ return '<h2>We will be back soon!</h2>';
724
  break;
725
 
726
  case 'eclipse':
727
+ return '<h2>Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a></h2>';
728
  break;
729
 
730
  case 'orbit':
731
+ return '<h2>WE ARE IN ORBIT ! STAY TUNED ...</h2>';
732
  break;
733
 
734
  case 'stylo':
735
+ return '<h2 class="animated '. $class .'">Something Awesome is Coming!</h2>';
736
  break;
737
 
738
  case 'element':
739
+ return '<h2>Coming Soon</h2>';
740
  break;
741
 
742
  default:
743
+ return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
744
  break;
745
  }
746
 
747
+ } else {
748
+ return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
749
  }
 
 
 
 
 
750
  }
751
 
752
  /**
817
  ob_start();
818
 
819
  // add blur effect if enabled
820
+ if ( get_option('niteoCS_effect['. $themeslug .']', 'disabled') == 'blur' ) {
821
+ $blur = get_option('niteoCS_effect_blur['. $themeslug .']', '0.5'); ?>
822
+
823
  <!-- blur effect -->
824
  <style>
825
  #background-image,.slide-background,.video-banner {filter:blur(<?php echo esc_attr($blur);?>px);transform:scale(1.1);}
837
  </style>
838
 
839
  <?php
840
+ $effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
841
 
842
+ if ( $effect == 'constellation' ) { ?>
843
+ <!-- constellation effect -->
844
+ <style>
845
+ .particles-js-canvas-el {position: absolute; top:0; left:0;}
846
+ <?php
847
+ switch ( $themeslug ) {
848
+ case 'frame': ?>
849
+ .particles-js-canvas-el {z-index: -1;}
850
+ #background-image, .video-banner {z-index: -3;}
851
+ .background-overlay {z-index: -2;}
852
+ <?php
853
+ break;
 
 
 
 
 
 
854
 
855
+ case 'stylo' ?>
856
+ .particles-js-canvas-el {z-index: 1;}
857
+ <?php
858
+ default:
859
+ break;
860
+ } ?>
861
+ </style>
862
+ <?php
 
863
  }
864
 
865
  $css = ob_get_clean();
878
  * @return HTML
879
  **/
880
  public function cmp_get_copyright() {
881
+ if ( get_option('niteoCS_copyright', 'Copyright 2017 by NiteoThemes. All rights reserved.' ) !== '' ) {
882
+ $copyright = stripslashes(get_option('niteoCS_copyright', 'Copyright 2017 by NiteoThemes. All rights reserved.'));
883
  $allowed_html = array(
884
  'a' => array(
885
  'href' => array(),
890
  'strong' => array(),
891
  );
892
 
893
+ return '<p class="copyright">'.wp_kses( $copyright, $allowed_html ).'</p>';
894
 
895
  }
896
 
923
 
924
  }
925
 
 
926
  // theme specific function after init
927
+ <?php
928
  switch ( $themeslug ) {
929
  case 'fifty': ?>
930
  var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
972
  }
973
  // video
974
  $source = get_option('niteoCS_banner_video['.$themeslug.']');
 
 
 
 
 
 
 
 
 
 
 
 
975
 
976
  switch ( $source ) {
977
  case 'YouTube':
1074
  $time = get_option('niteoCS_redirect_time'); ?>
1075
  <script>
1076
  setTimeout(function() {
1077
+ window.location.href = "<?php echo esc_url($url);?>";
1078
+ }, <?php echo esc_attr($time * 1000);?>);
1079
  </script>
1080
  <?php
1081
  }
1109
 
1110
 
1111
  // special effects
1112
+ $effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
1113
+
1114
+ switch ( $effect ) {
1115
+ case 'constellation': ?>
1116
+ <!-- load external Particles script -->
1117
+ <script type='text/javascript' src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
1118
+ <!-- INI particles -->
1119
+ <script>
1120
+ /* ---- particles.js config ---- */
1121
+ var wrapper = document.getElementById('background-wrapper');
1122
+ var background = ( wrapper === null ) ? 'slider-wrapper' : 'background-wrapper';
1123
+ particlesJS(background, {
1124
+ "particles": {
1125
+ "number": {
1126
+ "value": 100,
1127
+ "density": {
1128
+ "enable": true,
1129
+ "value_area":1000
1130
+ }
1131
+ },
1132
+ "color": {
1133
+ "value": "<?php echo esc_attr( get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff') );?>",
1134
+ },
1135
+
1136
+ "shape": {
1137
+ "type": "circle",
1138
+ "stroke": {
1139
+ "width": 0,
1140
+ "color": "#fff"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1141
  },
1142
+ "polygon": {
1143
+ "nb_sides": 5
1144
+ },
1145
+ },
1146
+ "opacity": {
1147
+ "value": 0.6,
1148
+ "random": false,
1149
+ "anim": {
1150
+ "enable": false,
1151
+ "speed": 1,
1152
+ "opacity_min": 0.1,
1153
+ "sync": false
1154
+ }
1155
+ },
1156
+ "size": {
1157
+ "value": 2,
1158
+ "random": true,
1159
+ "anim": {
1160
+ "enable": false,
1161
+ "speed": 40,
1162
+ "size_min": 0.1,
1163
+ "sync": false
1164
+ }
1165
+ },
1166
+ "line_linked": {
1167
+ "enable": true,
1168
+ "distance": 120,
1169
+ "color": "<?php echo esc_attr( get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff') );?>",
1170
+ "opacity": 0.4,
1171
+ "width": 1
1172
+ },
1173
+ },
1174
+ "interactivity": {
1175
+ "detect_on": "canvas",
1176
+ "events": {
1177
+ "onhover": {
1178
+ "enable": true,
1179
+ "mode": "grab"
1180
+ },
1181
+ "onclick": {
1182
+ "enable": false
1183
+ },
1184
+ "resize": true
1185
+ },
1186
+ "modes": {
1187
+ "grab": {
1188
+ "distance": 140,
1189
+ "line_linked": {
1190
+ "opacity": 1
1191
  }
1192
  },
1193
+ "bubble": {
1194
+ "distance": 400,
1195
+ "size": 40,
1196
+ "duration": 2,
1197
+ "opacity": 8,
1198
+ "speed": 3
1199
+ },
1200
+ "repulse": {
1201
+ "distance": 200,
1202
+ "duration": 0.4
1203
+ },
1204
+ "push": {
1205
+ "particles_nb": 4
1206
+ },
1207
+ "remove": {
1208
+ "particles_nb": 2
1209
+ }
1210
+ }
1211
+ },
1212
+ "retina_detect": true
1213
+ });
1214
+ </script>
1215
+ <?php
1216
+ break;
1217
+
1218
+ default:
1219
+ break;
1220
  }
1221
 
1222
  return false;
1238
 
1239
  $form_id = get_option('niteoCS_contact_form_id', '');
1240
 
1241
+ switch ($form_type) {
1242
  case 'cf7':
1243
 
1244
  $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><?php _e('Disabled', 'cmp-coming-soon-maintenance')?></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-slider.php CHANGED
@@ -87,7 +87,7 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
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
  } ?>
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
  } ?>
inc/settings/settings-subscribe-disabled.php CHANGED
@@ -14,8 +14,8 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
14
  </legend>
15
 
16
  <p>
17
- <label title="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
 
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
 
@@ -130,33 +121,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
 
121
 
122
  <p><?php printf(__('You can find or create new API key in your %s.', 'cmp-coming-soon-maintenance'), '<a href="https://admin.mailchimp.com/account/api/" target="_blank">MailChimp Account</a>'); ?></p>
123
 
 
124
 
125
+ <label for="niteoCS_mailchimp_list"><?php _e('Select MailChimp List to store emails.', 'cmp-coming-soon-maintenance');?>
 
 
126
 
127
+ <select name="niteoCS_mailchimp_list_selected" id="mailchimp-lists-select">
128
+ <?php
129
+ if ( is_array( $mailchimp_lists ) ) {
130
+
131
+ if ( $mailchimp_lists['response'] == 200 ) {
132
+ foreach ( $mailchimp_lists['lists'] as $list) { ?>
133
+ <option value="<?php echo esc_attr( $list['id'] );?>" <?php selected( $list['id'], $mailchimp_list_selected ); ?>><?php echo esc_attr( $list['name'] );?></option>
134
+ <?php
135
+ }
136
+ } else { ?>
137
+ <option value="error"><?php echo esc_attr( $mailchimp_lists['response'] . ': ' . $mailchimp_lists['message']);?></option>
138
  <?php
139
  }
140
+
141
  } else { ?>
142
+ <option value="error"><?php _e('Please insert MailChimp API key to retrieve Lists.', 'cmp-coming-soon-maintenance');?></option>
143
  <?php
144
+ } ?>
145
+ </select>
 
 
 
 
 
 
 
 
 
146
 
147
+ </label>
148
 
149
  </div>
150
 
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', function (_, val) { return ! val; });
16
  jQuery('#cmp-status').prop('checked', function (_, val) { return ! 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,16 +53,15 @@ 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' );
@@ -68,22 +70,24 @@ jQuery(document).ready(function($){
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 +112,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 +167,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 +210,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 +229,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 +410,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 +464,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 +550,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 +596,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');
@@ -625,6 +621,7 @@ jQuery(document).ready(function($){
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 +646,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 +691,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 +709,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
 
@@ -719,6 +719,7 @@ jQuery(document).ready(function($){
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
@@ -826,6 +827,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 +841,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 +858,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 +878,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 +889,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 +908,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,34 +974,37 @@ 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 ) {
@@ -1033,14 +1016,6 @@ jQuery(document).ready(function($){
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' );
70
  toggle_settings( 'background-effect' );
71
  toggle_settings( 'special-effect' );
72
  toggle_settings( 'cmp-logo' );
73
+
74
+ toggle_select('subscribe-method');
75
+
 
76
 
77
  // change all selects to select2
78
  jQuery('select:not(.headings-google-font):not(.content-google-font )').select2({
79
  width: '100%',
80
  minimumResultsForSearch: -1,
81
+
82
  });
83
 
84
+
85
  jQuery('#cmp-status').click(function(){
86
  jQuery('.cmp-status input[type=radio]').prop('disabled', function (_, val) { return ! val; });
87
  jQuery('#cmp-status-menubar').prop('checked', function (_, val) { return ! val; });
88
  });
89
 
90
+
91
  cmp_status_inputs();
92
 
93
  function cmp_status_inputs() {
112
  });
113
  }
114
 
115
+
116
  // expandable tabs
117
  jQuery('.table-wrapper h3').click(function(){
118
  jQuery(this).parent().toggleClass('closed');
119
  });
120
 
121
+
122
  // test unsplash image
123
  jQuery('#test-unsplash').click(function(e){
124
  e.preventDefault();
125
 
126
  var media_wrapper = jQuery('#unsplash-media'),
127
+ unsplash_feed = jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),
128
  unsp_url = '',
129
  feat = '',
130
  custom_str = '',
167
 
168
  jQuery(this).prop('disabled', true);
169
  jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');
170
+ media_wrapper.html('');
171
 
172
  var data = {
173
  action: 'niteo_unsplash',
210
  jQuery(this).fadeIn();
211
  jQuery('#test-unsplash').prop('disabled', false);
212
  jQuery('#test-unsplash').text('Display Unsplash Photo');
213
+ 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>')
 
214
  clearTimeout(loadingTimeout);
215
  });
216
 
 
 
217
  } else {
218
  jQuery('#test-unsplash').prop('disabled', false);
219
  jQuery('#test-unsplash').text('Display Unsplash Photo');
229
  });
230
 
231
 
 
232
  videoPreview = function() {
233
+ var source = $('.banner-video-source').val();
234
+ $('.video-wrapper').css('padding-top', '0');
235
+ if ( source == 'YouTube' ) {
236
+ var youtubeLink = $('#niteoCS-youtube-url').val();
237
+ if( youtubeLink.match(/(youtube.com)/) ){
238
+ var split_c = 'v=';
239
+ var split_n = 1;
240
+ }
241
 
242
+ if( youtubeLink.match(/(youtu.be)/) || youtubeLink.match(/(vimeo.com\/)+[0-9]/) ){
243
+ var split_c = '/';
244
+ var split_n = 3;
245
+ }
246
 
247
+ if ( source == 'vimeo' ) {
248
+ var youtubeLink = $('#niteoCS-vimeo-url').val();
249
 
250
+ if( youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/) ){
251
+ var split_c = '/';
252
+ var split_n = 5;
253
+ }
254
+ }
255
 
256
+ if ( youtubeLink ) {
257
+ var getYouTubeVideoID = youtubeLink.split(split_c)[split_n];
258
+ if ( getYouTubeVideoID != undefined ) {
259
+ var cleanVideoID = getYouTubeVideoID.replace(/(&)+(.*)/, '');
260
 
261
+ if( source == 'banner_youtube' && youtubeLink.match(/(youtu.be)/) || youtubeLink.match(/(youtube.com)/) ){
262
+ var videoEmbedLink = 'https://www.youtube.com/embed/'+cleanVideoID+'?autoplay=0';
263
+ }
 
264
 
265
+ if( source == 'banner_vimeo' && youtubeLink.match(/(vimeo.com\/)+[0-9]/) || youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/) ){
266
+ var videoEmbedLink = 'https://player.vimeo.com/video/'+cleanVideoID+'?autoplay=0';
267
+ }
 
 
268
 
269
+ var $iframe = $('<iframe src="'+videoEmbedLink+'" allowfullscreen></iframe>');
270
+ $('.video-wrapper').html($iframe);
271
+ var videoRatio = ( $iframe.height() / $iframe.width() ) * 100;
272
+
273
+ $iframe.css('position', 'absolute');
274
+ $iframe.css('top', '0');
275
+ $iframe.css('left', '0');
276
+ $iframe.css('width', '100%');
277
+ $iframe.css('height', '100%');
278
+
279
+ $('.video-wrapper').css('padding-top', videoRatio+'%');
280
+ $('#niteoCS-vimeo-url').css('border', '1px solid #ddd');
281
+ $('#niteoCS-youtube-url').css('border', '1px solid #ddd');
282
  } else {
283
+ $('.video-wrapper').text('Please enter correct ' + source + ' URL.').css('padding-top', '0');
284
+ $('#niteoCS-vimeo-url').css('border', '1px solid #d60000');
285
+ $('#niteoCS-youtube-url').css('border', '1px solid #d60000');
286
  }
 
 
287
 
288
+ } else {
289
+ $('.video-wrapper').text('Please enter ' + source + ' URL.').css('padding-top', '0');
290
+ $('#niteoCS-vimeo-url').css('border', '1px solid #d60000');
291
+ $('#niteoCS-youtube-url').css('border', '1px solid #d60000');
292
+ }
293
+ }
294
 
295
+ if ( source == 'video/mp4' ) {
296
+ var videoURL = jQuery('#niteoCS-video-id').data('url');
297
  if ( videoURL != '' ) {
298
+ $('.video-wrapper').html('<video width="600" height="400" controls><source src="'+videoURL+'" type="video/mp4">Your browser does not support the video tag.</video>');
299
  }
300
 
301
  }
302
  };
303
 
304
+ jQuery('#niteoCS-youtube-url').keyup(function() {
 
 
 
 
305
  videoPreview();
 
306
  });
307
 
308
+ // hiding video source inputs
309
+ jQuery('#csoptions .banner-video-source').change(function() {
310
+ switch(jQuery('#csoptions .banner-video-source' ).val() ) {
311
+ case 'YouTube':
312
+ jQuery('.youtube-source-input').css('display','block');
313
+ jQuery('.vimeo-source-input').css('display','none');
314
+ jQuery('.file-source-input').css('display','none');
315
+ break;
316
+ case 'vimeo':
317
+ jQuery('.youtube-source-input').css('display','none');
318
+ jQuery('.vimeo-source-input').css('display','block');
319
+ jQuery('.file-source-input').css('display','none');
320
+ break;
321
+ case 'video/mp4':
322
+ jQuery('.youtube-source-input').css('display','none');
323
+ jQuery('.vimeo-source-input').css('display','none');
324
+ jQuery('.file-source-input').css('display','block');
325
+ videoPreview();
326
+ break;
327
+ default:
328
+ jQuery('.file-source-input').css('display','block');
329
+ jQuery('.youtube-source-input').css('display','none');
330
+ jQuery('.vimeo-source-input').css('display','none');
331
+ }
332
+
333
  });
334
+ jQuery('#csoptions .banner-video-source').trigger('change');
335
 
336
+ // hiding banner on change
337
+ jQuery('#csoptions .niteoCS_banner').change(function() {
338
+
339
+ switch(jQuery('#csoptions .niteoCS_banner:checked' ).val() ) {
340
+ case '0':
341
+ jQuery('#custom_banner').css('display','block');
342
+ jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');
343
+ break;
344
+ case '1':
345
+ jQuery('#unsplash_banner').css('display','block');
346
+ jQuery('.theme_background fieldset:not(#unsplash_banner)').css('display','none');
347
+ break;
348
+ case '2':
349
+ jQuery('#default_banner').css('display','block');
350
+ jQuery('.theme_background fieldset:not(#default_banner)').css('display','none');
351
+ break;
352
+ case '3':
353
+ jQuery('#graphic_pattern').css('display','block');
354
+ jQuery('.theme_background fieldset:not(#graphic_pattern)').css('display','none');
355
+ break;
356
+ case '4':
357
+ jQuery('#solid_color').css('display','block');
358
+ jQuery('.theme_background fieldset:not(#solid_color)').css('display','none');
359
+ break;
360
+ case '5':
361
+ jQuery('#video_banner').css('display','block');
362
+ jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');
363
+ videoPreview();
364
+ break;
365
+ case '6':
366
+ jQuery('#gradient_background').css('display','block');
367
+ jQuery('.theme_background fieldset:not(#gradient_background)').css('display','none');
368
+ break;
369
+ default:
370
+ jQuery('#custom_banner').css('display','block');
371
+ jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');
372
+ break;
373
+ }
374
  });
375
 
376
+ jQuery('#csoptions .niteoCS_banner:first').trigger('change');
377
 
378
  // display selected unsplash feed
379
+ var unsplasfeed = jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();
380
+ jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
381
 
382
+ jQuery('#unsplash_banner select[name^="unsplash_feed"]').on('change', function() {
383
+ unsplasfeed = jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();
384
  jQuery('.unsplash-feed').css('display', 'none');
385
+ jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
386
  jQuery('#test-unsplash').trigger('click');
387
  });
388
 
410
  }
411
  }).trigger('change');
412
 
 
 
413
  // banner background colorpicker
414
  jQuery('#niteoCS_banner_color').wpColorPicker({
415
  change: function(event, ui){
416
  jQuery('.color-preview').css('background-color', ui.color.toString());
417
+ // jQuery(this).trigger('change');
418
+ }
419
  });
420
 
421
+ // banner gradient background colorpicker
422
  jQuery('#niteoCS_gradient_one').wpColorPicker({
423
  change: function(event, ui){
424
  jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
425
  'background':'-webkit-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
426
  'background':'linear-gradient(135deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'});
427
+ }
428
  });
429
 
430
+ // banner gradient background colorpicker
431
  jQuery('#niteoCS_gradient_two').wpColorPicker({
432
  change: function(event, ui){
433
  jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
434
  'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
435
  'background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)'});
436
+ }
437
  });
438
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  // banner pattern on change image preview
440
  jQuery('select[name^="niteoCS_banner_pattern"]').on('change', function() {
441
  var pattern = jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();
464
  jQuery('#content-example').removeClass().addClass('animated ' + heading_anim);
465
  });
466
 
467
+
468
  // ----------------------- sortable social list -----------------------
469
  // function to update social list
470
  var update_social = function(name, key, val){
550
  jQuery('.social-inputs .label').css('display', 'none');
551
  }
552
  });
 
553
  // hide/show input labels
554
  if (jQuery('.social-media i.active').length) {
555
  jQuery('.social-inputs .label').css('display', 'block');
556
  }
557
 
558
+
559
+
560
  // theme update admin notice view release notes
561
  jQuery('.view-release').click(function(e) {
562
  e.preventDefault();
563
  $this = jQuery(this);
564
  var release_url = $this.attr('href');
 
565
  jQuery.get(release_url, function( release ) {
566
  $this.closest('.notice').find('.release-note .notes').remove();
567
  $this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>');
 
568
  }).fail(function() {
569
  $this.closest('.notice').find('.release-note p').remove();
570
  $this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>');
596
 
597
  $.post(ajaxurl, data, function(response) {
598
  response = response.trim();
599
+ if (response == 'success') {
600
  setTimeout(function(){
601
+
602
  $parent.removeClass('notice-warning').addClass('notice-success');
603
  $parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
604
  }, 1500);
605
 
606
  } else {
607
+
608
  response = response.slice(0,-1);
609
  var error = $('p', $(response)).text();
610
  $parent.removeClass('notice-warning').addClass('notice-error');
621
  jQuery(this).parent().find('.theme-select').addClass('selected');
622
  });
623
 
624
+
625
  // theme update via theme button
626
  jQuery('.theme-update.button').one('click',function(e) {
627
  e.preventDefault();
646
  $this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');
647
 
648
  $.post(ajaxurl, data, function(response) {
649
+ if (response == 'success') {
650
  setTimeout(function(){
651
  $this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');
652
  setTimeout(function(){
691
  // parse JSON data to array
692
  response = jQuery.parseJSON(response);
693
 
694
+
695
  if ( response.result == 'true' ) {
696
  // overflow body hidden
697
  jQuery('body').addClass('modal-open');
709
  var newVer = jQuery('.update-theme').data('new_ver');
710
  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>';
711
  }
712
+
713
+
714
  }
715
  }
716
 
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
 
725
  // get screenshots
827
 
828
  });
829
 
830
+ // jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');
831
+
832
+
833
  // define functions //
834
  function ucwords (str) {
835
  return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) {
841
  return (str+'').toLowerCase();
842
  }
843
 
844
+ function media_upload_button (name, multiple, type) {
845
  // define var
846
  var $container = jQuery('.'+name+'-wrapper');
847
  var $add_button = jQuery('#add-'+name);
858
 
859
  $add_button.click(function(e) {
860
  e.preventDefault();
861
+ // If the media frame already exists, reopen it.
862
  if ( media_uploader ) {
863
  media_uploader.open();
864
  return;
878
  // Get media attachment details from the frame state
879
  var attachment = media_uploader.state().get('selection').toJSON();
880
 
881
+ if (attachment.length > 0) {
882
+ $container.empty();
 
 
 
 
883
 
 
884
  jQuery(attachment).each(function(i) {
885
  if (attachment[i].sizes && attachment[i].sizes.large) {
886
  image = attachment[i].sizes.large.url;
889
  }
890
 
891
  // add image ID and url to comma-separated variable
892
+ var comma = i === 0 ? '' : ',';
893
  imgID += ( comma + attachment[i].id );
 
894
  // Send the attachment URL to our custom image input field.
895
+
896
+ if ( name == 'pattern') {
897
+ $container.css('background-image', 'url(\''+image+'\')');
898
+ } else if ( name == '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
+ } else {
901
+ $container.append( '<img src="' + image + '" alt="" style="max-width:588px"/>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
902
  }
903
 
904
  });
908
 
909
  }
910
  // update hidden input with media id and trigger change
911
+ jQuery('#niteoCS-'+name+'-id').val( imgID).trigger('change');
912
 
913
  })
914
+ .open();if ( name == 'pattern') {
915
+ $container.css('background-image', 'url(\''+image+'\')');
916
+ }
917
  });
918
 
919
+
920
  $delete_button.click(function(e) {
921
  jQuery(this).css('display', 'none');
922
+ $container.empty();
923
  jQuery('#niteoCS-'+name+'-id').val('');
924
  jQuery('#niteoCS-'+name+'-id').trigger('change');
925
+
926
  });
927
  }
928
 
929
+
930
  // Retrieve Mailchimp lists
931
  jQuery('#connect-mailchimp').click(function(e){
932
  e.preventDefault();
974
  }
975
  });
976
 
977
+
978
  function toggle_settings ( classname ) {
979
  // Logo type inputs
980
+ jQuery('.'+classname).change(function() {
981
 
982
+ var value = jQuery('.'+classname+':checked' ).val();
983
+ value = ( jQuery.isNumeric(value) ) ? 'x'+value : value;
984
 
985
+ jQuery('.'+classname+'-switch.'+value).css('display','block');
986
+ jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none');
987
 
988
  });
989
 
990
  jQuery('.'+classname).first().trigger('change');
991
+
992
  }
993
 
994
  function toggle_select ( classname ) {
995
+ // Logo type inputs
996
  jQuery('.'+classname).change(function() {
997
  var value = jQuery('.'+classname ).val();
998
 
999
+ value = ( jQuery.isNumeric(value) ) ? 'x'+value : value;
1000
 
1001
+ jQuery('.'+classname+ '.'+value).css('display','block');
1002
+ jQuery('.'+classname+':not(.'+value+')').css('display','none');
1003
 
1004
  });
1005
 
1006
  jQuery('.'+classname).first().trigger('change');
1007
+
1008
  }
1009
 
1010
  function update_range ( selector ) {
1016
  });
1017
  }
1018
 
 
 
 
 
 
 
 
 
1019
  });
1020
 
1021
 
js/settings.min.js CHANGED
@@ -1 +1 @@
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(j){var t,a=document.location.hash.substring(1),s=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",s)):(jQuery(".submit").css("display","block"),jQuery("#csoptions").attr("action",s+"#"+e))},""!=a?navtab(a):jQuery(".table-wrapper-css").css("display","none"),window.onhashchange=function(){a=document.location.hash.substring(1),navtab(a)},j(".nav-tab:not(.theme-preview)").click(function(e){e.preventDefault(),a=j(this).data("tab"),document.location.hash=a}),u(".blur-range"),u(".overlay-opacity"),c("logo",!1,"image"),c("favicon",!1,"image"),c("images",!0,"image"),c("pattern",!1,"image"),c("video-thumb",!1,"image"),c("video",!1,"video"),l("analytics"),l("contact-form"),l("subscribe"),l("background-effect"),l("special-effect"),l("cmp-logo"),t="subscribe-method",jQuery("."+t).change(function(){var e=jQuery("."+t).val();e=jQuery.isNumeric(e)?"x"+e:e,jQuery("."+t+"."+e).css("display","block"),jQuery("."+t+":not(."+e+")").css("display","none")}),jQuery("."+t).first().trigger("change"),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,t){return!t}),jQuery("#cmp-status-menubar").prop("checked",function(e,t){return!t})}),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(e){e.preventDefault();var c=jQuery("#unsplash-media"),t=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),a="",s="",n="",i=jQuery(this).data("security");switch(t){case"0":a=jQuery("#niteoCS-unsplash-0").val();break;case"1":n=jQuery("#niteoCS-unsplash-1").val();break;case"2":a=jQuery("#niteoCS-unsplash-2").val();break;case"3":a=jQuery("#niteoCS-unsplash-3").val(),s=jQuery("#niteoCS_unsplash_feat").is(":checked")?"1":"0"}if(3==t||""!=a||""!=n){var r={feed:t,url:a,feat:s,custom_str:n};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>'),c.html("");var o={action:"niteo_unsplash",security:i,params:r};j.post(ajaxurl,o,function(e){var t=JSON.parse(e);jQuery("#unsplash_img").remove();var a=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"==t.response){if((t=jQuery.parseJSON(t.body))[0])var s=t[0].urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",n=t[0].user.name,i=t[0].user.links.html,r=t[0].links.html,o=t[0].id;else s=t.urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",n=t.user.name,i=t.user.links.html,r=t.links.html,o=t.id;jQuery("<img />",{src:s,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(c),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery("#unsplash-media").append('<span><a href="'+r+'" target="_blank">Photo</a> (ID: '+o+') by <a href="'+i+'" target="_blank">'+n+'</a> / <a href="https://unsplash.com/" target="_blank">Unsplash</a></span>'),clearTimeout(a)})}else jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery("#unsplash-media").html("<p>Error "+t.response+': <span style="text-transform:lowercase;">'+t.body+"</span></p>"),clearTimeout(a)})}else jQuery("#unsplash_img").remove()}),videoPreview=function(){var e=j(".banner-video-source").val();if(j(".video-wrapper").css("padding-top","0"),"YouTube"==e){var t;if((t=j("#niteoCS-youtube-url").val()).match(/(youtube.com)/))var a="v=",s=1;if(t.match(/(youtu.be)/)||t.match(/(vimeo.com\/)+[0-9]/))a="/",s=3;if("vimeo"==e)if((t=j("#niteoCS-vimeo-url").val()).match(/(vimeo.com\/)+[a-zA-Z]/))a="/",s=5;if(t){var n=t.split(a)[s];if(null!=n){var i=n.replace(/(&)+(.*)/,"");if("banner_youtube"==e&&t.match(/(youtu.be)/)||t.match(/(youtube.com)/))var r="https://www.youtube.com/embed/"+i+"?autoplay=0";if("banner_vimeo"==e&&t.match(/(vimeo.com\/)+[0-9]/)||t.match(/(vimeo.com\/)+[a-zA-Z]/))r="https://player.vimeo.com/video/"+i+"?autoplay=0";var o=j('<iframe src="'+r+'" allowfullscreen></iframe>');j(".video-wrapper").html(o);var c=o.height()/o.width()*100;o.css("position","absolute"),o.css("top","0"),o.css("left","0"),o.css("width","100%"),o.css("height","100%"),j(".video-wrapper").css("padding-top",c+"%"),j("#niteoCS-vimeo-url").css("border","1px solid #ddd"),j("#niteoCS-youtube-url").css("border","1px solid #ddd")}else j(".video-wrapper").text("Please enter correct "+e+" URL.").css("padding-top","0"),j("#niteoCS-vimeo-url").css("border","1px solid #d60000"),j("#niteoCS-youtube-url").css("border","1px solid #d60000")}else j(".video-wrapper").text("Please enter "+e+" URL.").css("padding-top","0"),j("#niteoCS-vimeo-url").css("border","1px solid #d60000"),j("#niteoCS-youtube-url").css("border","1px solid #d60000")}if("video/mp4"==e){var l=jQuery("#niteoCS-video-id").data("url");""!=l&&j(".video-wrapper").html('<video width="600" height="400" controls><source src="'+l+'" 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")}}),jQuery("#csoptions .niteoCS_banner:first").trigger("change");var e=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+e).css("display","block"),jQuery('#unsplash_banner select[name^="unsplash_feed"]').on("change",function(){e=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+e).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,t){jQuery(".color-preview").css("background-color",t.color.toString())}}),jQuery("#niteoCS_gradient_one").wpColorPicker({change:function(e,t){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+t.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+t.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+t.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})}}),jQuery("#niteoCS_gradient_two").wpColorPicker({change:function(e,t){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+t.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+t.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+t.color.toString()+" 100%)"})}}),jQuery('select[name^="niteoCS_banner_pattern"]').on("change",function(){var e=jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();if("custom"!=e){var t=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-wrapper").css("background-image","url('"+t+e+".png')")}else{t=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-wrapper").css("background-image","url('"+t+"')")}}),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 n,i=function(a,s,n){var e=j("#niteoCS_socialmedia").attr("value");e=j.parseJSON(e),j.each(e,function(e,t){t.name==a&&(t[s]=n)}),j("#niteoCS_socialmedia").attr("value",JSON.stringify(e))},r=j(".social-inputs"),o=function(e,t){var a=r.find('input[type="text"]');t.item.index();a.each(function(e,t){var a=j(t).data("name");i(a,"order",e)})};function c(s,t,n){var i,r=jQuery("."+s+"-wrapper"),e=jQuery("#add-"+s),o=jQuery("#delete-"+s),c="",l=s.replace("-"," ");l=l[0].toUpperCase()+l.slice(1),""!=jQuery("#niteoCS-"+s+"-id").val()&&o.css("display","block"),e.click(function(e){if(e.preventDefault(),a)a.open();else{var a=wp.media({title:"Select "+l,button:{text:"Insert "+l},multiple:t,library:{type:[n]}}).on("select",function(){var t=a.state().get("selection").toJSON();0<t.length&&(r.empty(),jQuery(t).each(function(e){i=t[e].sizes&&t[e].sizes.large?t[e].sizes.large.url:t[e].url,c+=(0===e?"":",")+t[e].id,"pattern"==s?r.css("background-image","url('"+i+"')"):"video"==s?r.append('<video width="600" height="400" controls><source src="'+i+'" type="video/mp4">Your browser does not support the video tag.</video>'):r.append('<img src="'+i+'" alt="" style="max-width:588px"/>')}),o.css("display","block")),jQuery("#niteoCS-"+s+"-id").val(c).trigger("change")}).open();"pattern"==s&&r.css("background-image","url('"+i+"')")}}),o.click(function(e){jQuery(this).css("display","none"),r.empty(),jQuery("#niteoCS-"+s+"-id").val(""),jQuery("#niteoCS-"+s+"-id").trigger("change")})}function l(t){jQuery("."+t).change(function(){var e=jQuery("."+t+":checked").val();e=jQuery.isNumeric(e)?"x"+e:e,jQuery("."+t+"-switch."+e).css("display","block"),jQuery("."+t+"-switch:not(."+e+")").css("display","none")}),jQuery("."+t).first().trigger("change")}function u(e){jQuery(e).on("input",function(){var e=jQuery(this).val();jQuery(this).parent().find("span").html(e)})}r.sortable({stop:o}),r.on("sortchange",o),(n=jQuery).fn.toggleDisabled=function(){return this.each(function(){var e,t=n(this),a=t.data("name");t.attr("disabled")?(t.prop("disabled",!1),e="1"):(t.prop("disabled",!0),e="0"),i(a,"active",e)})},jQuery('.social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),t=jQuery(this).attr("value");i(e,"url",t)}),jQuery('.social-inputs input[type="checkbox"]').click(function(e){j(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")?i(e,"hidden","0"):i(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 t=$this.attr("href");jQuery.get(t,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(e){e.preventDefault();var t=j(this),a=t.parents(".notice"),s=t.data("security"),n=t.data("slug"),i=t.data("name"),r={action:"cmp_theme_update_install",security:s,file:{name:n,tmp_name:"",url:jQuery(this).data("remote_url")+"?action=download&slug="+n}};a.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>'),j.post(ajaxurl,r,function(e){if("success"==(e=e.trim()))setTimeout(function(){a.removeClass("notice-warning").addClass("notice-success"),a.find(".message").html("<span> "+i+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500);else{e=e.slice(0,-1);var t=j("p",j(e)).text();a.removeClass("notice-warning").addClass("notice-error"),a.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="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 t=j(this),a=t.closest(".theme-wrapper"),s=a.data("security"),n=a.data("slug"),i={action:"cmp_theme_update_install",security:s,file:{name:n,tmp_name:"",url:a.data("remote_url")+"?action=download&slug="+n}};t.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),j.post(ajaxurl,i,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 u=j(this),d=u.closest(".theme-wrapper"),p=d.data("slug"),y=d.data("version"),h=d.data("remote_url"),m=d.data("type"),g=d.data("purchased"),v=(d.data("freebie"),jQuery(".update-theme").data("security")),f=(d.data("price"),0),e={action:"niteo_themeinfo",security:jQuery(".theme-wrapper").data("security"),theme_slug:jQuery(this).parents(".theme-wrapper").data("slug")};j.post(ajaxurl,e,function(e){var t="",a="",s="",n="";if("true"==(e=jQuery.parseJSON(e)).result){if(jQuery("body").addClass("modal-open"),"1"==g&&(s='<span class="theme-version">Version: '+y+"</span>",n='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>',jQuery(".update-theme").length)){var i=jQuery(".update-theme").data("slug");if(p==i){var r=jQuery(".update-theme").data("new_ver");n='<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 '+e.name+' theme available. <a href="'+h+"readme/"+p+'-readme.php" class="view-release">View update '+r+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+p+'" class="update-theme" data-security="'+v+'" data-slug="'+p+'" data-remote_url="'+h+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}if("1"!=g&&"premium"==m)t="disabled ",a='<button type="button" class="theme-purchase button hide"><a href="'+d.find("a").attr("href")+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>';var o=e.screenshots,c="";1<Object.keys(o).length&&(c='<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 l=j(['<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(\''+o[0]+"')\">"+c+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+e.name+s+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+e.author_homepage+'" target="_blank">'+e.author+"</a></p>",n,a,'\t\t\t\t<div class="theme-description">'+e.description+"</div>","\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<button type="submit" '+t+'class="button activate" name="Submit" aria-label="Select '+e.name+'">Activate</button>','\t\t\t<a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+p+"&utm_source=cmp&utm_medium=referral&utm_campaign="+p+'" class="button cmp-preview" target="_blank" aria-label="Preview '+e.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(l),jQuery(".theme-overlay.cmp .view-release").click(function(e){e.preventDefault();var t=(u=jQuery(this)).attr("href");jQuery.get(t,function(e){u.closest(".notice").find(".release-note .notes").remove(),u.closest(".notice").find(".release-note").append('<div class="notes">'+e+"</div>")}).fail(function(){u.closest(".notice").find(".release-note p").remove(),u.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(){jQuery(this).val()==p&&(jQuery(this).prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().addClass("selected"))}),jQuery(this).submit()}),jQuery(".screenshots-nav .right").click(function(){++f==Object.keys(o).length&&(f=0),f in o&&jQuery(".screenshot").css("background-image","url('"+o[f]+"')")}),jQuery(".screenshots-nav .left").click(function(){--f<0&&(f=Object.keys(o).length-1),f in o&&jQuery(".screenshot").css("background-image","url('"+o[f]+"')")})}})}),jQuery("#connect-mailchimp").click(function(e){e.preventDefault();var t=jQuery('input[name="niteoCS_mailchimp_apikey"]').val(),a=jQuery(this).data("security"),s=jQuery(this);if(""!=t){var n={apikey:t,security:a};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 i={action:"cmp_mailchimp_list_ajax",security:a,params:n};j.post(ajaxurl,i,function(e){var t=JSON.parse(e);200==t.response?(j("#mailchimp-lists-select").empty().prop("disabled",!1),j.each(t.lists,function(e,t){j("#mailchimp-lists-select").append('<option value="'+t.id+'">'+t.name+"</option>")})):j("#mailchimp-lists-select").empty().prop("disabled",!0).html('<option value="error">'+t.message+"</option>").trigger("change"),s.html("Retrieve Lists"),s.prop("disabled",!1)}).fail(function(){s.html("Retrieve Lists"),s.prop("disabled",!1)})}})});
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,1793 @@
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.7.1
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.7.1';
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', 'element');
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
 
89
+ if ( current_user_can('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
+ // get current user
123
+ $current_user = wp_get_current_user();
 
 
124
 
125
+ // check for roles array length
126
+ if ( count( $current_user->roles ) > 0 ) {
127
+ // enqueue topbar script and style only, if current user is allowed to display topbar, or is admin
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
+ // remove default wp version from handles
150
+ public function sdt_remove_ver_css_js( $src, $handle ) {
151
+ $handles_remove_ver = array('font_awesome', 'webfont', 'countdown_flatpicker_js', 'countdown_flatpicker_css', 'select2'); // <-- Adjust to your needs!
152
+ if ( in_array( $handle, $handles_remove_ver, true ) && strpos( $src, 'ver=' ) )
153
+ $src = remove_query_arg( 'ver', $src );
 
 
154
 
155
+ return $src;
156
+ }
157
 
 
 
 
 
 
 
158
 
159
+ //register scripts and load styles
160
+ public function cmp_adminMenu() {
161
+ /* Register our plugin page */
162
+ $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__));
 
163
 
164
+ add_submenu_page('cmp-settings', 'Content Settings', __('Content Settings', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-settings' );
 
 
 
 
 
165
 
166
+ add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
167
 
168
+ add_submenu_page('cmp-settings', 'Subscribers', __('Subscribers', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
 
 
 
 
 
169
 
170
+ add_submenu_page('cmp-settings', 'Translation', __('Translation', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-translate', array($this, 'cmp_translate_page') );
171
 
172
+ 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') );
173
 
174
+ add_submenu_page('cmp-settings', 'Help', __('Help', 'cmp-coming-soon-maintenance'), 'manage_options', 'cmp-help', array($this, 'cmp_help_page') );
175
 
176
+ /* Using registered $page handle to hook script load */
177
+ add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
178
 
179
+ }
180
 
 
181
 
182
+ // enqueue styles and scripts when navigated to CMP Settings page
183
+ public function cmp_enqueueScripts() {
184
+ wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
185
+ wp_enqueue_script('cmp_settings_js');
186
+ wp_enqueue_script('cmp-typography');
187
+ wp_enqueue_script( 'wp-color-picker');
188
+ wp_enqueue_script( 'webfont' );
189
+ wp_enqueue_script( 'select2-js');
190
+ wp_enqueue_media();
191
+ wp_enqueue_style( 'wp-color-picker');
192
+ wp_enqueue_style( 'select2');
193
+ wp_enqueue_style( 'font_awesome');
194
+ if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) ) {
195
+ wp_enqueue_style('animate-css');
196
+ }
197
+ }
198
 
199
+ public function cmp_settings_page() {
200
+ // include default options page
201
+ // check for them updates, not sure where else this to put
202
+ $this->cmp_check_update( $this->cmp_selectedTheme() );
203
+ require_once ('cmp-settings.php');
204
+ }
205
 
206
+ public function cmp_advanced_page() {
207
+ wp_enqueue_script('select2-js');
208
+ wp_enqueue_style('select2');
209
+ require_once ('cmp-advanced.php');
210
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
+ public function cmp_subs_page() {
213
+ require_once ('cmp-subscribers.php');
214
+ }
 
 
 
 
 
 
215
 
216
+ public function cmp_translate_page() {
217
+ require_once ('cmp-translate.php');
218
+ }
 
 
 
 
 
219
 
220
+ public function cmp_upload_page() {
221
+ require_once ('cmp-upload.php');
222
+ }
 
 
 
223
 
224
+ public function cmp_help_page() {
225
+ require_once ('cmp-help.php');
226
+ }
 
 
 
227
 
 
 
 
 
 
 
228
 
229
+ public function cmp_asset_url( $filepath ) {
230
+ return plugins_url( $filepath, __FILE__ );
231
+ }
 
 
 
232
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
+ // override wp login page if cmp is enabled
235
+ public function cmp_admin_override(){
 
 
 
 
236
 
237
+ // if admin or CMP disabled, return
238
+ if( current_user_can('administrator') || $this->cmp_status() == 0 ){
239
+ return;
240
+ }
241
 
242
+ if( is_user_logged_in() ){
243
 
244
+ // force redirect if logged-in user role is not set to bypass CMP
245
+ if( !$this->cmp_roles_filter() ){
246
+ wp_logout();
247
+ wp_redirect( get_bloginfo('url') );
248
+ exit();
 
249
  }
250
  }
251
+ }
252
 
253
+ // function to display CMP landing page
254
+ public function cmp_displayPage() {
255
 
256
+ // check if preview is set
257
+ if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
258
 
259
+ // register html class for rendering of HTML elements in Themes
260
+ require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
261
+ $html = new cmp_render_html();
262
 
263
+ // iframe preview with sidebar controls cmp_preview=true&selector=true - nt.com only
264
+ if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
265
+ if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/preview-selector.php') ) {
266
+ require_once ($this->plugins_dir_path . 'cmp-premium-themes/preview-selector.php');
267
+ die();
268
+ }
269
+ }
270
+
271
+ // preview for specific theme cmp_preview=true&theme=slug used in niteothemes
272
+ if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
273
+ $theme_preview = esc_attr($_GET['theme']);
274
+
275
+ if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
276
+ require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
277
+ die();
278
+ }
279
 
280
+ }
281
 
282
+ // preview for specific theme cmp_preview=true&template=slug used in
283
+ if ( isset($_GET['cmp_theme']) && !empty($_GET['cmp_theme']) ) {
284
+ $theme_preview = esc_attr($_GET['cmp_theme']);
285
+
286
+ if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
287
+ require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
288
  die();
289
  }
 
290
 
291
+ }
 
 
 
 
 
 
292
 
293
+ // finally render theme preview cmp_preview=true
294
+ if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
295
+ require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
296
+ die();
297
  }
298
+ }
299
+
300
+ // bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
301
+ if ( isset($_GET['cmp_bypass']) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
302
+ nocache_headers();
303
+ header('Cache-Control: max-age=0; private');
304
+ setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
305
+ return;
306
+ }
307
+
308
+ // if bypass Cookie is set, return
309
+ if ( isset($_COOKIE['cmp_bypass']) && $_COOKIE['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() ) ) && get_option('niteoCS_bypass', '0') == '1' ) {
310
+ return;
311
+ }
312
+
313
+ // Render CMP Theme mode if is activated and not in immediate redirect mode
314
+ if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
315
+
316
+ // check if user logged in, page filters and access role
317
+ if ( !is_user_logged_in() && $this->cmp_page_filter() ) {
318
+
319
+ // register html class for rendering of HTML elements in Themes
320
+ require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
321
+ $html = new cmp_render_html();
322
+
323
+ // if themes with countdown timer
324
+ if ( in_array($this->cmp_selectedTheme(), $this->countdown_themes) ){
325
+ // if counter is enabled
326
+ if ( get_option('niteoCS_counter', '1') == '1' ) {
327
+ // if countdown date is set
328
+ if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
329
+ // if timer < timestamp do set action
330
+ if ( get_option('niteoCS_counter_date' ) < time() ) {
331
+ // if action set to disable cmp
332
+ if ( get_option('niteoCS_countdown_action') == 'disable-cmp' ) {
333
+ update_option('niteoCS_activation', '0');
334
+ }
335
 
336
+ // if action set to redirect
337
+ if ( get_option('niteoCS_countdown_action') == 'redirect' ) {
338
+ $redirect_url = esc_url(get_option('niteoCS_countdown_redirect'));
339
+ header('Location: '.$redirect_url);
340
+ die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  }
342
  }
343
  }
344
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  }
 
346
 
347
+ // if maintanance mode send correct 503 headers
348
+ if ( $this->cmp_status() == '1' ){
349
+ header('HTTP/1.1 503 Service Temporarily Unavailable');
350
+ header('Status: 503 Service Temporarily Unavailable');
351
+ header('Retry-After: 86400'); // retry in a day
352
+ }
353
 
354
+ // render selected CMP theme
355
+ if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
356
+ require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
 
357
  die();
358
  }
359
  }
360
  }
361
 
362
+ // if CMP in redirect mode with 0 timeout
363
+ if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() && $this->cmp_page_filter() ) {
364
 
365
+ $redirect_url = get_option('niteoCS_URL_redirect');
366
+ // redirect to URL
367
+ if ( $redirect_url != '') {
368
+ header('Location: '.esc_url( $redirect_url ));
369
+ die();
 
 
 
 
 
370
  }
371
  }
372
+ }
373
 
 
 
 
 
 
 
 
 
 
 
 
374
 
375
+ // return CMP activation status and it`s states
376
+ public function cmp_status() {
 
 
 
377
 
378
+ if ( !get_option('niteoCS_status') ||
379
+ get_option('niteoCS_status') == '' ||
380
+ get_option('niteoCS_status') == false ) {
381
+ return '0';
 
382
 
383
+ } else {
384
+ return get_option( 'niteoCS_activation', '2' );
 
385
  }
386
+ }
387
 
388
+ // function to toggle CMP activation for admin menu icon
389
+ public function cmp_toggle_activation () {
390
+ // check for ajax
391
+ if ( isset( $_POST['payload'] ) ) {
392
+ // verify nonce
393
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
394
+ // verify user rights
395
+ if( !current_user_can('publish_pages') ) {
396
+ die('Sorry, but this request is invalid');
397
  }
 
 
 
 
 
 
398
 
399
+ if ( get_option('niteoCS_status', '') == '' ) {
400
+ update_option('niteoCS_status', '1');
401
+ } else {
402
+ update_option('niteoCS_status', '');
403
+ }
404
 
405
+ echo 'success';
406
+ wp_die();
407
+ return;
408
+ }
409
+ }
410
 
411
+ // check selected theme
412
+ public function cmp_selectedTheme() {
413
+ return get_option('niteoCS_theme', 'hardwork');
414
+ }
415
 
 
 
416
 
417
+ // return installed theme path
418
+ public function cmp_themePath( $slug ) {
419
+ if ( in_array($slug, $this->themes_standard) ) {
420
+ return dirname(__FILE__) . '/themes/';
421
 
422
+ } else {
423
+ return $this->plugins_dir_path . 'cmp-premium-themes/';
424
+ }
425
+ }
426
 
427
+ // return installed theme dir
428
+ public function cmp_themeURL( $slug ) {
429
+ if ( in_array($slug, $this->themes_standard) ) {
430
+ return plugins_url( '/themes/', __FILE__ );
431
 
432
+ } else {
433
+ return plugins_url( '/cmp-premium-themes/');
434
+
435
+ }
436
+ }
437
 
438
+ // older version of cmp_themeURL public function - migration after 1.9 version.
439
+ //can be deleted in future...
440
+ public function cmp_themeDirPath() {
441
+ if ( $this->niteo_in_array_r( $this->cmp_selectedTheme(), $this->cmp_premium_themes(), true ) ) {
442
+ return plugins_url( '/cmp-premium-themes/');
443
 
444
+ } else {
445
+ return plugins_url( '/themes/', __FILE__ );
446
+ }
447
+ }
448
 
449
+ // display admin topbar notice
450
+ public function cmp_admin_bar(){
 
451
 
452
+ // check onces and wordpress rights, else DIE
453
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && (get_current_screen() && get_current_screen()->id == 'toplevel_page_cmp-settings' ) ) {
 
 
454
 
455
+ //verify nonce and user rights
456
+ if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
457
+ die('Sorry, but this request is invalid');
458
+ }
459
 
460
+ if ( isset($_POST['activate']) && is_numeric($_POST['activate']) ) {
461
+ update_option('niteoCS_activation', sanitize_text_field($_POST['activate']));
462
+ }
463
 
464
+ if ( isset($_POST['cmp_status']) ) {
465
+ update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
466
+ } else {
467
 
468
+ update_option('niteoCS_status', false);
469
  }
470
 
471
+ }
472
 
473
+ require_once(ABSPATH . 'wp-admin/includes/screen.php');
 
474
 
475
+ $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
476
 
477
+ // push WP administrator to roles array, since it is default
478
+ array_push( $roles_topbar, 'administrator' );
479
 
480
+ $current_user = wp_get_current_user();
481
 
482
+ // if current user cannot access topbar, return
483
+ foreach ( $current_user->roles as $role ) {
484
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
 
486
+ if ( !in_array( $role, $roles_topbar ) ) {
487
+ return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
488
  }
489
+ };
490
+
491
+
492
+ global $wp_admin_bar;
493
+
494
+ $class = '';
495
+ $msg= '';
496
+
497
+
498
+ switch ( get_option( 'niteoCS_activation', '2' ) ) {
499
+ case '1':
500
+ $msg = __('Maintenance Mode:','cmp-coming-soon-maintenance');
501
+ $class = ' maintenance';
502
+ break;
503
+ case '2':
504
+ $msg = __('Coming Soon Mode:','cmp-coming-soon-maintenance');
505
+ $class = ' coming-soon';
506
+ break;
507
+ case '3':
508
+ $msg = __('Redirect Mode:','cmp-coming-soon-maintenance');
509
+ $class = ' redirect';
510
+ break;
511
+ default:
512
+ break;
513
+ }
514
+
515
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
516
+
517
+ $msg = '<img src="'.plugins_url('/img/cmp.png', __FILE__).'" alt="CMP Logo" class="cmp-logo"><span class="cmp-status-msg">'.$msg.'</span>';
518
+ $msg .='<div class="toggle-wrapper">
519
+ <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).'">
520
+ <label for="cmp-status-menubar" class="toggle"><span class="toggle_handler"></span></label>
521
+ </div>';
522
+
523
+ //Add the main siteadmin menu item
524
+ $wp_admin_bar->add_menu( array(
525
+ 'id' => 'cmp-admin-notice',
526
+ 'href' => admin_url().'admin.php?page=cmp-settings',
527
+ 'parent' => 'top-secondary',
528
+ 'title' => $msg,
529
+ 'meta' => array( 'class' => 'cmp-notice'.$class ),
530
+ ) );
531
+
532
+ // Display CMP Settings in topbar only for administrator
533
+ if ( user_can( $current_user, 'administrator' ) ) {
534
  $wp_admin_bar->add_node( array(
535
+ 'id' => 'cmp-settings',
536
+ 'title' => __('CMP Settings', 'cmp-coming-soon-maintenancee'),
537
+ 'href' => admin_url('admin.php?page=cmp-settings'),
538
+ 'parent' => 'cmp-admin-notice'
 
539
  ));
540
+ }
541
 
542
+ $wp_admin_bar->add_node( array(
543
+ 'id' => 'cmp-preview',
544
+ 'title' => __('CMP Preview', 'cmp-coming-soon-maintenancee'),
545
+ 'href' => get_site_url().'/?cmp_preview=true',
546
+ 'parent'=> 'cmp-admin-notice',
547
+ 'meta' => array('target' => '_blank' )
548
+ ));
549
 
550
+ }
551
 
552
+ public function cmp_activate() {
 
 
 
 
 
 
553
 
554
+ if ( get_option('niteoCS_archive') ) {
555
+ //get all the options back from the archive
556
+ $options = get_option('niteoCS_archive');
557
+ // update options
558
+ foreach ($options as $option) {
559
+ update_option($option['name'], $option['value']);
560
  }
 
561
 
562
+ // delete archive
563
+ delete_option('niteoCS_archive');
564
+ }
565
+ }
 
 
 
 
 
 
 
 
566
 
567
+ // archive plugin stuff when plugin is deactivated
568
+ public function cmp_deactivate() {
569
+ //get all the options. store them in an array
570
+ $options = array();
571
+
572
+ global $wpdb;
573
+ $saved_options = $wpdb->get_results( "SELECT * FROM $wpdb->options WHERE option_name LIKE 'niteoCS_%'", OBJECT );
574
+ $i = 0;
575
+ foreach ($saved_options as $option) {
576
+ $options[$i] = array('name' => $option->option_name, 'value' => get_option( $option->option_name) );
577
+ $i++;
578
+ }
579
 
580
+ //store the options all in one record, in case we ever reactivate the plugin
581
+ update_option('niteoCS_archive', $options);
 
582
 
583
+ //delete the separate ones
584
+ foreach ( $options as $option ) {
585
+ delete_option($option['name']);
586
 
587
  }
588
 
589
+ }
 
 
 
590
 
591
+ // clean plugin stuff when plugin is deleted
592
+ public function cmp_plugin_delete() {
593
+ delete_option('niteoCS_archive');
594
+ }
 
595
 
596
+ // returns list of premium themes => manually defined
597
+ public function cmp_premium_themes() {
598
+
599
+ $premium_themes = array();
600
+ 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') );
601
 
602
+ 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') );
603
 
604
+ 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') );
605
 
606
+ 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') );
607
 
608
+ 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') );
609
 
610
+ 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') );
611
 
612
+ 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') );
 
 
613
 
614
+ 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') );
615
+
616
+ // 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') );
617
 
618
+ return $premium_themes;
619
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
620
 
621
+ /**
622
+ * Difference between Premium Themes installed and Premium Themes available sets in cmp_premium_themes() function.
623
+ *
624
+ * @since 2.2
625
+ * @access public
626
+ * @return array
627
+ */
628
+ public function cmp_downloadable_themes() {
629
+ $downloadable_themes = array();
630
+
631
+ foreach ( $this->cmp_premium_themes() as $premium ) {
632
+ if ( !in_array($premium['name'], $this->premium_installed) ) {
633
+ array_push( $downloadable_themes, $premium );
634
+ }
635
  }
636
 
637
+ return $downloadable_themes;
638
+ }
639
 
640
+ // theme updates function
641
+ public function cmp_check_update( $theme_slug ) {
 
642
 
643
+ if ( !in_array( $theme_slug, $this->premium_installed ) ) {
644
+ return;
645
+ }
646
 
647
+ // check for current theme version
648
+ $remote_version = '';
649
+ $current_version = '';
650
 
651
+ if ( $this->dev == true ) {
652
+ delete_transient( $theme_slug.'_updatecheck' );
653
+ }
 
 
 
 
 
 
654
 
655
+ // check if update check transient is set
656
+ if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
657
+
658
+ $current_version = $this->cmp_theme_version($theme_slug);
659
+ // get remote version from remote server
660
+ $request = wp_remote_post( $this->remoteServer.'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')) );
661
+
662
+ // if no error, retrivee body
663
+ if ( !is_wp_error( $request ) ) {
664
 
665
+ // decode to json
666
+ $remote_version = json_decode( $request['body'], true );
667
 
668
+ // get remove version key
669
+ if ( isset($remote_version['version']) ) {
670
 
671
+ $remote_version = $remote_version['version'];
 
672
 
673
+ // if remote version is bigger than current, display info about new version
674
+ if ( (float)$remote_version > (float)$current_version ) {
675
 
676
+ $title = ucwords(str_replace('_', ' ', $theme_slug));
 
677
 
678
+ // create nonce
679
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
680
 
681
+ // if admin screen is not in updating theme
682
+ if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
683
 
684
+ $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>';
 
685
 
686
+ // set transient with 12 hour expire
687
+ set_transient( $theme_slug.'_updatecheck', $transient, 60*60*12 );
688
 
689
+ echo $transient;
690
+ }
 
 
691
 
692
+ } else {
693
+ // set transient no update available with 12 hours expire
694
+ set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
695
+ }
696
 
697
+ }
698
+ }
 
699
 
700
+ } else if ( $updatecheck_transient != '' ) {
701
+ echo $updatecheck_transient;
702
  }
703
 
704
+ return;
705
+ }
 
706
 
707
+ public function cmp_theme_upload($zip) {
708
+ // allow zip file to upload
709
+ add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
 
710
 
711
+ // load PHP WP FILE
712
+ if ( ! function_exists( 'wp_handle_upload' ) ) {
713
+ require_once realpath('../../../wp-admin/includes/file.php');
714
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
715
 
716
+ $uploadedfile = $zip;
717
+ $filename = $uploadedfile['name'];
718
+ /* You can use wp_check_filetype() public function to check the
719
+ file type and go on wit the upload or stop it.*/
720
+ $filetype = wp_check_filetype( $filename );
721
+
722
+ if ( $filetype['ext'] == 'zip' ) {
723
+ // Upload file
724
+ $movefile = wp_handle_upload( $uploadedfile, array('test_form' => FALSE) );
725
+
726
+ if ( $movefile && !isset( $movefile['error'] ) ) {
727
+
728
+ WP_Filesystem();
729
+ $source_path = $movefile['file'];
730
+ $theme_name = str_replace('.zip', '', $filename);
731
+ $destination_path = $this->plugins_dir_path . 'cmp-premium-themes/';
732
+
733
+ // create new theme DIR
734
+ if ( wp_mkdir_p( $destination_path ) ) {
735
+ // Unzip FILE into that DIR
736
+ $unzipfile = unzip_file( $source_path, $destination_path);
737
+
738
+ if ( $unzipfile ) {
739
+ // delete FILE
740
+ wp_delete_file( $source_path );
741
+ $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
742
+ $this->theme_array = array_merge( $this->themes_standard, $this->premium_installed );
743
+ 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>';
744
+ return;
745
 
746
+ } else {
747
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
748
+ return;
749
+ }
750
 
751
  } else {
752
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
753
+ return;
 
 
 
 
754
  }
755
+
756
  } else {
757
+ /**
758
+ * Error generated by _wp_handle_upload()
759
+ * @see _wp_handle_upload() in wp-admin/includes/file.php
760
+ */
761
+ echo '<div class="notice notice-error is-dismissible"><p>'.$movefile['error'].'</p></div>';
762
+ return;
763
  }
764
+ } else {
765
+ 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>';
766
  return;
767
  }
768
 
769
+ add_filter('upload_mimes', array($this, 'niteo_remove_zip_mime'));
770
+ return;
771
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
772
 
773
+ public function cmp_theme_update_install( $file ) {
774
+ $ajax = false;
775
+ // check for ajax
776
+ if ( isset( $_POST['file'] ) ) {
777
+ // verify nonce
778
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
779
+ // verify user rights
780
+ if( !current_user_can('publish_pages') ) {
781
+ die('Sorry, but this request is invalid');
782
+ }
783
 
784
+ // sanitize array
785
+ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
786
 
787
+ if ( !empty( $_POST['file'] ) ) {
788
+ $file = $_POST['file'];
789
+ $ajax = true;
790
+ }
791
+ }
792
 
793
+ // load PHP WP FILE
794
+ if ( ! empty( $file ) ) {
795
+ // Download file to temp location.
796
+ $file['tmp_name'] = download_url( $file['url'] );
797
+
798
+ // If error storing temporarily, return the error.
799
+ if ( !is_wp_error( $file['tmp_name'] ) ) {
800
+ WP_Filesystem();
801
+
802
+ $source_path = $file['tmp_name'];
803
+ $theme_name = $file['name'];
804
+
805
+ $destination_path = $this->plugins_dir_path . 'cmp-premium-themes/';
806
+
807
+ // create new theme DIR
808
+ if ( wp_mkdir_p( $destination_path ) ) {
809
+ // Unzip FILE into that DIR
810
+ $unzipfile = unzip_file( $source_path, $destination_path);
811
+
812
+ if ( $unzipfile ) {
813
+
814
+ // delete FILE
815
+ wp_delete_file( $source_path );
816
+ // reload premium installed themes
817
+ $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
818
+ // add it to all installed themes array
819
+ $this->theme_array = array_merge( $this->themes_standard, $this->premium_installed );
820
+ // reply response
821
+ // set transient no update available with 24 hours expire
822
+ set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
823
+ // die
824
+ if ( $ajax ) {
825
+ wp_die('success');
826
+ return;
827
+ } else {
828
+ 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>';
829
+ return;
830
+ }
831
+
832
+ } else {
833
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
834
+ if ( $ajax ) {
835
+ wp_die();
836
+ return;
837
+ } else {
838
+ return;
839
+ }
840
+ }
841
 
842
  } else {
843
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
844
+ if ( $ajax ) {
845
+ wp_die();
846
  return;
847
+ } else {
848
+ return;
849
+ }
850
  }
 
851
 
852
+ } else {
853
+ 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>';
854
  if ( $ajax === true ) {
855
+ wp_die();
856
+ } else {
857
  return;
858
+ }
859
  }
860
+ } else {
861
 
862
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
863
+ if ( $ajax === true ) {
864
+ wp_die();
865
+ } else {
866
+ return;
867
+ }
868
  }
869
+ }
870
 
871
+ public function cmp_textDomain() {
872
+ load_plugin_textdomain( 'cmp-coming-soon-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
873
+ }
874
 
875
+ // build unsplash api
876
+ public function cmp_unsplash_api ( $query ) {
 
877
 
878
+ $api_url = 'https://api.unsplash.com/'.$query.'&client_id=41f043163758cf2e898e8a868bc142c20bc3f5966e7abac4779ee684088092ab' ;
879
+
880
+ if ( function_exists( 'wp_remote_get' ) ) {
881
 
882
+ $response = wp_remote_get( $api_url );
883
 
884
+ if ( !is_object( $response ) && isset( $response['body'] ) ) {
 
885
 
886
+ $body = $response['body'];
887
+ $data = array( 'response' => $response['response']['code'], 'body' => $body );
 
888
 
889
  } else {
890
+ $data = array( 'response' => 'Unplash API', 'body' => 'Not responding after 5000ms' );
891
  }
892
 
893
+ } else {
894
+ $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.' );
895
  }
896
 
897
+ return $data;
898
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
899
 
900
+ // prepare unsplash url and get unsplash photo via cmp_unsplash_api()
901
+ public function niteo_unsplash( $params ) {
902
+ $ajax = false;
903
+
904
+ // check for ajax
905
+ if ( isset( $_POST['params'] ) ) {
906
+ // verify nonce
907
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
908
+ // verify user rights
909
+ if( !current_user_can('publish_pages') ) {
910
+ die('Sorry, but this request is invalid');
911
+ }
912
 
913
+ // sanitize array
914
+ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
915
 
916
+ if ( !empty( $_POST['params'] ) ) {
917
+ $params = $_POST['params'];
918
+ $ajax = true;
919
+ }
920
+ }
921
 
922
+ array_key_exists ('feed', $params) ? $feed = $params['feed'] : $feed = '';
923
+ array_key_exists ('url', $params) ? $url = $params['url'] : $url = '';
924
+ array_key_exists ('feat', $params) ? $feat = $params['feat'] : $feat = '';
925
+ array_key_exists ('custom_str', $params) ? $custom_str = $params['custom_str'] : $custom_str = '';
926
+ array_key_exists ('count', $params) ? $count = $params['count'] : $count = '1';
927
+
928
+ switch ( $feed ) {
929
+ // specific unsplash photo by url/id
930
+ case '0':
931
+ $id = '';
932
+ // check if $query contains unsplash.com url
933
+ if ( strpos( $url, 'unsplash.com' ) !== false ) {
934
+ $parts = parse_url( $url );
935
+ // check for photo parameter in URL
936
+ if ( isset($parts['query'])) {
937
+ parse_str($parts['query'], $query);
938
+ $id = $query['photo'];
939
  }
940
+ // if no ID found, get last part of URL containing ID
941
+ if ( $id == '' ) {
942
 
943
+ $pathFragments = explode('/', $parts['path']);
944
+ $id = end($pathFragments);
945
+ }
946
 
947
+ // $query is ID
948
+ } else {
949
+ $id = $url;
950
+ }
951
 
952
+ // prepare query for single image
953
+ $api_query = 'photos/'.$id.'?';
954
+ break;
955
 
956
+ // random from user
957
+ case '1':
 
958
 
959
+ if ( $custom_str[0] == '@' ) {
960
+ $custom_str = substr($custom_str, 1);
961
+ }
 
 
 
 
 
962
 
963
+ // prepare query for random photo from collection
964
+ $api_query = 'photos/random/?username='.$custom_str.'&count='.$count;
965
+ break;
966
 
967
+ // random from collection
968
+ case '2':
969
+ if ( is_numeric( $url ) ) {
970
+ $collection = $url;
971
+ } else {
972
+ $collection = filter_var($url, FILTER_SANITIZE_NUMBER_INT);
973
+ $collection = str_replace('-', '', $collection );
974
+ }
975
 
976
+ // prepare query for random photo from collection
977
+ $api_query = 'photos/random/?collections='.$collection.'&count='.$count;
978
+ break;
 
 
 
979
 
980
+ // random photo
981
+ case '3':
982
 
983
+ // featured
984
+ if ( $feat == '0' || $feat == '') {
985
+ $featured = 'false';
986
+ } else {
987
+ $featured = 'true';
988
+ }
989
 
990
+ // category
991
+ $search = str_replace(' ', ',', $url);
 
 
992
 
993
+ if ( $search !== '' ) {
994
+ $search = 'query='.$search.'&';
995
+ }
996
+ // prepare query for random photo
997
+ $api_query = 'photos/random/?orientation=landscape&featured='.$featured.'&'.$search.'count='.$count;
998
+ break;
999
 
1000
+ default:
1001
+ $api_query = 'photos/random/?orientation=landscape&count='.$count;
1002
+ break;
1003
+ }
1004
 
1005
+ $unsplash_img = $this->cmp_unsplash_api( $api_query );
1006
+
1007
+ if ( $ajax === true ) {
1008
+ echo json_encode($unsplash_img);
1009
+ wp_die();
1010
+
1011
+ } else {
1012
+ return $unsplash_img;
1013
  }
1014
+ }
1015
+
1016
+ // check value in multidimensional array
1017
+ public function niteo_in_array_r($needle, $haystack, $strict = false) {
1018
+ foreach ( $haystack as $item ) {
1019
+ if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
1020
+ return true;
1021
+ }
1022
+ }
1023
+
1024
+ return false;
1025
+ }
1026
+
1027
+ // save subscribe function
1028
+ // $check must be true, to avoid duplicated requests after update to 2.1
1029
+ public function niteo_subscribe( $check ) {
1030
+
1031
+ $subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
1032
+
1033
+ $response = '';
1034
+ $response_invalid = 'Please insert valid Email address.';
1035
+ $ajax = false;
1036
 
1037
+ // check for ajax request
1038
+ if ( isset( $_POST['check'] ) && $_POST['check'] == true ) {
1039
+ $check = true;
1040
+ $ajax = true;
1041
  }
1042
 
1043
+ if ( $check === true ) :
1044
+
1045
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST'
1046
+ && isset( $_POST['form_honeypot'] )
1047
+ && $_POST['form_honeypot'] === ''
1048
+ && isset( $_POST['email'] ) )
1049
+ {
1050
+
1051
+ if ( is_email( $_POST['email'] ) ) {
1052
+ // email already passed is_email, no need to sanitize
1053
+ $email = $_POST['email'];
1054
+
1055
+ // sanitize all inputs
1056
+ $ip_address = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field($_SERVER['REMOTE_ADDR']) : '';
1057
+ $firstname = ( isset( $_POST['firstname'] ) ) ? sanitize_text_field( $_POST['firstname'] ) : '';
1058
+ $lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
1059
+ $timestamp = time();
1060
+
1061
+ // get translation lists
1062
+ if ( get_option('niteoCS_translation') ) {
1063
+ $translation = json_decode( get_option('niteoCS_translation'), true );
1064
+ $response_ok = $translation[7]['translation'];
1065
+ $response_duplicate = $translation[5]['translation'];
1066
+ $response_invalid = $translation[6]['translation'];
1067
+
1068
+ } else {
1069
+ $response_ok = 'Thank you, your sign-up request was successful!';
1070
+ $response_duplicate = 'This Email address has already been on our subscriber list.';
1071
+ $response_invalid = 'Please insert valid Email address.';
1072
+ }
1073
+
1074
+ switch ( $subscribe_method ) {
1075
+ // default custom CMP method
1076
+ case 'cmp':
1077
+ // get subscribe list
1078
+ $subscribe_list = get_option('niteoCS_subscribers_list');
1079
 
1080
+ // if no subscribe list yet, create first item and insert it into DB
1081
+ if ( !$subscribe_list ) {
1082
+ $new_list = array();
1083
+ $new_email = array( 'id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1084
+ array_push( $new_list, $new_email );
1085
+ update_option( 'niteoCS_subscribers_list', $new_list );
1086
+ $response = array( 'status' => '1', 'message' => $response_ok);
1087
+
1088
+ } else {
1089
+ // check if email don`t already exists
1090
+ if ( !$this->niteo_in_array_r( $email, $subscribe_list, true ) ) {
1091
+ $count = count( $subscribe_list );
1092
+ $new_email = array( 'id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address, 'firstname' => $firstname, 'lastname' => $lastname );
1093
+ array_push( $subscribe_list, $new_email );
1094
+ update_option('niteoCS_subscribers_list', $subscribe_list);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1095
  $response = array( 'status' => '1', 'message' => $response_ok);
1096
+
1097
+ // if email exists return duplicate response
1098
  } else {
1099
+ $response = array( 'status' => '0', 'message' => $response_duplicate);
 
 
 
 
 
 
 
 
 
 
 
1100
  }
1101
+ }
1102
+ break;
1103
+
1104
+ // mailchimp API call
1105
+ case 'mailchimp':
1106
+ $api_key = esc_attr( get_option('niteoCS_mailchimp_apikey') );
1107
+ $list_id = esc_attr( get_option('niteoCS_mailchimp_list_selected') );
1108
+ $email = $_POST['email'];
1109
+ $status = 'subscribed'; // subscribed, cleaned, pending
1110
+
1111
+ $args = array(
1112
+ 'method' => 'PUT',
1113
+ 'headers' => array(
1114
+ 'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
1115
+ ),
1116
+ 'body' => json_encode(array(
1117
+ 'email_address' => $email,
1118
+ 'status' => $status
1119
+ ))
1120
+ );
1121
+
1122
+ $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 );
1123
+
1124
+ if ( !is_wp_error( $mailchimp ) ) {
1125
+
1126
+ $body = json_decode( $mailchimp['body'] );
1127
+
1128
+ if ( $mailchimp['response']['code'] == 200 && $body->status == $status ) {
1129
+ $response = array( 'status' => '1', 'message' => $response_ok);
 
 
 
 
1130
 
1131
  } else {
1132
+ $response = array( 'status' => '0', 'message' => 'Error ' . $mailchimp['response']['code'] . ' ' . $body->title . ': ' . $body->detail);
 
1133
  }
1134
 
1135
+ } else {
1136
+ $error = $mailchimp->get_error_message();
1137
+ $response = array( 'status' => '0', 'message' => $error);
1138
+ }
1139
 
1140
+ break;
 
 
1141
 
1142
+ default:
1143
+ break;
1144
+ }
 
 
1145
 
1146
+ // if not email, set response invalid
1147
+ } else {
1148
+ $response = array( 'status' => '0', 'message' => $response_invalid);
1149
+ }
1150
+ }
1151
 
1152
+ endif; // $check !== true
 
 
1153
 
1154
+ if ( $ajax === true ) {
1155
+ echo json_encode( $response );
1156
+ wp_die();
 
 
1157
 
1158
+ } else {
1159
+ return ( $response == '' ) ? $response : json_encode( $response );
1160
+ }
1161
+
1162
+ }
 
 
 
 
 
 
 
 
 
 
 
 
1163
 
1164
+ public function niteo_export_csv() {
1165
+ // load subscribers array
1166
+ $subscribers = get_option('niteoCS_subscribers_list');
1167
+
1168
+ if( !empty($subscribers) ) {
1169
+ $filename = 'subscribers-list-' . date('Y-m-d') . '.csv';
1170
+ header('Content-Type: text/csv');
1171
+ header('Content-Disposition: attachment;filename='.$filename);
1172
+ $fp = fopen('php://output', 'w');
1173
+ fputcsv($fp, array(__('Date','cmp-coming-soon-maintenance'),__('Email','cmp-coming-soon-maintenance')));
1174
+ foreach ($subscribers as $key => $value) {
1175
+ if ( isset( $value['ip_address'] ) ) {
1176
+ unset($subscribers[$key]['ip_address']);
1177
+ }
1178
+ if ( isset( $value['id'] ) ) {
1179
+ unset($subscribers[$key]['id']);
1180
  }
1181
 
1182
+ if ( isset( $value['timestamp'] ) ) {
1183
+ $format="Y-m-d H:i:s";
1184
+ $subscribers[$key]['timestamp'] = date_i18n($format, $subscribers[$key]['timestamp']);
1185
  }
 
1186
  }
 
 
1187
 
1188
+ foreach ( $subscribers as $key => $value ) {
1189
+ fputcsv($fp, $value, $delimiter = ',', $enclosure = '"' );
1190
+ }
1191
+ fclose($fp);
 
 
1192
  }
1193
+ die();
1194
+ }
1195
 
1196
+ public function niteo_allow_zip_mime( $existing_mimes = array() ) {
1197
+ // add your own extension here - as many as you like
1198
+ $existing_mimes['zip'] = 'application/zip';
1199
 
1200
+ // return amended array
1201
+ return $existing_mimes;
1202
+ }
1203
+
1204
+ public function niteo_remove_zip_mime( $existing_mimes = array() ) {
1205
+ // remove zip mime
1206
+ unset ($existing_mimes['zip']);
1207
+
1208
+ // return amended array
1209
+ return $existing_mimes;
1210
+ }
1211
 
1212
 
1213
+ public function cmp_admin_notice() {
1214
+ if ( isset($_GET['page']) && ($_GET['page'] == 'cmp-settings' || $_GET['page'] == 'cmp-translate' || $_GET['page'] == 'cmp-advanced') ) {
1215
+ if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
1216
+ $status = 'success';
1217
+ $message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
1218
 
1219
+ echo '<div class="notice notice-'.$status.' is-dismissible"><p>'.$message.'.</p></div>';
 
1220
  }
1221
+ }
1222
+ return;
1223
+ }
1224
 
1225
+ // convert hex to rgba
1226
+ public function hex2rgba ( $hex, $opacity ) {
1227
+ list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
1228
 
1229
+ $rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
1230
 
1231
+ return $rgba;
1232
+ }
1233
+
1234
+ // convert hex to hsl css
1235
+ public function hex2hsl( $hex, $opacity ) {
1236
+
1237
+ if ( $hex[0] != '#' ) {
1238
+ $rgba = explode( ',', $hex);
1239
+ $rgba[3] = str_replace(')', '', $rgba[3]);
1240
+ $rgba[3] = $rgba[3] - ( $opacity / 100 );
1241
+ $rgba = $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')';
1242
  return $rgba;
1243
  }
1244
 
1245
+ list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
 
1246
 
1247
+ $r = $red / 255.0;
1248
+ $g = $green / 255.0;
1249
+ $b = $blue / 255.0;
1250
+ $H = 0;
1251
+ $S = 0;
1252
+ $V = 0;
 
1253
 
1254
+ $min = min( $r, $g, $b );
1255
+ $max = max( $r, $g, $b );
1256
+ $delta = ( $max - $min );
1257
 
1258
+ $L = ( $max + $min ) / 2.0;
1259
+
1260
+ if( $delta == 0 ) {
1261
  $H = 0;
1262
  $S = 0;
1263
+ } else {
1264
+ $S = $L > 0.5 ? $delta / ( 2 - $max - $min ) : $delta / ( $max + $min );
1265
+
1266
+ $dR = ( ( ( $max - $r ) / 6) + ( $delta / 2 ) ) / $delta;
1267
+ $dG = ( ( ( $max - $g ) / 6) + ( $delta / 2 ) ) / $delta;
1268
+ $dB = ( ( ( $max - $b ) / 6) + ( $delta / 2 ) ) / $delta;
1269
+
1270
+ if ( $r == $max )
1271
+ $H = $dB - $dG;
1272
+ else if( $g == $max )
1273
+ $H = ( 1/3 ) + $dR - $dB;
1274
+ else
1275
+ $H = ( 2/3 ) + $dG - $dR;
1276
+
1277
+ if ( $H < 0 )
1278
+ $H += 1;
1279
+ if ( $H > 1 )
1280
+ $H -= 1;
1281
+ }
1282
 
1283
+ $HSL = array( 'hue' => round( ($H*360), 0 ), 'saturation'=> round( ($S*100), 0 ), 'luminosity' => round( ( $L*100 ), 0) );
1284
 
1285
+ // if color is white {
1286
+ if ( $HSL['hue'] == 0 && $HSL['saturation'] == 0) {
1287
+ $requested_lumi = $HSL['luminosity'] + $opacity;
1288
+ } else {
1289
+ $requested_lumi = $HSL['luminosity'] - $opacity;
1290
+ }
1291
+
1292
+ $requested_lumi = (int)round($requested_lumi);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1293
 
1294
+ if ( $requested_lumi > 90 ) {
1295
+
1296
+ $requested_lumi = 90;
1297
+ }
1298
 
1299
+ $HSL = 'hsl( '. $HSL['hue'] .', '.( $HSL['saturation']) .'%, '. $requested_lumi . '%)';
1300
+ return $HSL;
1301
+ }
 
 
 
 
 
1302
 
1303
+ // check if mobile
1304
+ public function isMobile() {
1305
+ if ( isset($_SERVER["HTTP_USER_AGENT"]) ) {
1306
+ 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"]);
1307
 
1308
+ } else {
1309
+ return false;
1310
  }
1311
+ }
1312
 
1313
+ // sanitize function
1314
+ public function sanitize_checkbox( $input ) {
1315
+ return ( ( isset( $input ) && true == $input ) ? '1' : '0' );
1316
+ }
1317
 
1318
+ // sanitize function
1319
+ public function niteo_sanitize_html( $html ) {
 
 
1320
 
1321
+ if ( !current_user_can( 'unfiltered_html' ) ) {
1322
+ $allowed = wp_kses_allowed_html( 'post' );
1323
+ $html = wp_kses( $html, $allowed );
1324
+ }
1325
 
1326
+ return $html;
1327
+ }
1328
 
1329
+ // public function to sort social icons
1330
+ public function sort_social($a, $b){
1331
+ if ( $a['hidden'] == $b['hidden'] ) {
1332
+ if( $a['order'] == $b['order'] ) {
1333
+ return 0;
1334
  }
1335
+ return $a['order'] < $b['order'] ? -1 : 1;
1336
+ } else {
1337
+ return $a['hidden'] > $b['hidden'] ? 1 : -1;
1338
+ }
1339
+ }
1340
+
1341
+ // public function to shift multidimensional array
1342
+ public function customShift($array, $name){
1343
+ // var_dump($array);
1344
+ foreach($array as $key => $val){ // loop all elements
1345
+ if($val['name'] == $name){ // check for id $id
1346
+ unset($array[$key]); // unset the $array with id $id
1347
+ array_unshift($array, $val); // unshift the array with $val to push in the beginning of array
1348
+ return $array; // return new $array
1349
+ }
1350
+ }
1351
+ }
1352
 
1353
+ public function get_youtube_img( $youtube_url ) {
1354
+ $youtube = preg_match('/.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/', $youtube_url, $url);
1355
 
1356
+ if ( isset( $url[7] ) && $url[7] != '') {
1357
+ $youtube_image = 'http://img.youtube.com/vi/' . $url[7] . '/hqdefault.jpg';
1358
+ return $youtube_image;
1359
+ }
1360
+ }
 
 
 
 
 
 
1361
 
1362
+ public function cmp_get_pages() {
1363
+ $page_titles = array();
1364
+ $pages = array();
1365
+ $page_ids = get_all_page_ids();
1366
 
1367
+ foreach ($page_ids as $page_id ) {
1368
+ array_push( $page_titles, get_the_title($page_id) );
 
 
 
 
 
1369
  }
1370
 
1371
+ foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
1372
+ $pages[] = array('id' => $id, 'name' => $name);
 
 
 
 
 
1373
  }
1374
 
1375
+ return $pages;
1376
+ }
 
 
1377
 
1378
+ // send json data for theme info overlay AJAX request
1379
+ public function niteo_themeinfo( ) {
 
1380
 
1381
+ // check for ajax
1382
+ if ( isset( $_POST['theme_slug'] ) ) {
1383
+ // verify nonce
1384
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
1385
+ // verify user rights
1386
+ if( !current_user_can('publish_pages') ) {
1387
+ die('Sorry, but this request is invalid');
1388
  }
1389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1390
 
1391
+ // sanitize $post
1392
+ $theme_slug = sanitize_text_field( $_POST['theme_slug'] );
1393
+ $data = array( 'result' => 'true', 'author_homepage' => $this->author_homepage, 'author' => $this->author );
1394
+
1395
+ if ( !empty( $theme_slug ) ) {
1396
+ $headers = array('Theme Name', 'Description');
1397
+ $theme_info = get_file_data(plugin_dir_path( __FILE__ ).'/themes/'. $theme_slug. '.txt', $headers, '');
1398
 
1399
+ $screenshots = array_map( 'basename', glob( plugin_dir_path( __FILE__ ) . 'img/thumbnails/'.$theme_slug.'/*' ) );
 
 
1400
 
1401
+ foreach ( $screenshots as $key => $screenshot ) {
1402
+ $screenshots[$key] = plugins_url('img/thumbnails/'.$theme_slug.'/'.$screenshot, __FILE__ );
 
 
 
 
 
 
 
 
 
 
 
1403
  }
1404
 
1405
+ $data['name'] = $theme_info[0];
1406
+ $data['description'] = $theme_info[1];
1407
+ $data['screenshots'] = $screenshots;
1408
+ }
 
 
 
 
 
 
 
 
 
 
1409
 
1410
+ echo json_encode ($data);
1411
+ wp_die();
1412
  }
1413
+ }
1414
 
1415
+ // legacy function for premium themes redirect
1416
+ public function niteo_redirect() {
1417
+ return;
1418
+ }
1419
+
1420
+ // returns array of google fonts from /inc/webfonts.php
1421
+ public function cmp_get_google_fonts() {
1422
+ $fonts = include_once wp_normalize_path( dirname( __FILE__ ) . '/inc/webfonts.php' );
1423
+ $google_fonts = json_decode( $fonts, true);
1424
+
1425
+ return $google_fonts;
1426
+ }
1427
+
1428
+ public function cmp_google_variant_title( $variant ) {
1429
+
1430
+ switch( $variant ) {
1431
+ case '100':
1432
+ return 'Thin 100';
1433
+ break;
1434
+ case '100italic':
1435
+ return 'Thin 100 Italic';
1436
+ break;
1437
+ case '200':
1438
+ return 'Extra-light 200';
1439
+ break;
1440
+ case '200italic':
1441
+ return 'Extra-light 200 Italic';
1442
+ break;
1443
+ case '300':
1444
+ return 'Light 300';
1445
+ break;
1446
+ case '300italic':
1447
+ return 'Light 300 Italic';
1448
+ break;
1449
+ case '400':
1450
+ return 'Regular 400';
1451
+ break;
1452
+ case '400italic':
1453
+ return 'Regular 400 Italic';
1454
+ break;
1455
+ case '500':
1456
+ return 'Medium 500';
1457
+ break;
1458
+ case '500italic':
1459
+ return 'Meidum 500 Italic';
1460
+ break;
1461
+ case '600':
1462
+ return 'Semi-Bold 600';
1463
+ break;
1464
+ case '600italic':
1465
+ return 'Semi-Bold 600 Italic';
1466
+ break;
1467
+ case '700':
1468
+ return 'Bold 700';
1469
+ break;
1470
+ case '700italic':
1471
+ return 'Bold 700 Italic';
1472
+ break;
1473
+ case '800':
1474
+ return 'Extra-Bold 800';
1475
+ break;
1476
+ case '800italic':
1477
+ return 'Extra-Bold Italic';
1478
+ break;
1479
+ case '900':
1480
+ return 'Black 900';
1481
+ break;
1482
+ case '900italic':
1483
+ return 'Black 900 Italic';
1484
+ break;
1485
+ case 'regular':
1486
+ return 'Regular 400';
1487
+ break;
1488
+ case 'italic':
1489
+ return 'Regular 400 Italic';
1490
+ break;
1491
+ default:
1492
+ break;
1493
  }
1494
+ }
1495
 
1496
+ // returns true if current page is in page array (blacklist or whitelist)
1497
+ // since 2.2
1498
+ public function cmp_page_filter() {
1499
+ $page_id = get_the_ID();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1500
 
1501
+ // change manually page_id to -1 if homepage is displayed
1502
+ if ( is_home() || is_front_page() ) {
1503
+ $page_id = '-1';
1504
+ }
1505
 
1506
+ switch ( get_option('niteoCS_page_filter', '0') ) {
1507
+ // disabled return true
1508
+ case '0':
1509
+ return true;
1510
+ break;
1511
 
1512
+ // whitelist
1513
+ case '1':
1514
+ $page_list = json_decode( get_option('niteoCS_page_whitelist', '[]'), true );
1515
+
1516
+ if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
1517
  return true;
 
 
1518
 
1519
+ } else {
1520
+ return false;
1521
+ }
1522
+ break;
1523
 
1524
+ // blacklist
1525
+ case '2':
1526
+ $page_list = json_decode( get_option('niteoCS_page_blacklist', '[]'), true );
 
 
 
1527
 
1528
+
1529
+ if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
1530
+ return false;
1531
 
1532
+ } else {
 
1533
  return true;
1534
  }
 
1535
 
1536
+ break;
1537
+
1538
+ default:
1539
+ return true;
1540
+ break;
1541
  }
1542
 
1543
+ return true;
1544
+ }
1545
 
1546
+ // returns true if logged in user meet CMP roles filter
1547
+ // since 2.2
1548
+ public function cmp_roles_filter() {
1549
+ $roles = json_decode( get_option('niteoCS_roles', '[]'), true );
1550
+ // push WP administrator to roles array, since it is default
1551
+ array_push( $roles, 'administrator' );
 
 
 
 
 
1552
 
1553
+ $current_user = wp_get_current_user();
1554
 
1555
+ foreach ( $current_user->roles as $role ) {
1556
+ if ( in_array( $role, $roles ) ) {
1557
+ return true;
1558
+ }
1559
+ };
1560
 
1561
+ return false;
1562
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1563
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1564
 
1565
+ public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
1566
+ if ( is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra) ) {
1567
+ if ($hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins'])) {
1568
+ $this_plugin = plugin_basename(__FILE__);
1569
+ foreach ($hook_extra['plugins'] as $key => $plugin) {
1570
+ if ($this_plugin == $plugin) {
1571
+ $this_plugin_updated = true;
1572
+ break;
1573
+ }
1574
+ }// endforeach;
1575
+ unset($key, $plugin, $this_plugin);
1576
+ if (isset($this_plugin_updated) && $this_plugin_updated === true) {
1577
+
1578
+ // migrate google analytics options
1579
+ if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
1580
+ update_option('niteoCS_analytics_status', 'google');
1581
+ }
1582
 
1583
+ // add social icons to social settings
1584
+ if ( get_option('niteoCS_socialmedia') ) {
1585
+ $niteoCS_socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
1586
+ $socialmedia = json_decode( $niteoCS_socialmedia, true );
1587
+ $update = false;
1588
+
1589
+ // add soundcloud and phone social media in 2.2 update
1590
+ if ( !$this->niteo_in_array_r( 'soundcloud', $socialmedia, true ) ) {
1591
+ $soundcloud = array(
1592
+ 'name' => 'soundcloud',
1593
+ 'url' => '',
1594
+ 'active' => '1',
1595
+ 'hidden' => '1',
1596
+ 'order' => '17',
1597
+ );
1598
+ array_push( $socialmedia, $soundcloud );
1599
+ $update = true;
1600
  }
1601
 
1602
+ // add whatsapp and phone social media in 2.3 update
1603
+ if ( !$this->niteo_in_array_r( 'whatsapp', $socialmedia, true ) ) {
1604
+ $whatsapp = array(
1605
+ 'name' => 'whatsapp',
1606
+ 'url' => '',
1607
+ 'active' => '1',
1608
+ 'hidden' => '1',
1609
+ 'order' => '18',
1610
+ );
1611
+ array_push( $socialmedia, $whatsapp );
1612
+
1613
+ $phone = array(
1614
+ 'name' => 'phone',
1615
+ 'url' => '',
1616
+ 'active' => '1',
1617
+ 'hidden' => '1',
1618
+ 'order' => '19',
1619
+ );
1620
+ array_push( $socialmedia, $phone );
1621
+ $update = true;
1622
  }
1623
 
1624
+ // add telegram social media in 2.6.6 update
1625
+ if ( !$this->niteo_in_array_r( 'telegram', $socialmedia, true ) ) {
1626
+ $telegram = array(
1627
+ 'name' => 'telegram',
1628
+ 'url' => '',
1629
+ 'active' => '1',
1630
+ 'hidden' => '1',
1631
+ 'order' => '20',
1632
+ );
1633
+ array_push( $socialmedia, $telegram );
1634
+ $update = true;
 
 
 
 
 
 
 
1635
  }
1636
 
1637
+ if ( $update == true ) {
1638
+ update_option('niteoCS_socialmedia', json_encode( $socialmedia) );
 
1639
  }
1640
+ }
1641
 
1642
+ // add new strings to translation
1643
+ if ( get_option('niteoCS_translation') ) {
1644
+ $translation = json_decode( get_option('niteoCS_translation'), true );
1645
+ if ( !isset($translation[9]) ) {
1646
+ array_push( $translation, array('id' => 9, 'string' => 'Scroll', 'translation' => 'Scroll') );
1647
+ }
1648
 
1649
+ if ( !isset($translation[10]) ) {
1650
+ array_push( $translation, array('id' => 10, 'string' => 'First Name', 'translation' => 'First Name') );
1651
+ }
1652
 
1653
+ if ( !isset($translation[11]) ) {
1654
+ array_push( $translation, array('id' => 11, 'string' => 'Last Name', 'translation' => 'Last Name') );
1655
+ }
1656
 
1657
+ update_option('niteoCS_translation', wp_json_encode($translation));
1658
+ }
 
 
1659
 
 
 
 
 
 
 
1660
 
1661
+ // check for < 1.8 version where subscriber ID was not set
1662
+ if ( get_option('niteoCS_subscribers_list') ) {
1663
+ $subscribe_list = get_option('niteoCS_subscribers_list');
1664
+
1665
+ if ( is_array($subscribe_list) && count($subscribe_list) > 0 && !array_key_exists ('id', $subscribe_list[0]) ) {
1666
+ $i = 1;
1667
+ foreach( $subscribe_list as &$sub ){
1668
+ $sub['id'] = $i;
1669
+ $sub = array('id' => $sub['id']) + $sub;
1670
+ // check if ip address is set
1671
+ if (!array_key_exists('ip_address', $sub)) {
1672
+ $sub['ip_address'] = 'nodata';
1673
+ }
1674
+ $i++;
1675
+ }
1676
+ update_option('niteoCS_subscribers_list', $subscribe_list);
1677
  }
1678
+ }
1679
 
1680
+ // delete transients for theme updates, to ensure the updates for latest cmp versions runs again
1681
+ foreach ( $this->premium_installed as $theme_slug ) {
1682
+ delete_transient( $theme_slug.'_updatecheck' );
1683
+ }
1684
+ }// endif; $this_plugin_updated
1685
+ }// endif update plugin and plugins not empty.
1686
+ }// endif; $hook_extra
1687
+ }// updatePlugin
1688
 
 
 
 
 
 
 
1689
 
1690
+ public function add_action_links ( $links ) {
1691
+ $settings = array(
1692
+ '<a href="' . admin_url( 'admin.php?page=cmp-settings' ) . '">CMP Settings</a>',
1693
+ );
1694
+ return array_merge( $settings, $links );
1695
+ }
1696
 
 
 
 
1697
 
1698
+ // returns version of selected CMP theme
1699
+ public function cmp_theme_version( $theme_slug ) {
1700
+ // if premium theme style.css exists get its version
 
1701
 
1702
+ if ( in_array( $theme_slug, $this->premium_installed ) ) {
1703
+ if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
1704
+ $version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', array('Version'), '');
1705
  }
1706
 
1707
+ } else {
1708
+ $version = $this->version;
1709
+ }
 
1710
 
1711
+ // if we have local version of theme and not in updating theme
1712
+ if ( is_array($version) ) {
1713
+ $version = $version[0];
1714
  }
1715
 
1716
+ return $version;
1717
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1718
 
1719
+ /**
1720
+ * Connect to Mailchimp via API and retrieve Mailchimp lists
1721
+ *
1722
+ * @since 2.6
1723
+ * @access public
1724
+ * @return Object
1725
+ */
1726
+ public function cmp_mailchimp_list_ajax( $apikey ) {
1727
+
1728
+ // check for ajax
1729
+ if ( isset( $_POST['params'] ) ) {
1730
+ // verify nonce
1731
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
1732
+ // verify user rights
1733
+ if( !current_user_can('publish_pages') ) {
1734
+ die('Sorry, but this request is invalid');
1735
+ }
1736
 
1737
+ // sanitize array
1738
+ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
 
 
1739
 
1740
+ // check params
1741
+ if ( !empty( $_POST['params'] ) ) {
1742
+ $params = $_POST['params'];
1743
+ }
1744
 
1745
+ $api_key = $params['apikey'];
1746
 
1747
+ $dc = substr($api_key,strpos($api_key,'-')+1); // datacenter, it is the part of your api key - us5, us8 etc
 
 
 
 
1748
 
1749
+ $args = array(
1750
+ 'headers' => array(
1751
+ 'Authorization' => 'Basic ' . base64_encode( 'user:'. $api_key )
1752
+ )
1753
+ );
1754
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1755
 
1756
+ // retrieve response from mailchimp
1757
+ $response = wp_remote_get( 'https://'.$dc.'.api.mailchimp.com/3.0/lists/', $args );
1758
+
1759
+ // if we have it, create new array with lists id and name, else push error messages into array
1760
+ if ( !is_wp_error( $response ) ) {
1761
+ $lists_array = array();
1762
+
1763
+ $body = json_decode( $response['body'], true);
1764
+
1765
+ if ( $response['response']['code'] == 200 ) {
1766
+ $lists_array['response'] = 200;
1767
+ $i = 0;
1768
+ foreach ( $body['lists'] as $list ) {
1769
+ $lists_array['lists'][$i]['id'] = $list['id'];
1770
+ $lists_array['lists'][$i]['name'] = $list['name'];
1771
+ $i++;
1772
  }
1773
 
1774
  } else {
1775
+ $lists_array['response'] = $response['response']['code'];
1776
+ $lists_array['message'] = $body['title'] . ': ' . $body['detail'];
1777
  }
1778
 
1779
+ } else {
1780
+ $lists_array['response'] = '500';
1781
+ $lists_array['message'] = $response->get_error_message();
1782
+ }
1783
 
1784
+ // json encode response
1785
+ $lists_json = json_encode( $lists_array );
1786
 
1787
+ // save it
1788
+ update_option('niteoCS_mailchimp_lists', $lists_json);
1789
 
1790
+ // delete selected old mailchimp list because we do not want it
1791
+ delete_option('niteoCS_mailchimp_list_selected');
 
1792
 
1793
+ // echo ajax result
1794
+ echo $lists_json;
1795
+ wp_die();
1796
 
1797
+ }
 
 
 
1798
 
1799
+ }
 
 
 
 
 
1800
  }
1801
 
1802
+ $cmpPlugin = new niteo_cmp();
 
 
1803
 
1804
  register_uninstall_hook( __FILE__, array('niteo_cmp', 'cmp_plugin_delete') );
1805
 
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,26 +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>
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.7.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
112
  <p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
113
 
114
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  <h4>CMP 2.7.1 update</h4>
116
  <ul>
117
  <li>Resolved issue with bypassing CMP by selected roles - reported by @bundag, thanks!</li>
themes/construct/construct-theme.php CHANGED
@@ -27,7 +27,7 @@
27
 
28
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
29
 
30
- <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.CMP_VERSION;?>" type="text/css" media="all">
31
 
32
 
33
  <style>
27
 
28
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
29
 
30
+ <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version;?>" type="text/css" media="all">
31
 
32
 
33
  <style>
themes/construct/style.css CHANGED
@@ -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;}
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/countdown-defaults.php CHANGED
@@ -20,6 +20,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 +39,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
 
20
  update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
21
  }
22
 
23
+ if (isset($_POST['niteoCS_overlay_color_'.$themeslug])) {
24
+ update_option('niteoCS_overlay_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_overlay_color_'.$themeslug]));
25
+ }
26
+
27
+ if (isset($_POST['niteoCS_overlay_opacity_'.$themeslug])) {
28
+ update_option('niteoCS_overlay_opacity['.$themeslug.']', sanitize_text_field($_POST['niteoCS_overlay_opacity_'.$themeslug]));
29
+ }
30
 
31
  if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location']) {
32
  update_option('niteoCS_social_location', sanitize_text_field($_POST['niteoCS_social_location']));
39
 
40
  $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
41
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
42
+ $overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
43
+ $overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
44
 
45
  $social_location = get_option('niteoCS_social_location', 'footer');
46
 
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/hardwork/hardwork-defaults.php CHANGED
@@ -5,15 +5,17 @@ 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,
@@ -28,9 +30,9 @@ $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,
30
 
31
  $banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
32
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
33
+ $overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
34
+ $overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0');
35
 
 
 
36
 
37
  $heading_font = array(
38
  '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
@@ -60,13 +60,11 @@ 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,7 +202,7 @@ 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,
60
  flex-grow: 10;
61
  width: 70%;
62
  max-width: 1170px;
 
63
  margin: 0 auto;
64
  }
65
 
66
 
67
 
 
68
  .graphic-logo {
69
  width: auto;
70
  max-width: 500px;
202
  }
203
 
204
  @media only screen and (max-width : 560px) {
205
+ .section {padding: 4em 1em;}
206
  .section-body {width: auto;}
207
  .graphic-logo {max-height: 200px;padding-bottom: 0;max-width: 100%;}
208
  .section-body,