Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 2.8 |
Comparing to | |
See all releases |
Code changes from version 2.7 to 2.8
- cmp-settings.php +15 -22
- css/cmp-settings-style.css +51 -4
- css/cmp-settings-style.min.css +1 -1
- css/preview-iframe.css +9 -5
- inc/class-cmp-render_html.php +224 -151
- inc/settings/settings-background.php +432 -227
- inc/settings/settings-background_effects.php +0 -64
- inc/settings/settings-slider.php +1 -1
- js/settings.js +226 -201
- js/settings.min.js +1 -1
- niteo-cmp.php +94 -61
- readme.txt +18 -1
- themes/coder.txt +6 -0
- themes/construct/style.css +1 -0
- themes/countdown/countdown-defaults.php +0 -9
- themes/countdown/countdown-settings.php +0 -15
- themes/countdown/countdown-theme.php +2 -7
- themes/hardwork/hardwork-defaults.php +7 -9
- themes/hardwork/hardwork-settings.php +15 -15
- themes/hardwork/hardwork-theme.php +3 -6
cmp-settings.php
CHANGED
@@ -6,16 +6,15 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
|
6 |
if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
|
7 |
die('Sorry, but this request is invalid');
|
8 |
}
|
9 |
-
}
|
10 |
|
11 |
-
if ( isset($_POST['select_theme']) && in_array($_POST['select_theme'], $this->theme_array)) {
|
12 |
-
update_option('niteoCS_theme', sanitize_text_field($_POST['select_theme']));
|
13 |
}
|
14 |
|
|
|
|
|
|
|
15 |
|
16 |
$themeslug = $this->cmp_selectedTheme();
|
17 |
$downloadable_themes = $this->cmp_downloadable_themes();
|
18 |
-
$font_animation = array('hardwork_premium', 'fifty', 'orbit', '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]))) {
|
@@ -528,11 +527,11 @@ add_thickbox();
|
|
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="
|
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&
|
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,9 +743,9 @@ add_thickbox();
|
|
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,13 +777,13 @@ add_thickbox();
|
|
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']);?>"
|
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,11 +839,6 @@ add_thickbox();
|
|
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 |
|
@@ -876,8 +870,7 @@ add_thickbox();
|
|
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,7 +905,7 @@ add_thickbox();
|
|
912 |
|
913 |
<?php
|
914 |
// include theme animation settings
|
915 |
-
if ( in_array($this->cmp_selectedTheme(), $
|
916 |
|
917 |
<fieldset>
|
918 |
<label for="niteoCS_heading_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Animation', 'cmp-coming-soon-maintenance');?></label></br>
|
@@ -965,7 +958,7 @@ add_thickbox();
|
|
965 |
</fieldset>
|
966 |
<?php
|
967 |
// include theme animation settings
|
968 |
-
if ( in_array($this->cmp_selectedTheme(), $
|
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,7 +973,7 @@ add_thickbox();
|
|
980 |
<?php
|
981 |
} ?>
|
982 |
|
983 |
-
<p style="margin-bottom:0"
|
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>
|
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->theme_array)) {
|
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]))) {
|
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 |
<?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 |
$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 |
require ( dirname(__FILE__) . '/inc/settings/settings-background.php' );
|
840 |
}
|
841 |
|
|
|
|
|
|
|
|
|
|
|
842 |
// special effects for premium themes
|
843 |
if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
|
844 |
|
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 |
|
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 |
</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 |
<?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>
|
css/cmp-settings-style.css
CHANGED
@@ -183,10 +183,9 @@
|
|
183 |
text-align: left
|
184 |
}
|
185 |
|
186 |
-
.cmp-coming-soon-maintenance #unsplash-media,
|
187 |
.cmp-coming-soon-maintenance .background-media td fieldset,
|
188 |
.cmp-coming-soon-maintenance .cmp-logo-switch.graphic {
|
189 |
-
|
190 |
}
|
191 |
|
192 |
.cmp-coming-soon-maintenance .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after {
|
@@ -369,6 +368,7 @@
|
|
369 |
.cmp-coming-soon-maintenance .color-preview,
|
370 |
.cmp-coming-soon-maintenance .gradient-preview,
|
371 |
.cmp-coming-soon-maintenance .pattern-wrapper {
|
|
|
372 |
background-repeat: repeat;
|
373 |
height: 200px;
|
374 |
border: 1px solid #ededed;
|
@@ -383,7 +383,8 @@
|
|
383 |
background-position: center
|
384 |
}
|
385 |
|
386 |
-
.cmp-coming-soon-maintenance .video-wrapper
|
|
|
387 |
position: relative;
|
388 |
width: 100%;
|
389 |
margin-top: 1em
|
@@ -421,7 +422,48 @@
|
|
421 |
.cmp-coming-soon-maintenance .background-media img,
|
422 |
.cmp-coming-soon-maintenance .logo-wrapper img {
|
423 |
max-width: 100%;
|
424 |
-
width: 100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
}
|
426 |
|
427 |
.cmp-coming-soon-maintenance .logo-wrapper img {
|
@@ -924,6 +966,11 @@
|
|
924 |
width: 5%
|
925 |
}
|
926 |
|
|
|
|
|
|
|
|
|
|
|
927 |
@media screen and (max-width:1450px) {
|
928 |
.cmp-coming-soon-maintenance .cmp-inputs-wrapper {
|
929 |
min-width: 70%
|
183 |
text-align: left
|
184 |
}
|
185 |
|
|
|
186 |
.cmp-coming-soon-maintenance .background-media td fieldset,
|
187 |
.cmp-coming-soon-maintenance .cmp-logo-switch.graphic {
|
188 |
+
margin-top: 1em
|
189 |
}
|
190 |
|
191 |
.cmp-coming-soon-maintenance .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after {
|
368 |
.cmp-coming-soon-maintenance .color-preview,
|
369 |
.cmp-coming-soon-maintenance .gradient-preview,
|
370 |
.cmp-coming-soon-maintenance .pattern-wrapper {
|
371 |
+
position: relative;
|
372 |
background-repeat: repeat;
|
373 |
height: 200px;
|
374 |
border: 1px solid #ededed;
|
383 |
background-position: center
|
384 |
}
|
385 |
|
386 |
+
.cmp-coming-soon-maintenance .video-yt-wrapper,
|
387 |
+
.cmp-coming-soon-maintenance .video-local-wrapper {
|
388 |
position: relative;
|
389 |
width: 100%;
|
390 |
margin-top: 1em
|
422 |
.cmp-coming-soon-maintenance .background-media img,
|
423 |
.cmp-coming-soon-maintenance .logo-wrapper img {
|
424 |
max-width: 100%;
|
425 |
+
width: 100%;
|
426 |
+
vertical-align: top;
|
427 |
+
}
|
428 |
+
|
429 |
+
.cmp-coming-soon-maintenance .background-thumb-wrapper {
|
430 |
+
position: relative;
|
431 |
+
margin: 1em 0;
|
432 |
+
overflow: hidden;
|
433 |
+
}
|
434 |
+
|
435 |
+
.cmp-coming-soon-maintenance .thumbnail-overlay {
|
436 |
+
position: absolute;
|
437 |
+
top: 0;
|
438 |
+
left: 0;
|
439 |
+
width: 100%;
|
440 |
+
height: 100%;
|
441 |
+
z-index: 1;
|
442 |
+
}
|
443 |
+
|
444 |
+
.cmp-coming-soon-maintenance .custom-gallery:not(.gallery-1):not(.gallery-2) {
|
445 |
+
display: grid;
|
446 |
+
height: auto;
|
447 |
+
grid-template-columns: 1fr 1fr 1fr;
|
448 |
+
grid-template-rows: 1fr auto;
|
449 |
+
grid-template-areas: "Big Big Big" "small-3 small-2 small-1";
|
450 |
+
grid-gap: 10px;
|
451 |
+
}
|
452 |
+
|
453 |
+
.cmp-coming-soon-maintenance .custom-gallery.gallery-3 {
|
454 |
+
grid-template-columns: 1fr 1fr!important;
|
455 |
+
grid-template-areas: "Big Big" "small-2 small-1"!important;
|
456 |
+
|
457 |
+
}
|
458 |
+
|
459 |
+
.cmp-coming-soon-maintenance .gallery-2 .big-thumb {
|
460 |
+
margin-bottom: 1em;
|
461 |
+
}
|
462 |
+
|
463 |
+
.cmp-coming-soon-maintenance .big-thumb {
|
464 |
+
grid-area: Big / Big;
|
465 |
+
overflow: hidden;
|
466 |
+
position: relative;
|
467 |
}
|
468 |
|
469 |
.cmp-coming-soon-maintenance .logo-wrapper img {
|
966 |
width: 5%
|
967 |
}
|
968 |
|
969 |
+
.cmp-coming-soon-maintenance .constellation,
|
970 |
+
.cmp-coming-soon-maintenance #subscribe-3rdparty fieldset{
|
971 |
+
margin-top: 1em;
|
972 |
+
}
|
973 |
+
|
974 |
@media screen and (max-width:1450px) {
|
975 |
.cmp-coming-soon-maintenance .cmp-inputs-wrapper {
|
976 |
min-width: 70%
|
css/cmp-settings-style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cmp-coming-soon-maintenance{overflow-x:hidden}.no-margin{margin:0}.cmp-coming-soon-maintenance .cmp-settings-wrapper{position:relative;margin-top:1em}.cmp-coming-soon-maintenance .wrapper-disabled{opacity:.4}.cmp-coming-soon-maintenance .comingsoon-error,.cmp-coming-soon-maintenance .comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.cmp-coming-soon-maintenance .comingsoon-success{border-left:4px solid #00d221}.cmp-coming-soon-maintenance .padding-bottom{padding-bottom:10px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single,.cmp-coming-soon-maintenance input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.cmp-coming-soon-maintenance .select2-container .select2-selection--single{height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.cmp-coming-soon-maintenance .select2-container:not(.select2-container--open){width:100%!important}.cmp-coming-soon-maintenance input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}.cmp-coming-soon-maintenance input[type=text],.cmp-coming-soon-maintenance textarea{width:100%}.cmp-coming-soon-maintenance #niteoCS_countdown_redirect,.cmp-coming-soon-maintenance #niteoCS_countdown_text,.cmp-coming-soon-maintenance .table-wrapper.content,.cmp-coming-soon-maintenance .table-wrapper.install,.cmp-coming-soon-maintenance .table-wrapper.seo,.cmp-coming-soon-maintenance .table-wrapper.theme-setup{display:none}.cmp-coming-soon-maintenance .wp-upload-form.cmp{padding:4em;display:block}.cmp-coming-soon-maintenance .cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-coming-soon-maintenance .cmp-status .active{background-color:#ddd}.cmp-coming-soon-maintenance .redirect{margin-bottom:0}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .table-wrapper,.cmp-coming-soon-maintenance .translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-coming-soon-maintenance div.custom_css{padding-bottom:2em;padding-right:3em;background:#fff;border:1px solid #dedede}.cmp-coming-soon-maintenance .CodeMirror-wrap{border-right:1px solid #dedede}.cmp-coming-soon-maintenance .custom_css .cmp-submit{padding-left:1em;border-top:1px solid #dedede;padding-top:2em}.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation input,.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation textarea{width:100%}.cmp-coming-soon-maintenance .cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.cmp-coming-soon-maintenance .table-wrapper.closed table,.cmp-coming-soon-maintenance .translate-settings tfoot{display:none}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.cmp-coming-soon-maintenance .custom_css h3,.cmp-coming-soon-maintenance .table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}.cmp-coming-soon-maintenance #unsplash-media,.cmp-coming-soon-maintenance .background-media td fieldset,.cmp-coming-soon-maintenance .cmp-logo-switch.graphic{padding-top:1em}.cmp-coming-soon-maintenance .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cmp-coming-soon-maintenance #niteoCS-text-logo,.cmp-coming-soon-maintenance .theme-title,.cmp-coming-soon-maintenance th label{font-weight:600}.cmp-coming-soon-maintenance .table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.cmp-coming-soon-maintenance .table-wrapper h4{margin:0}.cmp-coming-soon-maintenance .table-wrapper table{padding:1em;height:auto;width:90%}.cmp-coming-soon-maintenance .table-wrapper .theme-selector{width:100%}.cmp-coming-soon-maintenance .table-wrapper select{margin-bottom:10px;width:100%}.cmp-coming-soon-maintenance .table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .table-wrapper td.theme-selector{max-width:100%}.cmp-coming-soon-maintenance .table-wrapper th{vertical-align:top;width:180px;text-align:left}.cmp-coming-soon-maintenance #delete-banner,.cmp-coming-soon-maintenance #delete-favicon,.cmp-coming-soon-maintenance #delete-logo,.cmp-coming-soon-maintenance #delete-video-thumb{display:none}.cmp-coming-soon-maintenance .social-media{margin-top:0;margin-bottom:3em}.cmp-coming-soon-maintenance .social-inputs{position:relative}.cmp-coming-soon-maintenance .social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}.cmp-coming-soon-maintenance #niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.cmp-coming-soon-maintenance .social-description{margin-top:0}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(2){left:62px}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(3){left:148px}.cmp-coming-soon-maintenance .social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.cmp-coming-soon-maintenance .social-media i{font-size:2.45em;cursor:pointer}.cmp-coming-soon-maintenance .social-media i.active{color:#d54e21}.cmp-coming-soon-maintenance .social-inputs li{display:none;width:100%}.cmp-coming-soon-maintenance .social-inputs li.active{display:inline-block}.cmp-coming-soon-maintenance #custom_content_font,.cmp-coming-soon-maintenance #custom_headings_font,.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .unsplash-feed{display:none}.cmp-coming-soon-maintenance .social-inputs p{position:relative;padding-left:50px;height:50px}.cmp-coming-soon-maintenance .social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.cmp-coming-soon-maintenance .theme-details,.cmp-coming-soon-maintenance .toggle{cursor:pointer}.cmp-coming-soon-maintenance .social-inputs label{padding-left:100px}.cmp-coming-soon-maintenance .social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}.cmp-coming-soon-maintenance .color-preview,.cmp-coming-soon-maintenance .gradient-preview,.cmp-coming-soon-maintenance .pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.cmp-coming-soon-maintenance .theme-overlay .screenshot,.cmp-coming-soon-maintenance .thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.cmp-coming-soon-maintenance .video-wrapper{position:relative;width:100%;margin-top:1em}.cmp-coming-soon-maintenance #add-pattern{margin-bottom:1em}.cmp-coming-soon-maintenance .info{font-size:12px}.cmp-coming-soon-maintenance .nav-tab i{padding-right:3px}.cmp-coming-soon-maintenance .banner-wrapper,.cmp-coming-soon-maintenance .favicon-wrapper,.cmp-coming-soon-maintenance .logo-wrapper{margin:1em 0}.cmp-coming-soon-maintenance .favicon-wrapper img,.cmp-coming-soon-maintenance .logo-wrapper img{background-color:#efefef;padding:1em}.cmp-coming-soon-maintenance .favicon-wrapper img{max-width:32px}.cmp-coming-soon-maintenance .background-media img,.cmp-coming-soon-maintenance .logo-wrapper img{max-width:100%;width:100%}.cmp-coming-soon-maintenance .logo-wrapper img{max-height:150px;width:auto}.cmp-coming-soon-maintenance #font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}.cmp-coming-soon-maintenance #heading-example{border-bottom:none;line-height:1.5;padding:0}.cmp-coming-soon-maintenance .font-selector td:first-of-type{padding-bottom:2em}.cmp-coming-soon-maintenance .font-selector fieldset{padding:.5em 0}.cmp-coming-soon-maintenance .theme-wrapper{display:inline-block;margin:2em 1em 2em 0;width:calc(33.33% - 1.5em + 6px);text-align:center;border:1px solid #efefef;border-radius:6px;position:relative}.cmp-coming-soon-maintenance .theme-wrapper:nth-of-type(3n){margin-right:0}.cmp-coming-soon-maintenance .theme-wrapper.active{background-color:#ddd}.cmp-coming-soon-maintenance .thumbnail-holder{width:100%;border-top-left-radius:5px;border-top-right-radius:5px}.cmp-coming-soon-maintenance .thumbnail-holder::before{content:'';display:block;padding-top:56.25%;-webkit-transition:background-color .1s;transition:background-color .1s;border-top-left-radius:5px;border-top-right-radius:5px}.cmp-coming-soon-maintenance .theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.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)}}
|
1 |
+
.cmp-coming-soon-maintenance{overflow-x:hidden}.no-margin{margin:0}.cmp-coming-soon-maintenance .cmp-settings-wrapper{position:relative;margin-top:1em}.cmp-coming-soon-maintenance .wrapper-disabled{opacity:.4}.cmp-coming-soon-maintenance .comingsoon-error,.cmp-coming-soon-maintenance .comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.cmp-coming-soon-maintenance .comingsoon-success{border-left:4px solid #00d221}.cmp-coming-soon-maintenance .padding-bottom{padding-bottom:10px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single,.cmp-coming-soon-maintenance input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.cmp-coming-soon-maintenance .select2-container .select2-selection--single{height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.cmp-coming-soon-maintenance .select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.cmp-coming-soon-maintenance .select2-container:not(.select2-container--open){width:100%!important}.cmp-coming-soon-maintenance input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}.cmp-coming-soon-maintenance input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}.cmp-coming-soon-maintenance input[type=text],.cmp-coming-soon-maintenance textarea{width:100%}.cmp-coming-soon-maintenance #niteoCS_countdown_redirect,.cmp-coming-soon-maintenance #niteoCS_countdown_text,.cmp-coming-soon-maintenance .table-wrapper.content,.cmp-coming-soon-maintenance .table-wrapper.install,.cmp-coming-soon-maintenance .table-wrapper.seo,.cmp-coming-soon-maintenance .table-wrapper.theme-setup{display:none}.cmp-coming-soon-maintenance .wp-upload-form.cmp{padding:4em;display:block}.cmp-coming-soon-maintenance .cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-coming-soon-maintenance .cmp-status .active{background-color:#ddd}.cmp-coming-soon-maintenance .redirect{margin-bottom:0}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .table-wrapper,.cmp-coming-soon-maintenance .translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-coming-soon-maintenance div.custom_css{padding-bottom:2em;padding-right:3em;background:#fff;border:1px solid #dedede}.cmp-coming-soon-maintenance .CodeMirror-wrap{border-right:1px solid #dedede}.cmp-coming-soon-maintenance .custom_css .cmp-submit{padding-left:1em;border-top:1px solid #dedede;padding-top:2em}.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation input,.cmp-coming-soon-maintenance .cmp-inputs-wrapper .translation textarea{width:100%}.cmp-coming-soon-maintenance .cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.cmp-coming-soon-maintenance .table-wrapper.closed table,.cmp-coming-soon-maintenance .translate-settings tfoot{display:none}.cmp-coming-soon-maintenance .help-settings,.cmp-coming-soon-maintenance .subscribers-settings,.cmp-coming-soon-maintenance .translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.cmp-coming-soon-maintenance .custom_css h3,.cmp-coming-soon-maintenance .table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}.cmp-coming-soon-maintenance .background-media td fieldset,.cmp-coming-soon-maintenance .cmp-logo-switch.graphic{margin-top:1em}.cmp-coming-soon-maintenance .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cmp-coming-soon-maintenance #niteoCS-text-logo,.cmp-coming-soon-maintenance .theme-title,.cmp-coming-soon-maintenance th label{font-weight:600}.cmp-coming-soon-maintenance .table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.cmp-coming-soon-maintenance .table-wrapper h4{margin:0}.cmp-coming-soon-maintenance .table-wrapper table{padding:1em;height:auto;width:90%}.cmp-coming-soon-maintenance .table-wrapper .theme-selector{width:100%}.cmp-coming-soon-maintenance .table-wrapper select{margin-bottom:10px;width:100%}.cmp-coming-soon-maintenance .table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .table-wrapper td.theme-selector{max-width:100%}.cmp-coming-soon-maintenance .table-wrapper th{vertical-align:top;width:180px;text-align:left}.cmp-coming-soon-maintenance #delete-banner,.cmp-coming-soon-maintenance #delete-favicon,.cmp-coming-soon-maintenance #delete-logo,.cmp-coming-soon-maintenance #delete-video-thumb{display:none}.cmp-coming-soon-maintenance .social-media{margin-top:0;margin-bottom:3em}.cmp-coming-soon-maintenance .social-inputs{position:relative}.cmp-coming-soon-maintenance .social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}.cmp-coming-soon-maintenance #niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.cmp-coming-soon-maintenance .social-description{margin-top:0}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(2){left:62px}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(3){left:148px}.cmp-coming-soon-maintenance .social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.cmp-coming-soon-maintenance .social-media i{font-size:2.45em;cursor:pointer}.cmp-coming-soon-maintenance .social-media i.active{color:#d54e21}.cmp-coming-soon-maintenance .social-inputs li{display:none;width:100%}.cmp-coming-soon-maintenance .social-inputs li.active{display:inline-block}.cmp-coming-soon-maintenance #custom_content_font,.cmp-coming-soon-maintenance #custom_headings_font,.cmp-coming-soon-maintenance #unsplash_img,.cmp-coming-soon-maintenance .unsplash-feed{display:none}.cmp-coming-soon-maintenance .social-inputs p{position:relative;padding-left:50px;height:50px}.cmp-coming-soon-maintenance .social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.cmp-coming-soon-maintenance .theme-details,.cmp-coming-soon-maintenance .toggle{cursor:pointer}.cmp-coming-soon-maintenance .social-inputs label{padding-left:100px}.cmp-coming-soon-maintenance .social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}.cmp-coming-soon-maintenance .color-preview,.cmp-coming-soon-maintenance .gradient-preview,.cmp-coming-soon-maintenance .pattern-wrapper{position:relative;background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.cmp-coming-soon-maintenance .theme-overlay .screenshot,.cmp-coming-soon-maintenance .thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.cmp-coming-soon-maintenance .video-local-wrapper,.cmp-coming-soon-maintenance .video-yt-wrapper{position:relative;width:100%;margin-top:1em}.cmp-coming-soon-maintenance #add-pattern{margin-bottom:1em}.cmp-coming-soon-maintenance .info{font-size:12px}.cmp-coming-soon-maintenance .nav-tab i{padding-right:3px}.cmp-coming-soon-maintenance .banner-wrapper,.cmp-coming-soon-maintenance .favicon-wrapper,.cmp-coming-soon-maintenance .logo-wrapper{margin:1em 0}.cmp-coming-soon-maintenance .favicon-wrapper img,.cmp-coming-soon-maintenance .logo-wrapper img{background-color:#efefef;padding:1em}.cmp-coming-soon-maintenance .favicon-wrapper img{max-width:32px}.cmp-coming-soon-maintenance .background-media img,.cmp-coming-soon-maintenance .logo-wrapper img{max-width:100%;width:100%;vertical-align:top}.cmp-coming-soon-maintenance .background-thumb-wrapper{position:relative;margin:1em 0;overflow:hidden}.cmp-coming-soon-maintenance .thumbnail-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.cmp-coming-soon-maintenance .custom-gallery:not(.gallery-1):not(.gallery-2){display:grid;height:auto;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr auto;grid-template-areas:"Big Big Big" "small-3 small-2 small-1";grid-gap:10px}.cmp-coming-soon-maintenance .custom-gallery.gallery-3{grid-template-columns:1fr 1fr!important;grid-template-areas:"Big Big" "small-2 small-1"!important}.cmp-coming-soon-maintenance .gallery-2 .big-thumb{margin-bottom:1em}.cmp-coming-soon-maintenance .big-thumb{grid-area:Big/Big;overflow:hidden;position:relative}.cmp-coming-soon-maintenance .logo-wrapper img{max-height:150px;width:auto}.cmp-coming-soon-maintenance #font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}.cmp-coming-soon-maintenance #heading-example{border-bottom:none;line-height:1.5;padding:0}.cmp-coming-soon-maintenance .font-selector td:first-of-type{padding-bottom:2em}.cmp-coming-soon-maintenance .font-selector fieldset{padding:.5em 0}.cmp-coming-soon-maintenance .theme-wrapper{display:inline-block;margin:2em 1em 2em 0;width:calc(33.33% - 1.5em + 6px);text-align:center;border:1px solid #efefef;border-radius:6px;position:relative}.cmp-coming-soon-maintenance .theme-wrapper:nth-of-type(3n){margin-right:0}.cmp-coming-soon-maintenance .theme-wrapper.active{background-color:#ddd}.cmp-coming-soon-maintenance .thumbnail-holder{width:100%;border-top-left-radius:5px;border-top-right-radius:5px}.cmp-coming-soon-maintenance .thumbnail-holder::before{content:'';display:block;padding-top:56.25%;-webkit-transition:background-color .1s;transition:background-color .1s;border-top-left-radius:5px;border-top-right-radius:5px}.cmp-coming-soon-maintenance .theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.95)}.cmp-coming-soon-maintenance .toggle,.cmp-coming-soon-maintenance .toggle-wrapper{display:inline-block}.cmp-coming-soon-maintenance .theme-title{float:left;text-transform:uppercase}.cmp-coming-soon-maintenance .theme-version{float:right}.cmp-coming-soon-maintenance .theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.cmp-coming-soon-maintenance .theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.cmp-coming-soon-maintenance .theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px 10px 5px 5px;height:2em;background:#656565;line-height:2em;color:#fff}.cmp-coming-soon-maintenance .active .theme-inputs{background:#27ae60}.cmp-coming-soon-maintenance .theme-inputs .italic{font-style:italic}.cmp-coming-soon-maintenance .theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-coming-soon-maintenance .cmp-button,.cmp-coming-soon-maintenance .cmp-preview,.cmp-coming-soon-maintenance .theme-wrapper .button{height:28px;line-height:28px;padding:0 10px;min-width:80px;border-radius:3px;color:#fff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;box-shadow:none;-webkit-box-shadow:none;text-shadow:none;text-transform:uppercase}.cmp-coming-soon-maintenance .cmp-button.submit,.cmp-coming-soon-maintenance .theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.cmp-coming-soon-maintenance .theme-wrapper a.button:focus,.cmp-coming-soon-maintenance .theme-wrapper a.button:visited{background:0 0;-webkit-box-shadow:none;box-shadow:none}.cmp-coming-soon-maintenance .theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-coming-soon-maintenance .cmp-button.submit:focus,.cmp-coming-soon-maintenance .cmp-button.submit:hover,.cmp-coming-soon-maintenance .theme-actions .activate:focus,.cmp-coming-soon-maintenance .theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.cmp-coming-soon-maintenance .theme-wrapper .button{border:2px solid #fff!important;background:0 0;width:180px;line-height:2.5em;height:3em}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]{position:relative;background:0 0;border:none;outline:0;-webkit-box-shadow:none;box-shadow:none}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]::before{content:none}.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select input[type=radio]::after{font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.cmp-coming-soon-maintenance .theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.cmp-coming-soon-maintenance .theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.cmp-coming-soon-maintenance .theme-wrapper .button:hover,.cmp-coming-soon-maintenance .theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.cmp-coming-soon-maintenance .selected.button,.cmp-coming-soon-maintenance .theme-wrapper .button.theme-select:hover input[type=radio]::after{color:#23282d!important}.cmp-coming-soon-maintenance .theme-wrapper .theme-preview,.cmp-coming-soon-maintenance .theme-wrapper .theme-purchase,.cmp-coming-soon-maintenance .theme-wrapper .theme-select{margin-bottom:5px}.cmp-coming-soon-maintenance .theme-wrapper .theme-select.selected{background-color:#32b2ff}.cmp-coming-soon-maintenance .theme-wrapper .theme-details.button{line-height:0}.cmp-coming-soon-maintenance .cmp-preview{background-color:#2485bf!important}.cmp-coming-soon-maintenance .cmp-preview:active,.cmp-coming-soon-maintenance .cmp-preview:hover{background-color:#32b2ff!important}.cmp-coming-soon-maintenance .theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.cmp-coming-soon-maintenance .theme-info .theme-purchase:focus,.cmp-coming-soon-maintenance .theme-info .theme-purchase:hover{background-color:#34495e}.cmp-coming-soon-maintenance .button i{margin-right:5px}.cmp-coming-soon-maintenance .theme-purchase a,.cmp-coming-soon-maintenance .theme-purchase a:hover,.cmp-coming-soon-maintenance .theme-purchase a:visited{color:#fff;text-decoration:none}.cmp-coming-soon-maintenance p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.cmp-coming-soon-maintenance .theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.cmp-coming-soon-maintenance .fifty-layout input:checked+img,.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav div:hover{opacity:1}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav .left{float:left}.cmp-coming-soon-maintenance .theme-overlay .screenshots-nav .right{float:right}.cmp-coming-soon-maintenance .theme-description ul{list-style:none;padding-left:2em}.cmp-coming-soon-maintenance .theme-description h4,.cmp-coming-soon-maintenance .theme-description li{font-size:13px}.cmp-coming-soon-maintenance .theme-description .supported i{color:green}.cmp-coming-soon-maintenance .theme-description .not-supported i{color:red}.cmp-coming-soon-maintenance .wp-list-table .column-id{width:5%}.cmp-coming-soon-maintenance .cmp-status{margin-bottom:3em}.cmp-coming-soon-maintenance .toggle{position:relative;width:200px;height:30px;font-weight:600;background:0 0;border:2px solid #f1f1f1;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-radius:15px}.cmp-coming-soon-maintenance .toggle:after,.cmp-coming-soon-maintenance .toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.cmp-coming-soon-maintenance input[type=checkbox].toggle-checkbox{display:none}.cmp-coming-soon-maintenance .toggle_handler{display:inline-block;position:relative;z-index:1;background:#c0392b;width:90px;height:24px;top:3px;left:5px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-radius:10px 0 0 10px}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.cmp-coming-soon-maintenance .toggle-wrapper:hover .toggle_handler{background:#e74c3c}.cmp-coming-soon-maintenance .toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.cmp-coming-soon-maintenance .toggle:before{content:"Disabled";left:22px;color:#fff}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle:before,.cmp-coming-soon-maintenance .toggle:after{color:#23282d}.cmp-coming-soon-maintenance .toggle:after{content:"Enabled";right:26px}.cmp-coming-soon-maintenance .toggle-checkbox:checked+.toggle:after{color:#fff}.cmp-coming-soon-maintenance .fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.cmp-coming-soon-maintenance .fifty-layout input{visibility:hidden;position:absolute;margin:0}.cmp-coming-soon-maintenance .fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper{display:inline-block;width:calc(100% - 6em - 920px);max-width:350px;min-width:300px;margin-left:1em;padding-top:0;vertical-align:top;text-align:center}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.cmp-coming-soon-maintenance .widget.donate img{max-width:50px}.cmp-coming-soon-maintenance .widget.donate img.niteo-logo{max-width:120px}.cmp-coming-soon-maintenance .cmp-rate-us .button,.cmp-coming-soon-maintenance .cmp-rate-us a{display:block;text-align:center}.cmp-coming-soon-maintenance .cmp-rate-us a{padding:1em 0}.cmp-coming-soon-maintenance .cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-coming-soon-maintenance .cmp-rate-us form{text-align:center}.cmp-coming-soon-maintenance .subscribers .column-id{width:5%}.cmp-coming-soon-maintenance #subscribe-3rdparty fieldset,.cmp-coming-soon-maintenance .constellation{margin-top:1em}@media screen and (max-width:1450px){.cmp-coming-soon-maintenance .cmp-inputs-wrapper{min-width:70%}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.cmp-coming-soon-maintenance .theme-wrapper,.cmp-coming-soon-maintenance .theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-coming-soon-maintenance .cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.cmp-coming-soon-maintenance .theme-wrapper,.cmp-coming-soon-maintenance .theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.cmp-coming-soon-maintenance .table-wrapper th{display:block}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.cmp-coming-soon-maintenance .table-wrapper table{width:100%}.cmp-coming-soon-maintenance .table-wrapper th{width:140px}}@media screen and (max-width:782px){.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-coming-soon-maintenance .cmp-inputs-wrapper,.cmp-coming-soon-maintenance .cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-coming-soon-maintenance .cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.cmp-coming-soon-maintenance .theme-overlay .theme-info,.cmp-coming-soon-maintenance .theme-overlay .theme-screenshots{width:100%;float:none}.cmp-coming-soon-maintenance input[type=text],.cmp-coming-soon-maintenance textarea{font-size:13px}}@media screen and (max-width:560px){.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(2){left:50px}.cmp-coming-soon-maintenance .social-inputs .label:nth-of-type(3){left:105px}.cmp-coming-soon-maintenance .social-inputs p i{top:22px}.cmp-coming-soon-maintenance .social-inputs input[type=checkbox]{top:28px;left:53px}.cmp-coming-soon-maintenance .social-inputs label{padding-left:55px}.cmp-coming-soon-maintenance .social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}
|
css/preview-iframe.css
CHANGED
@@ -63,7 +63,7 @@ h3 {
|
|
63 |
#preview-customize {
|
64 |
position: fixed;
|
65 |
z-index: 11000;
|
66 |
-
width:
|
67 |
height: 100%;
|
68 |
left: 100%;
|
69 |
top: 0;
|
@@ -77,8 +77,8 @@ h3 {
|
|
77 |
}
|
78 |
|
79 |
.open #preview-customize {
|
80 |
-
-webkit-transform: translate3d(-
|
81 |
-
transform: translate3d(-
|
82 |
}
|
83 |
|
84 |
.customize-content {
|
@@ -89,11 +89,11 @@ h3 {
|
|
89 |
}
|
90 |
|
91 |
.thumbnail {
|
92 |
-
padding: 5px;
|
93 |
border: 1px solid #e0e0e0;
|
94 |
border-radius: 5px;
|
95 |
display: inline-block;
|
96 |
-
width: calc(
|
97 |
margin-right: 5px;
|
98 |
margin-bottom: 6px;
|
99 |
text-align: center;
|
@@ -101,6 +101,10 @@ padding: 5px;
|
|
101 |
font-weight: 600;
|
102 |
}
|
103 |
|
|
|
|
|
|
|
|
|
104 |
.customize-content img {
|
105 |
max-width: 100%;
|
106 |
border-radius: 5px;
|
63 |
#preview-customize {
|
64 |
position: fixed;
|
65 |
z-index: 11000;
|
66 |
+
width: 50vw;
|
67 |
height: 100%;
|
68 |
left: 100%;
|
69 |
top: 0;
|
77 |
}
|
78 |
|
79 |
.open #preview-customize {
|
80 |
+
-webkit-transform: translate3d(-50vw,0,0);
|
81 |
+
transform: translate3d(-50vw,0,0);
|
82 |
}
|
83 |
|
84 |
.customize-content {
|
89 |
}
|
90 |
|
91 |
.thumbnail {
|
92 |
+
padding: 5px;
|
93 |
border: 1px solid #e0e0e0;
|
94 |
border-radius: 5px;
|
95 |
display: inline-block;
|
96 |
+
width: calc(34% - 27px);
|
97 |
margin-right: 5px;
|
98 |
margin-bottom: 6px;
|
99 |
text-align: center;
|
101 |
font-weight: 600;
|
102 |
}
|
103 |
|
104 |
+
.background-selector .thumbnail {
|
105 |
+
max-width: 140px;
|
106 |
+
}
|
107 |
+
|
108 |
.customize-content img {
|
109 |
max-width: 100%;
|
110 |
border-radius: 5px;
|
inc/class-cmp-render_html.php
CHANGED
@@ -7,7 +7,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
7 |
class cmp_render_html extends niteo_cmp {
|
8 |
|
9 |
// Render Background
|
10 |
-
public function cmp_background( $niteoCS_banner, $themeslug
|
11 |
$size = $this->isMobile() ? 'large' : 'full';
|
12 |
$html = '';
|
13 |
// change background to default image, if image preview background is set
|
@@ -21,6 +21,7 @@ class cmp_render_html extends niteo_cmp {
|
|
21 |
case 'orbit':
|
22 |
case 'frame':
|
23 |
case 'eclipse':
|
|
|
24 |
// default image
|
25 |
$niteoCS_banner = '2';
|
26 |
break;
|
@@ -209,16 +210,16 @@ class cmp_render_html extends niteo_cmp {
|
|
209 |
break;
|
210 |
}
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
|
216 |
return $html;
|
217 |
}
|
218 |
|
219 |
|
220 |
// render slider
|
221 |
-
public function cmp_slider( $themeslug
|
222 |
|
223 |
// change to background if preview background is set
|
224 |
if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
|
@@ -361,20 +362,64 @@ class cmp_render_html extends niteo_cmp {
|
|
361 |
} ?>
|
362 |
</div>
|
363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
</div>
|
365 |
|
366 |
<div class="prev"></div>
|
367 |
<div class="next"></div>
|
368 |
|
369 |
<?php
|
370 |
-
// render overlay image if required
|
371 |
-
if ( $overlay === true ) {
|
372 |
-
echo '<div class="background-overlay"></div>';
|
373 |
-
}
|
374 |
|
375 |
return;
|
376 |
}
|
377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
// render Social Icons
|
379 |
public function cmp_social_icons( $mode = 'icon', $title = false, $themeslug = false ) {
|
380 |
|
@@ -489,6 +534,7 @@ class cmp_render_html extends niteo_cmp {
|
|
489 |
if ( isset( $_GET['theme'] ) ) {
|
490 |
switch ( $_GET['theme'] ) {
|
491 |
case 'eclipse':
|
|
|
492 |
$niteoCS_subscribe_label = 'SUBSCRIBE US';
|
493 |
break;
|
494 |
default:
|
@@ -681,6 +727,7 @@ class cmp_render_html extends niteo_cmp {
|
|
681 |
break;
|
682 |
|
683 |
case 'fifty':
|
|
|
684 |
return '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
|
685 |
break;
|
686 |
|
@@ -709,37 +756,45 @@ class cmp_render_html extends niteo_cmp {
|
|
709 |
**/
|
710 |
public function cmp_get_title( $class = '' ) {
|
711 |
global $allowedposttags;
|
|
|
712 |
|
|
|
713 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
714 |
-
$
|
715 |
|
716 |
-
switch ( $
|
717 |
case 'hardwork':
|
718 |
case 'hardwork_premium':
|
719 |
case 'fifty':
|
720 |
-
|
721 |
break;
|
722 |
|
723 |
case 'eclipse':
|
724 |
-
|
725 |
break;
|
726 |
|
727 |
case 'orbit':
|
728 |
-
|
729 |
break;
|
730 |
|
731 |
case 'stylo':
|
732 |
-
|
|
|
|
|
|
|
|
|
733 |
break;
|
734 |
|
735 |
default:
|
736 |
-
return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
|
737 |
break;
|
738 |
}
|
739 |
|
740 |
-
} else {
|
741 |
-
return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
|
742 |
}
|
|
|
|
|
|
|
|
|
|
|
743 |
}
|
744 |
|
745 |
/**
|
@@ -810,9 +865,9 @@ class cmp_render_html extends niteo_cmp {
|
|
810 |
ob_start();
|
811 |
|
812 |
// add blur effect if enabled
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
<!-- blur effect -->
|
817 |
<style>
|
818 |
#background-image,.slide-background,.video-banner {filter:blur(<?php echo esc_attr($blur);?>px);transform:scale(1.1);}
|
@@ -830,29 +885,33 @@ class cmp_render_html extends niteo_cmp {
|
|
830 |
</style>
|
831 |
|
832 |
<?php
|
833 |
-
|
|
|
834 |
|
835 |
-
|
836 |
-
<!-- constellation effect -->
|
837 |
-
<style>
|
838 |
-
.particles-js-canvas-el {position: absolute; top:0; left:0;}
|
839 |
-
<?php
|
840 |
-
switch ( $themeslug ) {
|
841 |
-
case 'frame': ?>
|
842 |
-
.particles-js-canvas-el {z-index: -1;}
|
843 |
-
#background-image, .video-banner {z-index: -3;}
|
844 |
-
.background-overlay {z-index: -2;}
|
845 |
-
<?php
|
846 |
-
break;
|
847 |
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
856 |
}
|
857 |
|
858 |
$css = ob_get_clean();
|
@@ -916,8 +975,8 @@ class cmp_render_html extends niteo_cmp {
|
|
916 |
|
917 |
}
|
918 |
|
919 |
-
// theme specific function after init
|
920 |
<?php
|
|
|
921 |
switch ( $themeslug ) {
|
922 |
case 'fifty': ?>
|
923 |
var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
|
@@ -965,6 +1024,18 @@ class cmp_render_html extends niteo_cmp {
|
|
965 |
}
|
966 |
// video
|
967 |
$source = get_option('niteoCS_banner_video['.$themeslug.']');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
|
969 |
switch ( $source ) {
|
970 |
case 'YouTube':
|
@@ -1067,8 +1138,8 @@ class cmp_render_html extends niteo_cmp {
|
|
1067 |
$time = get_option('niteoCS_redirect_time'); ?>
|
1068 |
<script>
|
1069 |
setTimeout(function() {
|
1070 |
-
window.location.href = "<?php echo esc_url($url);?>";
|
1071 |
-
}, <?php echo esc_attr($time * 1000);?>);
|
1072 |
</script>
|
1073 |
<?php
|
1074 |
}
|
@@ -1102,114 +1173,116 @@ class cmp_render_html extends niteo_cmp {
|
|
1102 |
|
1103 |
|
1104 |
// special effects
|
1105 |
-
$
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
"enable": true,
|
1161 |
-
"distance": 120,
|
1162 |
-
"color": "<?php echo esc_attr( get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff') );?>",
|
1163 |
-
"opacity": 0.4,
|
1164 |
-
"width": 1
|
1165 |
-
},
|
1166 |
-
},
|
1167 |
-
"interactivity": {
|
1168 |
-
"detect_on": "canvas",
|
1169 |
-
"events": {
|
1170 |
-
"onhover": {
|
1171 |
-
"enable": true,
|
1172 |
-
"mode": "grab"
|
1173 |
-
},
|
1174 |
-
"onclick": {
|
1175 |
-
"enable": false
|
1176 |
-
},
|
1177 |
-
"resize": true
|
1178 |
-
},
|
1179 |
-
"modes": {
|
1180 |
-
"grab": {
|
1181 |
-
"distance": 140,
|
1182 |
"line_linked": {
|
1183 |
-
"
|
1184 |
-
|
|
|
|
|
|
|
|
|
1185 |
},
|
1186 |
-
"
|
1187 |
-
"
|
1188 |
-
"
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1199 |
},
|
1200 |
-
"
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
break;
|
1210 |
-
|
1211 |
-
default:
|
1212 |
-
break;
|
1213 |
}
|
1214 |
|
1215 |
return false;
|
@@ -1231,7 +1304,7 @@ class cmp_render_html extends niteo_cmp {
|
|
1231 |
|
1232 |
$form_id = get_option('niteoCS_contact_form_id', '');
|
1233 |
|
1234 |
-
switch ($form_type) {
|
1235 |
case 'cf7':
|
1236 |
|
1237 |
$replace = array('<p>', '</p>' );
|
7 |
class cmp_render_html extends niteo_cmp {
|
8 |
|
9 |
// Render Background
|
10 |
+
public function cmp_background( $niteoCS_banner, $themeslug ) {
|
11 |
$size = $this->isMobile() ? 'large' : 'full';
|
12 |
$html = '';
|
13 |
// change background to default image, if image preview background is set
|
21 |
case 'orbit':
|
22 |
case 'frame':
|
23 |
case 'eclipse':
|
24 |
+
case 'element':
|
25 |
// default image
|
26 |
$niteoCS_banner = '2';
|
27 |
break;
|
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 |
} ?>
|
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 |
|
534 |
if ( isset( $_GET['theme'] ) ) {
|
535 |
switch ( $_GET['theme'] ) {
|
536 |
case 'eclipse':
|
537 |
+
case 'element':
|
538 |
$niteoCS_subscribe_label = 'SUBSCRIBE US';
|
539 |
break;
|
540 |
default:
|
727 |
break;
|
728 |
|
729 |
case 'fifty':
|
730 |
+
case 'element':
|
731 |
return '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
|
732 |
break;
|
733 |
|
756 |
**/
|
757 |
public function cmp_get_title( $class = '' ) {
|
758 |
global $allowedposttags;
|
759 |
+
$title = stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') );
|
760 |
|
761 |
+
// rewrite title if required for theme preview
|
762 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
763 |
+
$themeslug = esc_attr( $_GET['theme'] );
|
764 |
|
765 |
+
switch ( $themeslug ) {
|
766 |
case 'hardwork':
|
767 |
case 'hardwork_premium':
|
768 |
case 'fifty':
|
769 |
+
$title = 'We will be back soon!';
|
770 |
break;
|
771 |
|
772 |
case 'eclipse':
|
773 |
+
$title = 'Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a>';
|
774 |
break;
|
775 |
|
776 |
case 'orbit':
|
777 |
+
$title = 'WE ARE IN ORBIT ! STAY TUNED ...';
|
778 |
break;
|
779 |
|
780 |
case 'stylo':
|
781 |
+
$title = 'Something Awesome is Coming!';
|
782 |
+
break;
|
783 |
+
|
784 |
+
case 'element':
|
785 |
+
$title = 'Coming Soon';
|
786 |
break;
|
787 |
|
788 |
default:
|
|
|
789 |
break;
|
790 |
}
|
791 |
|
|
|
|
|
792 |
}
|
793 |
+
|
794 |
+
$title = ( $title == '' ) ? '' : '<h2 class="animated '. $class .'">' . wp_kses( $title, $allowedposttags ) . '</h2>';
|
795 |
+
|
796 |
+
return $title;
|
797 |
+
|
798 |
}
|
799 |
|
800 |
/**
|
865 |
ob_start();
|
866 |
|
867 |
// add blur effect if enabled
|
868 |
+
$blur = get_option('niteoCS_effect_blur['. $themeslug .']', '0.0');
|
869 |
+
if ( $blur != '0.0' ) {
|
870 |
+
?>
|
871 |
<!-- blur effect -->
|
872 |
<style>
|
873 |
#background-image,.slide-background,.video-banner {filter:blur(<?php echo esc_attr($blur);?>px);transform:scale(1.1);}
|
885 |
</style>
|
886 |
|
887 |
<?php
|
888 |
+
// check for premium themes special effects
|
889 |
+
if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
|
890 |
|
891 |
+
$effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
|
893 |
+
if ( $effect == 'constellation' ) { ?>
|
894 |
+
<!-- constellation effect -->
|
895 |
+
<style>
|
896 |
+
.particles-js-canvas-el {position: absolute; top:0; left:0;}
|
897 |
+
<?php
|
898 |
+
switch ( $themeslug ) {
|
899 |
+
case 'frame': ?>
|
900 |
+
.particles-js-canvas-el {z-index: -1;}
|
901 |
+
#background-image, .video-banner {z-index: -3;}
|
902 |
+
.background-overlay {z-index: -2;}
|
903 |
+
<?php
|
904 |
+
break;
|
905 |
+
|
906 |
+
case 'stylo' ?>
|
907 |
+
.particles-js-canvas-el {z-index: 1;}
|
908 |
+
<?php
|
909 |
+
default:
|
910 |
+
break;
|
911 |
+
} ?>
|
912 |
+
</style>
|
913 |
+
<?php
|
914 |
+
}
|
915 |
}
|
916 |
|
917 |
$css = ob_get_clean();
|
975 |
|
976 |
}
|
977 |
|
|
|
978 |
<?php
|
979 |
+
// theme specific function after init
|
980 |
switch ( $themeslug ) {
|
981 |
case 'fifty': ?>
|
982 |
var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
|
1024 |
}
|
1025 |
// video
|
1026 |
$source = get_option('niteoCS_banner_video['.$themeslug.']');
|
1027 |
+
|
1028 |
+
// sanitize source
|
1029 |
+
switch ( $source ) {
|
1030 |
+
case 'youtube':
|
1031 |
+
$source = 'YouTube';
|
1032 |
+
break;
|
1033 |
+
case 'local':
|
1034 |
+
$source = 'video/mp4';
|
1035 |
+
break;
|
1036 |
+
default:
|
1037 |
+
break;
|
1038 |
+
}
|
1039 |
|
1040 |
switch ( $source ) {
|
1041 |
case 'YouTube':
|
1138 |
$time = get_option('niteoCS_redirect_time'); ?>
|
1139 |
<script>
|
1140 |
setTimeout(function() {
|
1141 |
+
window.location.href = "<?php echo esc_url( $url );?>";
|
1142 |
+
}, <?php echo esc_attr( $time * 1000 );?>);
|
1143 |
</script>
|
1144 |
<?php
|
1145 |
}
|
1173 |
|
1174 |
|
1175 |
// special effects
|
1176 |
+
if ( in_array( $this->cmp_selectedTheme(), $this->premium_installed ) || ( isset( $theme_supports['special_effects'] ) && $theme_supports['special_effects'] ) ) {
|
1177 |
+
$effect = get_option('niteoCS_special_effect['.$themeslug.']', 'disabled');
|
1178 |
+
|
1179 |
+
switch ( $effect ) {
|
1180 |
+
case 'constellation': ?>
|
1181 |
+
<!-- load external Particles script -->
|
1182 |
+
<script type='text/javascript' src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
|
1183 |
+
<!-- INI particles -->
|
1184 |
+
<script>
|
1185 |
+
/* ---- particles.js config ---- */
|
1186 |
+
var wrapper = document.getElementById('background-wrapper');
|
1187 |
+
var background = ( wrapper === null ) ? 'slider-wrapper' : 'background-wrapper';
|
1188 |
+
particlesJS(background, {
|
1189 |
+
"particles": {
|
1190 |
+
"number": {
|
1191 |
+
"value": 100,
|
1192 |
+
"density": {
|
1193 |
+
"enable": true,
|
1194 |
+
"value_area":1000
|
1195 |
+
}
|
1196 |
+
},
|
1197 |
+
"color": {
|
1198 |
+
"value": "<?php echo esc_attr( get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff') );?>",
|
1199 |
+
},
|
1200 |
+
|
1201 |
+
"shape": {
|
1202 |
+
"type": "circle",
|
1203 |
+
"stroke": {
|
1204 |
+
"width": 0,
|
1205 |
+
"color": "#fff"
|
1206 |
+
},
|
1207 |
+
"polygon": {
|
1208 |
+
"nb_sides": 5
|
1209 |
+
},
|
1210 |
+
},
|
1211 |
+
"opacity": {
|
1212 |
+
"value": 0.6,
|
1213 |
+
"random": false,
|
1214 |
+
"anim": {
|
1215 |
+
"enable": false,
|
1216 |
+
"speed": 1,
|
1217 |
+
"opacity_min": 0.1,
|
1218 |
+
"sync": false
|
1219 |
+
}
|
1220 |
+
},
|
1221 |
+
"size": {
|
1222 |
+
"value": 2,
|
1223 |
+
"random": true,
|
1224 |
+
"anim": {
|
1225 |
+
"enable": false,
|
1226 |
+
"speed": 40,
|
1227 |
+
"size_min": 0.1,
|
1228 |
+
"sync": false
|
1229 |
+
}
|
1230 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1231 |
"line_linked": {
|
1232 |
+
"enable": true,
|
1233 |
+
"distance": 120,
|
1234 |
+
"color": "<?php echo esc_attr( get_option('niteoCS_special_effect['.$themeslug.'][constellation][color]', '#ffffff') );?>",
|
1235 |
+
"opacity": 0.4,
|
1236 |
+
"width": 1
|
1237 |
+
},
|
1238 |
},
|
1239 |
+
"interactivity": {
|
1240 |
+
"detect_on": "canvas",
|
1241 |
+
"events": {
|
1242 |
+
"onhover": {
|
1243 |
+
"enable": true,
|
1244 |
+
"mode": "grab"
|
1245 |
+
},
|
1246 |
+
"onclick": {
|
1247 |
+
"enable": false
|
1248 |
+
},
|
1249 |
+
"resize": true
|
1250 |
+
},
|
1251 |
+
"modes": {
|
1252 |
+
"grab": {
|
1253 |
+
"distance": 140,
|
1254 |
+
"line_linked": {
|
1255 |
+
"opacity": 1
|
1256 |
+
}
|
1257 |
+
},
|
1258 |
+
"bubble": {
|
1259 |
+
"distance": 400,
|
1260 |
+
"size": 40,
|
1261 |
+
"duration": 2,
|
1262 |
+
"opacity": 8,
|
1263 |
+
"speed": 3
|
1264 |
+
},
|
1265 |
+
"repulse": {
|
1266 |
+
"distance": 200,
|
1267 |
+
"duration": 0.4
|
1268 |
+
},
|
1269 |
+
"push": {
|
1270 |
+
"particles_nb": 4
|
1271 |
+
},
|
1272 |
+
"remove": {
|
1273 |
+
"particles_nb": 2
|
1274 |
+
}
|
1275 |
+
}
|
1276 |
},
|
1277 |
+
"retina_detect": true
|
1278 |
+
});
|
1279 |
+
</script>
|
1280 |
+
<?php
|
1281 |
+
break;
|
1282 |
+
|
1283 |
+
default:
|
1284 |
+
break;
|
1285 |
+
}
|
|
|
|
|
|
|
|
|
1286 |
}
|
1287 |
|
1288 |
return false;
|
1304 |
|
1305 |
$form_id = get_option('niteoCS_contact_form_id', '');
|
1306 |
|
1307 |
+
switch ( $form_type ) {
|
1308 |
case 'cf7':
|
1309 |
|
1310 |
$replace = array('<p>', '</p>' );
|
inc/settings/settings-background.php
CHANGED
@@ -1,253 +1,458 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
?>
|
4 |
-
<div class="table-wrapper theme-setup background-media">
|
5 |
-
<h3><?php _e('Graphic Background', 'cmp-coming-soon-maintenance');?></h3>
|
6 |
-
<table class="theme-setup">
|
7 |
-
<tbody>
|
8 |
-
<tr>
|
9 |
-
<th>
|
10 |
-
<fieldset>
|
11 |
-
<legend class="screen-reader-text">
|
12 |
-
<span><?php _e('Banner Settings', 'cmp-coming-soon-maintenance');?></span>
|
13 |
-
</legend>
|
14 |
-
|
15 |
-
<p>
|
16 |
-
<label title="Default Banner">
|
17 |
-
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="2"<?php if ( $banner_type == 2) { echo ' checked="checked"'; } ?>> <?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
|
18 |
-
</label>
|
19 |
-
</p>
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
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"'; } ?>> <?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"'; } ?>> <?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"'; } ?>> <?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"'; } ?>> <?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"'; } ?>> <?php _e('Gradient Color', 'cmp-coming-soon-maintenance');?>
|
50 |
-
</label>
|
51 |
-
</p>
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
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 |
-
|
|
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
|
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
-
|
|
|
|
|
|
|
92 |
|
93 |
-
<
|
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 |
-
|
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 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
106 |
|
107 |
-
|
|
|
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 |
-
|
113 |
-
|
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 |
-
|
118 |
-
|
119 |
-
<
|
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 |
-
<
|
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 |
-
<
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
<?php
|
133 |
-
|
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 |
-
|
143 |
-
|
144 |
-
|
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 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
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 |
-
|
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 ); ?>> <?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 ); ?>> <?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 ); ?>> <?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 ); ?>> <?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 ); ?>> <?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 ); ?>> <?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 ); ?>> <?php _e('Gradient Color', 'cmp-coming-soon-maintenance');?>
|
116 |
+
</label>
|
117 |
+
</p>
|
118 |
+
|
119 |
+
</fieldset>
|
120 |
+
</th>
|
121 |
+
|
122 |
+
<td class="theme_background">
|
123 |
+
|
124 |
+
<!-- DEFAULT BACKGROUND -->
|
125 |
+
<fieldset class="background-type-switch default_banner x2">
|
126 |
+
<div class="background-thumb-wrapper">
|
127 |
+
<img src="<?php echo esc_url( $this->cmp_themeURL( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg' );?>" alt="Default Media">
|
128 |
+
<div class="thumbnail-overlay"></div>
|
129 |
+
</div>
|
130 |
+
</fieldset>
|
131 |
+
|
132 |
+
<!-- CUSTOM BACKGROUND -->
|
133 |
+
<fieldset class="background-type-switch custom_banner x0">
|
134 |
|
135 |
+
<input type="hidden" class="widefat" id="niteoCS-images-id" name="niteoCS_banner_id_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_custom_id ); ?>" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
+
<input id="add-images" type="button" class="button" value="Media Library" />
|
138 |
+
|
139 |
+
<p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp-coming-soon-maintenance')?></p>
|
140 |
+
|
141 |
+
<div class="background-thumb-wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
+
<?php
|
144 |
+
if ( isset( $niteoCS_banner_custom_id ) && $niteoCS_banner_custom_id != '' ) {
|
145 |
+
$ids = explode( ',', $niteoCS_banner_custom_id );
|
146 |
+
} ?>
|
147 |
|
148 |
+
<div class="images-wrapper custom-gallery gallery-<?php echo ( isset( $ids ) && is_array( $ids ) ? count( $ids ) : '1');?>">
|
149 |
+
<?php
|
150 |
|
151 |
+
if ( isset( $ids ) && is_array( $ids ) ) {
|
152 |
|
153 |
+
$i = 0;
|
154 |
+
foreach ( $ids as $id ) {
|
155 |
|
156 |
+
if ( $i == 0 ) {
|
157 |
+
$img = wp_get_attachment_image_src( $id, 'large' ); ?>
|
158 |
+
<div class="big-thumb">
|
159 |
+
<div class="thumbnail-overlay"></div>
|
160 |
+
<?php
|
161 |
+
if ( isset ($img[0] ) ) {
|
162 |
+
echo '<img src="' . $img[0] . '" alt="">';
|
163 |
+
} ?>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<?php
|
167 |
|
168 |
+
} else {
|
169 |
+
$img = wp_get_attachment_image_src( $id, 'medium' );
|
170 |
+
if ( isset ($img[0] ) ) {
|
171 |
+
echo '<img src="' . $img[0] . '" alt="" class="no-blur">';
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
$i++;
|
176 |
+
}
|
177 |
+
} else { ?>
|
178 |
+
<div class="big-thumb">
|
179 |
+
<div class="thumbnail-overlay"></div>
|
180 |
+
</div>
|
181 |
+
<?php
|
182 |
+
} ?>
|
183 |
+
</div>
|
184 |
+
|
185 |
+
</div>
|
186 |
+
|
187 |
+
<input id="delete-images" type="button" class="button" value="<?php _e('Delete Images', 'cmp-coming-soon-maintenance');?>" style="display:<?php echo ( isset( $ids ) && is_array( $ids ) ) ? 'block' : 'none';?>"/>
|
188 |
+
|
189 |
+
</fieldset>
|
190 |
+
|
191 |
+
<!-- UNSPLASH BACKGROUND -->
|
192 |
+
<fieldset class="background-type-switch unsplash_banner x1">
|
193 |
+
|
194 |
+
<label for="unsplash_feed_<?php echo esc_attr( $themeslug );?>"><?php _e('Choose Unsplash Feed', 'cmp-coming-soon-maintenance');?></label><br>
|
195 |
+
<select name="unsplash_feed_<?php echo esc_attr( $themeslug );?>">
|
196 |
+
|
197 |
+
<option value="3" <?php selected( '3', $niteoCS_unsplash_feed ); ?>><?php _e('Random Photo', 'cmp-coming-soon-maintenance');?></option>
|
198 |
+
|
199 |
+
<option value="0" <?php selected( '0', $niteoCS_unsplash_feed ); ?>><?php _e('Specific Photo', 'cmp-coming-soon-maintenance');?></option>
|
200 |
+
|
201 |
+
<option value="2" <?php selected( '2', $niteoCS_unsplash_feed ); ?>><?php _e('Random from Collection', 'cmp-coming-soon-maintenance');?></option>
|
202 |
+
|
203 |
+
<option value="1" <?php selected( '1', $niteoCS_unsplash_feed ); ?>><?php _e('Random from User', 'cmp-coming-soon-maintenance');?></option>
|
204 |
+
|
205 |
+
</select>
|
206 |
+
|
207 |
+
<p class="unsplash-feed" id="unsplash-feed-0">
|
208 |
+
<label for="niteoCS_unsplash_0_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Unsplash Photo URL or Unsplash Photo ID', 'cmp-coming-soon-maintenance');?></label>
|
209 |
+
<input type="text" class="widefat" id="niteoCS-unsplash-0" name="niteoCS_unsplash_0_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_0 ); ?>" />
|
210 |
+
</p>
|
211 |
+
|
212 |
+
<p class="unsplash-feed" id="unsplash-feed-2">
|
213 |
+
<label for="niteoCS_unsplash_2_<?php echo esc_attr( $themeslug );?>"><?php printf(__('Enter <a href="%s">Unsplash Collection</a> URL or Collection ID.', 'cmp-coming-soon-maintenance'), 'https://unsplash.com/collections/');?></label>
|
214 |
+
<input type="text" class="widefat" id="niteoCS-unsplash-2" name="niteoCS_unsplash_2_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_2 ); ?>" />
|
215 |
+
</p>
|
216 |
+
|
217 |
+
<p><div class="unsplash-feed" id="unsplash-feed-3">
|
218 |
+
<label for="niteoCS_unsplash_3_<?php echo esc_attr( $themeslug );?>"><?php _e('Limit photos to specific keyword (fashion, nature, technology..)', 'cmp-coming-soon-maintenance');?></label>
|
219 |
+
<input type="text" class="widefat" id="niteoCS-unsplash-3" name="niteoCS_unsplash_3_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_3 ); ?>" />
|
220 |
+
|
221 |
+
<br><br>
|
222 |
+
|
223 |
+
<input type="checkbox" name="niteoCS_unsplash_feat_<?php echo esc_attr( $themeslug );?>" id="niteoCS_unsplash_feat" value="1" <?php checked( '1', get_option( 'niteoCS_unsplash_feat['.esc_attr( $themeslug ).']', '0' ) ); ?> class="regular-text code"><label for="niteoCS_unsplash_feat"><?php _e('Only Unsplash Featured Photos', 'cmp-coming-soon-maintenance');?></label>
|
224 |
+
</div></p>
|
225 |
+
|
226 |
+
<p class="unsplash-feed" id="unsplash-feed-1">
|
227 |
+
<label for="niteoCS_unsplash_1_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Unsplash User ID', 'cmp-coming-soon-maintenance');?></label>
|
228 |
+
<input type="text" class="widefat" id="niteoCS-unsplash-1" name="niteoCS_unsplash_1_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_unsplash_1 ); ?>" placeholder="@"/>
|
229 |
+
</p>
|
230 |
+
|
231 |
+
<button id="test-unsplash" class="button" data-security="<?php echo esc_attr( $ajax_nonce );?>"><?php _e('Display Unsplash Photo', 'cmp-coming-soon-maintenance');?></button>
|
232 |
+
|
233 |
+
<div class="background-thumb-wrapper">
|
234 |
+
<div id="unsplash-media">
|
235 |
+
<div class="thumbnail-overlay"></div>
|
236 |
+
</div>
|
237 |
+
|
238 |
+
</div>
|
239 |
+
|
240 |
+
<p class="unplash-description"><a href="http://unsplash.com" target="_blank">Unsplash</a> <?php _e('is a world leading source for free to use high quality stock images. All of the images that are submitted and published on Unsplash fall under under the <a href="https://unsplash.com/license"> Unsplash license</a>, which means you can use the image for any personal or commercial use.', 'cmp-coming-soon-maintenance');?></p>
|
241 |
+
|
242 |
+
</fieldset>
|
243 |
+
|
244 |
+
|
245 |
+
<!-- VIDEO BACKGROUND -->
|
246 |
+
<fieldset class="background-type-switch video_banner x5">
|
247 |
+
<label for="niteoCS_banner_video_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Video Source', 'cmp-coming-soon-maintenance');?></label><br>
|
248 |
+
|
249 |
+
<select name="niteoCS_banner_video_<?php echo esc_attr( $themeslug );?>" class="banner-video-source">
|
250 |
+
<option value="youtube" <?php selected( 'youtube', $niteoCS_banner_video ); ?>><?php _e('YouTube', 'cmp-coming-soon-maintenance');?></option>
|
251 |
+
<option value="local" <?php selected( 'local', $niteoCS_banner_video ); ?>><?php _e('Custom Video File', 'cmp-coming-soon-maintenance');?></option>
|
252 |
+
<option disabled value="vimeo" <?php selected( 'vimeo', $niteoCS_banner_video ); ?>><?php _e('Vimeo (coming soon...)', 'cmp-coming-soon-maintenance');?></option>
|
253 |
+
</select><br>
|
254 |
+
|
255 |
+
|
256 |
+
<p class="banner-video-source youtube">
|
257 |
+
<label for="niteoCS_youtube_url_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Youtube URL', 'cmp-coming-soon-maintenance');?></label>
|
258 |
+
<input type="text" class="widefat" id="niteoCS-youtube-url" name="niteoCS_youtube_url_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_youtube_url ); ?>" />
|
259 |
+
|
260 |
+
</p>
|
261 |
+
|
262 |
+
<p class="banner-video-source vimeo">
|
263 |
+
<label for="niteoCS_vimeo_url_<?php echo esc_attr( $themeslug );?>"><?php _e('Enter Vimeo URL', 'cmp-coming-soon-maintenance');?></label>
|
264 |
+
<input type="text" class="widefat" id="niteoCS-vimeo-url" name="niteoCS_vimeo_url_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_vimeo_url ); ?>" />
|
265 |
+
</p>
|
266 |
+
|
267 |
+
<p class="banner-video-source local">
|
268 |
+
<label for="niteoCS_file_url_<?php echo esc_attr( $themeslug );?>"><?php _e('Select or Upload custom Video file', 'cmp-coming-soon-maintenance');?></label>
|
269 |
+
<input id="add-video-local" type="button" class="button" value="Media Library"/>
|
270 |
+
<input type="hidden" class="widefat" id="niteoCS-video-local-id" name="niteoCS_video_file_url<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_video_file_url ); ?>" data-url="<?php echo esc_url( wp_get_attachment_url( $niteoCS_video_file_url ) ); ?>"/>
|
271 |
+
</p>
|
272 |
+
|
273 |
+
<!-- Local video image -->
|
274 |
+
<div class="banner-video-source local">
|
275 |
+
|
276 |
+
<div class="video-local-wrapper background-thumb-wrapper">
|
277 |
+
<div class="thumbnail-overlay"></div>
|
278 |
+
</div>
|
279 |
+
|
280 |
+
<p class="file-source-input">
|
281 |
+
<input id="delete-video" type="button" class="button" value="Remove Video" style="display:none"/>
|
282 |
+
</p>
|
283 |
+
|
284 |
+
</div>
|
285 |
+
|
286 |
+
<!-- YouTube video image -->
|
287 |
+
<div class="banner-video-source youtube">
|
288 |
+
<div class="video-yt-wrapper">
|
289 |
+
<div class="video-yt-thumb-wrapper background-thumb-wrapper"></div>
|
290 |
+
<div class="thumbnail-overlay"></div>
|
291 |
+
</div>
|
292 |
+
</div>
|
293 |
+
|
294 |
+
<!-- Video mobile Thumbnail -->
|
295 |
+
<div class="banner-video-source youtube local">
|
296 |
+
|
297 |
+
<p><?php _e('Video backgrounds doesn`t work on mobile devices therefore only thumbnail video image will be displayed on mobile devices. Upload custom thumbnail image by pressing button below. ', 'cmp-coming-soon-maintenance');?></p>
|
298 |
+
<input type="hidden" class="widefat" id="niteoCS-video-thumb-id" name="niteoCS_video_thumb_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_video_thumb ); ?>" />
|
299 |
+
<input id="add-video-thumb" type="button" class="button" value="<?php _e('Media Library', 'cmp-coming-soon-maintenance');?>" /><br><br>
|
300 |
+
|
301 |
+
<div class="video-thumb-wrapper background-thumb-wrapper">
|
302 |
+
<?php
|
303 |
+
if ( isset( $niteoCS_video_thumb ) && $niteoCS_video_thumb != '' ) {
|
304 |
+
$img = wp_get_attachment_image_src( $niteoCS_video_thumb, 'large' );
|
305 |
+
if ( isset( $img[0] ) ) {
|
306 |
+
echo '<img src="' .$img[0] . '" alt="">';
|
307 |
+
}
|
308 |
+
|
309 |
+
}
|
310 |
+
?>
|
311 |
+
<div class="thumbnail-overlay"></div>
|
312 |
+
</div>
|
313 |
+
|
314 |
+
<input id="delete-video-thumb" type="button" class="button" value="Remove Thumbnail" />
|
315 |
+
</div>
|
316 |
+
|
317 |
+
</fieldset>
|
318 |
+
|
319 |
+
<!-- PATTERN BACKGROUND -->
|
320 |
+
<fieldset class="background-type-switch graphic_pattern x3">
|
321 |
+
<label for="niteoCS_banner_pattern_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Pattern', 'cmp-coming-soon-maintenance');?></label><br>
|
322 |
+
<select name="niteoCS_banner_pattern_<?php echo esc_attr( $themeslug );?>" data-url="<?php echo esc_url(WP_PLUGIN_URL . '/cmp-coming-soon-maintenance/img/patterns/');?>">
|
323 |
+
<?php
|
324 |
+
foreach ( $patterns as $pattern ) { ?>
|
325 |
+
<option value="<?php echo esc_attr( $pattern );?>" <?php selected( $pattern, $niteoCS_banner_pattern ); ?>><?php echo esc_html(ucfirst(str_replace('_', ' ', $pattern)));?></option>
|
326 |
+
<?php
|
327 |
+
} ?>
|
328 |
+
<option value="custom" <?php selected( 'custom', $niteoCS_banner_pattern ); ?>><?php _e('Custom Pattern...', 'cmp-coming-soon-maintenance');?></option>
|
329 |
+
</select><br>
|
330 |
+
|
331 |
+
<input type="hidden" class="widefat" id="niteoCS-pattern-id" name="niteoCS_banner_pattern_custom_<?php echo esc_attr( $themeslug );?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_pattern_custom ); ?>" />
|
332 |
+
|
333 |
+
<input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ( $niteoCS_banner_pattern == 'custom' ) ? 'block' : 'none'?>;"/>
|
334 |
+
|
335 |
+
<div class="pattern-wrapper background-thumb-wrapper" style="background-image: url('<?php echo esc_url($pattern_url);?>');">
|
336 |
+
<div class="thumbnail-overlay"></div>
|
337 |
+
</div>
|
338 |
+
</fieldset>
|
339 |
+
|
340 |
+
<!-- SOLID COLOR BACKGROUND -->
|
341 |
+
<fieldset class="background-type-switch solid_color x4">
|
342 |
+
<label for="niteoCS_banner_color_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Color', 'cmp-coming-soon-maintenance');?></label><br>
|
343 |
+
<input type="text" name="niteoCS_banner_color_<?php echo esc_attr( $themeslug );?>" id="niteoCS_banner_color" value="<?php echo esc_attr( $niteoCS_banner_color ); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
|
344 |
+
<div class="color-preview" style="background-color:<?php echo esc_attr( $niteoCS_banner_color); ?>"></div>
|
345 |
+
</fieldset>
|
346 |
+
|
347 |
+
<!-- GRADIENT BACKGROUND -->
|
348 |
+
<fieldset class="background-type-switch gradient_background x6">
|
349 |
+
|
350 |
+
<label for="niteoCS_gradient_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Gradient Background', 'cmp-coming-soon-maintenance');?></label><br>
|
351 |
+
|
352 |
+
<select name="niteoCS_gradient_<?php echo esc_attr( $themeslug );?>" class="background-gradient">
|
353 |
+
<?php
|
354 |
|
355 |
+
foreach ( $gradient_array as $color => $name ) { ?>
|
356 |
+
<option value="<?php echo esc_attr( $color );?>" <?php selected ($color, $niteoCS_gradient ); ?>><?php echo esc_attr( $name );?></option>
|
357 |
+
<?php
|
358 |
+
} ?>
|
359 |
|
360 |
+
<option value="custom" <?php selected('custom', $niteoCS_gradient); ?>><?php _e('Custom Gradient', 'cmp-coming-soon-maintenance');?></option>
|
|
|
|
|
|
|
361 |
|
362 |
+
</select><br>
|
|
|
|
|
|
|
363 |
|
364 |
+
<p class="custom-gradient" style="display:<?php echo ( $niteoCS_gradient == 'custom' ) ? 'block' : 'none'; ?>">
|
365 |
+
<label for="niteoCS_banner_gradient_one_<?php echo esc_attr( $themeslug );?>"><?php _e('Select first gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
|
366 |
+
<input type="text" name="niteoCS_banner_gradient_one_<?php echo esc_attr( $themeslug );?>" id="niteoCS_gradient_one" value="<?php echo esc_attr( $niteoCS_gradient_one_custom); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
|
367 |
+
<label for="niteoCS_banner_gradient_two_<?php echo esc_attr( $themeslug );?>"><?php _e('Select second gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
|
368 |
+
<input type="text" name="niteoCS_banner_gradient_two_<?php echo esc_attr( $themeslug );?>" id="niteoCS_gradient_two" value="<?php echo esc_attr( $niteoCS_gradient_two_custom); ?>" data-default-color="#e5e5e5" class="regular-text code"><br>
|
369 |
+
</p>
|
370 |
|
371 |
+
<div class="gradient-preview" style="background:-moz-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:-webkit-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:linear-gradient(135deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%)"></div>
|
372 |
+
</fieldset>
|
373 |
|
|
|
|
|
374 |
|
375 |
+
<!-- BACKGROUND OVERLAY SETTINGS -->
|
376 |
+
<div class="background-type-switch x0 x1 x2 x3 x5">
|
|
|
|
|
377 |
|
378 |
+
<fieldset>
|
379 |
+
<legend class="screen-reader-text">
|
380 |
+
<span><?php _e('Background Overlay', 'cmp-coming-soon-maintenance');?></span>
|
381 |
+
</legend>
|
|
|
|
|
|
|
382 |
|
383 |
+
<label for="unsplash_feed_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Background Overlay', 'cmp-coming-soon-maintenance');?></label><br>
|
|
|
|
|
384 |
|
385 |
+
<select name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>" class="background-overlay">
|
386 |
+
|
387 |
+
<option value="solid-color" <?php selected( 'solid-color', $overlay ); ?>><?php _e('Solid Color', 'cmp-coming-soon-maintenance');?></option>
|
388 |
+
|
389 |
+
<option value="gradient" <?php selected( 'gradient', $overlay ); ?>><?php _e('Gradient', 'cmp-coming-soon-maintenance');?></option>
|
390 |
+
|
391 |
+
<option value="disabled" <?php selected( 'disabled', $overlay ); ?>><?php _e('Disabled', 'cmp-coming-soon-maintenance');?></option>
|
392 |
+
|
393 |
+
</select>
|
394 |
+
|
395 |
+
</fieldset>
|
396 |
+
|
397 |
+
|
398 |
+
<!-- BACKGROUND OVERLAY SOLID COLOR -->
|
399 |
+
<fieldset class="background-overlay solid-color">
|
400 |
+
<p><?php _e('Background Overlay Color', 'cmp-coming-soon-maintenance');?></p>
|
401 |
+
<input type="text" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_color" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color ); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
|
402 |
+
</fieldset>
|
403 |
+
|
404 |
+
<!-- BACKGROUND OVERLAY GRADIENT -->
|
405 |
+
<fieldset class="background-overlay gradient">
|
406 |
+
|
407 |
+
<label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient"><?php _e('Select Gradient Overlay', 'cmp-coming-soon-maintenance');?></label><br>
|
408 |
+
|
409 |
+
<select name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient" class="overlay-gradient">
|
410 |
+
<?php
|
411 |
+
|
412 |
+
foreach ( $gradient_array as $color => $name ) { ?>
|
413 |
+
<option value="<?php echo esc_attr( $color );?>" <?php selected ( $color, $overlay_gradient ); ?>><?php echo esc_attr( $name );?></option>
|
414 |
<?php
|
415 |
+
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
+
<option value="custom" <?php selected('custom', $overlay_gradient); ?>><?php _e('Custom Gradient', 'cmp-coming-soon-maintenance');?></option>
|
418 |
+
|
419 |
+
</select><br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
|
421 |
+
<p class="custom-overlay-gradient" style="display:<?php echo ( $overlay_gradient == 'custom' ) ? 'block' : 'none'; ?>">
|
422 |
+
|
423 |
+
<label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_one"><?php _e('Select first gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
|
424 |
+
|
425 |
+
<input type="text" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_one" value="<?php echo esc_attr( $overlay_gradient_one_custom); ?>" id="niteoCS_overlay_gradient_one" data-default-color="#e5e5e5" class="regular-text code"><br>
|
426 |
+
|
427 |
+
<label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_two"><?php _e('Select second gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
|
428 |
+
|
429 |
+
<input type="text" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_gradient_two" value="<?php echo esc_attr( $overlay_gradient_two_custom); ?>" id="niteoCS_overlay_gradient_two" data-default-color="#e5e5e5" class="regular-text code"><br>
|
430 |
+
|
431 |
+
</p>
|
432 |
+
|
433 |
+
</fieldset>
|
434 |
+
</fieldset>
|
435 |
+
|
436 |
+
<fieldset class="background-overlay solid-color gradient">
|
437 |
+
<label for="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_opacity"><?php _e('Background Overlay Opacity', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $overlay_opa ); ?></span></label><br>
|
438 |
+
<input type="range" class="background-overlay-opacity" name="niteoCS_overlay_<?php echo esc_attr( $themeslug );?>_opacity" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opa ); ?>" />
|
439 |
+
</fieldset>
|
440 |
+
|
441 |
+
|
442 |
+
<fieldset class="background-effect blur">
|
443 |
+
|
444 |
+
<label for="niteoCS_effect_blur_<?php echo esc_attr( $themeslug );?>"><?php _e('Background Blur Amount', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $effect_blur ); ?></span>px</label></br>
|
445 |
+
<input type="range" class="blur-range" name="niteoCS_effect_blur_<?php echo esc_attr( $themeslug );?>" min="0.0" max="10" step="0.5" value="<?php echo esc_attr( $effect_blur ); ?>" />
|
446 |
+
</fieldset>
|
447 |
+
|
448 |
+
</div>
|
449 |
+
|
450 |
+
</td>
|
451 |
+
</tr>
|
452 |
+
|
453 |
+
<?php echo $this->render_settings->submit(); ?>
|
454 |
+
|
455 |
+
</tbody>
|
456 |
+
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
|
458 |
+
</div>
|
inc/settings/settings-background_effects.php
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
-
|
4 |
-
if (isset($_POST['niteoCS_effect_'.$themeslug])) {
|
5 |
-
update_option('niteoCS_effect['.$themeslug.']', sanitize_text_field($_POST['niteoCS_effect_'.$themeslug]));
|
6 |
-
}
|
7 |
-
|
8 |
-
|
9 |
-
if (isset($_POST['niteoCS_effect_blur_'.$themeslug]) && is_numeric($_POST['niteoCS_effect_blur_'.$themeslug])) {
|
10 |
-
update_option('niteoCS_effect_blur['.$themeslug.']', sanitize_text_field($_POST['niteoCS_effect_blur_'.$themeslug]));
|
11 |
-
}
|
12 |
-
|
13 |
-
|
14 |
-
$background_effect = get_option('niteoCS_effect['.$themeslug.']', 'disabled');
|
15 |
-
$effect_blur = get_option('niteoCS_effect_blur['.$themeslug.']', '0.5');
|
16 |
-
|
17 |
-
?>
|
18 |
-
<div class="table-wrapper theme-setup background-effects">
|
19 |
-
<h3><?php _e('Background Effects', 'cmp-coming-soon-maintenance');?></h3>
|
20 |
-
<table class="theme-setup">
|
21 |
-
<tbody>
|
22 |
-
<tr>
|
23 |
-
<th>
|
24 |
-
<fieldset>
|
25 |
-
<legend class="screen-reader-text">
|
26 |
-
<span><?php _e('Background Effects', 'cmp-coming-soon-maintenance');?></span>
|
27 |
-
</legend>
|
28 |
-
|
29 |
-
<p>
|
30 |
-
<label title="Blur">
|
31 |
-
<input type="radio" class="background-effect" name="niteoCS_effect_<?php echo esc_attr( $themeslug );?>" value="blur" <?php checked( 'blur', $background_effect );?>> <?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 );?>> <?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 )
|
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 );?>> <?php _e('Slice', 'cmp-coming-soon-maintenance');?>
|
91 |
</label>
|
92 |
<?php
|
93 |
} ?>
|
js/settings.js
CHANGED
@@ -1,16 +1,13 @@
|
|
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,15 +50,16 @@ jQuery(document).ready(function($){
|
|
53 |
|
54 |
// update range inputs on change
|
55 |
update_range('.blur-range');
|
56 |
-
update_range('.overlay-opacity');
|
57 |
|
58 |
// create media upload buttons
|
59 |
-
|
60 |
-
media_upload_button('
|
61 |
-
media_upload_button('
|
62 |
-
media_upload_button('
|
63 |
-
media_upload_button('
|
64 |
-
media_upload_button('video', false, '
|
|
|
65 |
|
66 |
// show / hide settings
|
67 |
toggle_settings( 'analytics' );
|
@@ -70,24 +68,22 @@ jQuery(document).ready(function($){
|
|
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,19 +108,17 @@ jQuery(document).ready(function($){
|
|
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('
|
128 |
unsp_url = '',
|
129 |
feat = '',
|
130 |
custom_str = '',
|
@@ -167,7 +161,7 @@ jQuery(document).ready(function($){
|
|
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,10 +204,13 @@ jQuery(document).ready(function($){
|
|
210 |
jQuery(this).fadeIn();
|
211 |
jQuery('#test-unsplash').prop('disabled', false);
|
212 |
jQuery('#test-unsplash').text('Display Unsplash Photo');
|
213 |
-
jQuery('#unsplash-media').
|
|
|
214 |
clearTimeout(loadingTimeout);
|
215 |
});
|
216 |
|
|
|
|
|
217 |
} else {
|
218 |
jQuery('#test-unsplash').prop('disabled', false);
|
219 |
jQuery('#test-unsplash').text('Display Unsplash Photo');
|
@@ -229,160 +226,75 @@ jQuery(document).ready(function($){
|
|
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 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
|
247 |
-
|
248 |
-
var youtubeLink = $('#niteoCS-vimeo-url').val();
|
249 |
|
250 |
-
|
251 |
-
var split_c = '/';
|
252 |
-
var split_n = 5;
|
253 |
-
}
|
254 |
-
}
|
255 |
|
256 |
-
|
257 |
-
var getYouTubeVideoID = youtubeLink.split(split_c)[split_n];
|
258 |
-
if ( getYouTubeVideoID != undefined ) {
|
259 |
-
var cleanVideoID = getYouTubeVideoID.replace(/(&)+(.*)/, '');
|
260 |
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
264 |
|
265 |
-
|
266 |
-
|
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 |
-
|
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 |
-
|
296 |
-
|
|
|
|
|
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 |
-
|
|
|
|
|
|
|
|
|
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 |
-
//
|
337 |
-
jQuery('#
|
|
|
|
|
338 |
|
339 |
-
|
340 |
-
|
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
|
380 |
-
jQuery('#unsplash-feed-' +
|
381 |
|
382 |
-
jQuery('
|
383 |
-
|
384 |
jQuery('.unsplash-feed').css('display', 'none');
|
385 |
-
jQuery('#unsplash-feed-' +
|
386 |
jQuery('#test-unsplash').trigger('click');
|
387 |
});
|
388 |
|
@@ -410,32 +322,126 @@ jQuery(document).ready(function($){
|
|
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 |
-
|
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,7 +470,6 @@ jQuery(document).ready(function($){
|
|
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,21 +555,22 @@ jQuery(document).ready(function($){
|
|
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,15 +602,13 @@ jQuery(document).ready(function($){
|
|
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');
|
@@ -616,12 +620,11 @@ jQuery(document).ready(function($){
|
|
616 |
// theme-selector scripts
|
617 |
// select theme by click on thumbnail or select button
|
618 |
jQuery('.theme-select').click(function(){
|
619 |
-
jQuery(this).parent().find('input[name="
|
620 |
jQuery('.theme-select').removeClass('selected');
|
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,7 +649,7 @@ jQuery(document).ready(function($){
|
|
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,7 +694,6 @@ jQuery(document).ready(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,8 +711,6 @@ jQuery(document).ready(function($){
|
|
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,7 +719,6 @@ 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 |
|
725 |
// get screenshots
|
@@ -786,7 +785,7 @@ jQuery(document).ready(function($){
|
|
786 |
jQuery('.theme-overlay.cmp .activate').click(function(e) {
|
787 |
e.preventDefault();
|
788 |
// select theme
|
789 |
-
jQuery('input[name="
|
790 |
if ( jQuery(this).val() == slug ) {
|
791 |
jQuery(this).prop('checked', true);
|
792 |
jQuery('.theme-select').removeClass('selected');
|
@@ -827,9 +826,6 @@ jQuery(document).ready(function($){
|
|
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,7 +837,7 @@ jQuery(document).ready(function($){
|
|
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,7 +854,7 @@ jQuery(document).ready(function($){
|
|
858 |
|
859 |
$add_button.click(function(e) {
|
860 |
e.preventDefault();
|
861 |
-
|
862 |
if ( media_uploader ) {
|
863 |
media_uploader.open();
|
864 |
return;
|
@@ -878,9 +874,14 @@ jQuery(document).ready(function($){
|
|
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.
|
|
|
|
|
|
|
|
|
883 |
|
|
|
884 |
jQuery(attachment).each(function(i) {
|
885 |
if (attachment[i].sizes && attachment[i].sizes.large) {
|
886 |
image = attachment[i].sizes.large.url;
|
@@ -889,16 +890,40 @@ jQuery(document).ready(function($){
|
|
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 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
}
|
903 |
|
904 |
});
|
@@ -908,25 +933,20 @@ jQuery(document).ready(function($){
|
|
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();
|
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.
|
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,37 +994,34 @@ jQuery(document).ready(function($){
|
|
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 |
-
|
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,6 +1033,14 @@ jQuery(document).ready(function($){
|
|
1016 |
});
|
1017 |
}
|
1018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1019 |
});
|
1020 |
|
1021 |
|
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 |
|
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 |
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 |
});
|
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 |
|
162 |
jQuery(this).prop('disabled', true);
|
163 |
jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');
|
164 |
+
// media_wrapper.html('');
|
165 |
|
166 |
var data = {
|
167 |
action: 'niteo_unsplash',
|
204 |
jQuery(this).fadeIn();
|
205 |
jQuery('#test-unsplash').prop('disabled', false);
|
206 |
jQuery('#test-unsplash').text('Display Unsplash Photo');
|
207 |
+
jQuery('#unsplash-media').parent().after('<span><a href="'+img_url+'" target="_blank">Photo</a> (ID: '+img_id+') by <a href="'+author_url+'" target="_blank">' +author+ '</a> / <a href="https://unsplash.com/" target="_blank">Unsplash</a></span>')
|
208 |
+
jQuery( '.blur-range' ).trigger('input');
|
209 |
clearTimeout(loadingTimeout);
|
210 |
});
|
211 |
|
212 |
+
|
213 |
+
|
214 |
} else {
|
215 |
jQuery('#test-unsplash').prop('disabled', false);
|
216 |
jQuery('#test-unsplash').text('Display Unsplash Photo');
|
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 |
}
|
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 |
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 |
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 |
|
603 |
$.post(ajaxurl, data, function(response) {
|
604 |
response = response.trim();
|
605 |
+
if ( response == 'success' ) {
|
606 |
setTimeout(function(){
|
|
|
607 |
$parent.removeClass('notice-warning').addClass('notice-success');
|
608 |
$parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
|
609 |
}, 1500);
|
610 |
|
611 |
} else {
|
|
|
612 |
response = response.slice(0,-1);
|
613 |
var error = $('p', $(response)).text();
|
614 |
$parent.removeClass('notice-warning').addClass('notice-error');
|
620 |
// theme-selector scripts
|
621 |
// select theme by click on thumbnail or select button
|
622 |
jQuery('.theme-select').click(function(){
|
623 |
+
jQuery(this).parent().find('input[name="niteoCS_select_theme"]').prop("checked", true).trigger('change');
|
624 |
jQuery('.theme-select').removeClass('selected');
|
625 |
jQuery(this).parent().find('.theme-select').addClass('selected');
|
626 |
});
|
627 |
|
|
|
628 |
// theme update via theme button
|
629 |
jQuery('.theme-update.button').one('click',function(e) {
|
630 |
e.preventDefault();
|
649 |
$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 |
// parse JSON data to array
|
695 |
response = jQuery.parseJSON(response);
|
696 |
|
|
|
697 |
if ( response.result == 'true' ) {
|
698 |
// overflow body hidden
|
699 |
jQuery('body').addClass('modal-open');
|
711 |
var newVer = jQuery('.update-theme').data('new_ver');
|
712 |
noticeHtml = '<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response['name']+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'" class="update-theme" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>';
|
713 |
}
|
|
|
|
|
714 |
}
|
715 |
}
|
716 |
|
719 |
var buttonDisabled = 'disabled ';
|
720 |
var buyURL = $wrapper.find('a').attr('href');
|
721 |
var buyButton = '<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>';
|
|
|
722 |
}
|
723 |
|
724 |
// get screenshots
|
785 |
jQuery('.theme-overlay.cmp .activate').click(function(e) {
|
786 |
e.preventDefault();
|
787 |
// select theme
|
788 |
+
jQuery('input[name="niteoCS_select_theme"]').each(function() {
|
789 |
if ( jQuery(this).val() == slug ) {
|
790 |
jQuery(this).prop('checked', true);
|
791 |
jQuery('.theme-select').removeClass('selected');
|
826 |
|
827 |
});
|
828 |
|
|
|
|
|
|
|
829 |
// define functions //
|
830 |
function ucwords (str) {
|
831 |
return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) {
|
837 |
return (str+'').toLowerCase();
|
838 |
}
|
839 |
|
840 |
+
function media_upload_button (name, multiple, type, element) {
|
841 |
// define var
|
842 |
var $container = jQuery('.'+name+'-wrapper');
|
843 |
var $add_button = jQuery('#add-'+name);
|
854 |
|
855 |
$add_button.click(function(e) {
|
856 |
e.preventDefault();
|
857 |
+
// If the media frame already exists, reopen it.
|
858 |
if ( media_uploader ) {
|
859 |
media_uploader.open();
|
860 |
return;
|
874 |
// Get media attachment details from the frame state
|
875 |
var attachment = media_uploader.state().get('selection').toJSON();
|
876 |
|
877 |
+
if ( attachment.length > 0 ) {
|
878 |
+
$container.find('img').remove();
|
879 |
+
|
880 |
+
// remove and add gallery count class
|
881 |
+
$container.attr('class', name + '-wrapper custom-gallery');
|
882 |
+
$container.addClass('gallery-' + attachment.length);
|
883 |
|
884 |
+
// get images ID, append thumbnail and store IDs in hidden input
|
885 |
jQuery(attachment).each(function(i) {
|
886 |
if (attachment[i].sizes && attachment[i].sizes.large) {
|
887 |
image = attachment[i].sizes.large.url;
|
890 |
}
|
891 |
|
892 |
// add image ID and url to comma-separated variable
|
893 |
+
var comma = ( i === 0 ) ? '' : ',';
|
894 |
imgID += ( comma + attachment[i].id );
|
|
|
895 |
|
896 |
+
// Send the attachment URL to our custom image input field.
|
897 |
+
switch ( element ) {
|
898 |
+
case 'video':
|
899 |
+
$container.append( '<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>' );
|
900 |
+
break;
|
901 |
+
|
902 |
+
case 'background':
|
903 |
+
$container.css('background-image', 'url(\''+image+'\')');
|
904 |
+
break;
|
905 |
+
|
906 |
+
case 'img':
|
907 |
+
default:
|
908 |
+
// if gallery - more than one image, it must be a graphic background, attach the first image to big coontainer
|
909 |
+
if ( attachment.length > 1 && i == 0 ) {
|
910 |
+
jQuery('.big-thumb').append( '<img src="' + image + '" alt=""/>' );
|
911 |
+
|
912 |
+
// if gallery - more than one image, it must be a graphic background, attach all others images to normal wrapper
|
913 |
+
} else if ( attachment.length > 1 && i !== 0 ) {
|
914 |
+
$container.append( '<img src="' + image + '" alt="" class="no-blur"/>' );
|
915 |
+
|
916 |
+
// if single image, and it is a background image, attach it to big container as well
|
917 |
+
} else if ( $container.find('.big-thumb').length ) {
|
918 |
+
jQuery('.big-thumb').append( '<img src="' + image + '" alt=""/>' );
|
919 |
+
|
920 |
+
// all others images
|
921 |
+
} else {
|
922 |
+
$container.append( '<img src="' + image + '" alt=""/>' );
|
923 |
+
}
|
924 |
+
|
925 |
+
jQuery( '.blur-range' ).trigger('input');
|
926 |
+
break;
|
927 |
}
|
928 |
|
929 |
});
|
933 |
|
934 |
}
|
935 |
// update hidden input with media id and trigger change
|
936 |
+
jQuery('#niteoCS-'+name+'-id').val( imgID ).trigger('change');
|
937 |
|
938 |
})
|
939 |
+
.open();
|
|
|
|
|
940 |
});
|
941 |
|
|
|
942 |
$delete_button.click(function(e) {
|
943 |
jQuery(this).css('display', 'none');
|
944 |
+
$container.find('img').remove();
|
945 |
jQuery('#niteoCS-'+name+'-id').val('');
|
946 |
jQuery('#niteoCS-'+name+'-id').trigger('change');
|
|
|
947 |
});
|
948 |
}
|
949 |
|
|
|
950 |
// Retrieve Mailchimp lists
|
951 |
jQuery('#connect-mailchimp').click(function(e){
|
952 |
e.preventDefault();
|
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 |
});
|
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 |
|
js/settings.min.js
CHANGED
@@ -1 +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)})}})});
|
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})});
|
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.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -18,30 +18,34 @@ class niteo_cmp {
|
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
-
$this->version = '2.
|
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 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
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 |
|
@@ -85,8 +89,8 @@ class niteo_cmp {
|
|
85 |
}
|
86 |
|
87 |
public function cmp_adminInit() {
|
88 |
-
|
89 |
-
if (
|
90 |
// ini render-settings class
|
91 |
require_once('inc/class-cmp-render_settings.php');
|
92 |
$this->render_settings = new cmp_render_settings();
|
@@ -235,14 +239,14 @@ class niteo_cmp {
|
|
235 |
public function cmp_admin_override(){
|
236 |
|
237 |
// if admin or CMP disabled, return
|
238 |
-
if(
|
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();
|
@@ -279,7 +283,7 @@ class niteo_cmp {
|
|
279 |
|
280 |
}
|
281 |
|
282 |
-
// preview for specific theme cmp_preview=true&template=slug used
|
283 |
if ( isset($_GET['cmp_theme']) && !empty($_GET['cmp_theme']) ) {
|
284 |
$theme_preview = esc_attr($_GET['cmp_theme']);
|
285 |
|
@@ -449,10 +453,10 @@ class niteo_cmp {
|
|
449 |
// display admin topbar notice
|
450 |
public function cmp_admin_bar(){
|
451 |
|
452 |
-
//
|
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 |
}
|
@@ -468,8 +472,36 @@ class niteo_cmp {
|
|
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 );
|
@@ -482,19 +514,16 @@ class niteo_cmp {
|
|
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');
|
@@ -1031,7 +1060,19 @@ class niteo_cmp {
|
|
1031 |
$subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
|
1032 |
|
1033 |
$response = '';
|
1034 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1035 |
$ajax = false;
|
1036 |
|
1037 |
// check for ajax request
|
@@ -1058,19 +1099,6 @@ class niteo_cmp {
|
|
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':
|
@@ -1340,7 +1368,7 @@ class niteo_cmp {
|
|
1340 |
|
1341 |
// public function to shift multidimensional array
|
1342 |
public function customShift($array, $name){
|
1343 |
-
|
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
|
@@ -1553,7 +1581,7 @@ class niteo_cmp {
|
|
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 |
};
|
@@ -1564,16 +1592,17 @@ class niteo_cmp {
|
|
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 |
-
|
|
|
1577 |
|
1578 |
// migrate google analytics options
|
1579 |
if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
|
@@ -1639,22 +1668,25 @@ class niteo_cmp {
|
|
1639 |
}
|
1640 |
}
|
1641 |
|
1642 |
-
//
|
1643 |
-
|
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 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1656 |
|
1657 |
-
update_option('niteoCS_translation', wp_json_encode($translation));
|
1658 |
}
|
1659 |
|
1660 |
|
@@ -1662,7 +1694,7 @@ class niteo_cmp {
|
|
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;
|
@@ -1681,6 +1713,7 @@ class niteo_cmp {
|
|
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
|
@@ -1700,8 +1733,8 @@ class niteo_cmp {
|
|
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 {
|
@@ -1709,7 +1742,7 @@ class niteo_cmp {
|
|
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 |
|
@@ -1744,7 +1777,7 @@ class niteo_cmp {
|
|
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(
|
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
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
+
$this->version = '2.8';
|
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 |
+
|
29 |
+
// set array of themes supporting countdown
|
30 |
+
$this->countdown_themes = array('frame', 'countdown', 'postery', 'countdown2', 'stylo', 'element');
|
31 |
+
|
32 |
+
// set array of themes supporting Font Animations
|
33 |
+
$this->fontanimation_themes = array('hardwork_premium', 'fifty', 'orbit', 'stylo');
|
34 |
|
35 |
// get all installed themes [folder names under /themes] and put them to array
|
36 |
$this->themes_standard = array_map('basename', glob( plugin_dir_path( __FILE__ ) . 'themes/*', GLOB_ONLYDIR));
|
37 |
|
38 |
// check for installed premium themes
|
39 |
+
if ( file_exists( $this->plugins_dir_path . 'cmp-premium-themes/' ) ) {
|
40 |
+
$this->premium_installed = array_map( 'basename', glob( $this->plugins_dir_path . 'cmp-premium-themes/*', GLOB_ONLYDIR ) );
|
41 |
+
$this->theme_array = array_merge( $this->themes_standard, $this->premium_installed );
|
42 |
} else {
|
43 |
$this->theme_array = $this->themes_standard;
|
44 |
}
|
45 |
|
46 |
// set remote server URL for updates
|
47 |
+
$this->remoteServer = ( $this->dev == true ) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
|
48 |
+
$this->minified = ( $this->dev == true ) ? '' : '.min';
|
49 |
|
50 |
$this->init();
|
51 |
|
89 |
}
|
90 |
|
91 |
public function cmp_adminInit() {
|
92 |
+
|
93 |
+
if ( current_user_can('administrator') ) {
|
94 |
// ini render-settings class
|
95 |
require_once('inc/class-cmp-render_settings.php');
|
96 |
$this->render_settings = new cmp_render_settings();
|
239 |
public function cmp_admin_override(){
|
240 |
|
241 |
// if admin or CMP disabled, return
|
242 |
+
if ( current_user_can('administrator') || $this->cmp_status() == 0 ) {
|
243 |
return;
|
244 |
}
|
245 |
|
246 |
+
if ( is_user_logged_in() ) {
|
247 |
|
248 |
+
// logout and force redirect if logged-in user role is not set to bypass CMP
|
249 |
+
if ( !$this->cmp_roles_filter() ) {
|
250 |
wp_logout();
|
251 |
wp_redirect( get_bloginfo('url') );
|
252 |
exit();
|
283 |
|
284 |
}
|
285 |
|
286 |
+
// preview for specific theme cmp_preview=true&template=slug used for customer themes installed previews
|
287 |
if ( isset($_GET['cmp_theme']) && !empty($_GET['cmp_theme']) ) {
|
288 |
$theme_preview = esc_attr($_GET['cmp_theme']);
|
289 |
|
453 |
// display admin topbar notice
|
454 |
public function cmp_admin_bar(){
|
455 |
|
456 |
+
// CMP PLUGIN ACTIVATION AND STATUS CHANGE SETTINGS!
|
457 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && ( get_current_screen() && get_current_screen()->id == 'toplevel_page_cmp-settings' ) ) {
|
458 |
|
459 |
+
// verify nonce and user rights
|
460 |
if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
|
461 |
die('Sorry, but this request is invalid');
|
462 |
}
|
472 |
update_option('niteoCS_status', false);
|
473 |
}
|
474 |
|
475 |
+
// purge cache in 3rd party plugins
|
476 |
+
if ( function_exists( 'w3tc_pgcache_flush' ) ) {
|
477 |
+
w3tc_pgcache_flush();
|
478 |
+
}
|
479 |
+
|
480 |
+
if ( function_exists( 'wp_cache_clear_cache' ) ) {
|
481 |
+
wp_cache_clear_cache();
|
482 |
+
}
|
483 |
+
|
484 |
+
if ( class_exists( 'Endurance_Page_Cache' ) ) {
|
485 |
+
$epc = new Endurance_Page_Cache;
|
486 |
+
$epc->purge_all();
|
487 |
+
}
|
488 |
+
|
489 |
+
if ( class_exists( 'SG_CachePress_Supercacher' ) && method_exists( 'SG_CachePress_Supercacher', 'purge_cache' ) ) {
|
490 |
+
SG_CachePress_Supercacher::purge_cache (true );
|
491 |
+
}
|
492 |
+
|
493 |
+
if ( isset( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
|
494 |
+
$GLOBALS['wp_fastest_cache']->deleteCache( true );
|
495 |
+
}
|
496 |
+
|
497 |
+
if ( is_callable( array( 'Swift_Performance_Cache', 'clear_all_cache' ) ) ) {
|
498 |
+
Swift_Performance_Cache::clear_all_cache();
|
499 |
+
}
|
500 |
+
|
501 |
}
|
502 |
|
503 |
+
|
504 |
+
// Display admin TOPBAR
|
505 |
require_once(ABSPATH . 'wp-admin/includes/screen.php');
|
506 |
|
507 |
$roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
|
514 |
// if current user cannot access topbar, return
|
515 |
foreach ( $current_user->roles as $role ) {
|
516 |
|
|
|
517 |
if ( !in_array( $role, $roles_topbar ) ) {
|
518 |
return false;
|
519 |
}
|
520 |
};
|
521 |
|
|
|
522 |
global $wp_admin_bar;
|
523 |
|
524 |
$class = '';
|
525 |
$msg= '';
|
526 |
|
|
|
527 |
switch ( get_option( 'niteoCS_activation', '2' ) ) {
|
528 |
case '1':
|
529 |
$msg = __('Maintenance Mode:','cmp-coming-soon-maintenance');
|
1060 |
$subscribe_method = get_option('niteoCS_subscribe_method', 'cmp');
|
1061 |
|
1062 |
$response = '';
|
1063 |
+
// get translation lists
|
1064 |
+
if ( get_option('niteoCS_translation') ) {
|
1065 |
+
$translation = json_decode( get_option('niteoCS_translation'), true );
|
1066 |
+
$response_ok = $translation[7]['translation'];
|
1067 |
+
$response_duplicate = $translation[5]['translation'];
|
1068 |
+
$response_invalid = $translation[6]['translation'];
|
1069 |
+
|
1070 |
+
} else {
|
1071 |
+
$response_ok = 'Thank you, your sign-up request was successful!';
|
1072 |
+
$response_duplicate = 'This Email address has already been on our subscriber list.';
|
1073 |
+
$response_invalid = 'Please insert valid Email address.';
|
1074 |
+
}
|
1075 |
+
|
1076 |
$ajax = false;
|
1077 |
|
1078 |
// check for ajax request
|
1099 |
$lastname = ( isset( $_POST['lastname'] ) ) ? sanitize_text_field( $_POST['lastname'] ) : '';
|
1100 |
$timestamp = time();
|
1101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1102 |
switch ( $subscribe_method ) {
|
1103 |
// default custom CMP method
|
1104 |
case 'cmp':
|
1368 |
|
1369 |
// public function to shift multidimensional array
|
1370 |
public function customShift($array, $name){
|
1371 |
+
|
1372 |
foreach($array as $key => $val){ // loop all elements
|
1373 |
if($val['name'] == $name){ // check for id $id
|
1374 |
unset($array[$key]); // unset the $array with id $id
|
1581 |
$current_user = wp_get_current_user();
|
1582 |
|
1583 |
foreach ( $current_user->roles as $role ) {
|
1584 |
+
if ( in_array( $role, $roles ) ) {
|
1585 |
return true;
|
1586 |
}
|
1587 |
};
|
1592 |
|
1593 |
public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
|
1594 |
if ( is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra) ) {
|
1595 |
+
if ( $hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins']) ) {
|
1596 |
$this_plugin = plugin_basename(__FILE__);
|
1597 |
+
foreach ( $hook_extra['plugins'] as $key => $plugin ) {
|
1598 |
+
if ( $this_plugin == $plugin ) {
|
1599 |
$this_plugin_updated = true;
|
1600 |
break;
|
1601 |
}
|
1602 |
}// endforeach;
|
1603 |
+
unset( $key, $plugin, $this_plugin );
|
1604 |
+
|
1605 |
+
if ( isset( $this_plugin_updated ) && $this_plugin_updated === true ) {
|
1606 |
|
1607 |
// migrate google analytics options
|
1608 |
if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
|
1668 |
}
|
1669 |
}
|
1670 |
|
1671 |
+
// migrate overlay color and opacity settings after update 2.8
|
1672 |
+
$current_theme = get_option('niteoCS_theme');
|
|
|
|
|
|
|
|
|
1673 |
|
1674 |
+
if ( $current_theme ) {
|
1675 |
+
$overlay_color = get_option('niteoCS_overlay_color['.$current_theme.']');
|
1676 |
+
$overlay_opacity = get_option('niteoCS_overlay_opacity['.$current_theme.']');
|
1677 |
|
1678 |
+
if ( $overlay_color ) {
|
1679 |
+
update_option( 'niteoCS_overlay['.$current_theme.']', 'solid-color' );
|
1680 |
+
update_option( 'niteoCS_overlay['.$current_theme.'][color]', $overlay_color );
|
1681 |
+
}
|
1682 |
+
|
1683 |
+
if ( $overlay_opacity ) {
|
1684 |
+
update_option( 'niteoCS_overlay['.$current_theme.'][opacity]', $overlay_opacity );
|
1685 |
+
}
|
1686 |
+
|
1687 |
+
delete_option('niteoCS_overlay_color['.$current_theme.']');
|
1688 |
+
delete_option('niteoCS_overlay_opacity['.$current_theme.']');
|
1689 |
|
|
|
1690 |
}
|
1691 |
|
1692 |
|
1694 |
if ( get_option('niteoCS_subscribers_list') ) {
|
1695 |
$subscribe_list = get_option('niteoCS_subscribers_list');
|
1696 |
|
1697 |
+
if ( is_array( $subscribe_list ) && count( $subscribe_list ) > 0 && !array_key_exists ('id', $subscribe_list[0]) ) {
|
1698 |
$i = 1;
|
1699 |
foreach( $subscribe_list as &$sub ){
|
1700 |
$sub['id'] = $i;
|
1713 |
foreach ( $this->premium_installed as $theme_slug ) {
|
1714 |
delete_transient( $theme_slug.'_updatecheck' );
|
1715 |
}
|
1716 |
+
|
1717 |
}// endif; $this_plugin_updated
|
1718 |
}// endif update plugin and plugins not empty.
|
1719 |
}// endif; $hook_extra
|
1733 |
// if premium theme style.css exists get its version
|
1734 |
|
1735 |
if ( in_array( $theme_slug, $this->premium_installed ) ) {
|
1736 |
+
if ( file_exists( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css' ) ) {
|
1737 |
+
$version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', array('Version'), '' );
|
1738 |
}
|
1739 |
|
1740 |
} else {
|
1742 |
}
|
1743 |
|
1744 |
// if we have local version of theme and not in updating theme
|
1745 |
+
if ( is_array( $version ) ) {
|
1746 |
$version = $version[0];
|
1747 |
}
|
1748 |
|
1777 |
|
1778 |
$api_key = $params['apikey'];
|
1779 |
|
1780 |
+
$dc = substr( $api_key,strpos($api_key,'-') + 1 ); // datacenter, it is the part of your api key - us5, us8 etc
|
1781 |
|
1782 |
$args = array(
|
1783 |
'headers' => array(
|
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 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -112,6 +112,23 @@ CMP – Coming Soon & Maintenance plugin has all premium features you ever wishe
|
|
112 |
<p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
|
113 |
|
114 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
<h4>CMP 2.7 update</h4>
|
116 |
<ul>
|
117 |
<li>New Premium CMP Theme: Element. We hope you enjoy it guys!</li>
|
4 |
Tags: coming soon, landing page, launch page, maintenance mode, under construction
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
112 |
<p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
|
113 |
|
114 |
== Changelog ==
|
115 |
+
<h4>CMP 2.8 update</h4>
|
116 |
+
<ul>
|
117 |
+
<li>New Feature: Background Gradient Overlay. You can now set a beautiful gradient over your Background images or videos!</li>
|
118 |
+
<li>New Feature: Support for every major 3rd party chaching plugins. Website caching caused many support questions so hopefully it is resolved now.</li>
|
119 |
+
<li>Change: Moved Color Overlay Setup to Background media section.</li>
|
120 |
+
<li>Bug Resolved: Formating of MailChimp Email Successful Subscription message.</li>
|
121 |
+
<li>Bug Resolved: Translation phrase "Please insert valid Email address." bug. - thanks @70ph!</li>
|
122 |
+
|
123 |
+
<p>*** please note we recommend to upgrade your Premium or Freebies themes after this update! *** </p>
|
124 |
+
</ul>
|
125 |
+
|
126 |
+
|
127 |
+
<h4>CMP 2.7.1 update</h4>
|
128 |
+
<ul>
|
129 |
+
<li>Resolved issue with bypassing CMP by selected roles - reported by @bundag, thanks!</li>
|
130 |
+
</ul>
|
131 |
+
|
132 |
<h4>CMP 2.7 update</h4>
|
133 |
<ul>
|
134 |
<li>New Premium CMP Theme: Element. We hope you enjoy it guys!</li>
|
themes/coder.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Coder
|
3 |
+
Description: <p>Hardwork is our default theme for CMP plugin. By default it is set to modern white screen with only one heading to display clear message: "This website is under construction, please come back later".</p><p>Set a fullscreen custom image or use any from thousands Unsplash Library media, set social icons, add custom texts with overlay color and you have beautiful colorful landing page both for Under construction or Coming soon page.</p><h4>Supported Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Fade in/out Text Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
4 |
+
|
5 |
+
|
6 |
+
|
themes/construct/style.css
CHANGED
@@ -59,6 +59,7 @@ h1,h2,h3,h4,h5,h6{font-weight: 400;}
|
|
59 |
.section-body p{width:70%;max-width: 900px;margin:0.5em auto;}
|
60 |
.section-social{background-color: #f8f8f8;}
|
61 |
.section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;font-size:1em;}
|
|
|
62 |
#background-image, .video-banner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;background-attachment: scroll!important;background-position: center center;background-repeat: no-repeat;background-size: cover;}
|
63 |
#background-image {opacity: 0; -webkit-transition: opacity 400ms; transition: opacity 400ms;}
|
64 |
#background-image.loaded {opacity: 1;}
|
59 |
.section-body p{width:70%;max-width: 900px;margin:0.5em auto;}
|
60 |
.section-social{background-color: #f8f8f8;}
|
61 |
.section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;font-size:1em;}
|
62 |
+
.background-overlay{position: absolute;top: 0;right: 0;bottom: 0;left: 0;}
|
63 |
#background-image, .video-banner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;background-attachment: scroll!important;background-position: center center;background-repeat: no-repeat;background-size: cover;}
|
64 |
#background-image {opacity: 0; -webkit-transition: opacity 400ms; transition: opacity 400ms;}
|
65 |
#background-image.loaded {opacity: 1;}
|
themes/countdown/countdown-defaults.php
CHANGED
@@ -20,13 +20,6 @@ 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 |
-
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,8 +32,6 @@ $banner_type = get_option('niteoCS_banner['.$themeslug.']', '1');
|
|
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 |
|
20 |
update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location']) {
|
25 |
update_option('niteoCS_social_location', sanitize_text_field($_POST['niteoCS_social_location']));
|
32 |
|
33 |
$active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
|
34 |
$font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
|
|
|
|
|
35 |
|
36 |
$social_location = get_option('niteoCS_social_location', 'footer');
|
37 |
|
themes/countdown/countdown-settings.php
CHANGED
@@ -31,21 +31,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
31 |
</fieldset>
|
32 |
</td>
|
33 |
</tr>
|
34 |
-
<tr>
|
35 |
-
<th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
36 |
-
<td>
|
37 |
-
|
38 |
-
<fieldset id="overlay-color">
|
39 |
-
<input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
|
40 |
-
</fieldset>
|
41 |
|
42 |
-
<fieldset>
|
43 |
-
<label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?>: <span>: <?php echo esc_attr( $overlay_opacity); ?></span></label><br>
|
44 |
-
<input type="range" class="overlay-opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opacity); ?>" />
|
45 |
-
|
46 |
-
</fieldset>
|
47 |
-
</td>
|
48 |
-
</tr>
|
49 |
<tr><th>
|
50 |
<p class="cmp-submit">
|
51 |
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
@@ -64,7 +50,6 @@ jQuery(document).ready(function($){
|
|
64 |
jQuery('#niteoCS_font_color').wpColorPicker();
|
65 |
jQuery('#niteoCS_background_color').wpColorPicker();
|
66 |
jQuery('#niteoCS_active_color').wpColorPicker();
|
67 |
-
jQuery('#niteoCS_overlay_color').wpColorPicker();
|
68 |
|
69 |
});
|
70 |
</script>
|
31 |
</fieldset>
|
32 |
</td>
|
33 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<tr><th>
|
36 |
<p class="cmp-submit">
|
37 |
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
50 |
jQuery('#niteoCS_font_color').wpColorPicker();
|
51 |
jQuery('#niteoCS_background_color').wpColorPicker();
|
52 |
jQuery('#niteoCS_active_color').wpColorPicker();
|
|
|
53 |
|
54 |
});
|
55 |
</script>
|
themes/countdown/countdown-theme.php
CHANGED
@@ -26,9 +26,7 @@
|
|
26 |
$themeslug = 'countdown';
|
27 |
|
28 |
// get theme related settings
|
29 |
-
|
30 |
-
$font_color_light = $this->hex2hsl($font_color, '20');
|
31 |
-
$background_overlay = $this->hex2rgba($overlay_color, $overlay_opacity);
|
32 |
|
33 |
// get global settings
|
34 |
$niteoCS_counter = get_option('niteoCS_counter', '1');
|
@@ -55,7 +53,6 @@
|
|
55 |
::-moz-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
|
56 |
.input-icon:before,input[type="email"],input[type="text"]{color: <?php echo esc_attr( $font_color_light );?>;}
|
57 |
/* input[type="email"],input[type="text"] {border:1px solid <?php echo esc_attr( $font_color_light );?>;} */
|
58 |
-
.background-overlay{background-color:<?php echo esc_attr( $background_overlay );?>;}
|
59 |
footer, footer a {color: <?php echo esc_attr( $font_color_light );?>;}
|
60 |
.social-list.body a {background-color: <?php echo esc_attr( $font_color ); ?>;}
|
61 |
.social-list.body a:hover {background-color: <?php echo esc_attr( $active_color ); ?>;}
|
@@ -91,10 +88,8 @@
|
|
91 |
|
92 |
<div id="background-wrapper">
|
93 |
<?php
|
94 |
-
$overlay = ( $overlay_opacity == '0' ) ? false : true;
|
95 |
-
|
96 |
if ( method_exists ( $html, 'cmp_background' ) ) {
|
97 |
-
echo $html->cmp_background( $banner_type, $themeslug
|
98 |
|
99 |
} ?>
|
100 |
</div>
|
26 |
$themeslug = 'countdown';
|
27 |
|
28 |
// get theme related settings
|
29 |
+
$font_color_light = $this->hex2hsl( $font_color, '20' );
|
|
|
|
|
30 |
|
31 |
// get global settings
|
32 |
$niteoCS_counter = get_option('niteoCS_counter', '1');
|
53 |
::-moz-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
|
54 |
.input-icon:before,input[type="email"],input[type="text"]{color: <?php echo esc_attr( $font_color_light );?>;}
|
55 |
/* input[type="email"],input[type="text"] {border:1px solid <?php echo esc_attr( $font_color_light );?>;} */
|
|
|
56 |
footer, footer a {color: <?php echo esc_attr( $font_color_light );?>;}
|
57 |
.social-list.body a {background-color: <?php echo esc_attr( $font_color ); ?>;}
|
58 |
.social-list.body a:hover {background-color: <?php echo esc_attr( $active_color ); ?>;}
|
88 |
|
89 |
<div id="background-wrapper">
|
90 |
<?php
|
|
|
|
|
91 |
if ( method_exists ( $html, 'cmp_background' ) ) {
|
92 |
+
echo $html->cmp_background( $banner_type, $themeslug );
|
93 |
|
94 |
} ?>
|
95 |
</div>
|
themes/hardwork/hardwork-defaults.php
CHANGED
@@ -5,16 +5,14 @@ if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
|
|
5 |
update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
|
6 |
}
|
7 |
|
8 |
-
|
9 |
-
|
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,
|
@@ -30,9 +28,9 @@ $banner_type = get_option('niteoCS_banner['.$themeslug.']', '4');
|
|
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'),
|
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,
|
28 |
|
29 |
$banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
|
30 |
$font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
|
|
|
|
|
31 |
|
32 |
+
$footer_background = get_option('niteoCS_footer_background['.$themeslug.']', '#000000');
|
33 |
+
$footer_opacity = get_option('niteoCS_footer_background_opacity['.$themeslug.']', '0.4');
|
34 |
|
35 |
$heading_font = array(
|
36 |
'family' => get_option('niteoCS_font_headings['.$themeslug.']', 'Playfair Display'),
|
themes/hardwork/hardwork-settings.php
CHANGED
@@ -19,19 +19,23 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
19 |
</fieldset>
|
20 |
</td>
|
21 |
</tr>
|
|
|
22 |
<tr>
|
23 |
-
<th><h4><?php _e('
|
24 |
<td>
|
25 |
-
<fieldset
|
26 |
-
<input type="text" name="
|
27 |
</fieldset>
|
28 |
|
29 |
<fieldset>
|
30 |
-
<label for="
|
31 |
-
|
|
|
32 |
</fieldset>
|
33 |
</td>
|
|
|
34 |
</tr>
|
|
|
35 |
<tr><th>
|
36 |
<p class="cmp-submit">
|
37 |
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
@@ -47,16 +51,12 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
47 |
jQuery(document).ready(function($){
|
48 |
// ini color picker
|
49 |
jQuery('#niteoCS_font_color').wpColorPicker();
|
50 |
-
jQuery('#
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
54 |
|
55 |
-
|
56 |
-
jQuery('#overlay-color').css('display','block')
|
57 |
-
} else {
|
58 |
-
jQuery('#overlay-color').css('display','none')
|
59 |
-
}
|
60 |
-
});
|
61 |
});
|
62 |
</script>
|
19 |
</fieldset>
|
20 |
</td>
|
21 |
</tr>
|
22 |
+
|
23 |
<tr>
|
24 |
+
<th><h4><?php _e('Footer Background Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
25 |
<td>
|
26 |
+
<fieldset>
|
27 |
+
<input type="text" name="niteoCS_footer_background_<?php echo esc_attr($themeslug);?>" id="niteoCS_footer_background_<?php echo esc_attr($themeslug);?>" value="<?php echo esc_attr( $footer_background); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
|
28 |
</fieldset>
|
29 |
|
30 |
<fieldset>
|
31 |
+
<label for="niteoCS_footer_background_opacity_<?php echo esc_attr( $themeslug );?>"><?php _e('Footer Background Opacity', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $footer_opacity ); ?></span></label><br>
|
32 |
+
|
33 |
+
<input type="range" class="footer-opacity-<?php echo esc_attr( $themeslug );?>" name="niteoCS_footer_background_opacity_<?php echo esc_attr( $themeslug );?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $footer_opacity ); ?>" />
|
34 |
</fieldset>
|
35 |
</td>
|
36 |
+
|
37 |
</tr>
|
38 |
+
|
39 |
<tr><th>
|
40 |
<p class="cmp-submit">
|
41 |
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
51 |
jQuery(document).ready(function($){
|
52 |
// ini color picker
|
53 |
jQuery('#niteoCS_font_color').wpColorPicker();
|
54 |
+
jQuery('#niteoCS_footer_background_<?php echo esc_attr($themeslug);?>').wpColorPicker();
|
55 |
+
jQuery( '.footer-opacity-<?php echo esc_attr( $themeslug );?>' ).on('input', function () {
|
56 |
+
var value = jQuery(this).val();
|
57 |
+
// change label value
|
58 |
+
jQuery(this).parent().find('span').html(value);
|
59 |
|
60 |
+
});
|
|
|
|
|
|
|
|
|
|
|
61 |
});
|
62 |
</script>
|
themes/hardwork/hardwork-theme.php
CHANGED
@@ -33,9 +33,8 @@
|
|
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 ( $
|
37 |
-
.
|
38 |
-
.social-list{background-color: <?php echo $this->hex2rgba( esc_attr( $overlay_color ), 0.4);?>;}
|
39 |
<?php
|
40 |
} ?>
|
41 |
a {color:<?php echo esc_attr( $font_color ); ?>;}
|
@@ -70,10 +69,8 @@
|
|
70 |
<div id="background-wrapper">
|
71 |
|
72 |
<?php
|
73 |
-
$overlay = ( $overlay_opacity == '0' ) ? false : true;
|
74 |
-
|
75 |
if ( method_exists ( $html, 'cmp_background' ) ) {
|
76 |
-
echo $html->cmp_background( $banner_type, $themeslug
|
77 |
|
78 |
} ?>
|
79 |
|
33 |
<style>
|
34 |
body,input {font-family:'<?php echo esc_attr($content_font['family']);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
|
35 |
<?php
|
36 |
+
if ( $footer_opacity != '0' ) { ?>
|
37 |
+
.social-list {background-color: <?php echo esc_attr( $this->hex2rgba( $footer_background, $footer_opacity ) );?>;}
|
|
|
38 |
<?php
|
39 |
} ?>
|
40 |
a {color:<?php echo esc_attr( $font_color ); ?>;}
|
69 |
<div id="background-wrapper">
|
70 |
|
71 |
<?php
|
|
|
|
|
72 |
if ( method_exists ( $html, 'cmp_background' ) ) {
|
73 |
+
echo $html->cmp_background( $banner_type, $themeslug );
|
74 |
|
75 |
} ?>
|
76 |
|