Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 1.11.0 |
Comparing to | |
See all releases |
Code changes from version 1.10.0 to 1.11.0
- cmp-advanced.php +68 -0
- cmp-settings.php +36 -78
- css/cmp-settings-style.css +37 -18
- css/fastselect.min.css +232 -0
- img/thumbnails/construct/screenshot1.jpg +0 -0
- img/thumbnails/countdown/screenshot1.jpg +0 -0
- img/thumbnails/countdown/screenshot2.jpg +0 -0
- img/thumbnails/fifty/screenshot1.jpg +0 -0
- img/thumbnails/fifty/screenshot2.jpg +0 -0
- img/thumbnails/frame/screenshot1.jpg +0 -0
- img/thumbnails/hardwork/screenshot1.jpg +0 -0
- img/thumbnails/hardwork/screenshot2.jpg +0 -0
- img/thumbnails/hardwork/screenshot3.jpg +0 -0
- img/thumbnails/hardwork_premium/screenshot1.jpg +0 -0
- img/thumbnails/postery/screenshot1.jpg +0 -0
- img/thumbnails/postery/screenshot2.jpg +0 -0
- inc/class-cmp-subscribers.php +2 -2
- inc/helper-functions.php +55 -0
- inc/settings-background.php +26 -26
- inc/settings-counter.php +0 -2
- inc/settings-slider.php +1 -1
- inc/settings-subscribe.php +1 -4
- js/fastsearch.min.js +1 -0
- js/fastselect.min.js +773 -0
- js/settings.js +309 -455
- js/settings.min.js +1 -1
- languages/coming-soon-default.mo +0 -0
- languages/coming-soon-default.po +23 -135
- niteo-cmp.php +165 -96
- readme.txt +16 -8
- sftp-config.json +0 -45
- themes/construct.txt +7 -0
- themes/construct/construct-theme.php +58 -28
- themes/construct/style.css +32 -18
- themes/countdown.txt +7 -0
- themes/countdown/countdown-theme.php +59 -23
- themes/countdown/style.css +62 -30
- themes/fifty.txt +7 -0
- themes/fifty_thumbnail.jpg +0 -0
- themes/frame.txt +7 -0
- themes/frame_thumbnail.jpg +0 -0
- themes/hardwork.txt +7 -0
- themes/hardwork/hardwork-defaults.php +2 -2
- themes/hardwork/hardwork-settings.php +1 -3
- themes/hardwork/hardwork-theme.php +75 -49
- themes/hardwork/style.css +48 -31
- themes/hardwork_premium.txt +7 -0
- themes/hardwork_premium_thumbnail.jpg +0 -0
- themes/postery.txt +7 -0
- themes/postery/img/postery_banner_full.jpg +0 -0
- themes/postery/postery-defaults.php +3 -3
- themes/postery/postery-theme.php +89 -58
- themes/postery/style.css +46 -27
cmp-advanced.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
|
4 |
+
$pages = $this->cmp_get_pages();
|
5 |
+
?>
|
6 |
+
|
7 |
+
<div class="wrap">
|
8 |
+
|
9 |
+
<div id="icon-options-general" class="icon32">
|
10 |
+
<br />
|
11 |
+
</div>
|
12 |
+
<form method="post" action="admin.php?page=cmp-advanced&status=settings-saved" id="csoptions">
|
13 |
+
|
14 |
+
<div class="cmp-settings-wrapper">
|
15 |
+
|
16 |
+
<div class="cmp-inputs-wrapper">
|
17 |
+
|
18 |
+
<div class="table-wrapper general">
|
19 |
+
<h3><?php _e('Individual Pages Settings', 'cmp-coming-soon-maintenance');?></h3>
|
20 |
+
<table class="general">
|
21 |
+
<tbody>
|
22 |
+
<tr>
|
23 |
+
<td>
|
24 |
+
<fieldset class="cmp-status">
|
25 |
+
<h4><?php _e('Select the pages on which to enable CMP Page.', 'cmp-coming-soon-maintenance');?></h4>
|
26 |
+
<select name="cmp-select-pages" class="cmp-select-pages" multiple>
|
27 |
+
<?php
|
28 |
+
foreach ($pages as $page) { ?>
|
29 |
+
<option value="<?php echo esc_attr($page['id']);?>"><?php echo esc_attr($page['name']);?></option>
|
30 |
+
<?php
|
31 |
+
} ?>
|
32 |
+
</select>
|
33 |
+
|
34 |
+
</fieldset>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
<tr><th>
|
38 |
+
<p class="cmp-submit">
|
39 |
+
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
40 |
+
<input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
|
41 |
+
</p>
|
42 |
+
</th></tr>
|
43 |
+
</tbody>
|
44 |
+
</table>
|
45 |
+
|
46 |
+
</div>
|
47 |
+
|
48 |
+
</div> <!-- <div class="cmp-settings-wrapper"> -->
|
49 |
+
|
50 |
+
<?php
|
51 |
+
// get sidebar with "widgets"
|
52 |
+
if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
|
53 |
+
require (dirname(__FILE__) . '/cmp-sidebar.php');
|
54 |
+
}
|
55 |
+
|
56 |
+
?>
|
57 |
+
|
58 |
+
</div> <!-- <div class="cmp-inputs-wrapper"> -->
|
59 |
+
|
60 |
+
</div> <!-- <div id="wrap"> -->
|
61 |
+
|
62 |
+
<script>
|
63 |
+
jQuery(document).ready(function($){
|
64 |
+
$('.cmp-select-pages').fastselect({
|
65 |
+
placeholder: 'Select pages..',
|
66 |
+
});
|
67 |
+
});
|
68 |
+
</script>
|
cmp-settings.php
CHANGED
@@ -74,6 +74,10 @@ if (isset($_POST['niteoCS_video_thumb_'.$themeslug])) {
|
|
74 |
update_option('niteoCS_video_thumb['.$themeslug.']', sanitize_text_field($_POST['niteoCS_video_thumb_'.$themeslug]));
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
77 |
|
78 |
if (isset($_POST['niteoCS_banner_id_'.$themeslug])) {
|
79 |
$allnums = true;
|
@@ -203,12 +207,18 @@ if (isset($_POST['niteoCS_URL_redirect'])) {
|
|
203 |
update_option('niteoCS_URL_redirect', esc_url_raw( $_POST['niteoCS_URL_redirect']));
|
204 |
}
|
205 |
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
$ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
|
208 |
|
209 |
// get Settings TAB
|
210 |
$premium_themes = $this->cmp_plugin_premium();
|
211 |
$niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
|
|
|
212 |
|
213 |
// get Content Settings
|
214 |
$niteoCS_body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
|
@@ -221,7 +231,7 @@ $niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
|
|
221 |
$niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
|
222 |
$niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
|
223 |
$niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
|
224 |
-
|
225 |
// get SEO
|
226 |
$niteoCS_favicon_id = get_option('niteoCS_favicon_id');
|
227 |
$niteoCS_title = stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!'));
|
@@ -251,10 +261,11 @@ $niteoCS_banner_video = get_option('niteoCS_banner_video['.$themeslug.']');
|
|
251 |
$niteoCS_youtube_url = get_option('niteoCS_youtube_url['.$themeslug.']');
|
252 |
$niteoCS_vimeo_url = get_option('niteoCS_vimeo_url['.$themeslug.']');
|
253 |
$niteoCS_video_thumb = get_option('niteoCS_video_thumb['.$themeslug.']');
|
|
|
254 |
|
255 |
//include theme defaults
|
256 |
-
if (file_exists($this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php')) {
|
257 |
-
include ( $this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php' );
|
258 |
}
|
259 |
|
260 |
|
@@ -291,21 +302,6 @@ if ( $niteoCS_banner_pattern == 'custom' && $niteoCS_banner_pattern_custom != ''
|
|
291 |
$pattern_url = plugins_url('/img/patterns/'.esc_attr($niteoCS_banner_pattern).'.png', __FILE__);
|
292 |
}
|
293 |
|
294 |
-
|
295 |
-
// count new subscribers
|
296 |
-
$new_subs = array();
|
297 |
-
|
298 |
-
if ( $niteoCS_subscribers_list ) {
|
299 |
-
foreach ($niteoCS_subscribers_list as $subscriber) {
|
300 |
-
|
301 |
-
if ( $subscriber['timestamp'] > $niteoCS_csv_export_time )
|
302 |
-
array_push($new_subs, $subscriber['email']);
|
303 |
-
}
|
304 |
-
$new_subs = count($new_subs);
|
305 |
-
} else {
|
306 |
-
$new_subs = '0';
|
307 |
-
}
|
308 |
-
|
309 |
// define patterns array
|
310 |
$patterns = array('fabric', 'gray_sand', 'green_dust_scratch', 'mirrored_squares', 'noisy', 'photography', 'playstation', 'sakura', 'white_sand', 'white_texture');
|
311 |
|
@@ -425,6 +421,8 @@ add_thickbox();
|
|
425 |
<input type="radio" name="activate" value="3" <?php echo ($this->cmp_status() == 3) ? 'checked="checked"' : '';?>> <?php _e('Redirect Mode', 'cmp-coming-soon-maintenance');?><br>
|
426 |
<span class="info redirect"><?php _e('Choose Redirect Mode if you want to redirect your website to another URL.','cmp-coming-soon-maintenance')?></span>
|
427 |
<input type="text" id="niteoCS_URL_redirect" name="niteoCS_URL_redirect" value="<?php echo esc_url( $niteoCS_URL_redirect); ?>" class="regular-text code" <?php echo ($this->cmp_status() == 3) ? '' : 'disabled';?>><br>
|
|
|
|
|
428 |
</legend>
|
429 |
|
430 |
</fieldset>
|
@@ -451,59 +449,30 @@ add_thickbox();
|
|
451 |
<span><?php _e('Free Themes', 'cmp-coming-soon-maintenance');?> </span>
|
452 |
</legend>
|
453 |
<?php
|
454 |
-
// define what attribute we want from style.css header
|
455 |
-
$headers = array('Version');
|
456 |
-
|
457 |
// move active theme to beginning
|
458 |
$key = array_search ($this->cmp_selectedTheme(), $this->themes_standard);
|
459 |
-
if ($key) {
|
460 |
$active = $this->themes_standard[$key];
|
461 |
unset($this->themes_standard[$key]);
|
462 |
array_unshift($this->themes_standard, $active);
|
463 |
}
|
464 |
|
465 |
-
$i = 0;
|
466 |
foreach ( $this->themes_standard as $theme_slug ) {
|
467 |
|
468 |
-
// get theme update transient if set
|
469 |
-
$theme_update = false;
|
470 |
-
$transient = get_transient( $theme_slug.'_updatecheck' );
|
471 |
-
if ( $transient != false && $transient =! '' ) {
|
472 |
-
$theme_update = true;
|
473 |
-
}
|
474 |
-
|
475 |
// get thumbnail
|
476 |
-
$thumbnail = plugins_url('/themes/'. $theme_slug . '/img/'. $theme_slug . '_thumbnail.jpg', __FILE__);
|
477 |
-
|
478 |
-
|
479 |
-
$version = '';
|
480 |
-
if (file_exists(plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css')) {
|
481 |
-
$version = get_file_data( plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css', $headers, '');
|
482 |
-
if (isset($version[0])) {
|
483 |
-
$version = $version[0];
|
484 |
-
}
|
485 |
-
}
|
486 |
-
?>
|
487 |
-
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-type="standard" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
|
488 |
<div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
|
489 |
|
490 |
<span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
|
491 |
-
|
492 |
-
<span class="theme-version">ver.<?php echo esc_html($version);?></span>
|
493 |
-
|
494 |
<div class="theme-inputs">
|
495 |
|
496 |
<div class="button theme-select hide <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
|
497 |
<input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
|
498 |
<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>
|
499 |
</div>
|
500 |
-
|
501 |
-
<?php
|
502 |
-
// echo update button if update is available
|
503 |
-
if ($theme_update === true) { ?>
|
504 |
-
<button type="button" class="theme-update button hide"><i class="fa fa-refresh" aria-hidden="true"></i><?php _e('Update', 'cmp-coming-soon-maintenance');?></button>
|
505 |
-
<?php
|
506 |
-
} ?>
|
507 |
|
508 |
<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>
|
509 |
|
@@ -511,7 +480,6 @@ add_thickbox();
|
|
511 |
</div> <!-- theme-wrapper -->
|
512 |
|
513 |
<?php
|
514 |
-
$i++;
|
515 |
} ?>
|
516 |
</fieldset>
|
517 |
</td>
|
@@ -527,7 +495,9 @@ add_thickbox();
|
|
527 |
|
528 |
</div>
|
529 |
<?php
|
530 |
-
if ( !empty($premium_themes) ) {
|
|
|
|
|
531 |
<div class="table-wrapper general">
|
532 |
<h3><?php _e('Premium Themes', 'cmp-coming-soon-maintenance');?></h3>
|
533 |
<table class="general theme-selector">
|
@@ -540,61 +510,49 @@ add_thickbox();
|
|
540 |
</legend>
|
541 |
<?php
|
542 |
// move active theme to beginning if active is not already set in standard themes
|
543 |
-
if ($key === false) {
|
544 |
$premium_themes = $this->customShift($premium_themes, $this->cmp_selectedTheme());
|
545 |
}
|
546 |
|
547 |
// build previews for premium themes
|
548 |
foreach ( $premium_themes as $premium_theme ) {
|
549 |
$theme_slug = $premium_theme['name'];
|
550 |
-
|
551 |
// if premium theme is not in themes array, display buy button
|
552 |
if ( !in_array( $theme_slug, $this->theme_array) ) {
|
553 |
-
$purchased = false;
|
554 |
$version = '';
|
555 |
-
$thumbnail = plugins_url('/themes/'. $theme_slug. '_thumbnail.jpg', __FILE__);
|
556 |
-
|
557 |
}
|
558 |
|
559 |
// if premium theme has been installed
|
560 |
if ( in_array( $theme_slug, $this->theme_array) ) {
|
561 |
-
$purchased = true;
|
562 |
-
$thumbnail = plugins_url().'/cmp-premium-themes/'. $theme_slug . '/img/'. $theme_slug . '_thumbnail.jpg';
|
563 |
$version = '';
|
564 |
// get theme version
|
565 |
-
if (file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css')) {
|
566 |
$version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
|
567 |
-
if (isset($version[0])) {$version = $version[0];}
|
568 |
}
|
569 |
}
|
570 |
?>
|
571 |
|
572 |
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium" data-purchased="<?php echo esc_attr($purchased);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
|
573 |
|
574 |
-
|
575 |
<div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
|
576 |
|
577 |
-
|
578 |
-
|
579 |
<span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
|
580 |
|
581 |
-
<?php echo $purchased ? '<span class="theme-version">ver.'.esc_html($version).'</span>' : ''; ?>
|
582 |
|
583 |
<div class="theme-inputs">
|
584 |
|
585 |
<?php
|
586 |
-
if ($purchased
|
587 |
<div class="button theme-select hide <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
|
588 |
<input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
|
589 |
<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>
|
590 |
</div>
|
591 |
-
|
592 |
<?php
|
593 |
-
// echo update button if update is available
|
594 |
-
if ( $theme_update === true ) { ?>
|
595 |
-
<button type="button" class="theme-update button hide"><i class="fa fa-refresh" aria-hidden="true"></i><?php _e('Update', 'cmp-coming-soon-maintenance');?></button>
|
596 |
-
<?php
|
597 |
-
}
|
598 |
// if not purchased, display buy button
|
599 |
} else { ?>
|
600 |
|
@@ -765,8 +723,8 @@ add_thickbox();
|
|
765 |
<?php
|
766 |
|
767 |
// include social special settings
|
768 |
-
if (file_exists($this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php')) {
|
769 |
-
include ( $this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php' );
|
770 |
}
|
771 |
?>
|
772 |
<tr><th>
|
@@ -848,8 +806,8 @@ add_thickbox();
|
|
848 |
|
849 |
<?php
|
850 |
// include theme related settings
|
851 |
-
if (file_exists($this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php')) {
|
852 |
-
require ( $this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php' );
|
853 |
}
|
854 |
|
855 |
?>
|
74 |
update_option('niteoCS_video_thumb['.$themeslug.']', sanitize_text_field($_POST['niteoCS_video_thumb_'.$themeslug]));
|
75 |
}
|
76 |
|
77 |
+
if (isset($_POST['niteoCS_video_file_url'.$themeslug])) {
|
78 |
+
update_option('niteoCS_video_file_url['.$themeslug.']', sanitize_text_field($_POST['niteoCS_video_file_url'.$themeslug]));
|
79 |
+
}
|
80 |
+
|
81 |
|
82 |
if (isset($_POST['niteoCS_banner_id_'.$themeslug])) {
|
83 |
$allnums = true;
|
207 |
update_option('niteoCS_URL_redirect', esc_url_raw( $_POST['niteoCS_URL_redirect']));
|
208 |
}
|
209 |
|
210 |
+
if (isset($_POST['niteoCS_redirect_time'])) {
|
211 |
+
update_option('niteoCS_redirect_time', sanitize_text_field( $_POST['niteoCS_redirect_time']));
|
212 |
+
}
|
213 |
+
|
214 |
+
|
215 |
|
216 |
$ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
|
217 |
|
218 |
// get Settings TAB
|
219 |
$premium_themes = $this->cmp_plugin_premium();
|
220 |
$niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
|
221 |
+
$niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
|
222 |
|
223 |
// get Content Settings
|
224 |
$niteoCS_body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
|
231 |
$niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
|
232 |
$niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
|
233 |
$niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
|
234 |
+
|
235 |
// get SEO
|
236 |
$niteoCS_favicon_id = get_option('niteoCS_favicon_id');
|
237 |
$niteoCS_title = stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!'));
|
261 |
$niteoCS_youtube_url = get_option('niteoCS_youtube_url['.$themeslug.']');
|
262 |
$niteoCS_vimeo_url = get_option('niteoCS_vimeo_url['.$themeslug.']');
|
263 |
$niteoCS_video_thumb = get_option('niteoCS_video_thumb['.$themeslug.']');
|
264 |
+
$niteoCS_video_file_url = get_option('niteoCS_video_file_url['.$themeslug.']');
|
265 |
|
266 |
//include theme defaults
|
267 |
+
if (file_exists($this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php')) {
|
268 |
+
include ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php' );
|
269 |
}
|
270 |
|
271 |
|
302 |
$pattern_url = plugins_url('/img/patterns/'.esc_attr($niteoCS_banner_pattern).'.png', __FILE__);
|
303 |
}
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
// define patterns array
|
306 |
$patterns = array('fabric', 'gray_sand', 'green_dust_scratch', 'mirrored_squares', 'noisy', 'photography', 'playstation', 'sakura', 'white_sand', 'white_texture');
|
307 |
|
421 |
<input type="radio" name="activate" value="3" <?php echo ($this->cmp_status() == 3) ? 'checked="checked"' : '';?>> <?php _e('Redirect Mode', 'cmp-coming-soon-maintenance');?><br>
|
422 |
<span class="info redirect"><?php _e('Choose Redirect Mode if you want to redirect your website to another URL.','cmp-coming-soon-maintenance')?></span>
|
423 |
<input type="text" id="niteoCS_URL_redirect" name="niteoCS_URL_redirect" value="<?php echo esc_url( $niteoCS_URL_redirect); ?>" class="regular-text code" <?php echo ($this->cmp_status() == 3) ? '' : 'disabled';?>><br>
|
424 |
+
<label for="niteoCS_redirect_time"><?php _e('Delay Time in Seconds', 'cmp-coming-soon-maintenance');?></label>
|
425 |
+
<input type="text" id="niteoCS_redirect_time" name="niteoCS_redirect_time" value="<?php echo esc_attr( $niteoCS_redirect_time); ?>" class="regular-text code" <?php echo ($this->cmp_status() == 3) ? '' : 'disabled';?>><br>
|
426 |
</legend>
|
427 |
|
428 |
</fieldset>
|
449 |
<span><?php _e('Free Themes', 'cmp-coming-soon-maintenance');?> </span>
|
450 |
</legend>
|
451 |
<?php
|
|
|
|
|
|
|
452 |
// move active theme to beginning
|
453 |
$key = array_search ($this->cmp_selectedTheme(), $this->themes_standard);
|
454 |
+
if ( $key ) {
|
455 |
$active = $this->themes_standard[$key];
|
456 |
unset($this->themes_standard[$key]);
|
457 |
array_unshift($this->themes_standard, $active);
|
458 |
}
|
459 |
|
|
|
460 |
foreach ( $this->themes_standard as $theme_slug ) {
|
461 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
// get thumbnail
|
463 |
+
$thumbnail = plugins_url('/themes/'. $theme_slug . '/img/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
|
464 |
+
|
465 |
+
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="standard" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
<div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
|
467 |
|
468 |
<span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
|
469 |
+
|
|
|
|
|
470 |
<div class="theme-inputs">
|
471 |
|
472 |
<div class="button theme-select hide <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
|
473 |
<input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
|
474 |
<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>
|
475 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
|
477 |
<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>
|
478 |
|
480 |
</div> <!-- theme-wrapper -->
|
481 |
|
482 |
<?php
|
|
|
483 |
} ?>
|
484 |
</fieldset>
|
485 |
</td>
|
495 |
|
496 |
</div>
|
497 |
<?php
|
498 |
+
if ( !empty( $premium_themes ) ) {
|
499 |
+
// define what attribute we want from style.css header
|
500 |
+
$headers = array('Version');?>
|
501 |
<div class="table-wrapper general">
|
502 |
<h3><?php _e('Premium Themes', 'cmp-coming-soon-maintenance');?></h3>
|
503 |
<table class="general theme-selector">
|
510 |
</legend>
|
511 |
<?php
|
512 |
// move active theme to beginning if active is not already set in standard themes
|
513 |
+
if ( $key === false ) {
|
514 |
$premium_themes = $this->customShift($premium_themes, $this->cmp_selectedTheme());
|
515 |
}
|
516 |
|
517 |
// build previews for premium themes
|
518 |
foreach ( $premium_themes as $premium_theme ) {
|
519 |
$theme_slug = $premium_theme['name'];
|
520 |
+
$thumbnail = plugins_url('/img/thumbnails/'. $theme_slug. '/screenshot1.jpg', __FILE__);
|
521 |
// if premium theme is not in themes array, display buy button
|
522 |
if ( !in_array( $theme_slug, $this->theme_array) ) {
|
523 |
+
$purchased = 'false';
|
524 |
$version = '';
|
|
|
|
|
525 |
}
|
526 |
|
527 |
// if premium theme has been installed
|
528 |
if ( in_array( $theme_slug, $this->theme_array) ) {
|
529 |
+
$purchased = 'true';
|
|
|
530 |
$version = '';
|
531 |
// get theme version
|
532 |
+
if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
|
533 |
$version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
|
534 |
+
if ( isset($version[0])) { $version = $version[0] ;}
|
535 |
}
|
536 |
}
|
537 |
?>
|
538 |
|
539 |
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium" data-purchased="<?php echo esc_attr($purchased);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
|
540 |
|
|
|
541 |
<div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
|
542 |
|
|
|
|
|
543 |
<span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
|
544 |
|
545 |
+
<?php echo ( $purchased == 'true' ) ? '<span class="theme-version">ver.'.esc_html($version).'</span>' : ''; ?>
|
546 |
|
547 |
<div class="theme-inputs">
|
548 |
|
549 |
<?php
|
550 |
+
if ( $purchased == 'true' ) { ?>
|
551 |
<div class="button theme-select hide <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
|
552 |
<input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
|
553 |
<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>
|
554 |
</div>
|
|
|
555 |
<?php
|
|
|
|
|
|
|
|
|
|
|
556 |
// if not purchased, display buy button
|
557 |
} else { ?>
|
558 |
|
723 |
<?php
|
724 |
|
725 |
// include social special settings
|
726 |
+
if (file_exists($this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php')) {
|
727 |
+
include ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php' );
|
728 |
}
|
729 |
?>
|
730 |
<tr><th>
|
806 |
|
807 |
<?php
|
808 |
// include theme related settings
|
809 |
+
if (file_exists($this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php')) {
|
810 |
+
require ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-settings.php' );
|
811 |
}
|
812 |
|
813 |
?>
|
css/cmp-settings-style.css
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
|
14 |
.comingsoon-error,
|
15 |
.comingsoon-success{
|
16 |
-
|
17 |
width: calc(100% - 4em);
|
18 |
border-left: 4px solid red;
|
19 |
background-color: white;
|
@@ -31,10 +31,10 @@ input[type="text"], textarea{width:100%;}
|
|
31 |
.table-wrapper.custom_css,
|
32 |
#niteoCS_countdown_text,
|
33 |
#niteoCS_countdown_redirect {
|
34 |
-
|
35 |
}
|
36 |
.upload-plugin.comingsoon .wp-upload-form {
|
37 |
-
|
38 |
}
|
39 |
|
40 |
.cmp-status legend {
|
@@ -65,9 +65,10 @@ input[type="text"], textarea{width:100%;}
|
|
65 |
padding-left:1em;
|
66 |
border-bottom:1px solid #dedede;
|
67 |
cursor: pointer;
|
|
|
68 |
}
|
69 |
|
70 |
-
.table-wrapper h3::after {
|
71 |
font-family: fontAwesome;
|
72 |
content: "\f147";
|
73 |
position: absolute;
|
@@ -92,7 +93,7 @@ input[type="text"], textarea{width:100%;}
|
|
92 |
}
|
93 |
|
94 |
.table-wrapper table {
|
95 |
-
|
96 |
}
|
97 |
|
98 |
.table-wrapper .theme-selector {
|
@@ -105,23 +106,23 @@ input[type="text"], textarea{width:100%;}
|
|
105 |
}
|
106 |
|
107 |
.table-wrapper td {
|
108 |
-
|
109 |
width: 100%;
|
110 |
-
|
111 |
-
|
112 |
}
|
113 |
|
114 |
.table-wrapper td.theme-selector {
|
115 |
-
|
116 |
}
|
117 |
|
118 |
.table-wrapper td {
|
119 |
-
|
120 |
}
|
121 |
.table-wrapper th {
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
}
|
126 |
#delete-logo,
|
127 |
#delete-banner,
|
@@ -140,7 +141,8 @@ input[type="text"], textarea{width:100%;}
|
|
140 |
|
141 |
#niteoCS-text-logo {
|
142 |
border: none;
|
143 |
-
box-shadow: none;
|
|
|
144 |
font-size: 3em;
|
145 |
font-weight: 600;
|
146 |
}
|
@@ -175,14 +177,14 @@ th label {font-weight: 600;}
|
|
175 |
#unsplash_img{display: none;max-width: 100%;}
|
176 |
#unsplash-media{padding-top: 1em;}
|
177 |
.unsplash-feed{display: none;}
|
178 |
-
.pattern-
|
179 |
.color-preview {
|
180 |
background-repeat: repeat;
|
181 |
height: 200px;
|
182 |
border: 1px solid #ededed;
|
183 |
}
|
184 |
|
185 |
-
.video-
|
186 |
position: relative;
|
187 |
width: 100%;
|
188 |
margin-top: 1em;
|
@@ -192,12 +194,18 @@ th label {font-weight: 600;}
|
|
192 |
.info{font-size: 12px;}
|
193 |
.nav-tab i {padding-right:3px}
|
194 |
|
195 |
-
.logo-wrapper,
|
|
|
|
|
|
|
196 |
.logo-wrapper img,
|
197 |
.favicon-wrapper img {background-color: #efefef;padding:1em;}
|
198 |
.favicon-wrapper img {max-width: 32px;}
|
199 |
-
.logo-wrapper img, .
|
200 |
.logo-wrapper img {max-height: 150px;width:auto;}
|
|
|
|
|
|
|
201 |
|
202 |
#font-example-wrapper {padding:1em;border:1px solid #dedede;}
|
203 |
#heading-example {padding-left: 0;border-bottom:none;}
|
@@ -248,6 +256,7 @@ th label {font-weight: 600;}
|
|
248 |
|
249 |
.theme-wrapper .hide:not(.selected) {
|
250 |
opacity: 0;
|
|
|
251 |
transition: opacity 300ms, background-color 500ms
|
252 |
}
|
253 |
|
@@ -255,6 +264,7 @@ th label {font-weight: 600;}
|
|
255 |
.theme-wrapper .hide.activated,
|
256 |
.theme-wrapper:hover .hide {
|
257 |
opacity: 1;
|
|
|
258 |
transition: opacity 300ms, background-color 500ms
|
259 |
}
|
260 |
|
@@ -274,6 +284,7 @@ th label {font-weight: 600;}
|
|
274 |
color: #ffffff!important;
|
275 |
-moz-appearance: none;
|
276 |
-webkit-appearance: none;
|
|
|
277 |
transition: background-color .5s;
|
278 |
border: none!important;
|
279 |
-webkit-box-shadow: none;
|
@@ -287,6 +298,7 @@ th label {font-weight: 600;}
|
|
287 |
background-color: #c0392b;
|
288 |
color: #fff;
|
289 |
border: none;
|
|
|
290 |
transition: background-color .5s;
|
291 |
}
|
292 |
|
@@ -413,6 +425,7 @@ p.cmp-submit {
|
|
413 |
background-color: black;
|
414 |
line-height: 40px;
|
415 |
opacity: .7;
|
|
|
416 |
transition: opacity 500ms;
|
417 |
}
|
418 |
|
@@ -482,6 +495,8 @@ p.cmp-submit {
|
|
482 |
text-align: center;
|
483 |
}
|
484 |
|
|
|
|
|
485 |
@media screen and (max-width: 1450px) {
|
486 |
.cmp-inputs-wrapper {min-width: 70%;}
|
487 |
.cmp-sidebar-wrapper {width: calc(30% - 2em + 7px);}
|
@@ -509,5 +524,9 @@ p.cmp-submit {
|
|
509 |
.cmp-sidebar-wrapper,
|
510 |
.cmp-inputs-wrapper {display: block;max-width:100%;width: 100%; margin:0;}
|
511 |
.cmp-sidebar-wrapper .widget {padding: 2em;}
|
|
|
|
|
|
|
|
|
512 |
}
|
513 |
|
13 |
|
14 |
.comingsoon-error,
|
15 |
.comingsoon-success{
|
16 |
+
padding: 1em;
|
17 |
width: calc(100% - 4em);
|
18 |
border-left: 4px solid red;
|
19 |
background-color: white;
|
31 |
.table-wrapper.custom_css,
|
32 |
#niteoCS_countdown_text,
|
33 |
#niteoCS_countdown_redirect {
|
34 |
+
display: none;
|
35 |
}
|
36 |
.upload-plugin.comingsoon .wp-upload-form {
|
37 |
+
max-width: 600px;
|
38 |
}
|
39 |
|
40 |
.cmp-status legend {
|
65 |
padding-left:1em;
|
66 |
border-bottom:1px solid #dedede;
|
67 |
cursor: pointer;
|
68 |
+
text-align: left;
|
69 |
}
|
70 |
|
71 |
+
.table-wrapper h3:not(.no-icon):not(.notice-title)::after {
|
72 |
font-family: fontAwesome;
|
73 |
content: "\f147";
|
74 |
position: absolute;
|
93 |
}
|
94 |
|
95 |
.table-wrapper table {
|
96 |
+
width: 90%;
|
97 |
}
|
98 |
|
99 |
.table-wrapper .theme-selector {
|
106 |
}
|
107 |
|
108 |
.table-wrapper td {
|
109 |
+
display: block;
|
110 |
width: 100%;
|
111 |
+
max-width: 600px;
|
112 |
+
margin-bottom: 1em;
|
113 |
}
|
114 |
|
115 |
.table-wrapper td.theme-selector {
|
116 |
+
max-width: 100%;
|
117 |
}
|
118 |
|
119 |
.table-wrapper td {
|
120 |
+
display: block;
|
121 |
}
|
122 |
.table-wrapper th {
|
123 |
+
vertical-align: top;
|
124 |
+
width: 180px;
|
125 |
+
text-align: left;
|
126 |
}
|
127 |
#delete-logo,
|
128 |
#delete-banner,
|
141 |
|
142 |
#niteoCS-text-logo {
|
143 |
border: none;
|
144 |
+
-webkit-box-shadow: none;
|
145 |
+
box-shadow: none;
|
146 |
font-size: 3em;
|
147 |
font-weight: 600;
|
148 |
}
|
177 |
#unsplash_img{display: none;max-width: 100%;}
|
178 |
#unsplash-media{padding-top: 1em;}
|
179 |
.unsplash-feed{display: none;}
|
180 |
+
.pattern-wrapper,
|
181 |
.color-preview {
|
182 |
background-repeat: repeat;
|
183 |
height: 200px;
|
184 |
border: 1px solid #ededed;
|
185 |
}
|
186 |
|
187 |
+
.video-wrapper {
|
188 |
position: relative;
|
189 |
width: 100%;
|
190 |
margin-top: 1em;
|
194 |
.info{font-size: 12px;}
|
195 |
.nav-tab i {padding-right:3px}
|
196 |
|
197 |
+
.logo-wrapper,
|
198 |
+
.banner-wrapper,
|
199 |
+
.favicon-wrapper {margin: 1em 0;}
|
200 |
+
|
201 |
.logo-wrapper img,
|
202 |
.favicon-wrapper img {background-color: #efefef;padding:1em;}
|
203 |
.favicon-wrapper img {max-width: 32px;}
|
204 |
+
.logo-wrapper img, .background-media img{max-width: 100%;width:100%;}
|
205 |
.logo-wrapper img {max-height: 150px;width:auto;}
|
206 |
+
.background-media td fieldset {
|
207 |
+
padding-top: 1em;
|
208 |
+
}
|
209 |
|
210 |
#font-example-wrapper {padding:1em;border:1px solid #dedede;}
|
211 |
#heading-example {padding-left: 0;border-bottom:none;}
|
256 |
|
257 |
.theme-wrapper .hide:not(.selected) {
|
258 |
opacity: 0;
|
259 |
+
-webkit-transition: opacity 300ms, background-color 500ms;
|
260 |
transition: opacity 300ms, background-color 500ms
|
261 |
}
|
262 |
|
264 |
.theme-wrapper .hide.activated,
|
265 |
.theme-wrapper:hover .hide {
|
266 |
opacity: 1;
|
267 |
+
-webkit-transition: opacity 300ms, background-color 500ms;
|
268 |
transition: opacity 300ms, background-color 500ms
|
269 |
}
|
270 |
|
284 |
color: #ffffff!important;
|
285 |
-moz-appearance: none;
|
286 |
-webkit-appearance: none;
|
287 |
+
-webkit-transition: background-color .5s;
|
288 |
transition: background-color .5s;
|
289 |
border: none!important;
|
290 |
-webkit-box-shadow: none;
|
298 |
background-color: #c0392b;
|
299 |
color: #fff;
|
300 |
border: none;
|
301 |
+
-webkit-transition: background-color .5s;
|
302 |
transition: background-color .5s;
|
303 |
}
|
304 |
|
425 |
background-color: black;
|
426 |
line-height: 40px;
|
427 |
opacity: .7;
|
428 |
+
-webkit-transition: opacity 500ms;
|
429 |
transition: opacity 500ms;
|
430 |
}
|
431 |
|
495 |
text-align: center;
|
496 |
}
|
497 |
|
498 |
+
.subscribers .column-id { width: 5%; }
|
499 |
+
|
500 |
@media screen and (max-width: 1450px) {
|
501 |
.cmp-inputs-wrapper {min-width: 70%;}
|
502 |
.cmp-sidebar-wrapper {width: calc(30% - 2em + 7px);}
|
524 |
.cmp-sidebar-wrapper,
|
525 |
.cmp-inputs-wrapper {display: block;max-width:100%;width: 100%; margin:0;}
|
526 |
.cmp-sidebar-wrapper .widget {padding: 2em;}
|
527 |
+
.theme-wrapper.hide,.theme-wrapper .hide:not(.selected) { opacity: 1;}
|
528 |
+
.theme-overlay .theme-screenshots,
|
529 |
+
.theme-overlay .theme-info {width:100%;float:none;}
|
530 |
+
|
531 |
}
|
532 |
|
css/fastselect.min.css
ADDED
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*----------------------------------------------------------------------------------------------------
|
2 |
+
General styling
|
3 |
+
----------------------------------------------------------------------------------------------------*/
|
4 |
+
@-webkit-keyframes fstAnimationEnter {
|
5 |
+
from {
|
6 |
+
opacity: 0;
|
7 |
+
-webkit-transform: translate3d(0, -1em, 0); }
|
8 |
+
to {
|
9 |
+
opacity: 1;
|
10 |
+
-webkit-transform: translate3d(0, 0, 0); } }
|
11 |
+
|
12 |
+
@-moz-keyframes fstAnimationEnter {
|
13 |
+
from {
|
14 |
+
opacity: 0;
|
15 |
+
-moz-transform: translate3d(0, -1em, 0); }
|
16 |
+
to {
|
17 |
+
opacity: 1;
|
18 |
+
-moz-transform: translate3d(0, 0, 0); } }
|
19 |
+
|
20 |
+
@keyframes fstAnimationEnter {
|
21 |
+
from {
|
22 |
+
opacity: 0;
|
23 |
+
-webkit-transform: translate3d(0, -1em, 0);
|
24 |
+
-moz-transform: translate3d(0, -1em, 0);
|
25 |
+
-ms-transform: translate3d(0, -1em, 0);
|
26 |
+
-o-transform: translate3d(0, -1em, 0);
|
27 |
+
transform: translate3d(0, -1em, 0); }
|
28 |
+
to {
|
29 |
+
opacity: 1;
|
30 |
+
-webkit-transform: translate3d(0, 0, 0);
|
31 |
+
-moz-transform: translate3d(0, 0, 0);
|
32 |
+
-ms-transform: translate3d(0, 0, 0);
|
33 |
+
-o-transform: translate3d(0, 0, 0);
|
34 |
+
transform: translate3d(0, 0, 0); } }
|
35 |
+
|
36 |
+
.fstElement {
|
37 |
+
position: relative;
|
38 |
+
border: 1px solid #dedede;
|
39 |
+
box-sizing: border-box; }
|
40 |
+
.fstElement > select,
|
41 |
+
.fstElement > input {
|
42 |
+
position: absolute;
|
43 |
+
left: -999em; }
|
44 |
+
|
45 |
+
.fstToggleBtn {
|
46 |
+
font-size: 1.4em;
|
47 |
+
display: block;
|
48 |
+
position: relative;
|
49 |
+
box-sizing: border-box;
|
50 |
+
padding: 0.71429em 1.42857em 0.71429em 0.71429em;
|
51 |
+
min-width: 14.28571em;
|
52 |
+
cursor: pointer; }
|
53 |
+
.fstToggleBtn:after {
|
54 |
+
position: absolute;
|
55 |
+
content: "";
|
56 |
+
right: 0.71429em;
|
57 |
+
top: 50%;
|
58 |
+
margin-top: -0.17857em;
|
59 |
+
border: 0.35714em solid transparent;
|
60 |
+
border-top-color: #cacaca; }
|
61 |
+
|
62 |
+
.fstQueryInput {
|
63 |
+
-webkit-appearance: none;
|
64 |
+
-moz-appearance: none;
|
65 |
+
-ms-appearance: none;
|
66 |
+
-o-appearance: none;
|
67 |
+
appearance: none;
|
68 |
+
outline: none;
|
69 |
+
box-sizing: border-box;
|
70 |
+
background: transparent;
|
71 |
+
border: 0; }
|
72 |
+
|
73 |
+
.fstResults {
|
74 |
+
position: absolute;
|
75 |
+
left: -1px;
|
76 |
+
top: 100%;
|
77 |
+
right: -1px;
|
78 |
+
max-height: 30em;
|
79 |
+
overflow-x: hidden;
|
80 |
+
overflow-y: auto;
|
81 |
+
-webkit-overflow-scrolling: touch;
|
82 |
+
border: 1px solid #D7D7D7;
|
83 |
+
border-top: 0;
|
84 |
+
background-color: #FFF;
|
85 |
+
display: none; }
|
86 |
+
|
87 |
+
.fstResultItem {
|
88 |
+
font-size: 1.4em;
|
89 |
+
display: block;
|
90 |
+
padding: 0.5em 0.71429em;
|
91 |
+
margin: 0;
|
92 |
+
cursor: pointer;
|
93 |
+
border-top: 1px solid #fff; }
|
94 |
+
.fstResultItem.fstUserOption {
|
95 |
+
color: #707070; }
|
96 |
+
.fstResultItem.fstFocused {
|
97 |
+
color: #fff;
|
98 |
+
background-color: #43A2F3;
|
99 |
+
border-color: #73baf6; }
|
100 |
+
.fstResultItem.fstSelected {
|
101 |
+
color: #fff;
|
102 |
+
background-color: #2694f1;
|
103 |
+
border-color: #73baf6; }
|
104 |
+
|
105 |
+
.fstGroupTitle {
|
106 |
+
font-size: 1.4em;
|
107 |
+
display: block;
|
108 |
+
padding: 0.5em 0.71429em;
|
109 |
+
margin: 0;
|
110 |
+
font-weight: bold; }
|
111 |
+
|
112 |
+
.fstGroup {
|
113 |
+
padding-top: 1em; }
|
114 |
+
.fstGroup:first-child {
|
115 |
+
padding-top: 0; }
|
116 |
+
|
117 |
+
.fstNoResults {
|
118 |
+
font-size: 1.4em;
|
119 |
+
display: block;
|
120 |
+
padding: 0.71429em 0.71429em;
|
121 |
+
margin: 0;
|
122 |
+
color: #999; }
|
123 |
+
|
124 |
+
/*----------------------------------------------------------------------------------------------------
|
125 |
+
Single Mode
|
126 |
+
----------------------------------------------------------------------------------------------------*/
|
127 |
+
.fstSingleMode .fstControls {
|
128 |
+
position: absolute;
|
129 |
+
left: -1px;
|
130 |
+
right: -1px;
|
131 |
+
top: 100%;
|
132 |
+
padding: 0.5em;
|
133 |
+
border: 1px solid #D7D7D7;
|
134 |
+
background-color: #fff;
|
135 |
+
display: none; }
|
136 |
+
|
137 |
+
.fstSingleMode .fstQueryInput {
|
138 |
+
font-size: 1.4em;
|
139 |
+
display: block;
|
140 |
+
width: 100%;
|
141 |
+
padding: 0.5em 0.35714em;
|
142 |
+
color: #999;
|
143 |
+
border: 1px solid #D7D7D7; }
|
144 |
+
|
145 |
+
.fstSingleMode.fstActive {
|
146 |
+
z-index: 100; }
|
147 |
+
.fstSingleMode.fstActive.fstElement,
|
148 |
+
.fstSingleMode.fstActive .fstControls,
|
149 |
+
.fstSingleMode.fstActive .fstResults {
|
150 |
+
box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.1); }
|
151 |
+
.fstSingleMode.fstActive .fstControls {
|
152 |
+
display: block; }
|
153 |
+
.fstSingleMode.fstActive .fstResults {
|
154 |
+
display: block;
|
155 |
+
z-index: 10;
|
156 |
+
margin-top: -1px; }
|
157 |
+
|
158 |
+
/*----------------------------------------------------------------------------------------------------
|
159 |
+
Multiple mode
|
160 |
+
----------------------------------------------------------------------------------------------------*/
|
161 |
+
.fstChoiceItem {
|
162 |
+
display: inline-block;
|
163 |
+
font-size: 1.2em;
|
164 |
+
position: relative;
|
165 |
+
margin: 0 0.41667em 0.41667em 0;
|
166 |
+
padding: 0.33333em 0.33333em 0.33333em 1.5em;
|
167 |
+
float: left;
|
168 |
+
border-radius: 0.25em;
|
169 |
+
border: 1px solid #43A2F3;
|
170 |
+
cursor: auto;
|
171 |
+
color: #fff;
|
172 |
+
background-color: #43A2F3;
|
173 |
+
-webkit-animation: fstAnimationEnter 0.2s;
|
174 |
+
-moz-animation: fstAnimationEnter 0.2s;
|
175 |
+
animation: fstAnimationEnter 0.2s; }
|
176 |
+
.fstChoiceItem.mod1 {
|
177 |
+
background-color: #F9F9F9;
|
178 |
+
border: 1px solid #D7D7D7;
|
179 |
+
color: #232323; }
|
180 |
+
.fstChoiceItem.mod1 > .fstChoiceRemove {
|
181 |
+
color: #a4a4a4; }
|
182 |
+
|
183 |
+
.fstChoiceRemove {
|
184 |
+
margin: 0;
|
185 |
+
padding: 0;
|
186 |
+
border: 0;
|
187 |
+
cursor: pointer;
|
188 |
+
background: none;
|
189 |
+
font-size: 1.16667em;
|
190 |
+
position: absolute;
|
191 |
+
left: 0;
|
192 |
+
top: 50%;
|
193 |
+
width: 1.28571em;
|
194 |
+
line-height: 1.28571em;
|
195 |
+
margin-top: -0.64286em;
|
196 |
+
text-align: center;
|
197 |
+
color: #fff; }
|
198 |
+
.fstChoiceRemove::-moz-focus-inner {
|
199 |
+
padding: 0;
|
200 |
+
border: 0; }
|
201 |
+
|
202 |
+
.fstMultipleMode .fstControls {
|
203 |
+
box-sizing: border-box;
|
204 |
+
padding: 0.5em 0.5em 0em 0.5em;
|
205 |
+
overflow: hidden;
|
206 |
+
width: 100%;
|
207 |
+
cursor: text; }
|
208 |
+
|
209 |
+
.fstMultipleMode .fstQueryInput {
|
210 |
+
font-size: 1.4em;
|
211 |
+
float: left;
|
212 |
+
padding: 0.28571em 0;
|
213 |
+
margin: 0 0 0.35714em 0;
|
214 |
+
width: 2em;
|
215 |
+
color: #999; }
|
216 |
+
|
217 |
+
.fstMultipleMode .fstQueryInputExpanded {
|
218 |
+
float: none;
|
219 |
+
width: 100%;
|
220 |
+
padding: 0.28571em 0.35714em; }
|
221 |
+
|
222 |
+
.fstMultipleMode .fstFakeInput {
|
223 |
+
font-size: 1.4em; }
|
224 |
+
|
225 |
+
.fstMultipleMode.fstActive,
|
226 |
+
.fstMultipleMode.fstActive .fstResults {
|
227 |
+
box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.1); }
|
228 |
+
|
229 |
+
.fstMultipleMode.fstActive .fstResults {
|
230 |
+
display: block;
|
231 |
+
z-index: 10;
|
232 |
+
border-top: 1px solid #D7D7D7; }
|
img/thumbnails/construct/screenshot1.jpg
ADDED
Binary file
|
img/thumbnails/countdown/screenshot1.jpg
ADDED
Binary file
|
img/thumbnails/countdown/screenshot2.jpg
ADDED
Binary file
|
img/thumbnails/fifty/screenshot1.jpg
ADDED
Binary file
|
img/thumbnails/fifty/screenshot2.jpg
ADDED
Binary file
|
img/thumbnails/frame/screenshot1.jpg
ADDED
Binary file
|
img/thumbnails/hardwork/screenshot1.jpg
ADDED
Binary file
|
img/thumbnails/hardwork/screenshot2.jpg
ADDED
Binary file
|
img/thumbnails/hardwork/screenshot3.jpg
ADDED
Binary file
|
img/thumbnails/hardwork_premium/screenshot1.jpg
ADDED
Binary file
|
img/thumbnails/postery/screenshot1.jpg
ADDED
Binary file
|
img/thumbnails/postery/screenshot2.jpg
ADDED
Binary file
|
inc/class-cmp-subscribers.php
CHANGED
@@ -11,8 +11,8 @@ class cmp_subs_list_table extends WP_List_Table {
|
|
11 |
function __construct(){
|
12 |
$this->subscriber_list = get_option('niteoCS_subscribers_list');
|
13 |
$this->dateformat = get_option('date_format');
|
14 |
-
|
15 |
-
|
16 |
'plural' => __( 'subscribers', 'cmp' ), //plural name of the listed records
|
17 |
));
|
18 |
}
|
11 |
function __construct(){
|
12 |
$this->subscriber_list = get_option('niteoCS_subscribers_list');
|
13 |
$this->dateformat = get_option('date_format');
|
14 |
+
parent::__construct( array(
|
15 |
+
'singular' => __( 'subscriber', 'cmp' ), //singular name of the listed records
|
16 |
'plural' => __( 'subscribers', 'cmp' ), //plural name of the listed records
|
17 |
));
|
18 |
}
|
inc/helper-functions.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
|
4 |
+
function cmp_get_pages() {
|
5 |
+
$page_titles = array();
|
6 |
+
$pages = array();
|
7 |
+
$page_ids = get_all_page_ids();
|
8 |
+
|
9 |
+
foreach ($page_ids as $page_id ) {
|
10 |
+
array_push($page_titles, get_the_title($page_id));
|
11 |
+
}
|
12 |
+
|
13 |
+
foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
|
14 |
+
$pages[] = array('id' => $id, 'name' => $name);
|
15 |
+
}
|
16 |
+
|
17 |
+
return $pages;
|
18 |
+
|
19 |
+
}
|
20 |
+
|
21 |
+
|
22 |
+
// send json data for theme info overlay AJAX request
|
23 |
+
function niteo_themeinfo( ) {
|
24 |
+
|
25 |
+
// check for ajax
|
26 |
+
if ( isset( $_POST['theme_slug'] ) ) {
|
27 |
+
// verify nonce
|
28 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
29 |
+
// verify user rights
|
30 |
+
if( !current_user_can('publish_pages') ) {
|
31 |
+
die('Sorry, but this request is invalid');
|
32 |
+
}
|
33 |
+
|
34 |
+
// sanitize $post
|
35 |
+
$theme_slug = sanitize_text_field( $_POST['theme_slug'] );
|
36 |
+
$data = array( 'result' => 'true', 'author_homepage' => $this->author_homepage, 'author' => $this->author );
|
37 |
+
|
38 |
+
if ( !empty( $theme_slug ) ) {
|
39 |
+
$headers = array('Theme Name', 'Description');
|
40 |
+
$theme_info = get_file_data( $this->cmp_themePath( $theme_slug ).$theme_slug.'/style.css', $headers, '');
|
41 |
+
|
42 |
+
$screenshots = array_map( 'basename', glob( plugin_dir_path( __FILE__ ) . 'img/thumbnails/'.$theme_slug.'/*' ) );
|
43 |
+
foreach ( $screenshots as $key => $screenshot ) {
|
44 |
+
$screenshots[$key] = plugins_url('img/thumbnails/'.$theme_slug.'/'.$screenshot, __FILE__ );
|
45 |
+
}
|
46 |
+
|
47 |
+
$data['name'] = $theme_info[0];
|
48 |
+
$data['description'] = $theme_info[1];
|
49 |
+
$data['screenshots'] = $screenshots;
|
50 |
+
}
|
51 |
+
|
52 |
+
echo json_encode ($data);
|
53 |
+
wp_die();
|
54 |
+
}
|
55 |
+
}
|
inc/settings-background.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
?>
|
4 |
-
<div class="table-wrapper theme-setup">
|
5 |
<h3><?php _e('Graphic Background', 'cmp-coming-soon-maintenance');?></h3>
|
6 |
<table class="theme-setup">
|
7 |
<tbody>
|
@@ -12,6 +12,12 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
12 |
<span><?php _e('Banner Settings', 'cmp-coming-soon-maintenance');?></span>
|
13 |
</legend>
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
<p>
|
16 |
<label title="Custom banner">
|
17 |
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_banner == 0) { echo ' checked="checked"'; } ?>> <?php _e('Custom Images', 'cmp-coming-soon-maintenance');?>
|
@@ -25,12 +31,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
25 |
</p>
|
26 |
<p>
|
27 |
<label title="Video Banner">
|
28 |
-
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="5"<?php if ( $niteoCS_banner == 5) { echo ' checked="checked"'; } ?>> <?php _e('
|
29 |
-
</label>
|
30 |
-
</p>
|
31 |
-
<p>
|
32 |
-
<label title="Default Banner">
|
33 |
-
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="2"<?php if ( $niteoCS_banner == 2) { echo ' checked="checked"'; } ?>> <?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
|
34 |
</label>
|
35 |
</p>
|
36 |
<p>
|
@@ -66,7 +67,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
66 |
}
|
67 |
?>
|
68 |
</div>
|
69 |
-
<input id="delete-banner" type="button" class="button" value="
|
70 |
</fieldset>
|
71 |
|
72 |
<fieldset id="unsplash_banner">
|
@@ -117,13 +118,10 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
117 |
</fieldset>
|
118 |
|
119 |
<fieldset id="default_banner">
|
120 |
-
<div class="banner-wrapper default">
|
121 |
<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">
|
122 |
-
</div>
|
123 |
</fieldset>
|
124 |
|
125 |
<fieldset id="graphic_pattern">
|
126 |
-
<div class="banner-wrapper default">
|
127 |
<label for="niteoCS_banner_pattern_<?php echo esc_attr($themeslug);?>"><?php _e('Select Pattern', 'cmp-coming-soon-maintenance');?></label></br>
|
128 |
<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/');?>">
|
129 |
<?php
|
@@ -134,28 +132,24 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
134 |
<option value="custom" <?php if ( $niteoCS_banner_pattern == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Pattern...', 'cmp-coming-soon-maintenance');?></option>
|
135 |
</select><br>
|
136 |
|
137 |
-
<input type="hidden" class="widefat" id="
|
138 |
|
139 |
<input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ($niteoCS_banner_pattern == 'custom') ? 'block' : 'none'?>;"/>
|
140 |
|
141 |
-
<div class="pattern-
|
142 |
-
</div>
|
143 |
</fieldset>
|
144 |
|
145 |
<fieldset id="solid_color">
|
146 |
-
<div class="banner-wrapper default">
|
147 |
<label for="niteoCS_banner_color_<?php echo esc_attr($themeslug);?>"><?php _e('Select Color', 'cmp-coming-soon-maintenance');?></label><br>
|
148 |
<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="#bdc3c7" class="regular-text code"><br>
|
149 |
<div class="color-preview" style="background-color:<?php echo esc_attr( $niteoCS_banner_color); ?>"></div>
|
150 |
-
</div>
|
151 |
</fieldset>
|
152 |
|
153 |
<fieldset id="video_banner">
|
154 |
-
<div class="banner-wrapper default">
|
155 |
-
|
156 |
<label for="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>"><?php _e('Select Video Source', 'cmp-coming-soon-maintenance');?></label></br>
|
157 |
<select name="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>" class="banner-video-source">
|
158 |
-
<option value="
|
|
|
159 |
<option disabled value="vimeo" <?php if ( $niteoCS_banner_video == 'vimeo' ) { echo ' selected="selected"'; } ?>><?php _e('Vimeo (coming soon...)', 'cmp-coming-soon-maintenance');?></option>
|
160 |
</select><br>
|
161 |
|
@@ -171,13 +165,21 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
171 |
<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); ?>" />
|
172 |
</p>
|
173 |
|
174 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
-
<
|
|
|
|
|
177 |
|
178 |
-
<p><?php _e('Video backgrounds doesn`t work on mobile devices therefore only thumbnail video image will be displayed on mobile devices.
|
179 |
-
<input type="hidden" class="widefat" id="niteoCS-video-thumb" name="niteoCS_video_thumb_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_video_thumb ); ?>" />
|
180 |
-
<input id="add-video-thumb" type="button" class="button" value="<?php _e('
|
181 |
|
182 |
<div class="video-thumb-wrapper">
|
183 |
<?php
|
@@ -192,8 +194,6 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
192 |
</div>
|
193 |
|
194 |
<input id="delete-video-thumb" type="button" class="button" value="Remove Thumbnail" />
|
195 |
-
|
196 |
-
</div>
|
197 |
</fieldset>
|
198 |
</td>
|
199 |
</tr>
|
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>
|
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 ( $niteoCS_banner == 2) { echo ' checked="checked"'; } ?>> <?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
|
18 |
+
</label>
|
19 |
+
</p>
|
20 |
+
|
21 |
<p>
|
22 |
<label title="Custom banner">
|
23 |
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_banner == 0) { echo ' checked="checked"'; } ?>> <?php _e('Custom Images', 'cmp-coming-soon-maintenance');?>
|
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 ( $niteoCS_banner == 5) { echo ' checked="checked"'; } ?>> <?php _e('Video', 'cmp-coming-soon-maintenance');?>
|
|
|
|
|
|
|
|
|
|
|
35 |
</label>
|
36 |
</p>
|
37 |
<p>
|
67 |
}
|
68 |
?>
|
69 |
</div>
|
70 |
+
<input id="delete-banner" type="button" class="button" value="Delete Media" />
|
71 |
</fieldset>
|
72 |
|
73 |
<fieldset id="unsplash_banner">
|
118 |
</fieldset>
|
119 |
|
120 |
<fieldset id="default_banner">
|
|
|
121 |
<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">
|
|
|
122 |
</fieldset>
|
123 |
|
124 |
<fieldset id="graphic_pattern">
|
|
|
125 |
<label for="niteoCS_banner_pattern_<?php echo esc_attr($themeslug);?>"><?php _e('Select Pattern', 'cmp-coming-soon-maintenance');?></label></br>
|
126 |
<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/');?>">
|
127 |
<?php
|
132 |
<option value="custom" <?php if ( $niteoCS_banner_pattern == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Pattern...', 'cmp-coming-soon-maintenance');?></option>
|
133 |
</select><br>
|
134 |
|
135 |
+
<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 ); ?>" />
|
136 |
|
137 |
<input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ($niteoCS_banner_pattern == 'custom') ? 'block' : 'none'?>;"/>
|
138 |
|
139 |
+
<div class="pattern-wrapper" style="background-image: url('<?php echo esc_url($pattern_url);?>');"></div>
|
|
|
140 |
</fieldset>
|
141 |
|
142 |
<fieldset id="solid_color">
|
|
|
143 |
<label for="niteoCS_banner_color_<?php echo esc_attr($themeslug);?>"><?php _e('Select Color', 'cmp-coming-soon-maintenance');?></label><br>
|
144 |
<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="#bdc3c7" class="regular-text code"><br>
|
145 |
<div class="color-preview" style="background-color:<?php echo esc_attr( $niteoCS_banner_color); ?>"></div>
|
|
|
146 |
</fieldset>
|
147 |
|
148 |
<fieldset id="video_banner">
|
|
|
|
|
149 |
<label for="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>"><?php _e('Select Video Source', 'cmp-coming-soon-maintenance');?></label></br>
|
150 |
<select name="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>" class="banner-video-source">
|
151 |
+
<option value="YouTube" <?php if ( $niteoCS_banner_video == 'YouTube' ) { echo ' selected="selected"'; } ?>><?php _e('YouTube', 'cmp-coming-soon-maintenance');?></option>
|
152 |
+
<option value="video/mp4" <?php if ( $niteoCS_banner_video == 'video/mp4' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Video File', 'cmp-coming-soon-maintenance');?></option>
|
153 |
<option disabled value="vimeo" <?php if ( $niteoCS_banner_video == 'vimeo' ) { echo ' selected="selected"'; } ?>><?php _e('Vimeo (coming soon...)', 'cmp-coming-soon-maintenance');?></option>
|
154 |
</select><br>
|
155 |
|
165 |
<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); ?>" />
|
166 |
</p>
|
167 |
|
168 |
+
<p class="file-source-input">
|
169 |
+
<label for="niteoCS_file_url_<?php echo esc_attr($themeslug);?>"><?php _e('Select or Upload custom Video file', 'cmp-coming-soon-maintenance');?></label>
|
170 |
+
<input id="add-video" type="button" class="button" value="Media Library"/>
|
171 |
+
<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) ); ?>"/>
|
172 |
+
</p>
|
173 |
+
|
174 |
+
<div class="video-wrapper"></div>
|
175 |
|
176 |
+
<p class="file-source-input">
|
177 |
+
<input id="delete-video" type="button" class="button" value="Remove Video" style="display:none"/>
|
178 |
+
</p>
|
179 |
|
180 |
+
<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>
|
181 |
+
<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 ); ?>" />
|
182 |
+
<input id="add-video-thumb" type="button" class="button" value="<?php _e('Media Library', 'cmp-coming-soon-maintenance');?>" /><br><br>
|
183 |
|
184 |
<div class="video-thumb-wrapper">
|
185 |
<?php
|
194 |
</div>
|
195 |
|
196 |
<input id="delete-video-thumb" type="button" class="button" value="Remove Thumbnail" />
|
|
|
|
|
197 |
</fieldset>
|
198 |
</td>
|
199 |
</tr>
|
inc/settings-counter.php
CHANGED
@@ -29,8 +29,6 @@ if (isset($_POST['niteoCS_countdown_redirect'])) {
|
|
29 |
}
|
30 |
|
31 |
// register and enqueue admin needed scripts
|
32 |
-
wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', dirname(__FILE__)));
|
33 |
-
wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', dirname(__FILE__)));
|
34 |
wp_enqueue_script('countdown_flatpicker_js');
|
35 |
wp_enqueue_style( 'countdown_flatpicker_css');
|
36 |
|
29 |
}
|
30 |
|
31 |
// register and enqueue admin needed scripts
|
|
|
|
|
32 |
wp_enqueue_script('countdown_flatpicker_js');
|
33 |
wp_enqueue_style( 'countdown_flatpicker_css');
|
34 |
|
inc/settings-slider.php
CHANGED
@@ -88,7 +88,7 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
|
88 |
<input type="checkbox" name="niteoCS_slider_auto_<?php echo esc_attr($themeslug);?>" id="niteoCS_slider_auto" value="1" <?php checked( '1', get_option( 'niteoCS_slider_auto', '0' ) ); ?> class="regular-text code"><label for="niteoCS_slider_auto"><?php _e('Slider Autostart', 'cmp-coming-soon-maintenance');?></label><br>
|
89 |
</p>
|
90 |
|
91 |
-
<label for="niteoCS_slider_count"><?php _e('Number of Unplash media Slides', 'cmp-coming-soon-maintenance');?></label></br>
|
92 |
<select name="niteoCS_slider_count_<?php echo esc_attr($themeslug);?>" <?php if ( $niteoCS_banner !== '1' ) { echo 'disabled'; } ?>>
|
93 |
<option value="2" <?php if ( $niteoCS_slider_count == '2' ) { echo ' selected="selected"'; } ?>>2</option>
|
94 |
<option value="3" <?php if ( $niteoCS_slider_count == '3' ) { echo ' selected="selected"'; } ?>>3</option>
|
88 |
<input type="checkbox" name="niteoCS_slider_auto_<?php echo esc_attr($themeslug);?>" id="niteoCS_slider_auto" value="1" <?php checked( '1', get_option( 'niteoCS_slider_auto', '0' ) ); ?> class="regular-text code"><label for="niteoCS_slider_auto"><?php _e('Slider Autostart', 'cmp-coming-soon-maintenance');?></label><br>
|
89 |
</p>
|
90 |
|
91 |
+
<label for="niteoCS_slider_count"><?php _e('Number of Unplash media Slides (applies only for Unsplash photos)', 'cmp-coming-soon-maintenance');?></label></br>
|
92 |
<select name="niteoCS_slider_count_<?php echo esc_attr($themeslug);?>" <?php if ( $niteoCS_banner !== '1' ) { echo 'disabled'; } ?>>
|
93 |
<option value="2" <?php if ( $niteoCS_slider_count == '2' ) { echo ' selected="selected"'; } ?>>2</option>
|
94 |
<option value="3" <?php if ( $niteoCS_slider_count == '3' ) { echo ' selected="selected"'; } ?>>3</option>
|
inc/settings-subscribe.php
CHANGED
@@ -65,10 +65,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
65 |
<input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr($niteoCS_subscribe_label );?>" class="regular-text code">
|
66 |
</label>
|
67 |
|
68 |
-
<p><?php _e('Total Subscribers: ', 'cmp-coming-soon-maintenance'); echo $niteoCS_subscribers_list ? count( $niteoCS_subscribers_list ) : '0';?></p>
|
69 |
-
<p><?php _e('Since last export: ', 'cmp-coming-soon-maintenance'); echo $new_subs;?></p>
|
70 |
-
<p><?php _e('Last Export Date: ', 'cmp-coming-soon-maintenance'); echo $niteoCS_csv_export_time ? date('Y-m-d\ H:i:s\ ', $niteoCS_csv_export_time) : __('Never exported', 'cmp-coming-soon-maintenance');?></p>
|
71 |
-
<a href="#generate-mailinglist" id="csv-generate" class="button"><?php _e('Generate CSV', 'cmp-coming-soon-maintenance');?></a>
|
72 |
|
73 |
</fieldset>
|
74 |
</td>
|
65 |
<input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr($niteoCS_subscribe_label );?>" class="regular-text code">
|
66 |
</label>
|
67 |
|
68 |
+
<p><?php _e('Total Subscribers: ', 'cmp-coming-soon-maintenance');?><a href="<?php echo admin_url(); ?>admin.php?page=cmp-subscribers""><?php echo $niteoCS_subscribers_list ? count( $niteoCS_subscribers_list ) : '0';?></a> </p>
|
|
|
|
|
|
|
69 |
|
70 |
</fieldset>
|
71 |
</td>
|
js/fastsearch.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function b(a,b){this.init.apply(this,arguments)}var c=a(window.document),d=0,e=/\w\b/g,f={13:"enter",27:"escape",40:"downArrow",38:"upArrow"};return a.extend(b.prototype,{init:function(c,e){e=this.options=a.extend(!0,{},b.defaults,e),this.$input=a(c),this.$el=e.wrapSelector instanceof a?e.wrapSelector:this.$input.closest(e.wrapSelector),b.pickTo(e,this.$el.data(),["url","onItemSelect","noResultsText","inputIdName","apiInputName"]),e.url=e.url||this.$el.attr("action"),this.ens=".fastsearch"+ ++d,this.itemSelector=b.selectorFromClass(e.itemClass),this.focusedItemSelector=b.selectorFromClass(e.focusedItemClass),this.events()},namespaceEvents:function(a){var b=this.ens;return a.replace(e,function(a){return a+b})},events:function(){var b=this,c=this.options;this.$input.on(this.namespaceEvents("keyup focus click"),function(a){"enter"!==f[a.keyCode]&&b.handleTyping()}).on(this.namespaceEvents("keydown"),function(a){if("enter"===f[a.keyCode]&&c.preventSubmit&&a.preventDefault(),b.hasResults&&b.resultsOpened)switch(f[a.keyCode]){case"downArrow":a.preventDefault(),b.navigateItem("down");break;case"upArrow":a.preventDefault(),b.navigateItem("up");break;case"enter":b.onEnter(a)}}),this.$el.on(this.namespaceEvents("click"),this.itemSelector,function(c){c.preventDefault(),b.handleItemSelect(a(this))}),c.mouseEvents&&this.$el.on(this.namespaceEvents("mouseleave"),this.itemSelector,function(b){a(this).removeClass(c.focusedItemClass)}).on(this.namespaceEvents("mouseenter"),this.itemSelector,function(d){b.$resultItems.removeClass(c.focusedItemClass),a(this).addClass(c.focusedItemClass)})},handleTyping:function(){var b=a.trim(this.$input.val()),c=this;b.length<this.options.minQueryLength?this.hideResults():b===this.query?this.showResults():(clearTimeout(this.keyupTimeout),this.keyupTimeout=setTimeout(function(){c.$el.addClass(c.options.loadingClass),c.query=b,c.getResults(function(a){c.showResults(c.storeResponse(a).generateResults(a))})},this.options.typeTimeout))},getResults:function(b){var c=this,d=this.options,e=this.$el.find("input, textarea, select").serializeArray();d.apiInputName&&e.push({name:d.apiInputName,value:this.$input.val()}),a.get(d.url,e,function(a){b(d.parseResponse?d.parseResponse.call(c,a,c):a)})},storeResponse:function(a){return this.responseData=a,this.hasResults=0!==a.length,this},generateResults:function(b){var c=a("<div>"),d=this.options;return d.template?a(d.template(b,this)):(0===b.length?c.html('<p class="'+d.noResultsClass+'">'+("function"==typeof d.noResultsText?d.noResultsText.call(this):d.noResultsText)+"</p>"):"html"===this.options.responseType?c.html(b):this["generate"+(b[0][d.responseFormat.groupItems]?"GroupedResults":"SimpleResults")](b,c),c.children())},generateSimpleResults:function(b,c){var d=this;this.itemModels=b,a.each(b,function(a,b){c.append(d.generateItem(b))})},generateGroupedResults:function(b,c){var d=this,e=this.options,f=e.responseFormat;this.itemModels=[],a.each(b,function(b,g){var h=a('<div class="'+e.groupClass+'">').appendTo(c);g[f.groupCaption]&&h.append('<h3 class="'+e.groupTitleClass+'">'+g[f.groupCaption]+"</h3>"),a.each(g.items,function(a,b){d.itemModels.push(b),h.append(d.generateItem(b))}),e.onGroupCreate&&e.onGroupCreate.call(d,h,g,d)})},generateItem:function(b){var c=this.options,d=c.responseFormat,e=b[d.url],f=b[d.html]||b[d.label],g=a("<"+(e?"a":"span")+">").html(f).addClass(c.itemClass);return e&&g.attr("href",e),c.onItemCreate&&c.onItemCreate.call(this,g,b,this),g},showResults:function(b){!b&&this.resultsOpened||(this.$el.removeClass(this.options.loadingClass).addClass(this.options.resultsOpenedClass),this.options.flipOnBottom&&this.checkDropdownPosition(),this.$resultsCont=this.$resultsCont||a("<div>").addClass(this.options.resultsContClass).appendTo(this.$el),b&&(this.$resultsCont.html(b),this.$resultItems=this.$resultsCont.find(this.itemSelector),this.options.onResultsCreate&&this.options.onResultsCreate.call(this,this.$resultsCont,this.responseData,this)),this.resultsOpened||(this.documentCancelEvents("on"),this.$input.trigger("openingResults")),this.options.focusFirstItem&&this.$resultItems&&this.$resultItems.length&&this.navigateItem("down"),this.resultsOpened=!0)},checkDropdownPosition:function(){var a=this.options.flipOnBottom,b="boolean"==typeof a&&a?400:a,d=this.$input.offset().top+b>c.height();this.$el.toggleClass(this.options.resultsFlippedClass,d)},documentCancelEvents:function(b,d){var e=this;return"off"===b&&this.closeEventsSetuped?(c.off(this.ens),void(this.closeEventsSetuped=!1)):void("on"!==b||this.closeEventsSetuped||(c.on(this.namespaceEvents("click keyup"),function(b){("escape"===f[b.keyCode]||!a(b.target).is(e.$el)&&!a.contains(e.$el.get(0),b.target)&&a.contains(document.documentElement,b.target))&&(d?d.call(e):e.hideResults())}),this.closeEventsSetuped=!0))},navigateItem:function(a){var b=this.$resultItems.filter(this.focusedItemSelector),c=this.$resultItems.length-1;if(0===b.length)return void this.$resultItems.eq("up"===a?c:0).addClass(this.options.focusedItemClass);var d=this.$resultItems.index(b),e="up"===a?d-1:d+1;e>c&&(e=0),e<0&&(e=c),b.removeClass(this.options.focusedItemClass),this.$resultItems.eq(e).addClass(this.options.focusedItemClass)},navigateDown:function(){this.navigateItem("down")},navigateUp:function(){this.navigateItem("up")},onEnter:function(a){var b=this.$resultItems.filter(this.focusedItemSelector);b.length&&(a.preventDefault(),this.handleItemSelect(b))},handleItemSelect:function(a){var b=this.options.onItemSelect,c=this.itemModels.length?this.itemModels[this.$resultItems.index(a)]:{};this.$input.trigger("itemSelected"),"fillInput"===b?this.fillInput(c):"follow"===b?window.location.href=a.attr("href"):"function"==typeof b&&b.call(this,a,c,this)},fillInput:function(b){var c=this.options,d=c.responseFormat;if(this.query=b[d.label],this.$input.val(b[d.label]).trigger("change"),c.fillInputId&&b.id){if(!this.$inputId){var e=c.inputIdName||this.$input.attr("name")+"_id";this.$inputId=this.$el.find('input[name="'+e+'"]'),this.$inputId.length||(this.$inputId=a('<input type="hidden" name="'+e+'" />').appendTo(this.$el))}this.$inputId.val(b.id).trigger("change")}this.hideResults()},hideResults:function(){return this.resultsOpened&&(this.resultsOpened=!1,this.$el.removeClass(this.options.resultsOpenedClass),this.$input.trigger("closingResults"),this.documentCancelEvents("off")),this},clear:function(){return this.hideResults(),this.$input.val("").trigger("change"),this},destroy:function(){c.off(this.ens),this.$input.off(this.ens),this.$el.off(this.ens).removeClass(this.options.resultsOpenedClass).removeClass(this.options.loadingClass),this.$resultsCont&&(this.$resultsCont.remove(),delete this.$resultsCont),delete this.$el.data().fastsearch}}),a.extend(b,{pickTo:function(b,c,d){return a.each(d,function(a,d){b[d]=c&&c[d]||b[d]}),b},selectorFromClass:function(a){return"."+a.replace(/\s/g,".")}}),b.defaults={wrapSelector:"form",url:null,responseType:"JSON",preventSubmit:!1,resultsContClass:"fs_results",resultsOpenedClass:"fsr_opened",resultsFlippedClass:"fsr_flipped",groupClass:"fs_group",itemClass:"fs_result_item",groupTitleClass:"fs_group_title",loadingClass:"loading",noResultsClass:"fs_no_results",focusedItemClass:"focused",typeTimeout:140,minQueryLength:2,template:null,mouseEvents:!("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),focusFirstItem:!1,flipOnBottom:!1,responseFormat:{url:"url",html:"html",label:"label",groupCaption:"caption",groupItems:"items"},fillInputId:!0,inputIdName:null,apiInputName:null,noResultsText:"No results found",onItemSelect:"follow",parseResponse:null,onResultsCreate:null,onGroupCreate:null,onItemCreate:null},a.fastsearch=b,a.fn.fastsearch=function(c){return this.each(function(){a.data(this,"fastsearch")||a.data(this,"fastsearch",new b(this,c))})},a});
|
js/fastselect.min.js
ADDED
@@ -0,0 +1,773 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(root, factory) {
|
2 |
+
|
3 |
+
if (typeof define === 'function' && define.amd) {
|
4 |
+
define(['jquery', 'fastsearch'], factory);
|
5 |
+
} else if (typeof module === 'object' && module.exports) {
|
6 |
+
module.exports = factory(require('jquery'), require('fastsearch'));
|
7 |
+
} else {
|
8 |
+
factory(root.jQuery);
|
9 |
+
}
|
10 |
+
|
11 |
+
}(this, function($) {
|
12 |
+
|
13 |
+
var $document = $(document),
|
14 |
+
instanceNum = 0,
|
15 |
+
Fastsearch = $.fastsearch,
|
16 |
+
pickTo = Fastsearch.pickTo,
|
17 |
+
selectorFromClass = Fastsearch.selectorFromClass;
|
18 |
+
|
19 |
+
function Fastselect(inputElement, options) {
|
20 |
+
|
21 |
+
this.init.apply(this, arguments);
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
$.extend(Fastselect.prototype, {
|
26 |
+
|
27 |
+
init: function(inputElement, options) {
|
28 |
+
|
29 |
+
this.$input = $(inputElement);
|
30 |
+
|
31 |
+
this.options = pickTo($.extend(true, {}, Fastselect.defaults, options, {
|
32 |
+
placeholder: this.$input.attr('placeholder')
|
33 |
+
}), this.$input.data(), [
|
34 |
+
'url', 'loadOnce', 'apiParam', 'initialValue', 'userOptionAllowed'
|
35 |
+
]);
|
36 |
+
|
37 |
+
this.ens = '.fastselect' + (++instanceNum);
|
38 |
+
this.hasCustomLoader = this.$input.is('input');
|
39 |
+
this.isMultiple = !!this.$input.attr('multiple');
|
40 |
+
this.userOptionAllowed = this.hasCustomLoader && this.isMultiple && this.options.userOptionAllowed;
|
41 |
+
|
42 |
+
this.optionsCollection = new OptionsCollection(pickTo({multipleValues: this.isMultiple}, this.options, [
|
43 |
+
'url', 'loadOnce', 'parseData', 'matcher'
|
44 |
+
]));
|
45 |
+
|
46 |
+
this.setupDomElements();
|
47 |
+
this.setupFastsearch();
|
48 |
+
this.setupEvents();
|
49 |
+
|
50 |
+
},
|
51 |
+
|
52 |
+
setupDomElements: function() {
|
53 |
+
|
54 |
+
this.$el = $('<div>').addClass(this.options.elementClass);
|
55 |
+
|
56 |
+
this[this.isMultiple ? 'setupMultipleElement' : 'setupSingleElement'](function() {
|
57 |
+
|
58 |
+
this.updateDomElements();
|
59 |
+
this.$controls.appendTo(this.$el);
|
60 |
+
this.$el.insertAfter(this.$input);
|
61 |
+
this.$input.detach().appendTo(this.$el);
|
62 |
+
|
63 |
+
});
|
64 |
+
|
65 |
+
},
|
66 |
+
|
67 |
+
setupSingleElement: function(onDone) {
|
68 |
+
|
69 |
+
var initialOptions = this.processInitialOptions(),
|
70 |
+
toggleBtnText = initialOptions && initialOptions.length ? initialOptions[0].text : this.options.placeholder;
|
71 |
+
|
72 |
+
this.$el.addClass(this.options.singleModeClass);
|
73 |
+
this.$controls = $('<div>').addClass(this.options.controlsClass);
|
74 |
+
this.$toggleBtn = $('<div>').addClass(this.options.toggleButtonClass).text(toggleBtnText).appendTo(this.$el);
|
75 |
+
this.$queryInput = $('<input>').attr('placeholder', this.options.searchPlaceholder).addClass(this.options.queryInputClass).appendTo(this.$controls);
|
76 |
+
|
77 |
+
onDone.call(this);
|
78 |
+
|
79 |
+
},
|
80 |
+
|
81 |
+
setupMultipleElement: function(onDone) {
|
82 |
+
|
83 |
+
var self = this,
|
84 |
+
options = self.options,
|
85 |
+
initialOptions = this.processInitialOptions();
|
86 |
+
|
87 |
+
this.$el.addClass(options.multipleModeClass);
|
88 |
+
this.$controls = $('<div>').addClass(options.controlsClass);
|
89 |
+
this.$queryInput = $('<input>').addClass(options.queryInputClass).appendTo(this.$controls);
|
90 |
+
|
91 |
+
initialOptions && $.each(initialOptions, function(i, option) {
|
92 |
+
|
93 |
+
self.addChoiceItem(option);
|
94 |
+
|
95 |
+
});
|
96 |
+
|
97 |
+
onDone.call(this);
|
98 |
+
|
99 |
+
},
|
100 |
+
|
101 |
+
updateDomElements: function() {
|
102 |
+
|
103 |
+
this.$el.toggleClass(this.options.noneSelectedClass, !this.optionsCollection.hasSelectedValues());
|
104 |
+
this.adjustQueryInputLayout();
|
105 |
+
|
106 |
+
},
|
107 |
+
|
108 |
+
processInitialOptions: function() {
|
109 |
+
|
110 |
+
var self = this, options;
|
111 |
+
|
112 |
+
if (this.hasCustomLoader) {
|
113 |
+
|
114 |
+
options = this.options.initialValue;
|
115 |
+
|
116 |
+
$.isPlainObject(options) && (options = [options]);
|
117 |
+
|
118 |
+
} else {
|
119 |
+
|
120 |
+
options = $.map(this.$input.find('option:selected').get(), function(option) {
|
121 |
+
|
122 |
+
var $option = $(option);
|
123 |
+
|
124 |
+
return {
|
125 |
+
text: $option.text(),
|
126 |
+
value: $option.attr('value')
|
127 |
+
};
|
128 |
+
|
129 |
+
});
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
options && $.each(options, function(i, option) {
|
134 |
+
self.optionsCollection.setSelected(option);
|
135 |
+
});
|
136 |
+
|
137 |
+
return options;
|
138 |
+
|
139 |
+
},
|
140 |
+
|
141 |
+
addChoiceItem: function(optionModel) {
|
142 |
+
|
143 |
+
$(
|
144 |
+
'<div data-text="' + optionModel.text + '" data-value="' + optionModel.value + '" class="' + this.options.choiceItemClass + '">' +
|
145 |
+
$('<div>').html(optionModel.text).text() +
|
146 |
+
'<button class="' + this.options.choiceRemoveClass + '" type="button">×</button>' +
|
147 |
+
'</div>'
|
148 |
+
).insertBefore(this.$queryInput);
|
149 |
+
|
150 |
+
},
|
151 |
+
|
152 |
+
setupFastsearch: function() {
|
153 |
+
|
154 |
+
var self = this,
|
155 |
+
options = this.options,
|
156 |
+
fastSearchParams = {};
|
157 |
+
|
158 |
+
pickTo(fastSearchParams, options, [
|
159 |
+
'resultsContClass', 'resultsOpenedClass', 'resultsFlippedClass', 'groupClass', 'itemClass', 'focusFirstItem',
|
160 |
+
'groupTitleClass', 'loadingClass', 'noResultsClass', 'noResultsText', 'focusedItemClass', 'flipOnBottom'
|
161 |
+
]);
|
162 |
+
|
163 |
+
this.fastsearch = new Fastsearch(this.$queryInput.get(0), $.extend(fastSearchParams, {
|
164 |
+
|
165 |
+
wrapSelector: this.isMultiple ? this.$el : this.$controls,
|
166 |
+
|
167 |
+
minQueryLength: 0,
|
168 |
+
typeTimeout: this.hasCustomLoader ? options.typeTimeout : 0,
|
169 |
+
preventSubmit: true,
|
170 |
+
fillInputId: false,
|
171 |
+
|
172 |
+
responseFormat: {
|
173 |
+
label: 'text',
|
174 |
+
groupCaption: 'label'
|
175 |
+
},
|
176 |
+
|
177 |
+
onItemSelect: function($item, model, fastsearch) {
|
178 |
+
|
179 |
+
var maxItems = options.maxItems;
|
180 |
+
|
181 |
+
if (self.isMultiple && maxItems && (self.optionsCollection.getValues().length > (maxItems - 1))) {
|
182 |
+
|
183 |
+
options.onMaxItemsReached && options.onMaxItemsReached(this);
|
184 |
+
|
185 |
+
} else {
|
186 |
+
|
187 |
+
self.setSelectedOption(model);
|
188 |
+
self.writeToInput();
|
189 |
+
!self.isMultiple && self.hide();
|
190 |
+
options.clearQueryOnSelect && fastsearch.clear();
|
191 |
+
|
192 |
+
if (self.userOptionAllowed && model.isUserOption) {
|
193 |
+
fastsearch.$resultsCont.remove();
|
194 |
+
delete fastsearch.$resultsCont;
|
195 |
+
self.hide();
|
196 |
+
}
|
197 |
+
|
198 |
+
options.onItemSelect && options.onItemSelect.call(self, $item, model, self, fastsearch);
|
199 |
+
|
200 |
+
}
|
201 |
+
|
202 |
+
},
|
203 |
+
|
204 |
+
onItemCreate: function($item, model) {
|
205 |
+
|
206 |
+
model.$item = $item;
|
207 |
+
model.selected && $item.addClass(options.itemSelectedClass);
|
208 |
+
|
209 |
+
if (self.userOptionAllowed && model.isUserOption) {
|
210 |
+
$item.text(self.options.userOptionPrefix + $item.text()).addClass(self.options.userOptionClass);
|
211 |
+
}
|
212 |
+
|
213 |
+
options.onItemCreate && options.onItemCreate.call(self, $item, model, self);
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
}));
|
218 |
+
|
219 |
+
this.fastsearch.getResults = function() {
|
220 |
+
|
221 |
+
if (self.userOptionAllowed && self.$queryInput.val().length > 1) {
|
222 |
+
self.renderOptions();
|
223 |
+
}
|
224 |
+
|
225 |
+
self.getOptions(function() {
|
226 |
+
self.renderOptions(true);
|
227 |
+
});
|
228 |
+
|
229 |
+
};
|
230 |
+
|
231 |
+
},
|
232 |
+
|
233 |
+
getOptions: function(onDone) {
|
234 |
+
|
235 |
+
var options = this.options,
|
236 |
+
self = this,
|
237 |
+
params = {};
|
238 |
+
|
239 |
+
if (this.hasCustomLoader) {
|
240 |
+
|
241 |
+
var query = $.trim(this.$queryInput.val());
|
242 |
+
|
243 |
+
if (query && options.apiParam) {
|
244 |
+
params[options.apiParam] = query;
|
245 |
+
}
|
246 |
+
|
247 |
+
this.optionsCollection.fetch(params, onDone);
|
248 |
+
|
249 |
+
} else {
|
250 |
+
|
251 |
+
!this.optionsCollection.models && this.optionsCollection.reset(this.gleanSelectData(this.$input));
|
252 |
+
onDone();
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
},
|
257 |
+
|
258 |
+
namespaceEvents: function(events) {
|
259 |
+
|
260 |
+
return Fastsearch.prototype.namespaceEvents.call(this, events);
|
261 |
+
|
262 |
+
},
|
263 |
+
|
264 |
+
setupEvents: function() {
|
265 |
+
|
266 |
+
var self = this,
|
267 |
+
options = this.options;
|
268 |
+
|
269 |
+
if (this.isMultiple) {
|
270 |
+
|
271 |
+
this.$el.on(this.namespaceEvents('click'), function(e) {
|
272 |
+
|
273 |
+
$(e.target).is(selectorFromClass(options.controlsClass)) && self.$queryInput.focus();
|
274 |
+
|
275 |
+
});
|
276 |
+
|
277 |
+
this.$queryInput.on(this.namespaceEvents('keyup'), function(e) {
|
278 |
+
|
279 |
+
// if (self.$queryInput.val().length === 0 && e.keyCode === 8) {
|
280 |
+
// console.log('TODO implement delete');
|
281 |
+
// }
|
282 |
+
|
283 |
+
self.adjustQueryInputLayout();
|
284 |
+
self.show();
|
285 |
+
|
286 |
+
}).on(this.namespaceEvents('focus'), function() {
|
287 |
+
|
288 |
+
self.show();
|
289 |
+
|
290 |
+
});
|
291 |
+
|
292 |
+
this.$el.on(this.namespaceEvents('click'), selectorFromClass(options.choiceRemoveClass), function(e) {
|
293 |
+
|
294 |
+
var $choice = $(e.currentTarget).closest(selectorFromClass(options.choiceItemClass));
|
295 |
+
|
296 |
+
self.removeSelectedOption({
|
297 |
+
value: $choice.attr('data-value'),
|
298 |
+
text: $choice.attr('data-text')
|
299 |
+
}, $choice);
|
300 |
+
|
301 |
+
});
|
302 |
+
|
303 |
+
} else {
|
304 |
+
|
305 |
+
this.$el.on(this.namespaceEvents('click'), selectorFromClass(options.toggleButtonClass), function() {
|
306 |
+
|
307 |
+
self.$el.hasClass(options.activeClass) ? self.hide() : self.show(true);
|
308 |
+
|
309 |
+
});
|
310 |
+
|
311 |
+
}
|
312 |
+
|
313 |
+
},
|
314 |
+
|
315 |
+
adjustQueryInputLayout: function() {
|
316 |
+
|
317 |
+
if (this.isMultiple && this.$queryInput) {
|
318 |
+
|
319 |
+
var noneSelected = this.$el.hasClass(this.options.noneSelectedClass);
|
320 |
+
|
321 |
+
this.$queryInput.toggleClass(this.options.queryInputExpandedClass, noneSelected);
|
322 |
+
|
323 |
+
if (noneSelected) {
|
324 |
+
|
325 |
+
this.$queryInput.attr({
|
326 |
+
style: '',
|
327 |
+
placeholder: this.options.placeholder
|
328 |
+
});
|
329 |
+
|
330 |
+
} else {
|
331 |
+
|
332 |
+
this.$fakeInput = this.$fakeInput || $('<span>').addClass(this.options.fakeInputClass);
|
333 |
+
this.$fakeInput.text(this.$queryInput.val().replace(/\s/g, ' '));
|
334 |
+
this.$queryInput.removeAttr('placeholder').css('width', this.$fakeInput.insertAfter(this.$queryInput).width() + 20);
|
335 |
+
this.$fakeInput.detach();
|
336 |
+
|
337 |
+
}
|
338 |
+
|
339 |
+
}
|
340 |
+
|
341 |
+
},
|
342 |
+
|
343 |
+
show: function(focus) {
|
344 |
+
|
345 |
+
this.$el.addClass(this.options.activeClass);
|
346 |
+
focus ? this.$queryInput.focus() : this.fastsearch.handleTyping();
|
347 |
+
|
348 |
+
this.documentCancelEvents('on');
|
349 |
+
|
350 |
+
},
|
351 |
+
|
352 |
+
hide: function() {
|
353 |
+
|
354 |
+
this.$el.removeClass(this.options.activeClass);
|
355 |
+
|
356 |
+
this.documentCancelEvents('off');
|
357 |
+
|
358 |
+
},
|
359 |
+
|
360 |
+
documentCancelEvents: function(setup) {
|
361 |
+
|
362 |
+
Fastsearch.prototype.documentCancelEvents.call(this, setup, this.hide);
|
363 |
+
|
364 |
+
},
|
365 |
+
|
366 |
+
setSelectedOption: function(option) {
|
367 |
+
|
368 |
+
if (this.optionsCollection.isSelected(option.value)) {
|
369 |
+
return;
|
370 |
+
}
|
371 |
+
|
372 |
+
this.optionsCollection.setSelected(option);
|
373 |
+
|
374 |
+
var selectedModel = this.optionsCollection.findWhere(function(model) {
|
375 |
+
return model.value === option.value;
|
376 |
+
});
|
377 |
+
|
378 |
+
if (this.isMultiple) {
|
379 |
+
|
380 |
+
this.$controls && this.addChoiceItem(option);
|
381 |
+
|
382 |
+
} else {
|
383 |
+
|
384 |
+
this.fastsearch && this.fastsearch.$resultItems.removeClass(this.options.itemSelectedClass);
|
385 |
+
this.$toggleBtn && this.$toggleBtn.text(option.text);
|
386 |
+
|
387 |
+
}
|
388 |
+
|
389 |
+
selectedModel && selectedModel.$item.addClass(this.options.itemSelectedClass);
|
390 |
+
|
391 |
+
this.updateDomElements();
|
392 |
+
|
393 |
+
},
|
394 |
+
|
395 |
+
removeSelectedOption: function(option, $choiceItem) {
|
396 |
+
|
397 |
+
var removedModel = this.optionsCollection.removeSelected(option);
|
398 |
+
|
399 |
+
if (removedModel && removedModel.$item) {
|
400 |
+
|
401 |
+
removedModel.$item.removeClass(this.options.itemSelectedClass);
|
402 |
+
|
403 |
+
}
|
404 |
+
|
405 |
+
if ($choiceItem) {
|
406 |
+
$choiceItem.remove();
|
407 |
+
} else {
|
408 |
+
this.$el.find(selectorFromClass(this.options.choiceItemClass) + '[data-value="' + option.value + '"]').remove();
|
409 |
+
}
|
410 |
+
|
411 |
+
this.updateDomElements();
|
412 |
+
this.writeToInput();
|
413 |
+
|
414 |
+
},
|
415 |
+
|
416 |
+
writeToInput: function() {
|
417 |
+
|
418 |
+
var values = this.optionsCollection.getValues(),
|
419 |
+
delimiter = this.options.valueDelimiter,
|
420 |
+
formattedValue = this.isMultiple ? (this.hasCustomLoader ? values.join(delimiter) : values) : values[0];
|
421 |
+
|
422 |
+
this.$input.val(formattedValue).trigger('change');
|
423 |
+
|
424 |
+
},
|
425 |
+
|
426 |
+
renderOptions: function(filter) {
|
427 |
+
|
428 |
+
var query = this.$queryInput.val();
|
429 |
+
var data;
|
430 |
+
|
431 |
+
if (this.optionsCollection.models) {
|
432 |
+
data = (filter ? this.optionsCollection.filter(query) : this.optionsCollection.models).slice(0);
|
433 |
+
} else {
|
434 |
+
data = [];
|
435 |
+
}
|
436 |
+
|
437 |
+
if (this.userOptionAllowed) {
|
438 |
+
|
439 |
+
var queryInList = this.optionsCollection.models && this.optionsCollection.findWhere(function(model) {
|
440 |
+
return model.value === query;
|
441 |
+
});
|
442 |
+
|
443 |
+
query && !queryInList && data.unshift({
|
444 |
+
text: query,
|
445 |
+
value: query,
|
446 |
+
isUserOption: true
|
447 |
+
});
|
448 |
+
|
449 |
+
}
|
450 |
+
|
451 |
+
this.fastsearch.showResults(this.fastsearch.storeResponse(data).generateResults(data));
|
452 |
+
|
453 |
+
},
|
454 |
+
|
455 |
+
gleanSelectData: function($select) {
|
456 |
+
|
457 |
+
var self = this,
|
458 |
+
$elements = $select.children();
|
459 |
+
|
460 |
+
if ($elements.eq(0).is('optgroup')) {
|
461 |
+
|
462 |
+
return $.map($elements.get(), function(optgroup) {
|
463 |
+
|
464 |
+
var $optgroup = $(optgroup);
|
465 |
+
|
466 |
+
return {
|
467 |
+
label: $optgroup.attr('label'),
|
468 |
+
items: self.gleanOptionsData($optgroup.children())
|
469 |
+
};
|
470 |
+
|
471 |
+
});
|
472 |
+
|
473 |
+
} else {
|
474 |
+
|
475 |
+
return this.gleanOptionsData($elements);
|
476 |
+
|
477 |
+
}
|
478 |
+
|
479 |
+
},
|
480 |
+
|
481 |
+
gleanOptionsData: function($options) {
|
482 |
+
|
483 |
+
return $.map($options.get(), function(option) {
|
484 |
+
var $option = $(option);
|
485 |
+
return {
|
486 |
+
text: $option.text(),
|
487 |
+
value: $option.attr('value'),
|
488 |
+
selected: $option.is(':selected')
|
489 |
+
};
|
490 |
+
});
|
491 |
+
|
492 |
+
},
|
493 |
+
|
494 |
+
destroy: function() {
|
495 |
+
|
496 |
+
$document.off(this.ens);
|
497 |
+
this.fastsearch.destroy();
|
498 |
+
this.$input.off(this.ens).detach().insertAfter(this.$el);
|
499 |
+
this.$el.off(this.ens).remove();
|
500 |
+
|
501 |
+
this.$input.data() && delete this.$input.data().fastselect;
|
502 |
+
|
503 |
+
}
|
504 |
+
|
505 |
+
});
|
506 |
+
|
507 |
+
function OptionsCollection(options) {
|
508 |
+
|
509 |
+
this.init(options);
|
510 |
+
|
511 |
+
}
|
512 |
+
|
513 |
+
$.extend(OptionsCollection.prototype, {
|
514 |
+
|
515 |
+
defaults: {
|
516 |
+
loadOnce: false,
|
517 |
+
url: null,
|
518 |
+
parseData: null,
|
519 |
+
multipleValues: false,
|
520 |
+
matcher: function(text, query) {
|
521 |
+
|
522 |
+
return text.toLowerCase().indexOf(query.toLowerCase()) > -1;
|
523 |
+
|
524 |
+
}
|
525 |
+
},
|
526 |
+
|
527 |
+
init: function(options) {
|
528 |
+
|
529 |
+
this.options = $.extend({}, this.defaults, options);
|
530 |
+
this.selectedValues = {};
|
531 |
+
|
532 |
+
},
|
533 |
+
|
534 |
+
fetch: function(fetchParams, onDone) {
|
535 |
+
|
536 |
+
var self = this,
|
537 |
+
afterFetch = function() {
|
538 |
+
self.applySelectedValues(onDone);
|
539 |
+
};
|
540 |
+
|
541 |
+
if (this.options.loadOnce) {
|
542 |
+
|
543 |
+
this.fetchDeferred = this.fetchDeferred || this.load(fetchParams);
|
544 |
+
this.fetchDeferred.done(afterFetch);
|
545 |
+
|
546 |
+
} else {
|
547 |
+
this.load(fetchParams, afterFetch);
|
548 |
+
}
|
549 |
+
|
550 |
+
},
|
551 |
+
|
552 |
+
reset: function(models) {
|
553 |
+
|
554 |
+
this.models = this.options.parseData ? this.options.parseData(models) : models;
|
555 |
+
this.applySelectedValues();
|
556 |
+
|
557 |
+
},
|
558 |
+
|
559 |
+
applySelectedValues: function(onDone) {
|
560 |
+
|
561 |
+
this.each(function(option) {
|
562 |
+
|
563 |
+
if (this.options.multipleValues && option.selected) {
|
564 |
+
|
565 |
+
this.selectedValues[option.value] = true;
|
566 |
+
|
567 |
+
} else {
|
568 |
+
|
569 |
+
option.selected = !!this.selectedValues[option.value];
|
570 |
+
|
571 |
+
}
|
572 |
+
|
573 |
+
});
|
574 |
+
|
575 |
+
onDone && onDone.call(this);
|
576 |
+
|
577 |
+
},
|
578 |
+
|
579 |
+
load: function(params, onDone) {
|
580 |
+
|
581 |
+
var self = this,
|
582 |
+
options = this.options;
|
583 |
+
|
584 |
+
return $.get(options.url, params, function(data) {
|
585 |
+
|
586 |
+
self.models = options.parseData ? options.parseData(data) : data;
|
587 |
+
|
588 |
+
onDone && onDone.call(self);
|
589 |
+
|
590 |
+
});
|
591 |
+
|
592 |
+
},
|
593 |
+
|
594 |
+
setSelected: function(option) {
|
595 |
+
|
596 |
+
if (!this.options.multipleValues) {
|
597 |
+
this.selectedValues = {};
|
598 |
+
}
|
599 |
+
|
600 |
+
this.selectedValues[option.value] = true;
|
601 |
+
this.applySelectedValues();
|
602 |
+
|
603 |
+
},
|
604 |
+
|
605 |
+
removeSelected: function(option) {
|
606 |
+
|
607 |
+
var model = this.findWhere(function(model) {
|
608 |
+
return option.value === model.value;
|
609 |
+
});
|
610 |
+
|
611 |
+
model && (model.selected = false);
|
612 |
+
|
613 |
+
delete this.selectedValues[option.value];
|
614 |
+
|
615 |
+
return model;
|
616 |
+
|
617 |
+
},
|
618 |
+
|
619 |
+
isSelected: function(value) {
|
620 |
+
|
621 |
+
return !!this.selectedValues[value];
|
622 |
+
|
623 |
+
},
|
624 |
+
|
625 |
+
hasSelectedValues: function() {
|
626 |
+
|
627 |
+
return this.getValues().length > 0;
|
628 |
+
|
629 |
+
},
|
630 |
+
|
631 |
+
each: function(iterator) {
|
632 |
+
|
633 |
+
var self = this;
|
634 |
+
|
635 |
+
this.models && $.each(this.models, function(i, option) {
|
636 |
+
|
637 |
+
option.items ? $.each(option.items, function(i, nestedOption) {
|
638 |
+
iterator.call(self, nestedOption);
|
639 |
+
}) : iterator.call(self, option);
|
640 |
+
|
641 |
+
});
|
642 |
+
|
643 |
+
},
|
644 |
+
|
645 |
+
where: function(predicate) {
|
646 |
+
|
647 |
+
var temp = [];
|
648 |
+
|
649 |
+
this.each(function(option) {
|
650 |
+
predicate(option) && temp.push(option);
|
651 |
+
});
|
652 |
+
|
653 |
+
return temp;
|
654 |
+
|
655 |
+
},
|
656 |
+
|
657 |
+
findWhere: function(predicate) {
|
658 |
+
|
659 |
+
var models = this.where(predicate);
|
660 |
+
|
661 |
+
return models.length ? models[0] : undefined;
|
662 |
+
|
663 |
+
},
|
664 |
+
|
665 |
+
filter: function(query) {
|
666 |
+
|
667 |
+
var self = this;
|
668 |
+
|
669 |
+
function checkItem(item) {
|
670 |
+
return self.options.matcher(item.text, query) ? item : null;
|
671 |
+
}
|
672 |
+
|
673 |
+
if (!query || query.length === 0) {
|
674 |
+
return this.models;
|
675 |
+
}
|
676 |
+
|
677 |
+
return $.map(this.models, function(item) {
|
678 |
+
|
679 |
+
if (item.items) {
|
680 |
+
|
681 |
+
var filteredItems = $.map(item.items, checkItem);
|
682 |
+
|
683 |
+
return filteredItems.length ? {
|
684 |
+
label: item.label,
|
685 |
+
items: filteredItems
|
686 |
+
} : null;
|
687 |
+
|
688 |
+
} else {
|
689 |
+
return checkItem(item);
|
690 |
+
}
|
691 |
+
|
692 |
+
});
|
693 |
+
|
694 |
+
},
|
695 |
+
|
696 |
+
getValues: function() {
|
697 |
+
|
698 |
+
return $.map(this.selectedValues, function(prop, key) {
|
699 |
+
return prop ? key : null;
|
700 |
+
});
|
701 |
+
|
702 |
+
}
|
703 |
+
|
704 |
+
});
|
705 |
+
|
706 |
+
Fastselect.defaults = {
|
707 |
+
|
708 |
+
elementClass: 'fstElement',
|
709 |
+
singleModeClass: 'fstSingleMode',
|
710 |
+
noneSelectedClass: 'fstNoneSelected',
|
711 |
+
multipleModeClass: 'fstMultipleMode',
|
712 |
+
queryInputClass: 'fstQueryInput',
|
713 |
+
queryInputExpandedClass: 'fstQueryInputExpanded',
|
714 |
+
fakeInputClass: 'fstFakeInput',
|
715 |
+
controlsClass: 'fstControls',
|
716 |
+
toggleButtonClass: 'fstToggleBtn',
|
717 |
+
activeClass: 'fstActive',
|
718 |
+
itemSelectedClass: 'fstSelected',
|
719 |
+
choiceItemClass: 'fstChoiceItem',
|
720 |
+
choiceRemoveClass: 'fstChoiceRemove',
|
721 |
+
userOptionClass: 'fstUserOption',
|
722 |
+
|
723 |
+
resultsContClass: 'fstResults',
|
724 |
+
resultsOpenedClass: 'fstResultsOpened',
|
725 |
+
resultsFlippedClass: 'fstResultsFilpped',
|
726 |
+
groupClass: 'fstGroup',
|
727 |
+
itemClass: 'fstResultItem',
|
728 |
+
groupTitleClass: 'fstGroupTitle',
|
729 |
+
loadingClass: 'fstLoading',
|
730 |
+
noResultsClass: 'fstNoResults',
|
731 |
+
focusedItemClass: 'fstFocused',
|
732 |
+
|
733 |
+
matcher: null,
|
734 |
+
|
735 |
+
url: null,
|
736 |
+
loadOnce: false,
|
737 |
+
apiParam: 'query',
|
738 |
+
initialValue: null,
|
739 |
+
clearQueryOnSelect: true,
|
740 |
+
minQueryLength: 1,
|
741 |
+
focusFirstItem: false,
|
742 |
+
flipOnBottom: true,
|
743 |
+
typeTimeout: 150,
|
744 |
+
userOptionAllowed: false,
|
745 |
+
valueDelimiter: ',',
|
746 |
+
maxItems: null,
|
747 |
+
|
748 |
+
parseData: null,
|
749 |
+
onItemSelect: null,
|
750 |
+
onItemCreate: null,
|
751 |
+
onMaxItemsReached: null,
|
752 |
+
|
753 |
+
placeholder: 'Choose option',
|
754 |
+
searchPlaceholder: 'Search options',
|
755 |
+
noResultsText: 'No results',
|
756 |
+
userOptionPrefix: 'Add '
|
757 |
+
|
758 |
+
};
|
759 |
+
|
760 |
+
$.Fastselect = Fastselect;
|
761 |
+
$.Fastselect.OptionsCollection = OptionsCollection;
|
762 |
+
|
763 |
+
$.fn.fastselect = function(options) {
|
764 |
+
return this.each(function() {
|
765 |
+
if (!$.data(this, 'fastselect')) {
|
766 |
+
$.data(this, 'fastselect', new Fastselect(this, options));
|
767 |
+
}
|
768 |
+
});
|
769 |
+
};
|
770 |
+
|
771 |
+
return $;
|
772 |
+
|
773 |
+
}));
|
js/settings.js
CHANGED
@@ -48,13 +48,14 @@ jQuery(document).ready(function($){
|
|
48 |
jQuery(this).addClass('active');
|
49 |
$children.trigger('change');
|
50 |
if ( $children.val() == '3' ) {
|
51 |
-
jQuery('#niteoCS_URL_redirect').prop('disabled',false);
|
|
|
52 |
} else {
|
53 |
-
jQuery('#niteoCS_URL_redirect').prop('disabled',true);
|
|
|
54 |
}
|
55 |
});
|
56 |
|
57 |
-
|
58 |
// expandable tabs
|
59 |
jQuery('.table-wrapper h3').click(function(){
|
60 |
jQuery(this).toggleClass('closed');
|
@@ -80,175 +81,6 @@ jQuery(document).ready(function($){
|
|
80 |
}
|
81 |
});
|
82 |
|
83 |
-
// script for logo upload
|
84 |
-
var logoContainer = jQuery('.logo-wrapper');
|
85 |
-
|
86 |
-
if ( jQuery('#niteoCS-logo-id').val() != '' ) {
|
87 |
-
// Add Gallery Button To Change Gallery
|
88 |
-
jQuery('#add-logo').val( 'Change Logo' );
|
89 |
-
// Display Delete Gallery
|
90 |
-
jQuery('#delete-logo').css( 'display', 'block' );
|
91 |
-
}
|
92 |
-
|
93 |
-
jQuery('#add-logo').click(function(e) {
|
94 |
-
e.preventDefault();
|
95 |
-
// If the media frame already exists, reopen it.
|
96 |
-
if ( media_uploader ) {
|
97 |
-
media_uploader.open();
|
98 |
-
return;
|
99 |
-
}
|
100 |
-
var media_uploader = wp.media({
|
101 |
-
title: 'Select Logo',
|
102 |
-
button: {
|
103 |
-
text: 'Insert Logo'
|
104 |
-
},
|
105 |
-
multiple: false, // Set this to true to allow multiple files to be selected
|
106 |
-
type : 'image'
|
107 |
-
})
|
108 |
-
.on('select', function() {
|
109 |
-
// Get media attachment details from the frame state
|
110 |
-
var attachment = media_uploader.state().get('selection').first().toJSON();
|
111 |
-
|
112 |
-
jQuery('.logo-wrapper').empty();
|
113 |
-
|
114 |
-
// Send the attachment URL to our custom image input field.
|
115 |
-
logoContainer.append( '<img src="' + attachment.url + '" alt="" style="max-width:588px"/>' );
|
116 |
-
// Add Gallery Button To Change Gallery
|
117 |
-
jQuery('#add-logo').val( 'Change Logo' );
|
118 |
-
// Display Delete Gallery
|
119 |
-
jQuery('#delete-logo').css( 'display', 'block' );
|
120 |
-
|
121 |
-
jQuery('#niteoCS-logo-id').val( attachment.id ).trigger('change');
|
122 |
-
|
123 |
-
})
|
124 |
-
.open();
|
125 |
-
});
|
126 |
-
|
127 |
-
jQuery('#delete-logo').click(function(e) {
|
128 |
-
jQuery('.logo-wrapper').empty();
|
129 |
-
jQuery('#add-logo').val( 'Select Logo' );
|
130 |
-
jQuery(this).css('display', 'none');
|
131 |
-
jQuery('#niteoCS-logo-id').val('');
|
132 |
-
jQuery('#niteoCS-logo-id').trigger('change');
|
133 |
-
|
134 |
-
});
|
135 |
-
|
136 |
-
// script for favicon upload
|
137 |
-
var favContainer = jQuery('.favicon-wrapper');
|
138 |
-
|
139 |
-
if ( jQuery('#niteoCS-favicon-id').val() != '' ) {
|
140 |
-
jQuery('#add-favicon').val( 'Change favicon' );
|
141 |
-
jQuery('#delete-favicon').css( 'display', 'block' );
|
142 |
-
}
|
143 |
-
|
144 |
-
jQuery('#add-favicon').click(function(e) {
|
145 |
-
e.preventDefault();
|
146 |
-
// If the media frame already exists, reopen it.
|
147 |
-
if ( media_uploader ) {
|
148 |
-
media_uploader.open();
|
149 |
-
return;
|
150 |
-
}
|
151 |
-
var media_uploader = wp.media({
|
152 |
-
title: 'Select favicon',
|
153 |
-
button: {
|
154 |
-
text: 'Insert favicon'
|
155 |
-
},
|
156 |
-
multiple: false, // Set this to true to allow multiple files to be selected
|
157 |
-
type : 'image'
|
158 |
-
})
|
159 |
-
.on('select', function() {
|
160 |
-
// Get media attachment details from the frame state
|
161 |
-
var attachment = media_uploader.state().get('selection').first().toJSON();
|
162 |
-
|
163 |
-
jQuery('.favicon-wrapper').empty();
|
164 |
-
|
165 |
-
// Send the attachment URL to our custom image input field.
|
166 |
-
favContainer.append( '<img src="' + attachment.url + '" alt="" style="max-width:32px"/>' );
|
167 |
-
// Add Gallery Button To Change Gallery
|
168 |
-
jQuery('#add-favicon').val( 'Change favicon' );
|
169 |
-
// Display Delete Gallery
|
170 |
-
jQuery('#delete-favicon').css( 'display', 'block' );
|
171 |
-
|
172 |
-
jQuery('#niteoCS-favicon-id').val( attachment.id ).trigger('change');
|
173 |
-
|
174 |
-
if (!jQuery('#favicon').length) {
|
175 |
-
jQuery('head').append('<link id="favicon" rel="shortcut icon" href="'+attachment.url+'" />');
|
176 |
-
} else {
|
177 |
-
jQuery('#favicon').attr('href', attachment.url);
|
178 |
-
}
|
179 |
-
|
180 |
-
|
181 |
-
})
|
182 |
-
.open();
|
183 |
-
});
|
184 |
-
|
185 |
-
jQuery('#delete-favicon').click(function(e) {
|
186 |
-
jQuery('.favicon-wrapper').empty();
|
187 |
-
jQuery('#add-favicon').val( 'Select favicon' );
|
188 |
-
jQuery(this).css('display', 'none');
|
189 |
-
jQuery('#niteoCS-favicon-id').val('').trigger('change');
|
190 |
-
jQuery('#favicon').remove();
|
191 |
-
|
192 |
-
});
|
193 |
-
|
194 |
-
// script for banner upload
|
195 |
-
|
196 |
-
if ( jQuery('#niteoCS-banner-id').val() != '' ) {
|
197 |
-
// Display Delete Gallery
|
198 |
-
jQuery('#delete-banner').css( 'display', 'block' );
|
199 |
-
}
|
200 |
-
|
201 |
-
jQuery('#add-banner').click(function(e) {
|
202 |
-
var bannerContainer = jQuery('.banner-wrapper:not(.default)');
|
203 |
-
e.preventDefault();
|
204 |
-
// If the media frame already exists, reopen it.
|
205 |
-
if ( media_uploader ) {
|
206 |
-
media_uploader.open();
|
207 |
-
return;
|
208 |
-
}
|
209 |
-
var media_uploader = wp.media({
|
210 |
-
title: 'Select Photos',
|
211 |
-
button: {
|
212 |
-
text: 'Insert Photos'
|
213 |
-
},
|
214 |
-
multiple: true, // Set this to true to allow multiple files to be selected
|
215 |
-
type : 'image'
|
216 |
-
})
|
217 |
-
.on('select', function() {
|
218 |
-
// Get media attachment details from the frame state
|
219 |
-
var attachment = media_uploader.state().get('selection').toJSON();
|
220 |
-
var imgID = '';
|
221 |
-
var imgURL = '';
|
222 |
-
|
223 |
-
if (attachment.length > 0) {
|
224 |
-
bannerContainer.empty();
|
225 |
-
|
226 |
-
jQuery(attachment).each(function(i) {
|
227 |
-
// Send the attachment URL to our custom image input field.
|
228 |
-
if ('large' in attachment[i]['sizes']) {
|
229 |
-
bannerContainer.append( '<img src="' + attachment[i]['sizes']['large'].url + '" alt="" style="max-width:588px;"/>' );
|
230 |
-
} else {
|
231 |
-
bannerContainer.append( '<img src="' + attachment[i].url + '" alt="" style="max-width:588px;"/>' );
|
232 |
-
}
|
233 |
-
|
234 |
-
// Display Delete Gallery
|
235 |
-
jQuery('#delete-banner').css( 'display', 'block' );
|
236 |
-
// add image ID and url to comma-separated variable
|
237 |
-
var comma = i === 0 ? '' : ',';
|
238 |
-
imgID += ( comma + attachment[i].id );
|
239 |
-
});
|
240 |
-
// add image ID and url to input val
|
241 |
-
jQuery('#niteoCS-banner-id').val( imgID ).trigger('change');
|
242 |
-
}
|
243 |
-
})
|
244 |
-
.open();
|
245 |
-
});
|
246 |
-
|
247 |
-
jQuery('#delete-banner').click(function(e) {
|
248 |
-
jQuery('.banner-wrapper:not(.default)').empty();
|
249 |
-
jQuery(this).css('display', 'none');
|
250 |
-
jQuery('#niteoCS-banner-id').val('').trigger('change');
|
251 |
-
});
|
252 |
// test unsplash image
|
253 |
jQuery('#test-unsplash').click(function(e){
|
254 |
e.preventDefault();
|
@@ -316,32 +148,10 @@ jQuery(document).ready(function($){
|
|
316 |
|
317 |
});
|
318 |
|
319 |
-
|
320 |
-
jQuery('#csoptions .banner-video-source').change(function() {
|
321 |
-
|
322 |
-
switch(jQuery('#csoptions .banner-video-source' ).val() ) {
|
323 |
-
case 'youtube':
|
324 |
-
jQuery('.youtube-source-input').css('display','block');
|
325 |
-
jQuery('.vimeo-source-input').css('display','none');
|
326 |
-
break;
|
327 |
-
case 'vimeo':
|
328 |
-
jQuery('.youtube-source-input').css('display','none');
|
329 |
-
jQuery('.vimeo-source-input').css('display','block');
|
330 |
-
break;
|
331 |
-
default:
|
332 |
-
jQuery('.youtube-source-input').css('display','none');
|
333 |
-
jQuery('.vimeo-source-input').css('display','block');
|
334 |
-
}
|
335 |
-
});
|
336 |
-
jQuery('#csoptions .banner-video-source').trigger('change');
|
337 |
-
|
338 |
-
// video pattern preview
|
339 |
-
jQuery('#test-video').click(function(e) {
|
340 |
-
e.preventDefault();
|
341 |
-
|
342 |
var source = $('.banner-video-source').val();
|
343 |
-
|
344 |
-
if ( source == '
|
345 |
var youtubeLink = $('#niteoCS-youtube-url').val();
|
346 |
if( youtubeLink.match(/(youtube.com)/) ){
|
347 |
var split_c = 'v=';
|
@@ -352,107 +162,95 @@ jQuery(document).ready(function($){
|
|
352 |
var split_c = '/';
|
353 |
var split_n = 3;
|
354 |
}
|
355 |
-
}
|
356 |
|
357 |
-
|
358 |
-
|
359 |
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
}
|
364 |
-
}
|
365 |
-
if ( youtubeLink ) {
|
366 |
-
var getYouTubeVideoID = youtubeLink.split(split_c)[split_n];
|
367 |
-
if ( getYouTubeVideoID != undefined ) {
|
368 |
-
var cleanVideoID = getYouTubeVideoID.replace(/(&)+(.*)/, '');
|
369 |
-
|
370 |
-
if( source == 'banner_youtube' && youtubeLink.match(/(youtu.be)/) || youtubeLink.match(/(youtube.com)/) ){
|
371 |
-
var videoEmbedLink = 'https://www.youtube.com/embed/'+cleanVideoID+'?autoplay=1';
|
372 |
}
|
|
|
373 |
|
374 |
-
|
375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
}
|
377 |
|
378 |
-
var $iframe = $('<iframe src="'+videoEmbedLink+'" allowfullscreen></iframe>');
|
379 |
-
$('.video-preview').html($iframe);
|
380 |
-
var videoRatio = ( $iframe.height() / $iframe.width() ) * 100;
|
381 |
-
|
382 |
-
$iframe.css('position', 'absolute');
|
383 |
-
$iframe.css('top', '0');
|
384 |
-
$iframe.css('left', '0');
|
385 |
-
$iframe.css('width', '100%');
|
386 |
-
$iframe.css('height', '100%');
|
387 |
-
|
388 |
-
$('.video-preview').css('padding-top', videoRatio+'%');
|
389 |
-
$('#niteoCS-vimeo-url').css('border', '1px solid #ddd');
|
390 |
-
$('#niteoCS-youtube-url').css('border', '1px solid #ddd');
|
391 |
} else {
|
392 |
-
$('.video-
|
393 |
$('#niteoCS-vimeo-url').css('border', '1px solid #d60000');
|
394 |
$('#niteoCS-youtube-url').css('border', '1px solid #d60000');
|
395 |
}
|
|
|
396 |
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
}
|
402 |
-
});
|
403 |
-
|
404 |
-
// script for video thumb upload
|
405 |
-
var $videoThumbContainer = jQuery('.video-thumb-wrapper');
|
406 |
-
|
407 |
-
if ( jQuery('#niteoCS-video-thumb').val() != '' ) {
|
408 |
-
jQuery('#delete-video-thumb').css( 'display', 'block' );
|
409 |
-
}
|
410 |
-
|
411 |
-
jQuery('#add-video-thumb').click(function(e) {
|
412 |
-
e.preventDefault();
|
413 |
-
// If the media frame already exists, reopen it.
|
414 |
-
if ( media_uploader ) {
|
415 |
-
media_uploader.open();
|
416 |
-
return;
|
417 |
-
}
|
418 |
-
var media_uploader = wp.media({
|
419 |
-
title: 'Select Image',
|
420 |
-
button: {
|
421 |
-
text: 'Insert Video Thumbnail'
|
422 |
-
},
|
423 |
-
multiple: false, // Set this to true to allow multiple files to be selected
|
424 |
-
type : 'image'
|
425 |
-
})
|
426 |
-
.on('select', function() {
|
427 |
-
// Get media attachment details from the frame state
|
428 |
-
var attachment = media_uploader.state().get('selection').first().toJSON();
|
429 |
-
|
430 |
-
$videoThumbContainer.empty();
|
431 |
-
|
432 |
-
// Send the attachment URL to our custom image input field.
|
433 |
-
if (attachment['sizes']['large']=== undefined) {
|
434 |
-
var thumbUrl = attachment.url;
|
435 |
-
} else {
|
436 |
-
var thumbUrl = attachment['sizes']['large'].url;
|
437 |
}
|
|
|
|
|
|
|
438 |
|
439 |
-
|
440 |
-
|
441 |
-
// Display Delete Gallery
|
442 |
-
jQuery('#delete-video-thumb').css( 'display', 'block' );
|
443 |
-
|
444 |
-
jQuery('#niteoCS-video-thumb').val( attachment.id ).trigger('change');
|
445 |
-
|
446 |
-
})
|
447 |
-
.open();
|
448 |
});
|
449 |
|
450 |
-
|
451 |
-
|
452 |
-
jQuery(
|
453 |
-
jQuery('#
|
454 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
});
|
|
|
456 |
|
457 |
// hiding banner on change
|
458 |
jQuery('#csoptions .niteoCS_banner').change(function() {
|
@@ -481,6 +279,7 @@ jQuery(document).ready(function($){
|
|
481 |
case '5':
|
482 |
jQuery('#video_banner').css('display','block');
|
483 |
jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');
|
|
|
484 |
break;
|
485 |
default:
|
486 |
jQuery('#custom_banner').css('display','block');
|
@@ -525,43 +324,6 @@ jQuery(document).ready(function($){
|
|
525 |
}
|
526 |
});
|
527 |
|
528 |
-
// add custom pattern button
|
529 |
-
jQuery('#add-pattern').click(function(e) {
|
530 |
-
e.preventDefault();
|
531 |
-
// If the media frame already exists, reopen it.
|
532 |
-
if ( media_uploader ) {
|
533 |
-
media_uploader.open();
|
534 |
-
return;
|
535 |
-
}
|
536 |
-
var media_uploader = wp.media({
|
537 |
-
title: 'Select Pattern',
|
538 |
-
button: {
|
539 |
-
text: 'Select Pattern'
|
540 |
-
},
|
541 |
-
multiple: false, // Set this to true to allow multiple files to be selected
|
542 |
-
type : 'image'
|
543 |
-
})
|
544 |
-
.on('select', function() {
|
545 |
-
// Get media attachment details from the frame state
|
546 |
-
var attachment = media_uploader.state().get('selection').first().toJSON();
|
547 |
-
|
548 |
-
jQuery('.pattern-preview').css('background-image', '');
|
549 |
-
|
550 |
-
// Send the attachment URL to our custom image input field.
|
551 |
-
if (attachment['sizes']['large']=== undefined) {
|
552 |
-
var pattern_url = attachment.url;
|
553 |
-
} else {
|
554 |
-
var pattern_url = attachment['sizes']['large'].url;
|
555 |
-
}
|
556 |
-
|
557 |
-
jQuery('.pattern-preview').css('background-image', 'url(\''+pattern_url+'\')');
|
558 |
-
|
559 |
-
jQuery('#niteoCS_banner_pattern_custom').val( attachment.url );
|
560 |
-
|
561 |
-
})
|
562 |
-
.open();
|
563 |
-
});
|
564 |
-
|
565 |
// hiding subscribe from on load
|
566 |
if ( jQuery('#niteoCS_subscribe').prop('checked') == true) {
|
567 |
jQuery('.subscribe').css('display','block')
|
@@ -596,27 +358,6 @@ jQuery(document).ready(function($){
|
|
596 |
});
|
597 |
|
598 |
|
599 |
-
// export CSV
|
600 |
-
jQuery('#csv-generate').click(function(e){
|
601 |
-
e.preventDefault();
|
602 |
-
var action = 'action=niteo_export_csv';
|
603 |
-
jQuery.post(ajaxurl, action, function(response) {
|
604 |
-
if(response) {
|
605 |
-
jQuery('<iframe />').attr('src', ajaxurl + '?action=niteo_export_csv').appendTo('body').hide();
|
606 |
-
}
|
607 |
-
});
|
608 |
-
});
|
609 |
-
|
610 |
-
function ucwords (str) {
|
611 |
-
return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) {
|
612 |
-
return $1.toUpperCase();
|
613 |
-
});
|
614 |
-
}
|
615 |
-
|
616 |
-
function strtolower (str) {
|
617 |
-
return (str+'').toLowerCase();
|
618 |
-
}
|
619 |
-
|
620 |
// Google FONTS
|
621 |
var heading_family = '';
|
622 |
var content_family = '';
|
@@ -910,6 +651,7 @@ jQuery(document).ready(function($){
|
|
910 |
|
911 |
// display theme details overlay
|
912 |
jQuery('.theme-details').click(function() {
|
|
|
913 |
var $this = $(this),
|
914 |
$wrapper = $this.closest('.theme-wrapper'),
|
915 |
slug = $wrapper.data('slug'),
|
@@ -919,144 +661,256 @@ jQuery(document).ready(function($){
|
|
919 |
purchased = $wrapper.data('purchased'),
|
920 |
noticeHtml = '',
|
921 |
security = jQuery('.update-theme').data('security'),
|
922 |
-
i =
|
923 |
|
924 |
|
925 |
-
|
926 |
-
|
927 |
-
jQuery('
|
928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
929 |
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
}
|
936 |
-
|
937 |
-
|
938 |
-
|
|
|
|
|
|
|
|
|
939 |
}
|
940 |
|
941 |
-
|
942 |
-
var
|
943 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
944 |
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
|
953 |
-
|
954 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
955 |
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
|
|
|
|
961 |
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
' <div class="theme-wrap">',
|
966 |
-
' <div class="theme-header">',
|
967 |
-
' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',
|
968 |
-
' </div>',
|
969 |
-
' <div class="theme-about">',
|
970 |
-
' <div class="theme-screenshots">',
|
971 |
-
' <div class="screenshot" style="background-image:url(\''+screenshots['1']+'\')">'+arrows+'</div>',
|
972 |
-
' </div>',
|
973 |
-
' <div class="theme-info">',
|
974 |
-
' <h2 class="theme-name">'+data['name'] + versionInfo + '</h2>',
|
975 |
-
' <p class="theme-author">By <a href="'+data['author_homepage']+'">'+data['author']+'</a></p>',
|
976 |
-
noticeHtml,
|
977 |
-
' <div class="theme-description">'+data['description']+'</div>',
|
978 |
-
buyButton,
|
979 |
-
' </div>',
|
980 |
-
' </div>',
|
981 |
-
' <div class="theme-actions">',
|
982 |
-
' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+data['name']+'">Activate</button>',
|
983 |
-
' <a href="http://cmp.niteothemes.com/?cmp_preview=true&theme='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+data['name']+'">Live Preview</a>',
|
984 |
-
' </div>',
|
985 |
-
' </div>',
|
986 |
-
'</div>',
|
987 |
-
].join("\n"));
|
988 |
-
|
989 |
-
// append html to overlay
|
990 |
-
jQuery('.theme-overlay.cmp').append(html);
|
991 |
-
|
992 |
-
// attach view-release handler
|
993 |
-
jQuery('.theme-overlay.cmp .view-release').click(function(e) {
|
994 |
-
e.preventDefault();
|
995 |
-
$this = jQuery(this);
|
996 |
-
var release_url = $this.attr('href');
|
997 |
-
jQuery.get(release_url, function( release ) {
|
998 |
-
$this.closest('.notice').find('.release-note .notes').remove();
|
999 |
-
$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>');
|
1000 |
-
}).fail(function() {
|
1001 |
-
$this.closest('.notice').find('.release-note p').remove();
|
1002 |
-
$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>');
|
1003 |
});
|
1004 |
-
});
|
1005 |
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
// select theme
|
1018 |
-
jQuery('input[name="select_theme"]').each(function() {
|
1019 |
-
if ( jQuery(this).val() == slug ) {
|
1020 |
-
jQuery(this).prop('checked', true);
|
1021 |
-
jQuery('.theme-select').removeClass('selected');
|
1022 |
-
jQuery(this).parent().addClass('selected');
|
1023 |
-
}
|
1024 |
});
|
|
|
|
|
|
|
|
|
1025 |
|
1026 |
-
|
1027 |
-
|
1028 |
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
|
|
|
|
|
|
1032 |
|
1033 |
-
if (i > Object.keys(screenshots).length) {
|
1034 |
-
i = 1;
|
1035 |
-
}
|
1036 |
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1041 |
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1045 |
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1049 |
|
1050 |
-
if ((i in screenshots)) {
|
1051 |
-
jQuery('.screenshot').css('background-image', 'url(\''+screenshots[i]+'\')');
|
1052 |
}
|
1053 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1054 |
});
|
1055 |
-
|
1056 |
-
});
|
1057 |
|
1058 |
-
|
1059 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1060 |
|
1061 |
});
|
1062 |
|
48 |
jQuery(this).addClass('active');
|
49 |
$children.trigger('change');
|
50 |
if ( $children.val() == '3' ) {
|
51 |
+
jQuery('#niteoCS_URL_redirect').prop('disabled', false);
|
52 |
+
jQuery('#niteoCS_redirect_time').prop('disabled', false);
|
53 |
} else {
|
54 |
+
jQuery('#niteoCS_URL_redirect').prop('disabled', true);
|
55 |
+
jQuery('#niteoCS_redirect_time').prop('disabled', true);
|
56 |
}
|
57 |
});
|
58 |
|
|
|
59 |
// expandable tabs
|
60 |
jQuery('.table-wrapper h3').click(function(){
|
61 |
jQuery(this).toggleClass('closed');
|
81 |
}
|
82 |
});
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
// test unsplash image
|
85 |
jQuery('#test-unsplash').click(function(e){
|
86 |
e.preventDefault();
|
148 |
|
149 |
});
|
150 |
|
151 |
+
videoPreview = function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
var source = $('.banner-video-source').val();
|
153 |
+
$('.video-wrapper').css('padding-top', '0');
|
154 |
+
if ( source == 'YouTube' ) {
|
155 |
var youtubeLink = $('#niteoCS-youtube-url').val();
|
156 |
if( youtubeLink.match(/(youtube.com)/) ){
|
157 |
var split_c = 'v=';
|
162 |
var split_c = '/';
|
163 |
var split_n = 3;
|
164 |
}
|
|
|
165 |
|
166 |
+
if ( source == 'vimeo' ) {
|
167 |
+
var youtubeLink = $('#niteoCS-vimeo-url').val();
|
168 |
|
169 |
+
if( youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/) ){
|
170 |
+
var split_c = '/';
|
171 |
+
var split_n = 5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
+
}
|
174 |
|
175 |
+
if ( youtubeLink ) {
|
176 |
+
var getYouTubeVideoID = youtubeLink.split(split_c)[split_n];
|
177 |
+
if ( getYouTubeVideoID != undefined ) {
|
178 |
+
var cleanVideoID = getYouTubeVideoID.replace(/(&)+(.*)/, '');
|
179 |
+
|
180 |
+
if( source == 'banner_youtube' && youtubeLink.match(/(youtu.be)/) || youtubeLink.match(/(youtube.com)/) ){
|
181 |
+
var videoEmbedLink = 'https://www.youtube.com/embed/'+cleanVideoID+'?autoplay=0';
|
182 |
+
}
|
183 |
+
|
184 |
+
if( source == 'banner_vimeo' && youtubeLink.match(/(vimeo.com\/)+[0-9]/) || youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/) ){
|
185 |
+
var videoEmbedLink = 'https://player.vimeo.com/video/'+cleanVideoID+'?autoplay=0';
|
186 |
+
}
|
187 |
+
|
188 |
+
var $iframe = $('<iframe src="'+videoEmbedLink+'" allowfullscreen></iframe>');
|
189 |
+
$('.video-wrapper').html($iframe);
|
190 |
+
var videoRatio = ( $iframe.height() / $iframe.width() ) * 100;
|
191 |
+
|
192 |
+
$iframe.css('position', 'absolute');
|
193 |
+
$iframe.css('top', '0');
|
194 |
+
$iframe.css('left', '0');
|
195 |
+
$iframe.css('width', '100%');
|
196 |
+
$iframe.css('height', '100%');
|
197 |
+
|
198 |
+
$('.video-wrapper').css('padding-top', videoRatio+'%');
|
199 |
+
$('#niteoCS-vimeo-url').css('border', '1px solid #ddd');
|
200 |
+
$('#niteoCS-youtube-url').css('border', '1px solid #ddd');
|
201 |
+
} else {
|
202 |
+
$('.video-wrapper').text('Please enter correct ' + source + ' URL.').css('padding-top', '0');
|
203 |
+
$('#niteoCS-vimeo-url').css('border', '1px solid #d60000');
|
204 |
+
$('#niteoCS-youtube-url').css('border', '1px solid #d60000');
|
205 |
}
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
} else {
|
208 |
+
$('.video-wrapper').text('Please enter ' + source + ' URL.').css('padding-top', '0');
|
209 |
$('#niteoCS-vimeo-url').css('border', '1px solid #d60000');
|
210 |
$('#niteoCS-youtube-url').css('border', '1px solid #d60000');
|
211 |
}
|
212 |
+
}
|
213 |
|
214 |
+
if ( source == 'video/mp4' ) {
|
215 |
+
var videoURL = jQuery('#niteoCS-video-id').data('url');
|
216 |
+
if ( videoURL != '' ) {
|
217 |
+
$('.video-wrapper').html('<video width="600" height="400" controls><source src="'+videoURL+'" type="video/mp4">Your browser does not support the video tag.</video>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
+
|
220 |
+
}
|
221 |
+
};
|
222 |
|
223 |
+
jQuery('#niteoCS-youtube-url').keyup(function() {
|
224 |
+
videoPreview();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
});
|
226 |
|
227 |
+
// hiding video source inputs
|
228 |
+
jQuery('#csoptions .banner-video-source').change(function() {
|
229 |
+
console.log(jQuery('#csoptions .banner-video-source' ).val());
|
230 |
+
switch(jQuery('#csoptions .banner-video-source' ).val() ) {
|
231 |
+
case 'YouTube':
|
232 |
+
jQuery('.youtube-source-input').css('display','block');
|
233 |
+
jQuery('.vimeo-source-input').css('display','none');
|
234 |
+
jQuery('.file-source-input').css('display','none');
|
235 |
+
break;
|
236 |
+
case 'vimeo':
|
237 |
+
jQuery('.youtube-source-input').css('display','none');
|
238 |
+
jQuery('.vimeo-source-input').css('display','block');
|
239 |
+
jQuery('.file-source-input').css('display','none');
|
240 |
+
break;
|
241 |
+
case 'video/mp4':
|
242 |
+
jQuery('.youtube-source-input').css('display','none');
|
243 |
+
jQuery('.vimeo-source-input').css('display','none');
|
244 |
+
jQuery('.file-source-input').css('display','block');
|
245 |
+
break;
|
246 |
+
default:
|
247 |
+
jQuery('.file-source-input').css('display','block');
|
248 |
+
jQuery('.youtube-source-input').css('display','none');
|
249 |
+
jQuery('.vimeo-source-input').css('display','none');
|
250 |
+
}
|
251 |
+
videoPreview();
|
252 |
});
|
253 |
+
jQuery('#csoptions .banner-video-source').trigger('change');
|
254 |
|
255 |
// hiding banner on change
|
256 |
jQuery('#csoptions .niteoCS_banner').change(function() {
|
279 |
case '5':
|
280 |
jQuery('#video_banner').css('display','block');
|
281 |
jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');
|
282 |
+
videoPreview();
|
283 |
break;
|
284 |
default:
|
285 |
jQuery('#custom_banner').css('display','block');
|
324 |
}
|
325 |
});
|
326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
// hiding subscribe from on load
|
328 |
if ( jQuery('#niteoCS_subscribe').prop('checked') == true) {
|
329 |
jQuery('.subscribe').css('display','block')
|
358 |
});
|
359 |
|
360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
// Google FONTS
|
362 |
var heading_family = '';
|
363 |
var content_family = '';
|
651 |
|
652 |
// display theme details overlay
|
653 |
jQuery('.theme-details').click(function() {
|
654 |
+
|
655 |
var $this = $(this),
|
656 |
$wrapper = $this.closest('.theme-wrapper'),
|
657 |
slug = $wrapper.data('slug'),
|
661 |
purchased = $wrapper.data('purchased'),
|
662 |
noticeHtml = '',
|
663 |
security = jQuery('.update-theme').data('security'),
|
664 |
+
i = 0;
|
665 |
|
666 |
|
667 |
+
var data = {
|
668 |
+
action: 'niteo_themeinfo',
|
669 |
+
security: jQuery('.theme-wrapper').data('security'),
|
670 |
+
theme_slug: jQuery(this).parents('.theme-wrapper').data('slug'),
|
671 |
+
};
|
672 |
+
|
673 |
+
$.post(ajaxurl, data, function(response) {
|
674 |
+
var buttonDisabled = '';
|
675 |
+
var buyButton = '';
|
676 |
+
var versionInfo = '';
|
677 |
+
var noticeHtml = '';
|
678 |
+
// parse JSON data to array
|
679 |
+
response = jQuery.parseJSON(response);
|
680 |
+
|
681 |
+
if ( response.result == 'true' ) {
|
682 |
+
// overflow body hidden
|
683 |
+
jQuery('body').addClass('modal-open');
|
684 |
+
|
685 |
+
// if premium and installed display version info
|
686 |
+
if ( purchased == '1' && type == 'premium' ) {
|
687 |
+
|
688 |
+
versionInfo = '<span class="theme-version">Version: '+version+'</span>';
|
689 |
+
if ( jQuery('.update-theme').length ) {
|
690 |
+
var newVer = jQuery('.update-theme').data('new_ver');
|
691 |
+
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+'&type='+type+'" class="update-theme" data-type="'+type+'" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>';
|
692 |
+
} else {
|
693 |
+
noticeHtml = '<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';
|
694 |
+
}
|
695 |
+
|
696 |
+
}
|
697 |
|
698 |
+
// if premium and not installed, display buy button
|
699 |
+
if ( purchased != '1' && type == 'premium' ){
|
700 |
+
var buttonDisabled = 'disabled ';
|
701 |
+
var buyURL = $wrapper.find('a').attr('href');
|
702 |
+
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>Buy</a></button>';
|
703 |
}
|
704 |
+
|
705 |
+
// get screenshots
|
706 |
+
var screenshots = response.screenshots;
|
707 |
+
var arrows = '';
|
708 |
+
// if we have more screenshots, generate navigation arrows
|
709 |
+
if ( Object.keys(screenshots).length > 1 ) {
|
710 |
+
arrows = '<div class="screenshots-nav"><div class="left"><i class="fa fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fa fa-chevron-right" aria-hidden="true"></i></div></div>';
|
711 |
}
|
712 |
|
713 |
+
// generate html to append to theme-overlay
|
714 |
+
var html = $([
|
715 |
+
'<div class="theme-backdrop">',
|
716 |
+
' <div class="theme-wrap">',
|
717 |
+
' <div class="theme-header">',
|
718 |
+
' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',
|
719 |
+
' </div>',
|
720 |
+
' <div class="theme-about">',
|
721 |
+
' <div class="theme-screenshots">',
|
722 |
+
' <div class="screenshot" style="background-image:url(\''+screenshots['0']+'\')">'+arrows+'</div>',
|
723 |
+
' </div>',
|
724 |
+
' <div class="theme-info">',
|
725 |
+
' <h2 class="theme-name">'+response['name'] + versionInfo + '</h2>',
|
726 |
+
' <p class="theme-author">By <a href="'+response['author_homepage']+'" target="_blank">'+response['author']+'</a></p>',
|
727 |
+
noticeHtml,
|
728 |
+
' <div class="theme-description">'+response['description']+'</div>',
|
729 |
+
buyButton,
|
730 |
+
' </div>',
|
731 |
+
' </div>',
|
732 |
+
' <div class="theme-actions">',
|
733 |
+
' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response['name']+'">Activate</button>',
|
734 |
+
' <a href="http://cmp.niteothemes.com/?cmp_preview=true&theme='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response['name']+'">Live Preview</a>',
|
735 |
+
' </div>',
|
736 |
+
' </div>',
|
737 |
+
'</div>',
|
738 |
+
].join("\n"));
|
739 |
+
|
740 |
+
// append html to overlay
|
741 |
+
jQuery('.theme-overlay.cmp').append(html);
|
742 |
+
|
743 |
+
// attach view-release handler
|
744 |
+
jQuery('.theme-overlay.cmp .view-release').click(function(e) {
|
745 |
+
e.preventDefault();
|
746 |
+
$this = jQuery(this);
|
747 |
+
var release_url = $this.attr('href');
|
748 |
+
jQuery.get(release_url, function( release ) {
|
749 |
+
$this.closest('.notice').find('.release-note .notes').remove();
|
750 |
+
$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>');
|
751 |
+
}).fail(function() {
|
752 |
+
$this.closest('.notice').find('.release-note p').remove();
|
753 |
+
$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>');
|
754 |
+
});
|
755 |
+
});
|
756 |
|
757 |
+
// attach close button handler
|
758 |
+
jQuery('.theme-overlay.cmp .close').click(function(e) {
|
759 |
+
e.preventDefault();
|
760 |
+
// overflow body hidden
|
761 |
+
jQuery('body').removeClass('modal-open');
|
762 |
+
jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast');
|
763 |
+
});
|
764 |
|
765 |
+
// attach select theme handler
|
766 |
+
jQuery('.theme-overlay.cmp .activate').click(function(e) {
|
767 |
+
e.preventDefault();
|
768 |
+
// select theme
|
769 |
+
jQuery('input[name="select_theme"]').each(function() {
|
770 |
+
if ( jQuery(this).val() == slug ) {
|
771 |
+
jQuery(this).prop('checked', true);
|
772 |
+
jQuery('.theme-select').removeClass('selected');
|
773 |
+
jQuery(this).parent().addClass('selected');
|
774 |
+
}
|
775 |
+
});
|
776 |
+
|
777 |
+
jQuery( '#csoptions' ).submit();
|
778 |
+
});
|
779 |
|
780 |
+
// attach arrows navigation handler
|
781 |
+
jQuery('.screenshots-nav .right').click(function() {
|
782 |
+
i++;
|
783 |
+
|
784 |
+
if (i == Object.keys(screenshots).length) {
|
785 |
+
i = 0;
|
786 |
+
}
|
787 |
|
788 |
+
if ((i in screenshots)) {
|
789 |
+
jQuery('.screenshot').css('background-image', 'url(\''+screenshots[i]+'\')');
|
790 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
});
|
|
|
792 |
|
793 |
+
// attach arrows navigation handler
|
794 |
+
jQuery('.screenshots-nav .left').click(function() {
|
795 |
+
i--;
|
796 |
+
|
797 |
+
if (i < 0) {
|
798 |
+
i = Object.keys(screenshots).length - 1;
|
799 |
+
}
|
800 |
+
|
801 |
+
if ((i in screenshots)) {
|
802 |
+
jQuery('.screenshot').css('background-image', 'url(\''+screenshots[i]+'\')');
|
803 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
});
|
805 |
+
}
|
806 |
+
});
|
807 |
+
|
808 |
+
});
|
809 |
|
810 |
+
jQuery('#csoptions input[name="niteoCS_banner"]').trigger('change');
|
811 |
+
jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');
|
812 |
|
813 |
+
media_upload_button('logo', false, 'image');
|
814 |
+
media_upload_button('favicon', false, 'image');
|
815 |
+
media_upload_button('banner', true, 'image');
|
816 |
+
media_upload_button('pattern', false, 'image');
|
817 |
+
media_upload_button('video-thumb', false, 'image');
|
818 |
+
media_upload_button('video', false, 'video');
|
819 |
|
|
|
|
|
|
|
820 |
|
821 |
+
// define functions //
|
822 |
+
function ucwords (str) {
|
823 |
+
return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) {
|
824 |
+
return $1.toUpperCase();
|
825 |
+
});
|
826 |
+
}
|
827 |
+
|
828 |
+
function strtolower (str) {
|
829 |
+
return (str+'').toLowerCase();
|
830 |
+
}
|
831 |
|
832 |
+
function media_upload_button (name, multiple, type) {
|
833 |
+
// define var
|
834 |
+
var $container = jQuery('.'+name+'-wrapper');
|
835 |
+
var $add_button = jQuery('#add-'+name);
|
836 |
+
var $delete_button = jQuery('#delete-'+name);
|
837 |
+
var image;
|
838 |
+
var imgID = '';
|
839 |
+
|
840 |
+
if ( jQuery('#niteoCS-'+name+'-id').val() != '' ) {
|
841 |
+
// Display Delete button
|
842 |
+
$delete_button.css( 'display', 'block' );
|
843 |
+
}
|
844 |
+
|
845 |
+
$add_button.click(function(e) {
|
846 |
+
e.preventDefault();
|
847 |
+
// If the media frame already exists, reopen it.
|
848 |
+
if ( media_uploader ) {
|
849 |
+
media_uploader.open();
|
850 |
+
return;
|
851 |
+
}
|
852 |
|
853 |
+
var media_uploader = wp.media({
|
854 |
+
title: 'Select '+ name,
|
855 |
+
button: {
|
856 |
+
text: 'Insert '+ name
|
857 |
+
},
|
858 |
+
multiple: multiple, // Set this to true to allow multiple files to be selected
|
859 |
+
library: {
|
860 |
+
type: [ type ]
|
861 |
+
},
|
862 |
+
})
|
863 |
+
.on('select', function() {
|
864 |
+
// Get media attachment details from the frame state
|
865 |
+
var attachment = media_uploader.state().get('selection').toJSON();
|
866 |
+
|
867 |
+
if (attachment.length > 0) {
|
868 |
+
$container.empty();
|
869 |
+
|
870 |
+
jQuery(attachment).each(function(i) {
|
871 |
+
if (attachment[i].sizes && attachment[i].sizes.large) {
|
872 |
+
image = attachment[i].sizes.large.url;
|
873 |
+
} else {
|
874 |
+
image = attachment[i].url;
|
875 |
+
}
|
876 |
+
|
877 |
+
// add image ID and url to comma-separated variable
|
878 |
+
var comma = i === 0 ? '' : ',';
|
879 |
+
imgID += ( comma + attachment[i].id );
|
880 |
+
// Send the attachment URL to our custom image input field.
|
881 |
+
|
882 |
+
if ( name == 'pattern') {
|
883 |
+
$container.css('background-image', 'url(\''+image+'\')');
|
884 |
+
} else if ( name == 'video') {
|
885 |
+
$container.append( '<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>' );
|
886 |
+
} else {
|
887 |
+
$container.append( '<img src="' + image + '" alt="" style="max-width:588px"/>' );
|
888 |
+
}
|
889 |
+
|
890 |
+
});
|
891 |
+
|
892 |
+
// Display Delete button
|
893 |
+
$delete_button.css( 'display', 'block' );
|
894 |
|
|
|
|
|
895 |
}
|
896 |
+
// update hidden input with media id and trigger change
|
897 |
+
jQuery('#niteoCS-'+name+'-id').val( imgID).trigger('change');
|
898 |
+
|
899 |
+
})
|
900 |
+
.open();if ( name == 'pattern') {
|
901 |
+
$container.css('background-image', 'url(\''+image+'\')');
|
902 |
+
}
|
903 |
});
|
|
|
|
|
904 |
|
905 |
+
|
906 |
+
$delete_button.click(function(e) {
|
907 |
+
jQuery(this).css('display', 'none');
|
908 |
+
$container.empty();
|
909 |
+
jQuery('#niteoCS-'+name+'-id').val('');
|
910 |
+
jQuery('#niteoCS-'+name+'-id').trigger('change');
|
911 |
+
|
912 |
+
});
|
913 |
+
}
|
914 |
|
915 |
});
|
916 |
|
js/settings.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(e){function t(e){return(e+"").replace(/^([a-z])|\s+([a-z])/g,function(e){return e.toUpperCase()})}function a(e){return(e+"").toLowerCase()}var n=document.location.hash.substring(1),s=jQuery("#csoptions").attr("action");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(".comingsoon."+e).css("display","block"),jQuery(".table-wrapper: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))},""!=n&&navtab(n),window.onhashchange=function(){n=document.location.hash.substring(1),navtab(n)},e(".nav-tab:not(.theme-preview)").click(function(t){t.preventDefault(),n=e(this).data("tab"),document.location.hash=n}),jQuery(".cmp-status legend").click(function(){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("#niteoCS_URL_redirect").prop("disabled",!1):jQuery("#niteoCS_URL_redirect").prop("disabled",!0)}),jQuery(".table-wrapper h3").click(function(){jQuery(this).toggleClass("closed"),jQuery(this).next().toggle()}),jQuery(".niteoCS-logo-type").change(function(){"text"==jQuery(".niteoCS-logo-type:checked").val()?(jQuery(".text-logo").css("display","block"),jQuery(".graphic-logo").css("display","none"),jQuery(".disabled-logo").css("display","none")):"graphic"==jQuery(".niteoCS-logo-type:checked").val()?(jQuery(".text-logo").css("display","none"),jQuery(".graphic-logo").css("display","block"),jQuery(".disabled-logo").css("display","none")):"disabled"==jQuery(".niteoCS-logo-type:checked").val()&&(jQuery(".text-logo").css("display","none"),jQuery(".graphic-logo").css("display","none"),jQuery(".disabled-logo").css("display","block"))});var i=jQuery(".logo-wrapper");""!=jQuery("#niteoCS-logo-id").val()&&(jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block")),jQuery("#add-logo").click(function(e){if(e.preventDefault(),t)t.open();else var t=wp.media({title:"Select Logo",button:{text:"Insert Logo"},multiple:!1,type:"image"}).on("select",function(){var e=t.state().get("selection").first().toJSON();jQuery(".logo-wrapper").empty(),i.append('<img src="'+e.url+'" alt="" style="max-width:588px"/>'),jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block"),jQuery("#niteoCS-logo-id").val(e.id).trigger("change")}).open()}),jQuery("#delete-logo").click(function(e){jQuery(".logo-wrapper").empty(),jQuery("#add-logo").val("Select Logo"),jQuery(this).css("display","none"),jQuery("#niteoCS-logo-id").val(""),jQuery("#niteoCS-logo-id").trigger("change")});var o=jQuery(".favicon-wrapper");""!=jQuery("#niteoCS-favicon-id").val()&&(jQuery("#add-favicon").val("Change favicon"),jQuery("#delete-favicon").css("display","block")),jQuery("#add-favicon").click(function(e){if(e.preventDefault(),t)t.open();else var t=wp.media({title:"Select favicon",button:{text:"Insert favicon"},multiple:!1,type:"image"}).on("select",function(){var e=t.state().get("selection").first().toJSON();jQuery(".favicon-wrapper").empty(),o.append('<img src="'+e.url+'" alt="" style="max-width:32px"/>'),jQuery("#add-favicon").val("Change favicon"),jQuery("#delete-favicon").css("display","block"),jQuery("#niteoCS-favicon-id").val(e.id).trigger("change"),jQuery("#favicon").length?jQuery("#favicon").attr("href",e.url):jQuery("head").append('<link id="favicon" rel="shortcut icon" href="'+e.url+'" />')}).open()}),jQuery("#delete-favicon").click(function(e){jQuery(".favicon-wrapper").empty(),jQuery("#add-favicon").val("Select favicon"),jQuery(this).css("display","none"),jQuery("#niteoCS-favicon-id").val("").trigger("change"),jQuery("#favicon").remove()}),""!=jQuery("#niteoCS-banner-id").val()&&jQuery("#delete-banner").css("display","block"),jQuery("#add-banner").click(function(e){var t=jQuery(".banner-wrapper:not(.default)");if(e.preventDefault(),a)a.open();else var a=wp.media({title:"Select Photos",button:{text:"Insert Photos"},multiple:!0,type:"image"}).on("select",function(){var e=a.state().get("selection").toJSON(),n="";e.length>0&&(t.empty(),jQuery(e).each(function(a){"large"in e[a].sizes?t.append('<img src="'+e[a].sizes.large.url+'" alt="" style="max-width:588px;"/>'):t.append('<img src="'+e[a].url+'" alt="" style="max-width:588px;"/>'),jQuery("#delete-banner").css("display","block"),n+=(0===a?"":",")+e[a].id}),jQuery("#niteoCS-banner-id").val(n).trigger("change"))}).open()}),jQuery("#delete-banner").click(function(e){jQuery(".banner-wrapper:not(.default)").empty(),jQuery(this).css("display","none"),jQuery("#niteoCS-banner-id").val("").trigger("change")}),jQuery("#test-unsplash").click(function(t){t.preventDefault();var a=jQuery("#unsplash-media"),n=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),s="",i="",o="",r=jQuery(this).data("security");switch(n){case"0":s=jQuery("#niteoCS-unsplash-0").val();break;case"1":s=jQuery("#niteoCS-unsplash-1").val(),i=jQuery('#unsplash_banner select[name^="unsplash_category"] option:selected').val(),o=jQuery("#niteoCS-category-keyword").val();break;case"2":s=jQuery("#niteoCS-unsplash-2").val();break;case"3":s=jQuery("#niteoCS-unsplash-3").val(),i=jQuery("#niteoCS_unsplash_feat").is(":checked")?"1":"0"}var c={feed:n,url:s,cat:i,custom_str:o};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>'),a.html("");var l={action:"niteo_unsplash",security:r,params:c};e.post(ajaxurl,l,function(e){jQuery("#unsplash_img").remove(),img_url=e.replace("WIDTHxHEIGHT","588x330"),jQuery("<img />",{src:img_url,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(a),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Test Unsplash")})})}),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");break;case"vimeo":jQuery(".youtube-source-input").css("display","none"),jQuery(".vimeo-source-input").css("display","block");break;default:jQuery(".youtube-source-input").css("display","none"),jQuery(".vimeo-source-input").css("display","block")}}),jQuery("#csoptions .banner-video-source").trigger("change"),jQuery("#test-video").click(function(t){t.preventDefault();var a=e(".banner-video-source").val();if("youtube"==a){if((i=e("#niteoCS-youtube-url").val()).match(/(youtube.com)/))var n="v=",s=1;if(i.match(/(youtu.be)/)||i.match(/(vimeo.com\/)+[0-9]/))var n="/",s=3}if("vimeo"==a){var i=e("#niteoCS-vimeo-url").val();if(i.match(/(vimeo.com\/)+[a-zA-Z]/))var n="/",s=5}if(i){var o=i.split(n)[s];if(void 0!=o){var r=o.replace(/(&)+(.*)/,"");if("banner_youtube"==a&&i.match(/(youtu.be)/)||i.match(/(youtube.com)/))c="https://www.youtube.com/embed/"+r+"?autoplay=1";if("banner_vimeo"==a&&i.match(/(vimeo.com\/)+[0-9]/)||i.match(/(vimeo.com\/)+[a-zA-Z]/))var c="https://player.vimeo.com/video/"+r+"?autoplay=1";var l=e('<iframe src="'+c+'" allowfullscreen></iframe>');e(".video-preview").html(l);var u=l.height()/l.width()*100;l.css("position","absolute"),l.css("top","0"),l.css("left","0"),l.css("width","100%"),l.css("height","100%"),e(".video-preview").css("padding-top",u+"%"),e("#niteoCS-vimeo-url").css("border","1px solid #ddd"),e("#niteoCS-youtube-url").css("border","1px solid #ddd")}else e(".video-preview").text("Please enter correct "+a+" URL.").css("padding-top","0"),e("#niteoCS-vimeo-url").css("border","1px solid #d60000"),e("#niteoCS-youtube-url").css("border","1px solid #d60000")}else e(".video-preview").text("Please enter "+a+" URL.").css("padding-top","0"),e("#niteoCS-vimeo-url").css("border","1px solid #d60000"),e("#niteoCS-youtube-url").css("border","1px solid #d60000")});var r=jQuery(".video-thumb-wrapper");""!=jQuery("#niteoCS-video-thumb").val()&&jQuery("#delete-video-thumb").css("display","block"),jQuery("#add-video-thumb").click(function(e){if(e.preventDefault(),t)t.open();else var t=wp.media({title:"Select Image",button:{text:"Insert Video Thumbnail"},multiple:!1,type:"image"}).on("select",function(){var e=t.state().get("selection").first().toJSON();if(r.empty(),void 0===e.sizes.large)a=e.url;else var a=e.sizes.large.url;r.append('<img src="'+a+'" alt=""/>'),jQuery("#delete-video-thumb").css("display","block"),jQuery("#niteoCS-video-thumb").val(e.id).trigger("change")}).open()}),jQuery("#delete-video-thumb").click(function(e){r.empty(),jQuery(this).css("display","none"),jQuery("#niteoCS-video-thumb").val("").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");break;default:jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none")}}),jQuery("#csoptions .niteoCS_banner").trigger("change");var c=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+c).css("display","block"),jQuery('#unsplash_banner select[name^="unsplash_feed"]').on("change",function(){c=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+c).css("display","block")}),jQuery("#niteoCS_banner_color").wpColorPicker({change:function(e,t){jQuery(".color-preview").css("background-color",t.color.toString())}}),jQuery('select[name^="niteoCS_banner_pattern"]').on("change",function(){var e=jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();if("custom"!=e){t=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-preview").css("background-image","url('"+t+e+".png')")}else{var t=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-preview").css("background-image","url('"+t+"')")}}),jQuery("#add-pattern").click(function(e){if(e.preventDefault(),t)t.open();else var t=wp.media({title:"Select Pattern",button:{text:"Select Pattern"},multiple:!1,type:"image"}).on("select",function(){var e=t.state().get("selection").first().toJSON();if(jQuery(".pattern-preview").css("background-image",""),void 0===e.sizes.large)a=e.url;else var a=e.sizes.large.url;jQuery(".pattern-preview").css("background-image","url('"+a+"')"),jQuery("#niteoCS_banner_pattern_custom").val(e.url)}).open()}),1==jQuery("#niteoCS_subscribe").prop("checked")&&jQuery(".subscribe").css("display","block"),jQuery("#niteoCS_subscribe").change(function(){jQuery(this)[0].checked?jQuery(".subscribe").css("display","block"):jQuery(".subscribe").css("display","none")}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block"))}),jQuery("#csv-generate").click(function(e){e.preventDefault();jQuery.post(ajaxurl,"action=niteo_export_csv",function(e){e&&jQuery("<iframe />").attr("src",ajaxurl+"?action=niteo_export_csv").appendTo("body").hide()})});var l="",u="";l="custom"==jQuery(".niteoCS_font_headings option:selected").val()?t(a(jQuery("#niteoCS_font_headings_custom").val())):jQuery(".niteoCS_font_headings option:selected").val(),u="custom"==jQuery(".niteoCS_font_content option:selected").val()?t(a(jQuery("#niteoCS_font_content_custom").val())):jQuery(".niteoCS_font_contentoption:selected").val(),WebFont.load({google:{families:[t(a(l)),t(a(u))]},active:function(){e("#heading-example, #niteoCS-text-logo").css("font-family",l),e("#content-example").css("font-family",u)}}),jQuery(".niteoCS_font_headings").on("change",function(){niteoCS_font_headings=jQuery(".niteoCS_font_headings option:selected").val(),"custom"==niteoCS_font_headings?(jQuery("#custom_headings_font").css("display","block"),jQuery("#custom_headings_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[t(a(jQuery("#niteoCS_font_headings_custom").val()))]},active:function(){e("#heading-example, #niteoCS-text-logo").css("font-family",jQuery("#niteoCS_font_headings_custom").val())}})},1e3))})):(jQuery("#custom_headings_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_headings]},active:function(){e("#heading-example, #niteoCS-text-logo").css("font-family",niteoCS_font_headings||"")}}))}),jQuery(".niteoCS_font_content").on("change",function(){niteoCS_font_content=jQuery(".niteoCS_font_content option:selected").val(),"custom"==niteoCS_font_content?(jQuery("#custom_content_font").css("display","block"),jQuery("#custom_content_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[t(a(jQuery("#niteoCS_font_content_custom").val()))]},active:function(){e("#content-example").css("font-family",jQuery("#niteoCS_font_content_custom").val())}})},1e3))})):(jQuery("#custom_content_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_content]},active:function(){e("#content-example").css("font-family",niteoCS_font_content||"")}}))});var d=function(t,a,n){var s=e("#niteoCS_socialmedia").attr("value");s=e.parseJSON(s),e.each(s,function(e,s){s.name==t&&(s[a]=n)}),e("#niteoCS_socialmedia").attr("value",JSON.stringify(s))},p=e(".social-inputs"),y=function(t,a){var n=p.find('input[type="text"]');a.item.index();n.each(function(t,a){var n=e(a).data("name");d(n,"order",t)})};p.sortable({stop:y}),p.on("sortchange",y),function(e){e.fn.toggleDisabled=function(){return this.each(function(){var t,a=e(this),n=a.data("name");a.attr("disabled")?(a.prop("disabled",!1),t="1"):(a.prop("disabled",!0),t="0"),d(n,"active",t)})}}(jQuery),jQuery('.social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),t=jQuery(this).attr("value");d(e,"url",t)}),jQuery('.social-inputs input[type="checkbox"]').click(function(t){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")?d(e,"hidden","0"):d(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(t){t.preventDefault();var a=e(this),n=a.parents(".notice"),s=a.data("security"),i=a.data("slug"),o=a.data("type"),r=n.find(".theme-name").text(),c=jQuery(this).data("remote_url");update={name:i,tmp_name:"",type:o,url:c+"?action=download&slug="+i};var l={action:"cmp_theme_update_install",security:s,file:update};n.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,l,function(t){if("success"==t)setTimeout(function(){n.removeClass("notice-warning").addClass("notice-success"),n.find(".message").html("<span> "+r+' Theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500);else{t=t.slice(0,-1);var a=e("p",e(t)).text();n.removeClass("notice-warning").addClass("notice-error"),n.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+a+"</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(t){t.preventDefault();var a=e(this),n=a.closest(".theme-wrapper"),s=n.data("security"),i=n.data("slug"),o={action:"cmp_theme_update_install",security:s,file:{name:i,tmp_name:"",type:n.data("type"),url:n.data("remote_url")+"?action=download&slug="+i}};a.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),e.post(ajaxurl,o,function(e){"success"==e?setTimeout(function(){a.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){a.fadeOut()},1500)},1500):(e=e.slice(0,-1),a.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".theme-details").click(function(){var t=e(this),a=t.closest(".theme-wrapper"),n=a.data("slug"),s=a.data("version"),i=a.data("remote_url"),o=a.data("type"),r=a.data("purchased"),c="",l=jQuery(".update-theme").data("security"),u=1;e.getJSON(i+"?action=get_metadata&slug="+n,function(d){if(jQuery("body").addClass("modal-open"),"1"==r){s<d.version&&(c='<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 '+d.name+' theme available. <a href="'+i+"readme/"+n+'-readme.html" class="view-release">View update '+d.version+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+n+"&type="+o+'" class="update-theme" data-type="'+o+'" data-security="'+l+'" data-slug="'+n+'" data-remote_url="'+i+'">Update now.</a></strong></p><div class="release-note"></div></div>'),s==d.version&&(c='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>');var p='<span class="theme-version">Version: '+s+"</span>",y="",h=""}else var p="",y="disabled ",h='<button type="button" class="theme-purchase button hide"><a href="'+a.find("a").attr("href")+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Buy</a></button>';var v=e.parseJSON(d.details_url),m="";Object.keys(v).length>1&&(m='<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 f=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[1]+"')\">"+m+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+d.name+p+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+d.author_homepage+'">'+d.author+"</a></p>",c,'\t\t\t\t<div class="theme-description">'+d.description+"</div>",h,"\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<button type="submit" '+y+'class="button activate" name="Submit" aria-label="Select '+d.name+'">Activate</button>','\t\t\t<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme='+n+'" class="button cmp-preview" target="_blank" aria-label="Preview '+d.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(f),jQuery(".theme-overlay.cmp .view-release").click(function(e){e.preventDefault();var a=(t=jQuery(this)).attr("href");jQuery.get(a,function(e){t.closest(".notice").find(".release-note .notes").remove(),t.closest(".notice").find(".release-note").append('<div class="notes">'+e+"</div>")}).fail(function(){t.closest(".notice").find(".release-note p").remove(),t.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()==n&&(jQuery(this).prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().addClass("selected"))}),jQuery("#csoptions").submit()}),jQuery(".screenshots-nav .right").click(function(){++u>Object.keys(v).length&&(u=1),u in v&&jQuery(".screenshot").css("background-image","url('"+v[u]+"')")}),jQuery(".screenshots-nav .left").click(function(){--u<1&&(u=Object.keys(v).length),u in v&&jQuery(".screenshot").css("background-image","url('"+v[u]+"')")})})}),jQuery('#csoptions input[name="niteoCS_banner"]').trigger("change"),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger("change")});
|
1 |
+
jQuery(document).ready(function(e){function t(e){return(e+"").replace(/^([a-z])|\s+([a-z])/g,function(e){return e.toUpperCase()})}function s(e){return(e+"").toLowerCase()}function a(e,t,s){var a,n=jQuery("."+e+"-wrapper"),i=jQuery("#add-"+e),o=jQuery("#delete-"+e),r="";""!=jQuery("#niteoCS-"+e+"-id").val()&&o.css("display","block"),i.click(function(i){if(i.preventDefault(),c)c.open();else{var c=wp.media({title:"Select "+e,button:{text:"Insert "+e},multiple:t,library:{type:[s]}}).on("select",function(){var t=c.state().get("selection").toJSON();t.length>0&&(n.empty(),jQuery(t).each(function(s){a=t[s].sizes&&t[s].sizes.large?t[s].sizes.large.url:t[s].url,r+=(0===s?"":",")+t[s].id,"pattern"==e?n.css("background-image","url('"+a+"')"):"video"==e?n.append('<video width="600" height="400" controls><source src="'+a+'" type="video/mp4">Your browser does not support the video tag.</video>'):n.append('<img src="'+a+'" alt="" style="max-width:588px"/>')}),o.css("display","block")),jQuery("#niteoCS-"+e+"-id").val(r).trigger("change")}).open();"pattern"==e&&n.css("background-image","url('"+a+"')")}}),o.click(function(t){jQuery(this).css("display","none"),n.empty(),jQuery("#niteoCS-"+e+"-id").val(""),jQuery("#niteoCS-"+e+"-id").trigger("change")})}var n=document.location.hash.substring(1),i=jQuery("#csoptions").attr("action");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(".comingsoon."+e).css("display","block"),jQuery(".table-wrapper:not(."+e+")").css("display","none"),jQuery(".comingsoon:not(."+e+")").css("display","none"),"install"==e?(jQuery(".submit").css("display","none"),jQuery("#csoptions").attr("action",i)):(jQuery(".submit").css("display","block"),jQuery("#csoptions").attr("action",i+"#"+e))},""!=n&&navtab(n),window.onhashchange=function(){n=document.location.hash.substring(1),navtab(n)},e(".nav-tab:not(.theme-preview)").click(function(t){t.preventDefault(),n=e(this).data("tab"),document.location.hash=n}),jQuery(".cmp-status legend").click(function(){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("#niteoCS_URL_redirect").prop("disabled",!1),jQuery("#niteoCS_redirect_time").prop("disabled",!1)):(jQuery("#niteoCS_URL_redirect").prop("disabled",!0),jQuery("#niteoCS_redirect_time").prop("disabled",!0))}),jQuery(".table-wrapper h3").click(function(){jQuery(this).toggleClass("closed"),jQuery(this).next().toggle()}),jQuery(".niteoCS-logo-type").change(function(){"text"==jQuery(".niteoCS-logo-type:checked").val()?(jQuery(".text-logo").css("display","block"),jQuery(".graphic-logo").css("display","none"),jQuery(".disabled-logo").css("display","none")):"graphic"==jQuery(".niteoCS-logo-type:checked").val()?(jQuery(".text-logo").css("display","none"),jQuery(".graphic-logo").css("display","block"),jQuery(".disabled-logo").css("display","none")):"disabled"==jQuery(".niteoCS-logo-type:checked").val()&&(jQuery(".text-logo").css("display","none"),jQuery(".graphic-logo").css("display","none"),jQuery(".disabled-logo").css("display","block"))}),jQuery("#test-unsplash").click(function(t){t.preventDefault();var s=jQuery("#unsplash-media"),a=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),n="",i="",o="",r=jQuery(this).data("security");switch(a){case"0":n=jQuery("#niteoCS-unsplash-0").val();break;case"1":n=jQuery("#niteoCS-unsplash-1").val(),i=jQuery('#unsplash_banner select[name^="unsplash_category"] option:selected').val(),o=jQuery("#niteoCS-category-keyword").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"}var c={feed:a,url:n,cat:i,custom_str:o};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>'),s.html("");var u={action:"niteo_unsplash",security:r,params:c};e.post(ajaxurl,u,function(e){jQuery("#unsplash_img").remove(),img_url=e.replace("WIDTHxHEIGHT","588x330"),jQuery("<img />",{src:img_url,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(s),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Test Unsplash")})})}),videoPreview=function(){var t=e(".banner-video-source").val();if(e(".video-wrapper").css("padding-top","0"),"YouTube"==t){var s=e("#niteoCS-youtube-url").val();if(s.match(/(youtube.com)/))var a="v=",n=1;if(s.match(/(youtu.be)/)||s.match(/(vimeo.com\/)+[0-9]/))var a="/",n=3;if("vimeo"==t&&(s=e("#niteoCS-vimeo-url").val()).match(/(vimeo.com\/)+[a-zA-Z]/))var a="/",n=5;if(s){var i=s.split(a)[n];if(void 0!=i){var o=i.replace(/(&)+(.*)/,"");if("banner_youtube"==t&&s.match(/(youtu.be)/)||s.match(/(youtube.com)/))r="https://www.youtube.com/embed/"+o+"?autoplay=0";if("banner_vimeo"==t&&s.match(/(vimeo.com\/)+[0-9]/)||s.match(/(vimeo.com\/)+[a-zA-Z]/))var r="https://player.vimeo.com/video/"+o+"?autoplay=0";var c=e('<iframe src="'+r+'" allowfullscreen></iframe>');e(".video-wrapper").html(c);var u=c.height()/c.width()*100;c.css("position","absolute"),c.css("top","0"),c.css("left","0"),c.css("width","100%"),c.css("height","100%"),e(".video-wrapper").css("padding-top",u+"%"),e("#niteoCS-vimeo-url").css("border","1px solid #ddd"),e("#niteoCS-youtube-url").css("border","1px solid #ddd")}else e(".video-wrapper").text("Please enter correct "+t+" URL.").css("padding-top","0"),e("#niteoCS-vimeo-url").css("border","1px solid #d60000"),e("#niteoCS-youtube-url").css("border","1px solid #d60000")}else e(".video-wrapper").text("Please enter "+t+" URL.").css("padding-top","0"),e("#niteoCS-vimeo-url").css("border","1px solid #d60000"),e("#niteoCS-youtube-url").css("border","1px solid #d60000")}if("video/mp4"==t){var l=jQuery("#niteoCS-video-id").data("url");""!=l&&e(".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(console.log(jQuery("#csoptions .banner-video-source").val()),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");break;default:jQuery(".file-source-input").css("display","block"),jQuery(".youtube-source-input").css("display","none"),jQuery(".vimeo-source-input").css("display","none")}videoPreview()}),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;default:jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none")}}),jQuery("#csoptions .niteoCS_banner").trigger("change");var o=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+o).css("display","block"),jQuery('#unsplash_banner select[name^="unsplash_feed"]').on("change",function(){o=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+o).css("display","block")}),jQuery("#niteoCS_banner_color").wpColorPicker({change:function(e,t){jQuery(".color-preview").css("background-color",t.color.toString())}}),jQuery('select[name^="niteoCS_banner_pattern"]').on("change",function(){var e=jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();if("custom"!=e){t=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-preview").css("background-image","url('"+t+e+".png')")}else{var t=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-preview").css("background-image","url('"+t+"')")}}),1==jQuery("#niteoCS_subscribe").prop("checked")&&jQuery(".subscribe").css("display","block"),jQuery("#niteoCS_subscribe").change(function(){jQuery(this)[0].checked?jQuery(".subscribe").css("display","block"):jQuery(".subscribe").css("display","none")}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block"))});var r="",c="";r="custom"==jQuery(".niteoCS_font_headings option:selected").val()?t(s(jQuery("#niteoCS_font_headings_custom").val())):jQuery(".niteoCS_font_headings option:selected").val(),c="custom"==jQuery(".niteoCS_font_content option:selected").val()?t(s(jQuery("#niteoCS_font_content_custom").val())):jQuery(".niteoCS_font_contentoption:selected").val(),WebFont.load({google:{families:[t(s(r)),t(s(c))]},active:function(){e("#heading-example, #niteoCS-text-logo").css("font-family",r),e("#content-example").css("font-family",c)}}),jQuery(".niteoCS_font_headings").on("change",function(){niteoCS_font_headings=jQuery(".niteoCS_font_headings option:selected").val(),"custom"==niteoCS_font_headings?(jQuery("#custom_headings_font").css("display","block"),jQuery("#custom_headings_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[t(s(jQuery("#niteoCS_font_headings_custom").val()))]},active:function(){e("#heading-example, #niteoCS-text-logo").css("font-family",jQuery("#niteoCS_font_headings_custom").val())}})},1e3))})):(jQuery("#custom_headings_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_headings]},active:function(){e("#heading-example, #niteoCS-text-logo").css("font-family",niteoCS_font_headings||"")}}))}),jQuery(".niteoCS_font_content").on("change",function(){niteoCS_font_content=jQuery(".niteoCS_font_content option:selected").val(),"custom"==niteoCS_font_content?(jQuery("#custom_content_font").css("display","block"),jQuery("#custom_content_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[t(s(jQuery("#niteoCS_font_content_custom").val()))]},active:function(){e("#content-example").css("font-family",jQuery("#niteoCS_font_content_custom").val())}})},1e3))})):(jQuery("#custom_content_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_content]},active:function(){e("#content-example").css("font-family",niteoCS_font_content||"")}}))});var u=function(t,s,a){var n=e("#niteoCS_socialmedia").attr("value");n=e.parseJSON(n),e.each(n,function(e,n){n.name==t&&(n[s]=a)}),e("#niteoCS_socialmedia").attr("value",JSON.stringify(n))},l=e(".social-inputs"),d=function(t,s){var a=l.find('input[type="text"]');s.item.index();a.each(function(t,s){var a=e(s).data("name");u(a,"order",t)})};l.sortable({stop:d}),l.on("sortchange",d),function(e){e.fn.toggleDisabled=function(){return this.each(function(){var t,s=e(this),a=s.data("name");s.attr("disabled")?(s.prop("disabled",!1),t="1"):(s.prop("disabled",!0),t="0"),u(a,"active",t)})}}(jQuery),jQuery('.social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),t=jQuery(this).attr("value");u(e,"url",t)}),jQuery('.social-inputs input[type="checkbox"]').click(function(t){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")?u(e,"hidden","0"):u(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(t){t.preventDefault();var s=e(this),a=s.parents(".notice"),n=s.data("security"),i=s.data("slug"),o=s.data("type"),r=a.find(".theme-name").text(),c=jQuery(this).data("remote_url");update={name:i,tmp_name:"",type:o,url:c+"?action=download&slug="+i};var u={action:"cmp_theme_update_install",security:n,file:update};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>'),e.post(ajaxurl,u,function(t){if("success"==t)setTimeout(function(){a.removeClass("notice-warning").addClass("notice-success"),a.find(".message").html("<span> "+r+' Theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500);else{t=t.slice(0,-1);var s=e("p",e(t)).text();a.removeClass("notice-warning").addClass("notice-error"),a.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+s+"</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(t){t.preventDefault();var s=e(this),a=s.closest(".theme-wrapper"),n=a.data("security"),i=a.data("slug"),o={action:"cmp_theme_update_install",security:n,file:{name:i,tmp_name:"",type:a.data("type"),url:a.data("remote_url")+"?action=download&slug="+i}};s.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),e.post(ajaxurl,o,function(e){"success"==e?setTimeout(function(){s.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){s.fadeOut()},1500)},1500):(e=e.slice(0,-1),s.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".theme-details").click(function(){var t=e(this),s=t.closest(".theme-wrapper"),a=s.data("slug"),n=s.data("version"),i=s.data("remote_url"),o=s.data("type"),r=s.data("purchased"),c=jQuery(".update-theme").data("security"),u=0,l={action:"niteo_themeinfo",security:jQuery(".theme-wrapper").data("security"),theme_slug:jQuery(this).parents(".theme-wrapper").data("slug")};e.post(ajaxurl,l,function(l){var d="",p="",y="",h="";if("true"==(l=jQuery.parseJSON(l)).result){if(jQuery("body").addClass("modal-open"),"1"==r&&"premium"==o)if(y='<span class="theme-version">Version: '+n+"</span>",jQuery(".update-theme").length){var m=jQuery(".update-theme").data("new_ver");h='<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 '+l.name+' theme available. <a href="'+i+"readme/"+a+'-readme.php" class="view-release">View update '+m+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+a+"&type="+o+'" class="update-theme" data-type="'+o+'" data-security="'+c+'" data-slug="'+a+'" data-remote_url="'+i+'">Update now.</a></strong></p><div class="release-note"></div></div>'}else h='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';if("1"!=r&&"premium"==o)var d="disabled ",p='<button type="button" class="theme-purchase button hide"><a href="'+s.find("a").attr("href")+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Buy</a></button>';var v=l.screenshots,f="";Object.keys(v).length>1&&(f='<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 b=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]+"')\">"+f+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+l.name+y+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+l.author_homepage+'" target="_blank">'+l.author+"</a></p>",h,'\t\t\t\t<div class="theme-description">'+l.description+"</div>",p,"\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 '+l.name+'">Activate</button>','\t\t\t<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme='+a+'" class="button cmp-preview" target="_blank" aria-label="Preview '+l.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(b),jQuery(".theme-overlay.cmp .view-release").click(function(e){e.preventDefault();var s=(t=jQuery(this)).attr("href");jQuery.get(s,function(e){t.closest(".notice").find(".release-note .notes").remove(),t.closest(".notice").find(".release-note").append('<div class="notes">'+e+"</div>")}).fail(function(){t.closest(".notice").find(".release-note p").remove(),t.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()==a&&(jQuery(this).prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().addClass("selected"))}),jQuery("#csoptions").submit()}),jQuery(".screenshots-nav .right").click(function(){++u==Object.keys(v).length&&(u=0),u in v&&jQuery(".screenshot").css("background-image","url('"+v[u]+"')")}),jQuery(".screenshots-nav .left").click(function(){--u<0&&(u=Object.keys(v).length-1),u in v&&jQuery(".screenshot").css("background-image","url('"+v[u]+"')")})}})}),jQuery('#csoptions input[name="niteoCS_banner"]').trigger("change"),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger("change"),a("logo",!1,"image"),a("favicon",!1,"image"),a("banner",!0,"image"),a("pattern",!1,"image"),a("video-thumb",!1,"image"),a("video",!1,"video")});
|
languages/coming-soon-default.mo
CHANGED
Binary file
|
languages/coming-soon-default.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: cmp\n"
|
4 |
-
"POT-Creation-Date: 2017-
|
5 |
-
"PO-Revision-Date: 2017-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en\n"
|
@@ -70,9 +70,6 @@ msgstr ""
|
|
70 |
|
71 |
#: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:337
|
72 |
#: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:682
|
73 |
-
#: cmp-premium-themes/fifty/fifty-slider_settings.php:60
|
74 |
-
#: cmp-premium-themes/frame/frame-settings.php:99
|
75 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:58
|
76 |
msgid "Disabled"
|
77 |
msgstr ""
|
78 |
|
@@ -398,15 +395,12 @@ msgstr ""
|
|
398 |
|
399 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:37
|
400 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:52
|
401 |
-
#: cmp-premium-themes/
|
402 |
-
#: cmp-premium-themes/frame/frame-settings.php:141
|
403 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:46
|
404 |
msgid "Customize Colors"
|
405 |
msgstr ""
|
406 |
|
407 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:40
|
408 |
-
#: cmp-premium-themes/
|
409 |
-
#: cmp-premium-themes/frame/frame-settings.php:144
|
410 |
msgid "Active Color"
|
411 |
msgstr ""
|
412 |
|
@@ -416,170 +410,64 @@ msgstr ""
|
|
416 |
|
417 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:49
|
418 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:56
|
419 |
-
#: cmp-premium-themes/
|
420 |
-
#: cmp-premium-themes/frame/frame-settings.php:154
|
421 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:50
|
422 |
msgid "Font Color"
|
423 |
msgstr ""
|
424 |
|
425 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:57
|
426 |
-
#: cmp-premium-themes/fifty/fifty-settings.php:50
|
427 |
msgid "Background Color"
|
428 |
msgstr ""
|
429 |
|
430 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:64
|
431 |
-
#: cmp-premium-themes/frame/frame-settings.php:
|
432 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:58
|
433 |
msgid "Overlay Color"
|
434 |
msgstr ""
|
435 |
|
436 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:67
|
437 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:61
|
438 |
msgid "Enable Overlay Color"
|
439 |
msgstr ""
|
440 |
|
441 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:73
|
442 |
-
#: cmp-premium-themes/frame/frame-settings.php:
|
443 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:67
|
444 |
msgid "Overlay Opacity"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: cmp-premium-themes/
|
448 |
-
|
449 |
-
msgid "Slider Setup"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: cmp-premium-themes/
|
453 |
-
|
454 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:47
|
455 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:73
|
456 |
-
msgid "Slider setup"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: cmp-premium-themes/
|
460 |
-
#: cmp-premium-themes/frame/frame-settings.php:93
|
461 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:52
|
462 |
-
msgid "Enabled"
|
463 |
-
msgstr ""
|
464 |
-
|
465 |
-
#: cmp-premium-themes/fifty/fifty-slider_settings.php:68
|
466 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:66
|
467 |
-
msgid "Slider is disabled."
|
468 |
-
msgstr ""
|
469 |
-
|
470 |
-
#: cmp-premium-themes/fifty/fifty-slider_settings.php:72
|
471 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:70
|
472 |
msgid ""
|
473 |
-
"To
|
474 |
-
"
|
475 |
-
"Unsplash photo or Default Media is selected."
|
476 |
-
msgstr ""
|
477 |
-
|
478 |
-
#: cmp-premium-themes/fifty/fifty-slider_settings.php:80
|
479 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:78
|
480 |
-
msgid "Slide"
|
481 |
-
msgstr ""
|
482 |
-
|
483 |
-
#: cmp-premium-themes/fifty/fifty-slider_settings.php:84
|
484 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:82
|
485 |
-
msgid "Fade"
|
486 |
-
msgstr ""
|
487 |
-
|
488 |
-
#: cmp-premium-themes/fifty/fifty-slider_settings.php:90
|
489 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:88
|
490 |
-
msgid "Slider Autostart"
|
491 |
-
msgstr ""
|
492 |
-
|
493 |
-
#: cmp-premium-themes/fifty/fifty-slider_settings.php:93
|
494 |
-
#: cmp-premium-themes/hardwork_premium/hardwork_premium-slider_settings.php:91
|
495 |
-
msgid "Number of Unplash media Slides"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: cmp-premium-themes/
|
499 |
-
msgid "
|
500 |
-
|
501 |
-
|
502 |
-
#: cmp-premium-themes/fifty/fifty-social_settings.php:24
|
503 |
-
msgid "Below Content (big icons)"
|
504 |
-
msgstr ""
|
505 |
-
|
506 |
-
#: cmp-premium-themes/fifty/fifty-social_settings.php:25
|
507 |
-
msgid "Footer (small icons)"
|
508 |
-
msgstr ""
|
509 |
-
|
510 |
-
#: cmp-premium-themes/fifty/fifty-theme.php:301
|
511 |
-
msgid "Subscribe"
|
512 |
-
msgstr ""
|
513 |
-
|
514 |
-
#: cmp-premium-themes/frame/frame-settings.php:82
|
515 |
-
msgid "Countdown Timer Setup"
|
516 |
-
msgstr ""
|
517 |
-
|
518 |
-
#: cmp-premium-themes/frame/frame-settings.php:88
|
519 |
-
#: cmp-premium-themes/frame/frame-settings.php:114
|
520 |
-
msgid "Counter setup"
|
521 |
-
msgstr ""
|
522 |
-
|
523 |
-
#: cmp-premium-themes/frame/frame-settings.php:107
|
524 |
-
msgid "Countdown Timer is disabled."
|
525 |
-
msgstr ""
|
526 |
-
|
527 |
-
#: cmp-premium-themes/frame/frame-settings.php:111
|
528 |
-
msgid "Click on date input and set a date & time for a Countdown timer."
|
529 |
-
msgstr ""
|
530 |
-
|
531 |
-
#: cmp-premium-themes/frame/frame-settings.php:117
|
532 |
-
msgid "Select Date.."
|
533 |
-
msgstr ""
|
534 |
-
|
535 |
-
#: cmp-premium-themes/frame/frame-settings.php:119
|
536 |
-
msgid "Countdown action:"
|
537 |
-
msgstr ""
|
538 |
-
|
539 |
-
#: cmp-premium-themes/frame/frame-settings.php:121
|
540 |
-
msgid "No action"
|
541 |
-
msgstr ""
|
542 |
-
|
543 |
-
#: cmp-premium-themes/frame/frame-settings.php:122
|
544 |
-
msgid "Display custom text"
|
545 |
-
msgstr ""
|
546 |
-
|
547 |
-
#: cmp-premium-themes/frame/frame-settings.php:123
|
548 |
-
msgid "Disable CMP Plugin Page"
|
549 |
-
msgstr ""
|
550 |
-
|
551 |
-
#: cmp-premium-themes/frame/frame-settings.php:124
|
552 |
-
msgid "URL redirect"
|
553 |
-
msgstr ""
|
554 |
-
|
555 |
-
#: cmp-premium-themes/frame/frame-settings.php:127
|
556 |
-
msgid "Enter custom text"
|
557 |
-
msgstr ""
|
558 |
-
|
559 |
-
#: cmp-premium-themes/frame/frame-settings.php:131
|
560 |
-
msgid "Enter redirect URL"
|
561 |
-
msgstr ""
|
562 |
-
|
563 |
-
#: cmp-premium-themes/frame/frame-settings.php:163
|
564 |
-
msgid "Frame Background Color"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: cmp-premium-themes/frame/frame-theme.php:
|
568 |
msgid "DAYS"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: cmp-premium-themes/frame/frame-theme.php:
|
572 |
msgid "HOURS"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: cmp-premium-themes/frame/frame-theme.php:
|
576 |
msgid "MINUTES"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: cmp-premium-themes/frame/frame-theme.php:
|
580 |
msgid "SECONDS"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: cmp-premium-themes/frame/frame-theme.php:
|
584 |
msgid "Insert your email address"
|
585 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: cmp\n"
|
4 |
+
"POT-Creation-Date: 2017-08-21 16:00+0200\n"
|
5 |
+
"PO-Revision-Date: 2017-08-21 16:00+0200\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en\n"
|
70 |
|
71 |
#: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:337
|
72 |
#: cmp-coming-soon-maintenance/tags/1.4.0/cmp-options.php:682
|
|
|
|
|
|
|
73 |
msgid "Disabled"
|
74 |
msgstr ""
|
75 |
|
395 |
|
396 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:37
|
397 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:52
|
398 |
+
#: cmp-premium-themes/frame/frame-settings.php:48
|
|
|
|
|
399 |
msgid "Customize Colors"
|
400 |
msgstr ""
|
401 |
|
402 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:40
|
403 |
+
#: cmp-premium-themes/frame/frame-settings.php:51
|
|
|
404 |
msgid "Active Color"
|
405 |
msgstr ""
|
406 |
|
410 |
|
411 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:49
|
412 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:56
|
413 |
+
#: cmp-premium-themes/frame/frame-settings.php:61
|
|
|
|
|
414 |
msgid "Font Color"
|
415 |
msgstr ""
|
416 |
|
417 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:57
|
|
|
418 |
msgid "Background Color"
|
419 |
msgstr ""
|
420 |
|
421 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:64
|
422 |
+
#: cmp-premium-themes/frame/frame-settings.php:80
|
|
|
423 |
msgid "Overlay Color"
|
424 |
msgstr ""
|
425 |
|
426 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:67
|
|
|
427 |
msgid "Enable Overlay Color"
|
428 |
msgstr ""
|
429 |
|
430 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:73
|
431 |
+
#: cmp-premium-themes/frame/frame-settings.php:86
|
|
|
432 |
msgid "Overlay Opacity"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: cmp-premium-themes/frame/frame-settings.php:70
|
436 |
+
msgid "Frame Color"
|
|
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: cmp-premium-themes/frame/frame-settings.php:94
|
440 |
+
msgid "Save All Changes"
|
|
|
|
|
|
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: cmp-premium-themes/frame/frame-theme.php:242
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
msgid ""
|
445 |
+
"To Display Graphic Media please upgrade CMP Plugin to latest version. You "
|
446 |
+
"can download latest version on "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: cmp-premium-themes/frame/frame-theme.php:242
|
450 |
+
msgid ""
|
451 |
+
"or you can use automatic plugin update in WP-Admin > Plugins > CMP - Coming "
|
452 |
+
"Soon & Maintenance Plugin > Update Now."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: cmp-premium-themes/frame/frame-theme.php:289
|
456 |
msgid "DAYS"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: cmp-premium-themes/frame/frame-theme.php:295
|
460 |
msgid "HOURS"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: cmp-premium-themes/frame/frame-theme.php:302
|
464 |
msgid "MINUTES"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: cmp-premium-themes/frame/frame-theme.php:308
|
468 |
msgid "SECONDS"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: cmp-premium-themes/frame/frame-theme.php:337
|
472 |
msgid "Insert your email address"
|
473 |
msgstr ""
|
niteo-cmp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
-
Version: 1.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -15,8 +15,8 @@
|
|
15 |
|
16 |
class niteo_cmp {
|
17 |
var $installedFolder = '';
|
18 |
-
var $plugins_dir_path = '';
|
19 |
var $version = '';
|
|
|
20 |
var $dev;
|
21 |
var $remoteServer = '';
|
22 |
var $theme_array = array();
|
@@ -26,14 +26,15 @@ class niteo_cmp {
|
|
26 |
var $minified = '';
|
27 |
|
28 |
function __construct() {
|
29 |
-
$this->
|
|
|
|
|
30 |
$this->dev = false;
|
31 |
$this->installedFolder = basename(dirname(__FILE__));
|
32 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
33 |
if ( $this->plugins_dir_path == './') {
|
34 |
$this->plugins_dir_path = WP_PLUGIN_DIR . '/';
|
35 |
}
|
36 |
-
|
37 |
// set array of themes with countdown
|
38 |
$this->countdown_themes = array('frame', 'countdown', 'postery');
|
39 |
|
@@ -51,6 +52,8 @@ class niteo_cmp {
|
|
51 |
$this->remoteServer = ($this->dev == true) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
|
52 |
$this->minified = ($this->dev == true) ? '.js' : '.min.js';
|
53 |
|
|
|
|
|
54 |
}
|
55 |
|
56 |
function cmp() {
|
@@ -59,9 +62,15 @@ class niteo_cmp {
|
|
59 |
|
60 |
function cmp_adminInit() {
|
61 |
wp_register_style( 'cmp_style', plugins_url('/css/cmp-settings-style.css', __FILE__),'',$this->version);
|
62 |
-
|
|
|
63 |
wp_register_style( 'font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
|
64 |
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
function cmp_add_admin_style() {
|
@@ -82,16 +91,13 @@ class niteo_cmp {
|
|
82 |
wp_enqueue_script( 'wp-color-picker');
|
83 |
wp_enqueue_script( 'webfont' );
|
84 |
wp_enqueue_media();
|
85 |
-
wp_enqueue_style('cmp_style');
|
86 |
wp_enqueue_style( 'wp-color-picker');
|
87 |
wp_enqueue_style('font_awesome');
|
88 |
|
89 |
-
// check for them updates, not sure where else this to put
|
90 |
-
$this->cmp_check_update( $this->cmp_selectedTheme() );
|
91 |
}
|
92 |
|
93 |
function sdt_remove_ver_css_js( $src, $handle ) {
|
94 |
-
$handles_remove_ver = array('font_awesome', 'webfont', 'countdown_flatpicker_js', 'countdown_flatpicker_css'); // <-- Adjust to your needs!
|
95 |
if ( in_array( $handle, $handles_remove_ver, true ) && strpos( $src, 'ver=' ) )
|
96 |
$src = remove_query_arg( 'ver', $src );
|
97 |
|
@@ -104,15 +110,13 @@ class niteo_cmp {
|
|
104 |
|
105 |
/* Register our plugin page */
|
106 |
$page = add_menu_page('CMP Settings', 'CMP Settings', 'activate_plugins', 'cmp-settings', array($this, 'cmp_settings_page'), plugins_url('/img/cmp.png', __FILE__));
|
107 |
-
add_submenu_page('cmp-settings', '
|
|
|
108 |
add_submenu_page('cmp-settings', 'Subscribers', 'Subscribers', 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
|
109 |
add_submenu_page('cmp-settings', 'Help', 'Help', 'manage_options', 'cmp-help', array($this, 'cmp_help_page') );
|
110 |
-
// add_submenu_page('cmp-settings', 'About', 'About', 'manage_options', 'cmp-about', array($this, 'cmp_about_page') );
|
111 |
|
112 |
/* Using registered $page handle to hook script load */
|
113 |
add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
|
114 |
-
// add subscribe form styles to header
|
115 |
-
add_action( 'admin_head', array($this, 'cmp_subs_style' ) );
|
116 |
|
117 |
// check onces and wordpress rights, else DIE
|
118 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
@@ -131,18 +135,12 @@ class niteo_cmp {
|
|
131 |
}
|
132 |
}
|
133 |
|
134 |
-
|
135 |
-
$page = ( isset($_GET['page'] ) ) ? esc_attr( $_GET['page'] ) : false;
|
136 |
-
if ( 'cmp-subscribers' != $page ) {
|
137 |
-
return;
|
138 |
-
}
|
139 |
-
echo '<style type="text/css" media="all">';
|
140 |
-
echo '.subscribers .column-ID { width: 5%; }';
|
141 |
-
echo '</style>';
|
142 |
-
}
|
143 |
|
144 |
function cmp_settings_page() {
|
145 |
// include default options page
|
|
|
|
|
146 |
require_once ('cmp-settings.php');
|
147 |
}
|
148 |
|
@@ -151,16 +149,21 @@ class niteo_cmp {
|
|
151 |
require_once ('cmp-subscribers.php');
|
152 |
}
|
153 |
|
|
|
154 |
function cmp_help_page() {
|
155 |
// include default options page
|
156 |
require_once ('cmp-help.php');
|
157 |
}
|
158 |
|
159 |
-
// function
|
160 |
// // include default options page
|
161 |
-
//
|
|
|
|
|
|
|
162 |
// }
|
163 |
|
|
|
164 |
function cmp_displayPage() {
|
165 |
|
166 |
if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
|
@@ -185,66 +188,70 @@ class niteo_cmp {
|
|
185 |
|
186 |
}
|
187 |
|
188 |
-
// render
|
189 |
-
if ( file_exists($this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
|
190 |
-
require_once ($this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php');
|
191 |
die();
|
192 |
}
|
193 |
}
|
194 |
|
195 |
-
// if
|
196 |
if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 ) {
|
197 |
-
|
198 |
if ( !is_user_logged_in() ) {
|
199 |
-
|
200 |
-
//
|
201 |
-
if (
|
202 |
-
// if
|
203 |
-
if (
|
204 |
-
// if
|
205 |
-
if ( get_option('
|
206 |
-
// if
|
207 |
-
if ( get_option('niteoCS_counter_date' )
|
208 |
-
// if
|
209 |
-
if (get_option('
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
|
|
|
|
218 |
}
|
219 |
}
|
220 |
}
|
221 |
}
|
222 |
-
}
|
223 |
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
|
|
235 |
}
|
236 |
-
}
|
237 |
}
|
238 |
|
239 |
-
// if redirect mode
|
240 |
-
if ( $this->cmp_status() == 3 && !is_user_logged_in() ) {
|
241 |
$redirect_url = get_option('niteoCS_URL_redirect');
|
242 |
-
// redirect
|
243 |
if ( $redirect_url != '') {
|
244 |
-
header('Location: '.esc_url($redirect_url));
|
245 |
die();
|
246 |
}
|
247 |
}
|
|
|
248 |
}
|
249 |
|
250 |
function cmp_admin_override(){
|
@@ -258,6 +265,7 @@ class niteo_cmp {
|
|
258 |
if( !current_user_can('administrator') ){
|
259 |
wp_logout();
|
260 |
wp_redirect( get_bloginfo('url') );
|
|
|
261 |
}
|
262 |
}
|
263 |
}
|
@@ -282,8 +290,8 @@ class niteo_cmp {
|
|
282 |
}
|
283 |
|
284 |
// return installed theme path
|
285 |
-
function cmp_themePath() {
|
286 |
-
if ( $this->niteo_in_array_r($
|
287 |
return $this->plugins_dir_path . 'cmp-premium-themes/';
|
288 |
} else {
|
289 |
|
@@ -313,8 +321,6 @@ class niteo_cmp {
|
|
313 |
}
|
314 |
}
|
315 |
|
316 |
-
|
317 |
-
|
318 |
// display admin notice
|
319 |
function cmp_admin_bar(){
|
320 |
global $wp_admin_bar;
|
@@ -380,7 +386,6 @@ class niteo_cmp {
|
|
380 |
}
|
381 |
|
382 |
delete_option('niteoCS_archive', $options);
|
383 |
-
|
384 |
}
|
385 |
|
386 |
// clean plugin stuff when plugin is deleted
|
@@ -398,55 +403,52 @@ class niteo_cmp {
|
|
398 |
}
|
399 |
|
400 |
// theme updates function
|
401 |
-
function cmp_check_update($theme_slug) {
|
402 |
|
|
|
|
|
|
|
403 |
// check for current theme version
|
404 |
$remote_version = '';
|
405 |
$current_version = '';
|
406 |
$type = '';
|
407 |
$headers = array('Version');
|
408 |
|
409 |
-
if ($this->dev == true) {
|
410 |
-
delete_transient($theme_slug.'_updatecheck' );
|
411 |
}
|
412 |
// check if update check transient is set
|
413 |
if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
|
414 |
|
415 |
// if premium theme style.css exists get its version
|
416 |
-
if ( in_array($theme_slug, $this->premium_installed) && file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css')) {
|
417 |
$version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
|
418 |
$type = 'premium';
|
419 |
}
|
420 |
|
421 |
-
// if standard theme style.css exists get its version
|
422 |
-
if ( in_array($theme_slug, $this->themes_standard) && file_exists(plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css')) {
|
423 |
-
$version = get_file_data( plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css', $headers, '');
|
424 |
-
$type = 'standard';
|
425 |
-
}
|
426 |
-
|
427 |
// if we have local version of theme and not in updating theme
|
428 |
if ( isset($version[0]) ) {
|
429 |
$current_version = $version[0];
|
430 |
|
431 |
// get remote version from remote server
|
432 |
-
$request = wp_remote_post($this->remoteServer.'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')));
|
433 |
// if no error, retrivee body
|
434 |
-
if ( !is_wp_error($request) ) {
|
435 |
// decode to json
|
436 |
-
$remote_version = json_decode($request['body'], true);
|
437 |
|
438 |
// get remove version key
|
439 |
if ( isset($remote_version['version']) ) {
|
440 |
$remote_version = $remote_version['version'];
|
441 |
|
442 |
// if remote version is bigger than current, display info about new version
|
443 |
-
if ((float)$remote_version > (float)$current_version) {
|
444 |
$title = ucwords(str_replace('_', ' ', $theme_slug));
|
445 |
// create nonce
|
446 |
$ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
|
447 |
// if admin screen is not in updating theme
|
448 |
if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
|
449 |
-
$transient = '<div class="notice notice-warning is-dismissible"><p class="message">'.sprintf(__('There is a new version of %s theme available.', 'cmp-coming-soon-maintenance'), $title).' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('View update %s notes','cmp-coming-soon-maintenance'), $remote_version).'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-remote_url="'.esc_url($this->remoteServer).'">'.__('Update now.','cmp-coming-soon-maintenance').'</a></p><div class="release-note"></div></div>';
|
450 |
// set transient with 24 hour expire
|
451 |
set_transient( $theme_slug.'_updatecheck', $transient, 60*60*24 );
|
452 |
echo $transient;
|
@@ -475,7 +477,6 @@ class niteo_cmp {
|
|
475 |
}
|
476 |
|
477 |
return;
|
478 |
-
|
479 |
}
|
480 |
|
481 |
function cmp_theme_upload($zip) {
|
@@ -593,7 +594,6 @@ class niteo_cmp {
|
|
593 |
|
594 |
// delete FILE
|
595 |
wp_delete_file( $source_path );
|
596 |
-
|
597 |
// reload premium installed themes
|
598 |
$this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
|
599 |
// add it to all installed themes array
|
@@ -644,7 +644,6 @@ class niteo_cmp {
|
|
644 |
return;
|
645 |
}
|
646 |
}
|
647 |
-
|
648 |
}
|
649 |
|
650 |
function cmp_textDomain() {
|
@@ -652,7 +651,6 @@ class niteo_cmp {
|
|
652 |
}
|
653 |
|
654 |
// unsplash api
|
655 |
-
|
656 |
function niteo_unsplash( $params ) {
|
657 |
$ajax = false;
|
658 |
|
@@ -798,7 +796,6 @@ class niteo_cmp {
|
|
798 |
}
|
799 |
|
800 |
return $response;
|
801 |
-
|
802 |
}
|
803 |
|
804 |
function niteo_export_csv() {
|
@@ -920,8 +917,6 @@ class niteo_cmp {
|
|
920 |
$H -= 1;
|
921 |
}
|
922 |
|
923 |
-
|
924 |
-
|
925 |
$HSL = array( 'hue' => round( ($H*360), 0 ), 'saturation'=> round( ($S*100), 0 ), 'luminosity' => round( ( $L*100 ), 0) );
|
926 |
|
927 |
// if color is white {
|
@@ -940,7 +935,6 @@ class niteo_cmp {
|
|
940 |
|
941 |
$HSL = 'hsl( '. $HSL['hue'] .', '.( $HSL['saturation']) .'%, '. $requested_lumi . '%)';
|
942 |
return $HSL;
|
943 |
-
|
944 |
}
|
945 |
|
946 |
// check if mobile
|
@@ -1069,8 +1063,20 @@ class niteo_cmp {
|
|
1069 |
// video
|
1070 |
$source = get_option('niteoCS_banner_video['.$themeslug.']');
|
1071 |
$background_class = 'video';
|
1072 |
-
|
1073 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1074 |
return array($background_class, $banner_url, $source);
|
1075 |
default:
|
1076 |
break;
|
@@ -1085,11 +1091,73 @@ class niteo_cmp {
|
|
1085 |
}
|
1086 |
}
|
1087 |
|
1088 |
-
|
|
|
|
|
|
|
1089 |
|
|
|
|
|
|
|
1090 |
|
1091 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1092 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1093 |
|
1094 |
add_action( 'admin_notices', array($cmpPlugin, 'cmp_admin_notice'));
|
1095 |
|
@@ -1097,6 +1165,7 @@ add_action('template_redirect', array($cmpPlugin, 'cmp_displayPage'));
|
|
1097 |
|
1098 |
add_action('wp_login', array($cmpPlugin, 'cmp_admin_override'));
|
1099 |
|
|
|
1100 |
add_action( 'wp_ajax_niteo_unsplash', array($cmpPlugin, 'niteo_unsplash') );
|
1101 |
add_action( 'wp_ajax_niteo_export_csv', array($cmpPlugin, 'niteo_export_csv') );
|
1102 |
add_action( 'wp_ajax_cmp_theme_update_install', array($cmpPlugin, 'cmp_theme_update_install') );
|
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: 1.11.0
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
15 |
|
16 |
class niteo_cmp {
|
17 |
var $installedFolder = '';
|
|
|
18 |
var $version = '';
|
19 |
+
var $plugins_dir_path = '';
|
20 |
var $dev;
|
21 |
var $remoteServer = '';
|
22 |
var $theme_array = array();
|
26 |
var $minified = '';
|
27 |
|
28 |
function __construct() {
|
29 |
+
$this->author = 'NiteoThemes';
|
30 |
+
$this->author_homepage = 'https://niteothemes.com';
|
31 |
+
$this->version = '1.11.0';
|
32 |
$this->dev = false;
|
33 |
$this->installedFolder = basename(dirname(__FILE__));
|
34 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
35 |
if ( $this->plugins_dir_path == './') {
|
36 |
$this->plugins_dir_path = WP_PLUGIN_DIR . '/';
|
37 |
}
|
|
|
38 |
// set array of themes with countdown
|
39 |
$this->countdown_themes = array('frame', 'countdown', 'postery');
|
40 |
|
52 |
$this->remoteServer = ($this->dev == true) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
|
53 |
$this->minified = ($this->dev == true) ? '.js' : '.min.js';
|
54 |
|
55 |
+
require_once dirname( __FILE__ ) . '/inc/helper-functions.php';
|
56 |
+
|
57 |
}
|
58 |
|
59 |
function cmp() {
|
62 |
|
63 |
function cmp_adminInit() {
|
64 |
wp_register_style( 'cmp_style', plugins_url('/css/cmp-settings-style.css', __FILE__),'',$this->version);
|
65 |
+
wp_enqueue_style('cmp_style');
|
66 |
+
wp_register_script('cmp_settings_js', plugins_url('/js/settings'.$this->minified, __FILE__), array('webfont'),$this->version);
|
67 |
wp_register_style( 'font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
|
68 |
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
|
69 |
+
wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
70 |
+
wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
|
71 |
+
// wp_register_script('fastselect_js', plugins_url('/js/fastselect.min.js', __FILE__), array('fastsearch_js') );
|
72 |
+
// wp_register_script('fastsearch_js', plugins_url('/js/fastsearch.min.js', __FILE__) );
|
73 |
+
// wp_register_style( 'fastselect_css', plugins_url('/css/fastselect.min.css', __FILE__) );
|
74 |
}
|
75 |
|
76 |
function cmp_add_admin_style() {
|
91 |
wp_enqueue_script( 'wp-color-picker');
|
92 |
wp_enqueue_script( 'webfont' );
|
93 |
wp_enqueue_media();
|
|
|
94 |
wp_enqueue_style( 'wp-color-picker');
|
95 |
wp_enqueue_style('font_awesome');
|
96 |
|
|
|
|
|
97 |
}
|
98 |
|
99 |
function sdt_remove_ver_css_js( $src, $handle ) {
|
100 |
+
$handles_remove_ver = array('font_awesome', 'webfont', 'countdown_flatpicker_js', 'countdown_flatpicker_css', 'fastselect'); // <-- Adjust to your needs!
|
101 |
if ( in_array( $handle, $handles_remove_ver, true ) && strpos( $src, 'ver=' ) )
|
102 |
$src = remove_query_arg( 'ver', $src );
|
103 |
|
110 |
|
111 |
/* Register our plugin page */
|
112 |
$page = add_menu_page('CMP Settings', 'CMP Settings', 'activate_plugins', 'cmp-settings', array($this, 'cmp_settings_page'), plugins_url('/img/cmp.png', __FILE__));
|
113 |
+
add_submenu_page('cmp-settings', 'Basic Settings', 'Basic Settings', 'manage_options', 'cmp-settings' );
|
114 |
+
// add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
|
115 |
add_submenu_page('cmp-settings', 'Subscribers', 'Subscribers', 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
|
116 |
add_submenu_page('cmp-settings', 'Help', 'Help', 'manage_options', 'cmp-help', array($this, 'cmp_help_page') );
|
|
|
117 |
|
118 |
/* Using registered $page handle to hook script load */
|
119 |
add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
|
|
|
|
|
120 |
|
121 |
// check onces and wordpress rights, else DIE
|
122 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
135 |
}
|
136 |
}
|
137 |
|
138 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
function cmp_settings_page() {
|
141 |
// include default options page
|
142 |
+
// check for them updates, not sure where else this to put
|
143 |
+
$this->cmp_check_update( $this->cmp_selectedTheme() );
|
144 |
require_once ('cmp-settings.php');
|
145 |
}
|
146 |
|
149 |
require_once ('cmp-subscribers.php');
|
150 |
}
|
151 |
|
152 |
+
|
153 |
function cmp_help_page() {
|
154 |
// include default options page
|
155 |
require_once ('cmp-help.php');
|
156 |
}
|
157 |
|
158 |
+
// function cmp_advanced_page() {
|
159 |
// // include default options page
|
160 |
+
// wp_enqueue_script('fastsearch_js');
|
161 |
+
// wp_enqueue_script('fastselect_js');
|
162 |
+
// wp_enqueue_style( 'fastselect_css');
|
163 |
+
// require_once ('cmp-advanced.php');
|
164 |
// }
|
165 |
|
166 |
+
|
167 |
function cmp_displayPage() {
|
168 |
|
169 |
if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
|
188 |
|
189 |
}
|
190 |
|
191 |
+
// for admin: render CMP Theme when preview is set
|
192 |
+
if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
|
193 |
+
require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
|
194 |
die();
|
195 |
}
|
196 |
}
|
197 |
|
198 |
+
// for users: render CMP Theme if set in Settings
|
199 |
if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 ) {
|
200 |
+
// check if user logged in
|
201 |
if ( !is_user_logged_in() ) {
|
202 |
+
//
|
203 |
+
// $id = get_the_id();
|
204 |
+
// if ($id == '295') {
|
205 |
+
// if themes with countdown timer
|
206 |
+
if ( in_array($this->cmp_selectedTheme(), $this->countdown_themes) ){
|
207 |
+
// if counter is enabled
|
208 |
+
if ( get_option('niteoCS_counter', '1') == '1' ) {
|
209 |
+
// if countdown date is set
|
210 |
+
if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
|
211 |
+
// if timer < timestamp do set action
|
212 |
+
if ( get_option('niteoCS_counter_date' ) < time() ) {
|
213 |
+
// if action set to disable cmp
|
214 |
+
if (get_option('niteoCS_countdown_action') == 'disable-cmp') {
|
215 |
+
update_option('niteoCS_activation', '0');
|
216 |
+
}
|
217 |
+
|
218 |
+
// if action set to redirect
|
219 |
+
if (get_option('niteoCS_countdown_action') == 'redirect') {
|
220 |
+
$redirect_url = esc_url(get_option('niteoCS_countdown_redirect'));
|
221 |
+
header('Location: '.$redirect_url);
|
222 |
+
die();
|
223 |
+
}
|
224 |
}
|
225 |
}
|
226 |
}
|
227 |
}
|
|
|
228 |
|
229 |
+
// if maintanance mode send correct 503 headers
|
230 |
+
if ( $this->cmp_status() == '1' ){
|
231 |
+
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
232 |
+
header('Status: 503 Service Temporarily Unavailable');
|
233 |
+
header('Retry-After: 86400'); // retry in a day
|
234 |
+
}
|
235 |
|
236 |
+
// render selected CMP theme
|
237 |
+
if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
|
238 |
+
require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
|
239 |
+
die();
|
240 |
+
}
|
241 |
}
|
242 |
+
// }
|
243 |
}
|
244 |
|
245 |
+
// if CMP in redirect mode
|
246 |
+
if ( $this->cmp_status() == 3 && get_option('niteoCS_URL_redirect') == 0 && !is_user_logged_in() ) {
|
247 |
$redirect_url = get_option('niteoCS_URL_redirect');
|
248 |
+
// redirect to URL
|
249 |
if ( $redirect_url != '') {
|
250 |
+
header('Location: '.esc_url( $redirect_url ));
|
251 |
die();
|
252 |
}
|
253 |
}
|
254 |
+
|
255 |
}
|
256 |
|
257 |
function cmp_admin_override(){
|
265 |
if( !current_user_can('administrator') ){
|
266 |
wp_logout();
|
267 |
wp_redirect( get_bloginfo('url') );
|
268 |
+
exit();
|
269 |
}
|
270 |
}
|
271 |
}
|
290 |
}
|
291 |
|
292 |
// return installed theme path
|
293 |
+
function cmp_themePath( $slug ) {
|
294 |
+
if ( $this->niteo_in_array_r( $slug, $this->cmp_plugin_premium() ) ) {
|
295 |
return $this->plugins_dir_path . 'cmp-premium-themes/';
|
296 |
} else {
|
297 |
|
321 |
}
|
322 |
}
|
323 |
|
|
|
|
|
324 |
// display admin notice
|
325 |
function cmp_admin_bar(){
|
326 |
global $wp_admin_bar;
|
386 |
}
|
387 |
|
388 |
delete_option('niteoCS_archive', $options);
|
|
|
389 |
}
|
390 |
|
391 |
// clean plugin stuff when plugin is deleted
|
403 |
}
|
404 |
|
405 |
// theme updates function
|
406 |
+
function cmp_check_update( $theme_slug ) {
|
407 |
|
408 |
+
if ( !in_array( $theme_slug, $this->premium_installed ) ) {
|
409 |
+
return;
|
410 |
+
}
|
411 |
// check for current theme version
|
412 |
$remote_version = '';
|
413 |
$current_version = '';
|
414 |
$type = '';
|
415 |
$headers = array('Version');
|
416 |
|
417 |
+
if ( $this->dev == true ) {
|
418 |
+
delete_transient( $theme_slug.'_updatecheck' );
|
419 |
}
|
420 |
// check if update check transient is set
|
421 |
if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
|
422 |
|
423 |
// if premium theme style.css exists get its version
|
424 |
+
if ( in_array( $theme_slug, $this->premium_installed ) && file_exists( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
|
425 |
$version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
|
426 |
$type = 'premium';
|
427 |
}
|
428 |
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
// if we have local version of theme and not in updating theme
|
430 |
if ( isset($version[0]) ) {
|
431 |
$current_version = $version[0];
|
432 |
|
433 |
// get remote version from remote server
|
434 |
+
$request = wp_remote_post( $this->remoteServer.'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')) );
|
435 |
// if no error, retrivee body
|
436 |
+
if ( !is_wp_error( $request ) ) {
|
437 |
// decode to json
|
438 |
+
$remote_version = json_decode( $request['body'], true );
|
439 |
|
440 |
// get remove version key
|
441 |
if ( isset($remote_version['version']) ) {
|
442 |
$remote_version = $remote_version['version'];
|
443 |
|
444 |
// if remote version is bigger than current, display info about new version
|
445 |
+
if ( (float)$remote_version > (float)$current_version ) {
|
446 |
$title = ucwords(str_replace('_', ' ', $theme_slug));
|
447 |
// create nonce
|
448 |
$ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
|
449 |
// if admin screen is not in updating theme
|
450 |
if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
|
451 |
+
$transient = '<div class="notice notice-warning is-dismissible"><p class="message">'.sprintf(__('There is a new version of %s theme available.', 'cmp-coming-soon-maintenance'), $title).' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('View update %s notes','cmp-coming-soon-maintenance'), $remote_version).'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-remote_url="'.esc_url($this->remoteServer).'" data-new_ver="'.esc_attr($remote_version).'">'.__('Update now.','cmp-coming-soon-maintenance').'</a></p><div class="release-note"></div></div>';
|
452 |
// set transient with 24 hour expire
|
453 |
set_transient( $theme_slug.'_updatecheck', $transient, 60*60*24 );
|
454 |
echo $transient;
|
477 |
}
|
478 |
|
479 |
return;
|
|
|
480 |
}
|
481 |
|
482 |
function cmp_theme_upload($zip) {
|
594 |
|
595 |
// delete FILE
|
596 |
wp_delete_file( $source_path );
|
|
|
597 |
// reload premium installed themes
|
598 |
$this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
|
599 |
// add it to all installed themes array
|
644 |
return;
|
645 |
}
|
646 |
}
|
|
|
647 |
}
|
648 |
|
649 |
function cmp_textDomain() {
|
651 |
}
|
652 |
|
653 |
// unsplash api
|
|
|
654 |
function niteo_unsplash( $params ) {
|
655 |
$ajax = false;
|
656 |
|
796 |
}
|
797 |
|
798 |
return $response;
|
|
|
799 |
}
|
800 |
|
801 |
function niteo_export_csv() {
|
917 |
$H -= 1;
|
918 |
}
|
919 |
|
|
|
|
|
920 |
$HSL = array( 'hue' => round( ($H*360), 0 ), 'saturation'=> round( ($S*100), 0 ), 'luminosity' => round( ( $L*100 ), 0) );
|
921 |
|
922 |
// if color is white {
|
935 |
|
936 |
$HSL = 'hsl( '. $HSL['hue'] .', '.( $HSL['saturation']) .'%, '. $requested_lumi . '%)';
|
937 |
return $HSL;
|
|
|
938 |
}
|
939 |
|
940 |
// check if mobile
|
1063 |
// video
|
1064 |
$source = get_option('niteoCS_banner_video['.$themeslug.']');
|
1065 |
$background_class = 'video';
|
1066 |
+
switch ( $source ) {
|
1067 |
+
case 'YouTube':
|
1068 |
+
$banner_url = get_option('niteoCS_youtube_url['.$themeslug.']');
|
1069 |
+
break;
|
1070 |
+
case 'vimeo':
|
1071 |
+
$banner_url = get_option('niteoCS_vimeo_url['.$themeslug.']');
|
1072 |
+
break;
|
1073 |
+
case 'video/mp4':
|
1074 |
+
$banner_url = get_option('niteoCS_video_file_url['.$themeslug.']');
|
1075 |
+
break;
|
1076 |
+
default:
|
1077 |
+
break;
|
1078 |
+
}
|
1079 |
+
|
1080 |
return array($background_class, $banner_url, $source);
|
1081 |
default:
|
1082 |
break;
|
1091 |
}
|
1092 |
}
|
1093 |
|
1094 |
+
function cmp_get_pages() {
|
1095 |
+
$page_titles = array();
|
1096 |
+
$pages = array();
|
1097 |
+
$page_ids = get_all_page_ids();
|
1098 |
|
1099 |
+
foreach ($page_ids as $page_id ) {
|
1100 |
+
array_push($page_titles, get_the_title($page_id));
|
1101 |
+
}
|
1102 |
|
1103 |
+
foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
|
1104 |
+
$pages[] = array('id' => $id, 'name' => $name);
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
return $pages;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
// send json data for theme info overlay AJAX request
|
1111 |
+
function niteo_themeinfo( ) {
|
1112 |
+
|
1113 |
+
// check for ajax
|
1114 |
+
if ( isset( $_POST['theme_slug'] ) ) {
|
1115 |
+
// verify nonce
|
1116 |
+
check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
|
1117 |
+
// verify user rights
|
1118 |
+
if( !current_user_can('publish_pages') ) {
|
1119 |
+
die('Sorry, but this request is invalid');
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
// sanitize $post
|
1123 |
+
$theme_slug = sanitize_text_field( $_POST['theme_slug'] );
|
1124 |
+
$data = array( 'result' => 'true', 'author_homepage' => $this->author_homepage, 'author' => $this->author );
|
1125 |
+
|
1126 |
+
if ( !empty( $theme_slug ) ) {
|
1127 |
+
$headers = array('Theme Name', 'Description');
|
1128 |
+
$theme_info = get_file_data(plugins_url('/themes/'. $theme_slug. '.txt', __FILE__), $headers, '');
|
1129 |
+
|
1130 |
+
$screenshots = array_map( 'basename', glob( plugin_dir_path( __FILE__ ) . 'img/thumbnails/'.$theme_slug.'/*' ) );
|
1131 |
+
foreach ( $screenshots as $key => $screenshot ) {
|
1132 |
+
$screenshots[$key] = plugins_url('img/thumbnails/'.$theme_slug.'/'.$screenshot, __FILE__ );
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
$data['name'] = $theme_info[0];
|
1136 |
+
$data['description'] = $theme_info[1];
|
1137 |
+
$data['screenshots'] = $screenshots;
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
echo json_encode ($data);
|
1141 |
+
wp_die();
|
1142 |
+
}
|
1143 |
+
}
|
1144 |
|
1145 |
+
// return script for redirect
|
1146 |
+
function niteo_redirect() {
|
1147 |
+
if ( $this->cmp_status() == 3 ) {
|
1148 |
+
$url = get_option('niteoCS_URL_redirect');
|
1149 |
+
$time = get_option('niteoCS_redirect_time');
|
1150 |
+
echo '<script>
|
1151 |
+
setTimeout(function() {
|
1152 |
+
window.location.href = "'.esc_url($url).'";
|
1153 |
+
}, '.esc_attr($time * 1000).');
|
1154 |
+
</script>';
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
$cmpPlugin = new niteo_cmp();
|
1161 |
|
1162 |
add_action( 'admin_notices', array($cmpPlugin, 'cmp_admin_notice'));
|
1163 |
|
1165 |
|
1166 |
add_action('wp_login', array($cmpPlugin, 'cmp_admin_override'));
|
1167 |
|
1168 |
+
add_action( 'wp_ajax_niteo_themeinfo', array($cmpPlugin, 'niteo_themeinfo') );
|
1169 |
add_action( 'wp_ajax_niteo_unsplash', array($cmpPlugin, 'niteo_unsplash') );
|
1170 |
add_action( 'wp_ajax_niteo_export_csv', array($cmpPlugin, 'niteo_export_csv') );
|
1171 |
add_action( 'wp_ajax_cmp_theme_update_install', array($cmpPlugin, 'cmp_theme_update_install') );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
|
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -16,13 +16,13 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
16 |
|
17 |
<h3>Preview</h3>
|
18 |
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork&video=true" target="_blank">Click for preview of Hardwork Theme with video background>></a>
|
19 |
-
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=countdown" target="_blank">Click for preview of Countdown Theme >></a>
|
20 |
-
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=construct" target="_blank">Click for preview of Construct Theme >></a>
|
21 |
-
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork" target="_blank">Click for preview of Hardwork Theme >></a>
|
22 |
-
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=postery" target="_blank">Click for preview of Postery Theme >></a>
|
23 |
-
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork_premium" target="_blank">Click for preview of Hardwork Premium Theme >></a>
|
24 |
-
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=frame" target="_blank">Click for preview of Frame Theme >></a>
|
25 |
-
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=fifty" target="_blank">Click for preview of Fifty Theme >></a>
|
26 |
|
27 |
<h3>Features</h3>
|
28 |
<ul>
|
@@ -112,6 +112,14 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
112 |
|
113 |
|
114 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
<h4>1.10.0</h4>
|
116 |
<ul>
|
117 |
<li>New free theme: Postery! Enjoy new free Theme with modern design and 3D animation! We hope you like as we do :)</li>
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 1.11.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
16 |
|
17 |
<h3>Preview</h3>
|
18 |
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork&video=true" target="_blank">Click for preview of Hardwork Theme with video background>></a>
|
19 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=countdown&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Countdown Theme >></a>
|
20 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=construct&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Construct Theme >></a>
|
21 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Hardwork Theme >></a>
|
22 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=postery&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Postery Theme >></a>
|
23 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork_premium&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Hardwork Premium Theme >></a>
|
24 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=frame&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Frame Theme >></a>
|
25 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=fifty&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Fifty Theme >></a>
|
26 |
|
27 |
<h3>Features</h3>
|
28 |
<ul>
|
112 |
|
113 |
|
114 |
== Changelog ==
|
115 |
+
<h4>1.11.0</h4>
|
116 |
+
<ul>
|
117 |
+
<li>New Feature: Background videos supports local WordPress library.</li>
|
118 |
+
<li>New Feature: Option to set a delay for Redirect Mode.</li>
|
119 |
+
<li>Fixed issues with displaying Themes in Internet Explorer.</li>
|
120 |
+
<li>Removed automatic check for updates to NiteoThemes server for free CMP Themes to meet WordPress Plugins policy.</li>
|
121 |
+
</ul>
|
122 |
+
|
123 |
<h4>1.10.0</h4>
|
124 |
<ul>
|
125 |
<li>New free theme: Postery! Enjoy new free Theme with modern design and 3D animation! We hope you like as we do :)</li>
|
sftp-config.json
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
{
|
2 |
-
// The tab key will cycle through the settings when first created
|
3 |
-
// Visit http://wbond.net/sublime_packages/sftp/settings for help
|
4 |
-
|
5 |
-
// sftp, ftp or ftps
|
6 |
-
"type": "ftp",
|
7 |
-
|
8 |
-
"save_before_upload": true,
|
9 |
-
"upload_on_save": true,
|
10 |
-
"sync_down_on_open": false,
|
11 |
-
"sync_skip_deletes": false,
|
12 |
-
"sync_same_age": true,
|
13 |
-
"confirm_downloads": false,
|
14 |
-
"confirm_sync": true,
|
15 |
-
"confirm_overwrite_newer": false,
|
16 |
-
|
17 |
-
"host": "ftp.cluster010.ovh.net",
|
18 |
-
"user": "noelamar",
|
19 |
-
"password": "Lapinbleu13",
|
20 |
-
"port": "21",
|
21 |
-
|
22 |
-
"remote_path": "/www/design/wp-content/plugins/1.10.0",
|
23 |
-
"ignore_regexes": [
|
24 |
-
"\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
|
25 |
-
"sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
|
26 |
-
"\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
|
27 |
-
],
|
28 |
-
//"file_permissions": "664",
|
29 |
-
//"dir_permissions": "775",
|
30 |
-
|
31 |
-
//"extra_list_connections": 0,
|
32 |
-
|
33 |
-
"connect_timeout": 30,
|
34 |
-
//"keepalive": 120,
|
35 |
-
//"ftp_passive_mode": true,
|
36 |
-
//"ftp_obey_passive_host": false,
|
37 |
-
//"ssh_key_file": "~/.ssh/id_rsa",
|
38 |
-
//"sftp_flags": ["-F", "/path/to/ssh_config"],
|
39 |
-
|
40 |
-
//"preserve_modification_times": false,
|
41 |
-
//"remote_time_offset_in_hours": 0,
|
42 |
-
//"remote_encoding": "utf-8",
|
43 |
-
//"remote_locale": "C",
|
44 |
-
//"allow_config_upload": false,
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
themes/construct.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Construct
|
3 |
+
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=construct
|
4 |
+
Author: Niteo
|
5 |
+
Author URI: https://niteothemes.com
|
6 |
+
Version: 1.9
|
7 |
+
Description: <p>Construct is clean and modern designed theme for CMP plugin. Construct features big paralax banner which can be set to any custom graphic, pattern or Unsplash library media. Add subscribe form, your customized social media icons and it can be used both Coming soon or Under Construction landing page.</p><h4>Main Features</h4><ul><li>Custom paralax banner</li><li>Subscribe form</li><li>Responsive design</li></ul>
|
themes/construct/construct-theme.php
CHANGED
@@ -2,9 +2,6 @@
|
|
2 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_honeypot'] === '' && isset( $_POST['EMAIL'] ) && is_email( $_POST['EMAIL'] ) ) {
|
3 |
$subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
|
4 |
}
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
?>
|
9 |
|
10 |
<!DOCTYPE html>
|
@@ -19,7 +16,6 @@
|
|
19 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
|
20 |
|
21 |
<?php
|
22 |
-
$ver = '1.8';
|
23 |
$themeslug = 'construct';
|
24 |
$size = $this->isMobile() ? 'large' : 'full';
|
25 |
// get theme related settings
|
@@ -49,11 +45,21 @@
|
|
49 |
// get background media
|
50 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '2');
|
51 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
52 |
-
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug);
|
53 |
$background_class = $background_media[0];
|
54 |
$banner_url = $background_media[1];
|
55 |
if ( $background_class == 'video' ) {
|
56 |
-
$source
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
} else {
|
59 |
$background_class = 'error';
|
@@ -112,7 +118,7 @@
|
|
112 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
113 |
<?php
|
114 |
} ?>
|
115 |
-
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$
|
116 |
|
117 |
<link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
|
118 |
|
@@ -182,7 +188,7 @@
|
|
182 |
}
|
183 |
break;
|
184 |
case 'text':
|
185 |
-
$text_logo = get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )); ?>
|
186 |
<h1><?php echo esc_html($text_logo); ?></h1>
|
187 |
<?php
|
188 |
case 'disabled':
|
@@ -199,7 +205,7 @@
|
|
199 |
case '0':
|
200 |
case '2':
|
201 |
case '3': ?>
|
202 |
-
<div class="banner <?php echo esc_attr($background_class);?>" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
|
203 |
<?php
|
204 |
break;
|
205 |
case '4': ?>
|
@@ -213,17 +219,17 @@
|
|
213 |
var screenHeight = screenWidth / 1.77777;
|
214 |
screenHeight = screenHeight.toFixed(0);
|
215 |
|
216 |
-
var banner = '<div class="banner" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>\')"></div>';
|
217 |
banner = banner.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
|
218 |
document.getElementById('banner-wrapper').innerHTML = banner;
|
219 |
</script>
|
220 |
-
<?php
|
|
|
221 |
// video media
|
222 |
case '5': ?>
|
223 |
-
|
224 |
<div id="player" class="video-banner"></div>
|
225 |
-
|
226 |
<?php
|
|
|
227 |
default:
|
228 |
break;
|
229 |
}
|
@@ -308,32 +314,56 @@
|
|
308 |
}
|
309 |
|
310 |
if ( $niteoCS_banner != 5 && $niteoCS_banner != 4 ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
<script type='text/javascript' src='<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug .'/paraxify.min.js';?>'></script>
|
312 |
<?php
|
313 |
|
314 |
-
}
|
315 |
-
$niteoCS_video_thumb = get_option('niteoCS_video_thumb['.$themeslug.']');
|
316 |
-
if ( $niteoCS_video_thumb != '' ) {
|
317 |
-
$thumb_id = wp_get_attachment_image_src($niteoCS_video_thumb, 'large');
|
318 |
|
319 |
-
|
320 |
-
$thumb = $thumb_id[0];
|
321 |
-
}
|
322 |
-
} ?>
|
323 |
|
324 |
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
325 |
|
326 |
<script>
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
|
334 |
</script>
|
335 |
<?php
|
336 |
-
|
|
|
|
|
|
|
|
|
337 |
|
338 |
|
339 |
</body>
|
2 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_honeypot'] === '' && isset( $_POST['EMAIL'] ) && is_email( $_POST['EMAIL'] ) ) {
|
3 |
$subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
|
4 |
}
|
|
|
|
|
|
|
5 |
?>
|
6 |
|
7 |
<!DOCTYPE html>
|
16 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
|
17 |
|
18 |
<?php
|
|
|
19 |
$themeslug = 'construct';
|
20 |
$size = $this->isMobile() ? 'large' : 'full';
|
21 |
// get theme related settings
|
45 |
// get background media
|
46 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '2');
|
47 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
48 |
+
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug );
|
49 |
$background_class = $background_media[0];
|
50 |
$banner_url = $background_media[1];
|
51 |
if ( $background_class == 'video' ) {
|
52 |
+
$source = $background_media[2];
|
53 |
+
$video_type = get_option('niteoCS_banner_video['.$themeslug.']');
|
54 |
+
$video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
|
55 |
+
|
56 |
+
if ( !empty( $video_poster ) ) {
|
57 |
+
$video_poster = $video_poster[0];
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( $video_type == 'video/mp4') {
|
61 |
+
$banner_url = wp_get_attachment_url( $banner_url );
|
62 |
+
}
|
63 |
}
|
64 |
} else {
|
65 |
$background_class = 'error';
|
118 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
119 |
<?php
|
120 |
} ?>
|
121 |
+
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version;?>" type="text/css" media="all">
|
122 |
|
123 |
<link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
|
124 |
|
188 |
}
|
189 |
break;
|
190 |
case 'text':
|
191 |
+
$text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' ))); ?>
|
192 |
<h1><?php echo esc_html($text_logo); ?></h1>
|
193 |
<?php
|
194 |
case 'disabled':
|
205 |
case '0':
|
206 |
case '2':
|
207 |
case '3': ?>
|
208 |
+
<div id="background-image" class="banner <?php echo esc_attr($background_class);?>" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
|
209 |
<?php
|
210 |
break;
|
211 |
case '4': ?>
|
219 |
var screenHeight = screenWidth / 1.77777;
|
220 |
screenHeight = screenHeight.toFixed(0);
|
221 |
|
222 |
+
var banner = '<div id="background-image" class="banner" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>\')"></div>';
|
223 |
banner = banner.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
|
224 |
document.getElementById('banner-wrapper').innerHTML = banner;
|
225 |
</script>
|
226 |
+
<?php
|
227 |
+
break;
|
228 |
// video media
|
229 |
case '5': ?>
|
|
|
230 |
<div id="player" class="video-banner"></div>
|
|
|
231 |
<?php
|
232 |
+
break;
|
233 |
default:
|
234 |
break;
|
235 |
}
|
314 |
}
|
315 |
|
316 |
if ( $niteoCS_banner != 5 && $niteoCS_banner != 4 ) { ?>
|
317 |
+
<script>
|
318 |
+
window.onload = function() {
|
319 |
+
var image = document.getElementById('background-image');
|
320 |
+
image.className += " loaded";
|
321 |
+
}
|
322 |
+
</script>
|
323 |
<script type='text/javascript' src='<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug .'/paraxify.min.js';?>'></script>
|
324 |
<?php
|
325 |
|
326 |
+
}
|
|
|
|
|
|
|
327 |
|
328 |
+
if ( $niteoCS_banner == 5 ){ ?>
|
|
|
|
|
|
|
329 |
|
330 |
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
331 |
|
332 |
<script>
|
333 |
+
|
334 |
+
<?php
|
335 |
+
if ( $video_type == 'YouTube' ) { ?>
|
336 |
+
|
337 |
+
var myBackground = new vidim( '#player', {
|
338 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
339 |
+
type: 'YouTube',
|
340 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
341 |
+
}
|
342 |
+
);
|
343 |
+
<?php
|
344 |
+
}
|
345 |
+
|
346 |
+
if ( $video_type == 'video/mp4' ) { ?>
|
347 |
+
var myBackground = new vidim( '#player', {
|
348 |
+
src: [
|
349 |
+
{
|
350 |
+
type: 'video/mp4',
|
351 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
352 |
+
},
|
353 |
+
],
|
354 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
355 |
+
});
|
356 |
+
<?php
|
357 |
+
} ?>
|
358 |
+
|
359 |
|
360 |
</script>
|
361 |
<?php
|
362 |
+
|
363 |
+
}
|
364 |
+
|
365 |
+
$this->niteo_redirect();
|
366 |
+
?>
|
367 |
|
368 |
|
369 |
</body>
|
themes/construct/style.css
CHANGED
@@ -12,8 +12,13 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
|
12 |
*/
|
13 |
|
14 |
body {
|
|
|
|
|
15 |
display: flex;
|
16 |
-
|
|
|
|
|
|
|
17 |
margin: 0;
|
18 |
min-height: 100vh;
|
19 |
}
|
@@ -22,42 +27,52 @@ body {
|
|
22 |
h1,h2,h3,h4,h5,h6{font-weight: 400;font-size:2em;}
|
23 |
.section {padding: 50px 2em;text-align: center;
|
24 |
position: relative;
|
25 |
-
display: -webkit-flex;
|
26 |
display: -moz-flex;
|
27 |
display: -ms-flex;
|
28 |
display: -o-flex;
|
|
|
|
|
29 |
display: flex;
|
30 |
-
|
|
|
|
|
31 |
-moz-justify-content: center;
|
32 |
-webkit-justify-content: center;
|
33 |
-
-webkit-flex-direction: column;
|
34 |
-moz-flex-direction: column;
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
37 |
-webkit-flex-grow: 1;
|
38 |
-moz-flex-grow: 1;}
|
39 |
-
.section-logo {
|
40 |
.section-logo img {max-width: 100%;max-height: 300px;}
|
41 |
.section-logo h1 {font-size: 2.5em; text-transform: uppercase;}
|
42 |
.section-banner{padding-top: 30%;height: 0;}
|
43 |
.section-body p{width:70%;max-width: 900px;margin:1em auto;}
|
44 |
.section-social{background-color: #f8f8f8;}
|
45 |
.section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;}
|
|
|
|
|
46 |
.banner, .video-banner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;background-attachment: fixed;background-position: center center;background-repeat: no-repeat;background-size: cover;}
|
|
|
47 |
.banner.pattern{background-size: initial; background-repeat: repeat;}
|
48 |
.social-list{padding:0;margin-bottom: 0;}
|
49 |
.social-list li{list-style: none;display: inline-block; padding: 0 5px;}
|
50 |
-
.section-body form{
|
51 |
.section-body form br {display: none;}
|
52 |
label {display: block;padding-bottom: 5px;text-indent: 15px;font-size:.8em;}
|
53 |
-
input {display: inline-block;line-height: 4em;height: 4em;box-sizing: border-box;vertical-align: middle;margin-bottom: 10px;}
|
54 |
input[type="email"],
|
55 |
input[type="text"] {width:280px;background-color: #f8f8f8;text-indent: 15px;font-style: italic;border: 1px solid #dcdcdc; border-top-left-radius:5px;border-bottom-left-radius:5px;}
|
56 |
input[type="submit"] {padding: 0;margin-left:-7px;width: 120px;color: white;font-weight:700;border: none;border-top-right-radius:5px;border-bottom-right-radius:5px;letter-spacing: 1px;cursor:pointer;}
|
57 |
input[type="text"] {width: calc(100% - 2px);border-radius:5px;}
|
58 |
-
.social-list a{display: block;height: 3em;width: 3em;line-height: 3em;background: transparent;-webkit-transition: background 300ms linear
|
59 |
-
.social-list i{font-size: 2em;-webkit-transition: all 300ms linear
|
60 |
-
.social-list a:hover i {-webkit-animation: spin 300ms linear
|
61 |
/* contact form 7 */
|
62 |
.wpcf7 .screen-reader-response, .wpcf7 .wpcf7-validation-errors {display: none;}
|
63 |
.wpcf7 .wpcf7-form-control-wrap {position: relative;}
|
@@ -76,20 +91,19 @@ input[type="text"] {width: calc(100% - 2px);border-radius:5px;}
|
|
76 |
}
|
77 |
::-webkit-scrollbar-track {
|
78 |
background:rgba(170,170,170,0.8);
|
79 |
-
} @-moz-keyframes spin {
|
80 |
-
from { -moz-transform: rotate(0deg); }
|
81 |
-
to { -moz-transform: rotate(360deg); }
|
82 |
}
|
83 |
@-webkit-keyframes spin {
|
84 |
from { -webkit-transform: rotate(0deg); }
|
85 |
to { -webkit-transform: rotate(360deg); }
|
86 |
}
|
87 |
@keyframes spin {
|
88 |
-
from {transform:rotate(0deg);}
|
89 |
-
to {transform:rotate(360deg);}
|
90 |
}
|
91 |
|
92 |
-
.video-banner iframe
|
|
|
|
|
93 |
transition: opacity 1500ms;
|
94 |
}
|
95 |
|
12 |
*/
|
13 |
|
14 |
body {
|
15 |
+
display: -webkit-box;
|
16 |
+
display: -ms-flexbox;
|
17 |
display: flex;
|
18 |
+
-webkit-box-orient: vertical;
|
19 |
+
-webkit-box-direction: normal;
|
20 |
+
-ms-flex-direction: column;
|
21 |
+
flex-direction: column;
|
22 |
margin: 0;
|
23 |
min-height: 100vh;
|
24 |
}
|
27 |
h1,h2,h3,h4,h5,h6{font-weight: 400;font-size:2em;}
|
28 |
.section {padding: 50px 2em;text-align: center;
|
29 |
position: relative;
|
|
|
30 |
display: -moz-flex;
|
31 |
display: -ms-flex;
|
32 |
display: -o-flex;
|
33 |
+
display: -webkit-box;
|
34 |
+
display: -ms-flexbox;
|
35 |
display: flex;
|
36 |
+
-webkit-box-pack: center;
|
37 |
+
-ms-flex-pack: center;
|
38 |
+
justify-content: center;
|
39 |
-moz-justify-content: center;
|
40 |
-webkit-justify-content: center;
|
|
|
41 |
-moz-flex-direction: column;
|
42 |
+
-webkit-box-orient: vertical;
|
43 |
+
-webkit-box-direction: normal;
|
44 |
+
-ms-flex-direction: column;
|
45 |
+
flex-direction: column;
|
46 |
+
-webkit-box-flex: 1;
|
47 |
+
-ms-flex-positive: 1;
|
48 |
+
flex-grow: 1;
|
49 |
-webkit-flex-grow: 1;
|
50 |
-moz-flex-grow: 1;}
|
51 |
+
.section-logo {width: 500px;max-width:100%; margin: 0 auto;}
|
52 |
.section-logo img {max-width: 100%;max-height: 300px;}
|
53 |
.section-logo h1 {font-size: 2.5em; text-transform: uppercase;}
|
54 |
.section-banner{padding-top: 30%;height: 0;}
|
55 |
.section-body p{width:70%;max-width: 900px;margin:1em auto;}
|
56 |
.section-social{background-color: #f8f8f8;}
|
57 |
.section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;}
|
58 |
+
#background-image {opacity: 0; -webkit-transition: opacity 400ms; transition: opacity 400ms;}
|
59 |
+
#background-image.loaded {opacity: 1;}
|
60 |
.banner, .video-banner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;background-attachment: fixed;background-position: center center;background-repeat: no-repeat;background-size: cover;}
|
61 |
+
|
62 |
.banner.pattern{background-size: initial; background-repeat: repeat;}
|
63 |
.social-list{padding:0;margin-bottom: 0;}
|
64 |
.social-list li{list-style: none;display: inline-block; padding: 0 5px;}
|
65 |
+
.section-body form{width: 400px;max-width:100%;margin: 0 auto;margin-top: 70px;margin-bottom: 30px;text-align:left;}
|
66 |
.section-body form br {display: none;}
|
67 |
label {display: block;padding-bottom: 5px;text-indent: 15px;font-size:.8em;}
|
68 |
+
input {display: inline-block;line-height: 4em;height: 4em;-webkit-box-sizing: border-box;box-sizing: border-box;vertical-align: middle;margin-bottom: 10px;}
|
69 |
input[type="email"],
|
70 |
input[type="text"] {width:280px;background-color: #f8f8f8;text-indent: 15px;font-style: italic;border: 1px solid #dcdcdc; border-top-left-radius:5px;border-bottom-left-radius:5px;}
|
71 |
input[type="submit"] {padding: 0;margin-left:-7px;width: 120px;color: white;font-weight:700;border: none;border-top-right-radius:5px;border-bottom-right-radius:5px;letter-spacing: 1px;cursor:pointer;}
|
72 |
input[type="text"] {width: calc(100% - 2px);border-radius:5px;}
|
73 |
+
.social-list a{display: block;height: 3em;width: 3em;line-height: 3em;background: transparent;-webkit-transition: background 300ms linear;transition: background 300ms linear;border-radius: 5px;}
|
74 |
+
.social-list i{font-size: 2em;-webkit-transition: all 300ms linear;transition: all 300ms linear;vertical-align: middle;}
|
75 |
+
.social-list a:hover i {-webkit-animation: spin 300ms linear;animation: spin 300ms linear;color:#fff;}
|
76 |
/* contact form 7 */
|
77 |
.wpcf7 .screen-reader-response, .wpcf7 .wpcf7-validation-errors {display: none;}
|
78 |
.wpcf7 .wpcf7-form-control-wrap {position: relative;}
|
91 |
}
|
92 |
::-webkit-scrollbar-track {
|
93 |
background:rgba(170,170,170,0.8);
|
|
|
|
|
|
|
94 |
}
|
95 |
@-webkit-keyframes spin {
|
96 |
from { -webkit-transform: rotate(0deg); }
|
97 |
to { -webkit-transform: rotate(360deg); }
|
98 |
}
|
99 |
@keyframes spin {
|
100 |
+
from {-webkit-transform:rotate(0deg);transform:rotate(0deg);}
|
101 |
+
to {-webkit-transform:rotate(360deg);transform:rotate(360deg);}
|
102 |
}
|
103 |
|
104 |
+
.video-banner iframe,
|
105 |
+
.video-banner video {
|
106 |
+
-webkit-transition: opacity 1500ms;
|
107 |
transition: opacity 1500ms;
|
108 |
}
|
109 |
|
themes/countdown.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Countdown
|
3 |
+
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=countdown
|
4 |
+
Author: Niteo
|
5 |
+
Author URI: https//niteothemes.com
|
6 |
+
Version: 1.5
|
7 |
+
Description: <p>Countdown theme attracts attention with big counting clocks, which you can set to any expiration date. When timer hits zero you can set following actions: do-nothing, redirect to set URL or disable CMP plugin and display your normal page to visitors.</p><p>Social icons can be set to a footer with transparent icons or inside Countdown body with big beautiful eye attacting icons.</p><h4>Main Features</h4><ul><li>Counter setup with three predefined actions</li><li>Two designs for Socials icons</li><li>Subscribe Form</li><li>Responsive design</li></ul>
|
themes/countdown/countdown-theme.php
CHANGED
@@ -15,7 +15,6 @@
|
|
15 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!')) ); ?></title>
|
16 |
|
17 |
<?php
|
18 |
-
$ver = '1.4';
|
19 |
$themeslug = 'countdown';
|
20 |
$size = $this->isMobile() ? 'large' : 'full';
|
21 |
// get theme related settings
|
@@ -68,11 +67,21 @@
|
|
68 |
|
69 |
// get background media
|
70 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
71 |
-
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug);
|
72 |
$background_class = $background_media[0];
|
73 |
$banner_url = $background_media[1];
|
74 |
if ( $background_class == 'video' ) {
|
75 |
-
$source
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
} else {
|
78 |
$background_class = 'error';
|
@@ -104,7 +113,7 @@
|
|
104 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
105 |
<?php
|
106 |
} ?>
|
107 |
-
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$
|
108 |
|
109 |
<link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
|
110 |
|
@@ -239,7 +248,7 @@
|
|
239 |
}
|
240 |
break;
|
241 |
case 'text':
|
242 |
-
$text_logo = get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' ))
|
243 |
<h1><?php echo esc_html($text_logo); ?></h1>
|
244 |
<?php
|
245 |
case 'disabled':
|
@@ -396,30 +405,54 @@
|
|
396 |
echo '</footer>';
|
397 |
} ?>
|
398 |
</div>
|
|
|
399 |
<?php
|
400 |
-
if
|
401 |
-
|
402 |
-
if ( $niteoCS_video_thumb != '' ) {
|
403 |
-
$thumb_id = wp_get_attachment_image_src($niteoCS_video_thumb, 'large');
|
404 |
-
|
405 |
-
if ( isset($thumb_id[0]) ) {
|
406 |
-
$thumb = $thumb_id[0];
|
407 |
-
}
|
408 |
-
} ?>
|
409 |
|
410 |
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
411 |
|
412 |
<script>
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
|
420 |
</script>
|
421 |
-
<?php
|
422 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
|
424 |
if ( $niteoCS_counter == '1') { ?>
|
425 |
<script>
|
@@ -477,6 +510,9 @@
|
|
477 |
}, 1000);
|
478 |
</script>
|
479 |
<?php
|
480 |
-
}
|
|
|
|
|
|
|
481 |
</body>
|
482 |
</html>
|
15 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!')) ); ?></title>
|
16 |
|
17 |
<?php
|
|
|
18 |
$themeslug = 'countdown';
|
19 |
$size = $this->isMobile() ? 'large' : 'full';
|
20 |
// get theme related settings
|
67 |
|
68 |
// get background media
|
69 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
70 |
+
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug );
|
71 |
$background_class = $background_media[0];
|
72 |
$banner_url = $background_media[1];
|
73 |
if ( $background_class == 'video' ) {
|
74 |
+
$source = $background_media[2];
|
75 |
+
$video_type = get_option('niteoCS_banner_video['.$themeslug.']');
|
76 |
+
$video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
|
77 |
+
|
78 |
+
if ( !empty( $video_poster ) ) {
|
79 |
+
$video_poster = $video_poster[0];
|
80 |
+
}
|
81 |
+
|
82 |
+
if ( $video_type == 'video/mp4') {
|
83 |
+
$banner_url = wp_get_attachment_url( $banner_url );
|
84 |
+
}
|
85 |
}
|
86 |
} else {
|
87 |
$background_class = 'error';
|
113 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
114 |
<?php
|
115 |
} ?>
|
116 |
+
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
|
117 |
|
118 |
<link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
|
119 |
|
248 |
}
|
249 |
break;
|
250 |
case 'text':
|
251 |
+
$text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));?>
|
252 |
<h1><?php echo esc_html($text_logo); ?></h1>
|
253 |
<?php
|
254 |
case 'disabled':
|
405 |
echo '</footer>';
|
406 |
} ?>
|
407 |
</div>
|
408 |
+
|
409 |
<?php
|
410 |
+
// if video ini vidim background player
|
411 |
+
if ( $niteoCS_banner == 5 ){ ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
414 |
|
415 |
<script>
|
416 |
+
|
417 |
+
<?php
|
418 |
+
if ( $video_type == 'YouTube' ) { ?>
|
419 |
+
|
420 |
+
var myBackground = new vidim( '#player', {
|
421 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
422 |
+
type: 'YouTube',
|
423 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
424 |
+
}
|
425 |
+
);
|
426 |
+
<?php
|
427 |
+
}
|
428 |
+
|
429 |
+
if ( $video_type == 'video/mp4' ) { ?>
|
430 |
+
var myBackground = new vidim( '#player', {
|
431 |
+
src: [
|
432 |
+
{
|
433 |
+
type: 'video/mp4',
|
434 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
435 |
+
},
|
436 |
+
],
|
437 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
438 |
+
});
|
439 |
+
<?php
|
440 |
+
} ?>
|
441 |
+
|
442 |
|
443 |
</script>
|
444 |
+
<?php
|
445 |
+
// add loaded class to background media
|
446 |
+
} else { ?>
|
447 |
+
<script>
|
448 |
+
window.onload = function() {
|
449 |
+
var image = document.getElementById('background-image');
|
450 |
+
image.className += " loaded";
|
451 |
+
}
|
452 |
+
</script>
|
453 |
+
<?php
|
454 |
+
|
455 |
+
}
|
456 |
|
457 |
if ( $niteoCS_counter == '1') { ?>
|
458 |
<script>
|
510 |
}, 1000);
|
511 |
</script>
|
512 |
<?php
|
513 |
+
}
|
514 |
+
|
515 |
+
$this->niteo_redirect();
|
516 |
+
?>
|
517 |
</body>
|
518 |
</html>
|
themes/countdown/style.css
CHANGED
@@ -3,7 +3,7 @@ Theme Name: Countdown
|
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=countdown
|
4 |
Author: Niteo
|
5 |
Author URI: https//niteothemes.com
|
6 |
-
Version: 1.
|
7 |
Details URI: {"1": "https:\/\/niteothemes.com\/cmp-screenshots\/countdown\/screenshot1.jpg","2":"https:\/\/niteothemes.com\/cmp-screenshots\/countdown\/screenshot2.jpg"}
|
8 |
Description: <p>Countdown theme attracts attention with big counting clocks, which you can set to any expiration date. When timer hits zero you can set following actions: do-nothing, redirect to set URL or disable CMP plugin and display your normal page to visitors.</p><p>Social icons can be set to a footer with transparent icons or inside Countdown body with big beautiful eye attacting icons.</p><h4>Main Features</h4><ul><li>Counter setup with three predefined actions</li><li>Two designs for Socials icons</li><li>Subscribe Form</li><li>Responsive design</li></ul>
|
9 |
|
@@ -68,7 +68,6 @@ a {
|
|
68 |
background-color: transparent;
|
69 |
text-decoration: none;
|
70 |
-webkit-transition: color .3s ease-in-out;
|
71 |
-
-o-transition: color .3s ease-in-out;
|
72 |
transition: color .3s ease-in-out;
|
73 |
|
74 |
}
|
@@ -126,7 +125,8 @@ figure {
|
|
126 |
}
|
127 |
|
128 |
hr {
|
129 |
-
box-sizing: content-box;
|
|
|
130 |
height: 0;
|
131 |
}
|
132 |
|
@@ -201,7 +201,8 @@ input {
|
|
201 |
|
202 |
input[type="checkbox"],
|
203 |
input[type="radio"] {
|
204 |
-
box-sizing: border-box;
|
|
|
205 |
padding: 0;
|
206 |
}
|
207 |
|
@@ -212,7 +213,8 @@ input[type="number"]::-webkit-outer-spin-button {
|
|
212 |
|
213 |
input[type="search"] {
|
214 |
-webkit-appearance: textfield;
|
215 |
-
box-sizing: content-box;
|
|
|
216 |
}
|
217 |
|
218 |
input[type="search"]::-webkit-search-cancel-button,
|
@@ -273,19 +275,39 @@ h3,h4,h5,h6 {
|
|
273 |
|
274 |
#background-wrapper {
|
275 |
position: relative;
|
276 |
-
display: -webkit-flex;
|
277 |
display: -moz-flex;
|
278 |
display: -ms-flexbox;
|
279 |
display: -o-flex;
|
|
|
280 |
display: flex;
|
281 |
min-height: 100vh;
|
282 |
padding: 0 1em;
|
283 |
-
-webkit-flex-direction: column;
|
284 |
-moz-flex-direction: column;
|
285 |
-
|
|
|
|
|
|
|
286 |
text-align: center;
|
287 |
}
|
288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
#background-image,
|
291 |
.video-banner {
|
@@ -300,9 +322,6 @@ h3,h4,h5,h6 {
|
|
300 |
z-index: -1;
|
301 |
}
|
302 |
|
303 |
-
.video-banner iframe {
|
304 |
-
transition: opacity 1500ms;
|
305 |
-
}
|
306 |
|
307 |
.background-overlay {
|
308 |
position: absolute;
|
@@ -322,25 +341,32 @@ h3,h4,h5,h6 {
|
|
322 |
|
323 |
.inner-content,
|
324 |
footer {
|
325 |
-
display: -webkit-flex;
|
326 |
display: -moz-flex;
|
327 |
display: -ms-flexbox;
|
328 |
display: -o-flex;
|
|
|
329 |
display: flex;
|
330 |
max-width: 768px;
|
331 |
width: 768px;
|
332 |
margin: 0 auto;
|
333 |
padding: 0;
|
334 |
-
-webkit-flex-direction: column;
|
335 |
-moz-flex-direction: column;
|
336 |
-
|
337 |
-
|
338 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
-webkit-flex-grow: 1;
|
340 |
-webkit-flex-shrink: 0;
|
341 |
-moz-flex-grow: 1;
|
342 |
-moz-flex-shrink: 0;
|
343 |
-
|
|
|
|
|
344 |
-moz-justify-content: center;
|
345 |
-webkit-justify-content: center;
|
346 |
text-align: center;
|
@@ -350,10 +376,19 @@ footer {
|
|
350 |
|
351 |
|
352 |
footer {
|
353 |
-
|
|
|
|
|
|
|
|
|
354 |
display: flex;
|
355 |
-
|
356 |
-
|
|
|
|
|
|
|
|
|
|
|
357 |
-webkit-flex-grow: 0;
|
358 |
}
|
359 |
|
@@ -362,8 +397,8 @@ footer {
|
|
362 |
}
|
363 |
|
364 |
.logo img {
|
365 |
-
max-width:
|
366 |
-
max-height:
|
367 |
}
|
368 |
|
369 |
.body p {
|
@@ -391,13 +426,11 @@ footer {
|
|
391 |
line-height: 2em;
|
392 |
background: transparent;
|
393 |
-webkit-transition: background 300ms linear;
|
394 |
-
-o-transition: background 300ms linear;
|
395 |
transition: background 300ms linear;
|
396 |
}
|
397 |
.social-list i{
|
398 |
font-size: 1em;
|
399 |
-webkit-transition: all 300ms linear;
|
400 |
-
-o-transition: all 300ms linear;
|
401 |
transition: all 300ms linear;
|
402 |
}
|
403 |
|
@@ -449,7 +482,8 @@ input {
|
|
449 |
display: inline-block;
|
450 |
line-height: 3em;
|
451 |
height: 3em;
|
452 |
-
box-sizing: border-box;
|
|
|
453 |
vertical-align: middle;
|
454 |
margin-bottom: 10px;
|
455 |
}
|
@@ -544,8 +578,6 @@ input[type="submit"] {
|
|
544 |
right: 0;
|
545 |
left: 0;
|
546 |
-webkit-transform: translateY(-50%);
|
547 |
-
-ms-transform: translateY(-50%);
|
548 |
-
-o-transform: translateY(-50%);
|
549 |
transform: translateY(-50%);
|
550 |
}
|
551 |
|
@@ -572,8 +604,8 @@ input[type="submit"] {
|
|
572 |
to { -webkit-transform: rotate(360deg); }
|
573 |
}
|
574 |
@keyframes spin {
|
575 |
-
from {transform:rotate(0deg);}
|
576 |
-
to {transform:rotate(360deg);}
|
577 |
}
|
578 |
|
579 |
@media only screen and (max-width : 1024px) {
|
@@ -588,6 +620,7 @@ input[type="submit"] {
|
|
588 |
}
|
589 |
|
590 |
@media only screen and (max-width : 768px) {
|
|
|
591 |
.inner-content, footer {width:auto;}
|
592 |
}
|
593 |
|
@@ -605,5 +638,4 @@ input[type="submit"] {
|
|
605 |
input[type="email"], input[type="submit"] {display:block;width:100%;}
|
606 |
input[type="submit"] {margin:0;}
|
607 |
input[type="email"]{margin-bottom: 5px;}
|
608 |
-
.logo img {max-width: 250px;}
|
609 |
}
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=countdown
|
4 |
Author: Niteo
|
5 |
Author URI: https//niteothemes.com
|
6 |
+
Version: 1.5
|
7 |
Details URI: {"1": "https:\/\/niteothemes.com\/cmp-screenshots\/countdown\/screenshot1.jpg","2":"https:\/\/niteothemes.com\/cmp-screenshots\/countdown\/screenshot2.jpg"}
|
8 |
Description: <p>Countdown theme attracts attention with big counting clocks, which you can set to any expiration date. When timer hits zero you can set following actions: do-nothing, redirect to set URL or disable CMP plugin and display your normal page to visitors.</p><p>Social icons can be set to a footer with transparent icons or inside Countdown body with big beautiful eye attacting icons.</p><h4>Main Features</h4><ul><li>Counter setup with three predefined actions</li><li>Two designs for Socials icons</li><li>Subscribe Form</li><li>Responsive design</li></ul>
|
9 |
|
68 |
background-color: transparent;
|
69 |
text-decoration: none;
|
70 |
-webkit-transition: color .3s ease-in-out;
|
|
|
71 |
transition: color .3s ease-in-out;
|
72 |
|
73 |
}
|
125 |
}
|
126 |
|
127 |
hr {
|
128 |
+
-webkit-box-sizing: content-box;
|
129 |
+
box-sizing: content-box;
|
130 |
height: 0;
|
131 |
}
|
132 |
|
201 |
|
202 |
input[type="checkbox"],
|
203 |
input[type="radio"] {
|
204 |
+
-webkit-box-sizing: border-box;
|
205 |
+
box-sizing: border-box;
|
206 |
padding: 0;
|
207 |
}
|
208 |
|
213 |
|
214 |
input[type="search"] {
|
215 |
-webkit-appearance: textfield;
|
216 |
+
-webkit-box-sizing: content-box;
|
217 |
+
box-sizing: content-box;
|
218 |
}
|
219 |
|
220 |
input[type="search"]::-webkit-search-cancel-button,
|
275 |
|
276 |
#background-wrapper {
|
277 |
position: relative;
|
|
|
278 |
display: -moz-flex;
|
279 |
display: -ms-flexbox;
|
280 |
display: -o-flex;
|
281 |
+
display: -webkit-box;
|
282 |
display: flex;
|
283 |
min-height: 100vh;
|
284 |
padding: 0 1em;
|
|
|
285 |
-moz-flex-direction: column;
|
286 |
+
-webkit-box-orient: vertical;
|
287 |
+
-webkit-box-direction: normal;
|
288 |
+
-ms-flex-direction: column;
|
289 |
+
flex-direction: column;
|
290 |
text-align: center;
|
291 |
}
|
292 |
|
293 |
+
#background-image {
|
294 |
+
opacity: 0;
|
295 |
+
-webkit-transition: opacity .5s;
|
296 |
+
transition: opacity .5s;
|
297 |
+
}
|
298 |
+
|
299 |
+
#background-image.loaded {
|
300 |
+
opacity: 1;
|
301 |
+
|
302 |
+
}
|
303 |
+
|
304 |
+
.video-banner iframe,
|
305 |
+
.video-banner video {
|
306 |
+
-webkit-transition: opacity 1500ms;
|
307 |
+
transition: opacity 1500ms;
|
308 |
+
}
|
309 |
+
|
310 |
+
|
311 |
|
312 |
#background-image,
|
313 |
.video-banner {
|
322 |
z-index: -1;
|
323 |
}
|
324 |
|
|
|
|
|
|
|
325 |
|
326 |
.background-overlay {
|
327 |
position: absolute;
|
341 |
|
342 |
.inner-content,
|
343 |
footer {
|
|
|
344 |
display: -moz-flex;
|
345 |
display: -ms-flexbox;
|
346 |
display: -o-flex;
|
347 |
+
display: -webkit-box;
|
348 |
display: flex;
|
349 |
max-width: 768px;
|
350 |
width: 768px;
|
351 |
margin: 0 auto;
|
352 |
padding: 0;
|
|
|
353 |
-moz-flex-direction: column;
|
354 |
+
-webkit-box-orient: vertical;
|
355 |
+
-webkit-box-direction: normal;
|
356 |
+
-ms-flex-direction: column;
|
357 |
+
flex-direction: column;
|
358 |
+
-webkit-box-flex: 1;
|
359 |
+
-ms-flex-positive: 1;
|
360 |
+
flex-grow: 1;
|
361 |
+
-ms-flex-negative: 0;
|
362 |
+
flex-shrink: 0;
|
363 |
-webkit-flex-grow: 1;
|
364 |
-webkit-flex-shrink: 0;
|
365 |
-moz-flex-grow: 1;
|
366 |
-moz-flex-shrink: 0;
|
367 |
+
-webkit-box-pack: center;
|
368 |
+
-ms-flex-pack: center;
|
369 |
+
justify-content: center;
|
370 |
-moz-justify-content: center;
|
371 |
-webkit-justify-content: center;
|
372 |
text-align: center;
|
376 |
|
377 |
|
378 |
footer {
|
379 |
+
-webkit-box-pack: end;
|
380 |
+
-ms-flex-pack: end;
|
381 |
+
justify-content: flex-end;
|
382 |
+
display: -webkit-box;
|
383 |
+
display: -ms-flexbox;
|
384 |
display: flex;
|
385 |
+
-webkit-box-orient: vertical;
|
386 |
+
-webkit-box-direction: normal;
|
387 |
+
-ms-flex-direction: column;
|
388 |
+
flex-direction: column;
|
389 |
+
-webkit-box-flex: 0;
|
390 |
+
-ms-flex-positive: 0;
|
391 |
+
flex-grow: 0;
|
392 |
-webkit-flex-grow: 0;
|
393 |
}
|
394 |
|
397 |
}
|
398 |
|
399 |
.logo img {
|
400 |
+
max-width: 700px;
|
401 |
+
max-height: 500px;
|
402 |
}
|
403 |
|
404 |
.body p {
|
426 |
line-height: 2em;
|
427 |
background: transparent;
|
428 |
-webkit-transition: background 300ms linear;
|
|
|
429 |
transition: background 300ms linear;
|
430 |
}
|
431 |
.social-list i{
|
432 |
font-size: 1em;
|
433 |
-webkit-transition: all 300ms linear;
|
|
|
434 |
transition: all 300ms linear;
|
435 |
}
|
436 |
|
482 |
display: inline-block;
|
483 |
line-height: 3em;
|
484 |
height: 3em;
|
485 |
+
-webkit-box-sizing: border-box;
|
486 |
+
box-sizing: border-box;
|
487 |
vertical-align: middle;
|
488 |
margin-bottom: 10px;
|
489 |
}
|
578 |
right: 0;
|
579 |
left: 0;
|
580 |
-webkit-transform: translateY(-50%);
|
|
|
|
|
581 |
transform: translateY(-50%);
|
582 |
}
|
583 |
|
604 |
to { -webkit-transform: rotate(360deg); }
|
605 |
}
|
606 |
@keyframes spin {
|
607 |
+
from {-webkit-transform:rotate(0deg);transform:rotate(0deg);}
|
608 |
+
to {-webkit-transform:rotate(360deg);transform:rotate(360deg);}
|
609 |
}
|
610 |
|
611 |
@media only screen and (max-width : 1024px) {
|
620 |
}
|
621 |
|
622 |
@media only screen and (max-width : 768px) {
|
623 |
+
.logo img {max-width: 100%; }
|
624 |
.inner-content, footer {width:auto;}
|
625 |
}
|
626 |
|
638 |
input[type="email"], input[type="submit"] {display:block;width:100%;}
|
639 |
input[type="submit"] {margin:0;}
|
640 |
input[type="email"]{margin-bottom: 5px;}
|
|
|
641 |
}
|
themes/fifty.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Fifty
|
3 |
+
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=fifty
|
4 |
+
Author: Niteo
|
5 |
+
Author URI: https://niteothemes.com
|
6 |
+
Version: 1.9
|
7 |
+
Description: <p>Fifty is Premium theme for CMP Plugin. As name suggests it divides page into two equal halfs. On the left half you can set custom logo, any text content, subscribe form and Social icons with two predefined desings: bigger colorful icons in body or smaller icons in Fifty`s footer.</p><p>Second half is predefined for your media. It can be a single image, random images per each website load or image slider.</p><h4>Main Features</h4><ul><li>Modern 50:50 design</li><li>Image slider</li><li>Two different social icons designs</li><li>Subscribe form</li><li>Responsive design</li></ul>
|
themes/fifty_thumbnail.jpg
DELETED
Binary file
|
themes/frame.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Frame
|
3 |
+
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=frame
|
4 |
+
Author: Niteo
|
5 |
+
Author URI: https://niteothemes.com
|
6 |
+
Version: 1.8
|
7 |
+
Description: <p>Frame is Premium theme for CMP plugin. Frame can be configured with outside and inside frame on your landing page where you can set beautiful digital counter with three predefined actions when timer hits zero: do-nothing, redirect to custom URL or disable CMP plugin and display your normal page to visitors.</p><p>Frame is usually used as Coming soon page but can serve as Maintenance landing page too. You can set custom image background, use any from predefined patterns or just plain color to keep things simple.</p><h4>Main Features</h4><ul><li>Framed design</li><li>Digital Counter</li><li>Subscribe form</li><li>Responsive design</li></ul>
|
themes/frame_thumbnail.jpg
DELETED
Binary file
|
themes/hardwork.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Hardwork
|
3 |
+
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork
|
4 |
+
Author: Niteo
|
5 |
+
Author URI: https://niteothemes.com
|
6 |
+
Version: 1.9.1
|
7 |
+
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>Main Features</h4><ul><li>Fullscreen image with overlay color</li><li>Responsive design</li></ul>
|
themes/hardwork/hardwork-defaults.php
CHANGED
@@ -5,9 +5,9 @@ $theme_supports = array(
|
|
5 |
'logo' => true,
|
6 |
'slider' => false,
|
7 |
'counter' => false,
|
8 |
-
'subscribe' =>
|
9 |
'social' => true,
|
10 |
-
'footer' =>
|
11 |
);
|
12 |
|
13 |
|
5 |
'logo' => true,
|
6 |
'slider' => false,
|
7 |
'counter' => false,
|
8 |
+
'subscribe' => false,
|
9 |
'social' => true,
|
10 |
+
'footer' => false,
|
11 |
);
|
12 |
|
13 |
|
themes/hardwork/hardwork-settings.php
CHANGED
@@ -32,9 +32,7 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']',
|
|
32 |
?>
|
33 |
|
34 |
<style>
|
35 |
-
#social-section tr:first-of-type
|
36 |
-
#subscribe-section,
|
37 |
-
#copyright-section {display: none!important;}
|
38 |
</style>
|
39 |
|
40 |
<div class="table-wrapper theme-setup">
|
32 |
?>
|
33 |
|
34 |
<style>
|
35 |
+
#social-section tr:first-of-type {display: none!important;}
|
|
|
|
|
36 |
</style>
|
37 |
|
38 |
<div class="table-wrapper theme-setup">
|
themes/hardwork/hardwork-theme.php
CHANGED
@@ -10,7 +10,6 @@
|
|
10 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
|
11 |
|
12 |
<?php
|
13 |
-
$ver = '1.9';
|
14 |
$themeslug = 'hardwork';
|
15 |
$size = $this->isMobile() ? 'large' : 'full';
|
16 |
// get theme related settings
|
@@ -87,11 +86,21 @@
|
|
87 |
|
88 |
// get background media
|
89 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
90 |
-
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug);
|
91 |
$background_class = $background_media[0];
|
92 |
$banner_url = $background_media[1];
|
93 |
if ( $background_class == 'video' ) {
|
94 |
-
$source
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
} else {
|
97 |
$background_class = 'error';
|
@@ -117,7 +126,7 @@
|
|
117 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
118 |
<?php
|
119 |
} ?>
|
120 |
-
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$
|
121 |
|
122 |
<link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
|
123 |
|
@@ -223,7 +232,7 @@
|
|
223 |
}
|
224 |
break;
|
225 |
case 'text':
|
226 |
-
$text_logo = get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )); ?>
|
227 |
<h1><?php echo esc_html($text_logo); ?></h1>
|
228 |
<?php
|
229 |
case 'disabled':
|
@@ -239,58 +248,75 @@
|
|
239 |
<?php
|
240 |
}
|
241 |
// display body
|
242 |
-
echo apply_filters('the_content', stripslashes($body))
|
243 |
-
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
uasort( $socialmedia , array($this,'sort_social') ); ?>
|
250 |
-
|
251 |
-
<section class="section section-social">
|
252 |
-
|
253 |
-
<ul class="social-list">
|
254 |
-
<?php
|
255 |
-
foreach ( $socialmedia as $social ) {
|
256 |
-
if ($social['active'] == '1' && $social['hidden'] == '0') {
|
257 |
-
if ( $social['name'] == 'envelope-o' ) {
|
258 |
-
echo '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
259 |
-
|
260 |
-
} else {
|
261 |
-
echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
262 |
}
|
263 |
-
}
|
264 |
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
<?php
|
269 |
-
}
|
270 |
-
if ( $niteoCS_banner == 5 ) {
|
271 |
-
$niteoCS_video_thumb = get_option('niteoCS_video_thumb['.$themeslug.']');
|
272 |
-
if ( $niteoCS_video_thumb != '' ) {
|
273 |
-
$thumb_id = wp_get_attachment_image_src($niteoCS_video_thumb, 'large');
|
274 |
-
|
275 |
-
if ( isset($thumb_id[0]) ) {
|
276 |
-
$thumb = $thumb_id[0];
|
277 |
-
}
|
278 |
} ?>
|
|
|
279 |
|
280 |
-
|
|
|
|
|
281 |
|
|
|
282 |
<script>
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
</script>
|
291 |
-
<?php
|
292 |
-
|
293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
</body>
|
295 |
|
296 |
</html>
|
10 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
|
11 |
|
12 |
<?php
|
|
|
13 |
$themeslug = 'hardwork';
|
14 |
$size = $this->isMobile() ? 'large' : 'full';
|
15 |
// get theme related settings
|
86 |
|
87 |
// get background media
|
88 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
89 |
+
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug );
|
90 |
$background_class = $background_media[0];
|
91 |
$banner_url = $background_media[1];
|
92 |
if ( $background_class == 'video' ) {
|
93 |
+
$source = $background_media[2];
|
94 |
+
$video_type = get_option('niteoCS_banner_video['.$themeslug.']');
|
95 |
+
$video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
|
96 |
+
|
97 |
+
if ( !empty( $video_poster ) ) {
|
98 |
+
$video_poster = $video_poster[0];
|
99 |
+
}
|
100 |
+
|
101 |
+
if ( $video_type == 'video/mp4') {
|
102 |
+
$banner_url = wp_get_attachment_url( $banner_url );
|
103 |
+
}
|
104 |
}
|
105 |
} else {
|
106 |
$background_class = 'error';
|
126 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
127 |
<?php
|
128 |
} ?>
|
129 |
+
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version ;?>" type="text/css" media="all">
|
130 |
|
131 |
<link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
|
132 |
|
232 |
}
|
233 |
break;
|
234 |
case 'text':
|
235 |
+
$text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' ))); ?>
|
236 |
<h1><?php echo esc_html($text_logo); ?></h1>
|
237 |
<?php
|
238 |
case 'disabled':
|
248 |
<?php
|
249 |
}
|
250 |
// display body
|
251 |
+
echo apply_filters('the_content', stripslashes($body));
|
252 |
+
|
253 |
+
// display footer social
|
254 |
+
if ( $enable_social === true ) {
|
255 |
+
//sort array by hidden, then order key
|
256 |
+
uasort( $socialmedia , array($this,'sort_social') ); ?>
|
257 |
+
|
258 |
+
<ul class="social-list">
|
259 |
+
<?php
|
260 |
+
foreach ( $socialmedia as $social ) {
|
261 |
+
if ($social['active'] == '1' && $social['hidden'] == '0') {
|
262 |
+
if ( $social['name'] == 'envelope-o' ) {
|
263 |
+
echo '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
264 |
|
265 |
+
} else {
|
266 |
+
echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
267 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
|
|
269 |
|
270 |
+
} //end foreach ?>
|
271 |
+
</ul>
|
272 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
} ?>
|
274 |
+
</section>
|
275 |
|
276 |
+
<?php
|
277 |
+
// if video ini vidim background player
|
278 |
+
if ( $niteoCS_banner == 5 ){ ?>
|
279 |
|
280 |
+
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
281 |
<script>
|
282 |
+
<?php
|
283 |
+
if ( $video_type == 'YouTube' ) { ?>
|
284 |
+
|
285 |
+
var myBackground = new vidim( '#player', {
|
286 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
287 |
+
type: 'YouTube',
|
288 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
289 |
+
}
|
290 |
+
);
|
291 |
+
<?php
|
292 |
+
}
|
293 |
+
|
294 |
+
if ( $video_type == 'video/mp4' ) { ?>
|
295 |
+
var myBackground = new vidim( '#player', {
|
296 |
+
src: [
|
297 |
+
{
|
298 |
+
type: 'video/mp4',
|
299 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
300 |
+
},
|
301 |
+
],
|
302 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
303 |
+
});
|
304 |
+
<?php
|
305 |
+
} ?>
|
306 |
</script>
|
307 |
+
<?php
|
308 |
+
// add loaded class to background media
|
309 |
+
} else { ?>
|
310 |
+
<script>
|
311 |
+
window.onload = function() {
|
312 |
+
var image = document.getElementById('background-image');
|
313 |
+
image.className += "loaded";
|
314 |
+
}
|
315 |
+
</script>
|
316 |
+
<?php
|
317 |
+
}
|
318 |
+
$this->niteo_redirect();
|
319 |
+
?>
|
320 |
</body>
|
321 |
|
322 |
</html>
|
themes/hardwork/style.css
CHANGED
@@ -3,7 +3,7 @@ Theme Name: Hardwork
|
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork
|
4 |
Author: Niteo
|
5 |
Author URI: https://niteothemes.com
|
6 |
-
Version: 1.9
|
7 |
Details URI: {"1": "https:\/\/niteothemes.com\/cmp-screenshots\/hardwork\/screenshot1.jpg","2": "https:\/\/niteothemes.com\/cmp-screenshots\/hardwork\/screenshot2.jpg","3": "http:\/\/niteo.cz\/cmp-screenshots\/hardwork\/screenshot3.jpg"}
|
8 |
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>Main Features</h4><ul><li>Fullscreen image with overlay color</li><li>Responsive design</li></ul>
|
9 |
|
@@ -12,8 +12,13 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
|
12 |
*/
|
13 |
|
14 |
body{
|
|
|
|
|
15 |
display: flex;
|
16 |
-
|
|
|
|
|
|
|
17 |
margin:0;
|
18 |
min-height: 100vh;
|
19 |
position: relative;
|
@@ -25,36 +30,35 @@ h1,h2,h3,h4,h5,h6{
|
|
25 |
margin-bottom: .3em;
|
26 |
}
|
27 |
.section {
|
28 |
-
flex
|
|
|
|
|
29 |
padding: 0 2em;
|
30 |
text-align: center;
|
31 |
position: relative;
|
32 |
}
|
33 |
|
34 |
.section-body {
|
35 |
-
display: -webkit-
|
36 |
-
display: -
|
37 |
-
display: -ms-flex;
|
38 |
-
display: -o-flex;
|
39 |
display: flex;
|
40 |
-
|
41 |
-
-
|
42 |
-
|
43 |
-
|
44 |
-
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
-
|
49 |
-
|
50 |
-
|
51 |
-
.section-social {
|
52 |
-
flex-grow: 0;
|
53 |
}
|
54 |
|
55 |
|
56 |
.logo-wrapper {
|
57 |
-
|
|
|
58 |
margin: 0 auto;
|
59 |
}
|
60 |
|
@@ -109,16 +113,32 @@ h1,h2,h3,h4,h5,h6{
|
|
109 |
z-index: -1;
|
110 |
}
|
111 |
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
transition: opacity 1500ms;
|
114 |
}
|
115 |
|
|
|
116 |
.social-list {
|
117 |
display: inline-block;
|
118 |
padding:0;
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
122 |
}
|
123 |
|
124 |
.social-list li{
|
@@ -134,19 +154,16 @@ h1,h2,h3,h4,h5,h6{
|
|
134 |
line-height: 3em;
|
135 |
background: transparent;
|
136 |
-webkit-transition: background 300ms linear;
|
137 |
-
-o-transition: background 300ms linear;
|
138 |
transition: background 300ms linear;
|
139 |
border-radius: 5px;
|
140 |
}
|
141 |
.social-list i{
|
142 |
font-size: 1em;
|
143 |
-webkit-transition: all 300ms linear;
|
144 |
-
-o-transition: all 300ms linear;
|
145 |
transition: all 300ms linear;
|
146 |
}
|
147 |
.social-list a:hover i {
|
148 |
-webkit-animation: spin 300ms linear;
|
149 |
-
-moz-animation: spin 300ms linear;
|
150 |
animation: spin 300ms linear;
|
151 |
}
|
152 |
|
@@ -157,8 +174,8 @@ h1,h2,h3,h4,h5,h6{
|
|
157 |
to { -webkit-transform: rotate(360deg); }
|
158 |
}
|
159 |
@keyframes spin {
|
160 |
-
from {transform:rotate(0deg);}
|
161 |
-
to {transform:rotate(360deg);}
|
162 |
}
|
163 |
|
164 |
@media only screen and (max-width : 1024px) {
|
@@ -166,7 +183,7 @@ h1,h2,h3,h4,h5,h6{
|
|
166 |
}
|
167 |
|
168 |
@media only screen and (max-width : 560px) {
|
169 |
-
.section {padding:
|
170 |
.section-logo { padding-top: 20px;}
|
171 |
h2 {font-size: 2.5em;}
|
172 |
.section-body p {font-size: 1em;}
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork
|
4 |
Author: Niteo
|
5 |
Author URI: https://niteothemes.com
|
6 |
+
Version: 1.9.1
|
7 |
Details URI: {"1": "https:\/\/niteothemes.com\/cmp-screenshots\/hardwork\/screenshot1.jpg","2": "https:\/\/niteothemes.com\/cmp-screenshots\/hardwork\/screenshot2.jpg","3": "http:\/\/niteo.cz\/cmp-screenshots\/hardwork\/screenshot3.jpg"}
|
8 |
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>Main Features</h4><ul><li>Fullscreen image with overlay color</li><li>Responsive design</li></ul>
|
9 |
|
12 |
*/
|
13 |
|
14 |
body{
|
15 |
+
display: -webkit-box;
|
16 |
+
display: -ms-flexbox;
|
17 |
display: flex;
|
18 |
+
-webkit-box-orient: vertical;
|
19 |
+
-webkit-box-direction: normal;
|
20 |
+
-ms-flex-direction: column;
|
21 |
+
flex-direction: column;
|
22 |
margin:0;
|
23 |
min-height: 100vh;
|
24 |
position: relative;
|
30 |
margin-bottom: .3em;
|
31 |
}
|
32 |
.section {
|
33 |
+
-webkit-box-flex: 1;
|
34 |
+
-ms-flex-positive: 1;
|
35 |
+
flex-grow: 1;
|
36 |
padding: 0 2em;
|
37 |
text-align: center;
|
38 |
position: relative;
|
39 |
}
|
40 |
|
41 |
.section-body {
|
42 |
+
display: -webkit-box;
|
43 |
+
display: -ms-flexbox;
|
|
|
|
|
44 |
display: flex;
|
45 |
+
min-height: 100vh;
|
46 |
+
-webkit-box-pack: center;
|
47 |
+
-ms-flex-pack: center;
|
48 |
+
justify-content: center;
|
49 |
+
-webkit-box-orient: vertical;
|
50 |
+
-webkit-box-direction: normal;
|
51 |
+
-ms-flex-direction: column;
|
52 |
+
flex-direction: column;
|
53 |
+
-webkit-box-flex: 10;
|
54 |
+
-ms-flex-positive: 10;
|
55 |
+
flex-grow: 10;
|
|
|
|
|
56 |
}
|
57 |
|
58 |
|
59 |
.logo-wrapper {
|
60 |
+
width: 500px;
|
61 |
+
max-width: 100%;
|
62 |
margin: 0 auto;
|
63 |
}
|
64 |
|
113 |
z-index: -1;
|
114 |
}
|
115 |
|
116 |
+
#background-image {
|
117 |
+
opacity: 0;
|
118 |
+
-webkit-transition: opacity .5s;
|
119 |
+
transition: opacity .5s;
|
120 |
+
}
|
121 |
+
|
122 |
+
#background-image.loaded {
|
123 |
+
opacity: 1;
|
124 |
+
|
125 |
+
}
|
126 |
+
|
127 |
+
.video-banner iframe,
|
128 |
+
.video-banner video {
|
129 |
+
-webkit-transition: opacity 1500ms;
|
130 |
transition: opacity 1500ms;
|
131 |
}
|
132 |
|
133 |
+
|
134 |
.social-list {
|
135 |
display: inline-block;
|
136 |
padding:0;
|
137 |
+
position: absolute;
|
138 |
+
bottom: 0;
|
139 |
+
left: 0;
|
140 |
+
right: 0;
|
141 |
+
margin: 0;
|
142 |
}
|
143 |
|
144 |
.social-list li{
|
154 |
line-height: 3em;
|
155 |
background: transparent;
|
156 |
-webkit-transition: background 300ms linear;
|
|
|
157 |
transition: background 300ms linear;
|
158 |
border-radius: 5px;
|
159 |
}
|
160 |
.social-list i{
|
161 |
font-size: 1em;
|
162 |
-webkit-transition: all 300ms linear;
|
|
|
163 |
transition: all 300ms linear;
|
164 |
}
|
165 |
.social-list a:hover i {
|
166 |
-webkit-animation: spin 300ms linear;
|
|
|
167 |
animation: spin 300ms linear;
|
168 |
}
|
169 |
|
174 |
to { -webkit-transform: rotate(360deg); }
|
175 |
}
|
176 |
@keyframes spin {
|
177 |
+
from {-webkit-transform:rotate(0deg);transform:rotate(0deg);}
|
178 |
+
to {-webkit-transform:rotate(360deg);transform:rotate(360deg);}
|
179 |
}
|
180 |
|
181 |
@media only screen and (max-width : 1024px) {
|
183 |
}
|
184 |
|
185 |
@media only screen and (max-width : 560px) {
|
186 |
+
.section {padding: 0 10px;}
|
187 |
.section-logo { padding-top: 20px;}
|
188 |
h2 {font-size: 2.5em;}
|
189 |
.section-body p {font-size: 1em;}
|
themes/hardwork_premium.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Hardwork Premium
|
3 |
+
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork_premium
|
4 |
+
Author: Niteo
|
5 |
+
Author URI: https://niteothemes.com/
|
6 |
+
Version: 2.3
|
7 |
+
Description: <p>Hardwork Premium is our first Premium theme for CMP Plugin. Premium version extends free Hardwork theme with fullscreen image Slider. It is a best choice for Photographers who want to display teaser photos while their website is cooking up or is under maintenance.</p><h4>Main Features</h4><ul><li>Fullscreen image Slider with overlay color</li><li>Responsive design</li></ul>
|
themes/hardwork_premium_thumbnail.jpg
DELETED
Binary file
|
themes/postery.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Theme Name: Postery
|
3 |
+
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=postery
|
4 |
+
Author: Niteo
|
5 |
+
Author URI: https//niteothemes.com
|
6 |
+
Version: 1.0
|
7 |
+
Description: <p>Postery is modern theme with trendy 3D animation and "poster-like" typography. You can set countdown timer, subscriber form, custom social icons or just insert custom text to keep things simple.</p><h4>Main Features</h4><ul><li>"Newspaper" typography and 3D animation.</li><li>Counter setup with three predefined actions.</li><li>Subscribe Form</li><li>Responsive design</li></ul>
|
themes/postery/img/postery_banner_full.jpg
CHANGED
Binary file
|
themes/postery/postery-defaults.php
CHANGED
@@ -11,13 +11,13 @@ $theme_supports = array(
|
|
11 |
);
|
12 |
|
13 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
14 |
-
$niteoCS_font_headings = get_option('niteoCS_font_headings['.$themeslug.']', '
|
15 |
-
$niteoCS_font_content = get_option('niteoCS_font_content['.$themeslug.']', '
|
16 |
|
17 |
// get options
|
18 |
$niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
|
19 |
$niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
|
20 |
$niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
|
21 |
-
$niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.
|
22 |
|
23 |
|
11 |
);
|
12 |
|
13 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
14 |
+
$niteoCS_font_headings = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
|
15 |
+
$niteoCS_font_content = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
|
16 |
|
17 |
// get options
|
18 |
$niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
|
19 |
$niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
|
20 |
$niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
|
21 |
+
$niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
|
22 |
|
23 |
|
themes/postery/postery-theme.php
CHANGED
@@ -15,7 +15,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
15 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!')) ); ?></title>
|
16 |
|
17 |
<?php
|
18 |
-
$ver = '1.0';
|
19 |
$themeslug = 'postery';
|
20 |
$size = $this->isMobile() ? 'large' : 'full';
|
21 |
// get theme related settings
|
@@ -73,11 +72,21 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
73 |
|
74 |
// get background media
|
75 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
76 |
-
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug);
|
77 |
$background_class = $background_media[0];
|
78 |
$banner_url = $background_media[1];
|
79 |
if ( $background_class == 'video' ) {
|
80 |
-
$source
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
} else {
|
83 |
$background_class = 'error';
|
@@ -103,7 +112,7 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
103 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
104 |
<?php
|
105 |
} ?>
|
106 |
-
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$
|
107 |
|
108 |
|
109 |
<style>
|
@@ -210,33 +219,36 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
210 |
<div class="inner-content">
|
211 |
<div class="content">
|
212 |
<!-- logo -->
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
<?php
|
215 |
-
|
216 |
-
|
217 |
-
// get logo id
|
218 |
-
$logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
219 |
-
// get logo
|
220 |
-
if ( $logo_id != '' ) {
|
221 |
-
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
222 |
-
}
|
223 |
-
if ( isset($logo_url[0]) ) { ?>
|
224 |
-
<img src="<?php echo esc_url( $logo_url[0] ); ?>" alt="logo">
|
225 |
-
<?php
|
226 |
-
}
|
227 |
-
break;
|
228 |
-
case 'text':
|
229 |
-
$text_logo = get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )); ?>
|
230 |
-
<h1 class="slab"><span class="slabtext"><?php echo esc_html($text_logo); ?></span></h1>
|
231 |
-
<?php
|
232 |
-
case 'disabled':
|
233 |
-
default:
|
234 |
-
break;
|
235 |
-
} ?>
|
236 |
-
</div>
|
237 |
-
|
238 |
-
<!-- body content -->
|
239 |
-
<?php
|
240 |
// display title if not empty
|
241 |
if ( $body_title != '' ) { ?>
|
242 |
<h2 class="title slab">
|
@@ -353,38 +365,53 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
353 |
|
354 |
</div> <!-- #background-wrapper -->
|
355 |
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
image.className += " loaded";
|
360 |
-
}
|
361 |
-
</script>
|
362 |
-
|
363 |
-
<?php
|
364 |
-
// if video thumbnail attach video scripts
|
365 |
-
if ( $niteoCS_banner == 5 ) {
|
366 |
-
$niteoCS_video_thumb = get_option('niteoCS_video_thumb['.$themeslug.']');
|
367 |
-
if ( $niteoCS_video_thumb != '' ) {
|
368 |
-
$thumb_id = wp_get_attachment_image_src($niteoCS_video_thumb, 'large');
|
369 |
-
|
370 |
-
if ( isset($thumb_id[0]) ) {
|
371 |
-
$thumb = $thumb_id[0];
|
372 |
-
}
|
373 |
-
} ?>
|
374 |
|
375 |
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
376 |
|
377 |
<script>
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
|
385 |
</script>
|
386 |
-
<?php
|
387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
|
389 |
// if counter is enabled attach counter script
|
390 |
if ( $niteoCS_counter == '1') { ?>
|
@@ -508,7 +535,9 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
508 |
$('.content')
|
509 |
.css('left', moveX+'px')
|
510 |
.css('top', moveY+'px')
|
511 |
-
.css('transform', 'rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)')
|
|
|
|
|
512 |
});
|
513 |
|
514 |
$('input[type="email"]').hover(
|
@@ -521,6 +550,8 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
521 |
);
|
522 |
</script>
|
523 |
<?php
|
524 |
-
}
|
|
|
|
|
525 |
</body>
|
526 |
</html>
|
15 |
<title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!')) ); ?></title>
|
16 |
|
17 |
<?php
|
|
|
18 |
$themeslug = 'postery';
|
19 |
$size = $this->isMobile() ? 'large' : 'full';
|
20 |
// get theme related settings
|
72 |
|
73 |
// get background media
|
74 |
if ( method_exists ( $this, 'get_background_media' ) ) {
|
75 |
+
$background_media = $this->get_background_media( $niteoCS_banner, $themeslug );
|
76 |
$background_class = $background_media[0];
|
77 |
$banner_url = $background_media[1];
|
78 |
if ( $background_class == 'video' ) {
|
79 |
+
$source = $background_media[2];
|
80 |
+
$video_type = get_option('niteoCS_banner_video['.$themeslug.']');
|
81 |
+
$video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
|
82 |
+
|
83 |
+
if ( !empty( $video_poster ) ) {
|
84 |
+
$video_poster = $video_poster[0];
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( $video_type == 'video/mp4') {
|
88 |
+
$banner_url = wp_get_attachment_url( $banner_url );
|
89 |
+
}
|
90 |
}
|
91 |
} else {
|
92 |
$background_class = 'error';
|
112 |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
113 |
<?php
|
114 |
} ?>
|
115 |
+
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
|
116 |
|
117 |
|
118 |
<style>
|
219 |
<div class="inner-content">
|
220 |
<div class="content">
|
221 |
<!-- logo -->
|
222 |
+
<?php
|
223 |
+
|
224 |
+
if ( $logo_type != 'disabled' ) { ?>
|
225 |
+
<div class="logo">
|
226 |
+
<?php
|
227 |
+
switch ($logo_type) {
|
228 |
+
case 'graphic':
|
229 |
+
// get logo id
|
230 |
+
$logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
231 |
+
// get logo
|
232 |
+
if ( $logo_id != '' ) {
|
233 |
+
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
234 |
+
}
|
235 |
+
if ( isset($logo_url[0]) ) { ?>
|
236 |
+
<img src="<?php echo esc_url( $logo_url[0] ); ?>" alt="logo">
|
237 |
+
<?php
|
238 |
+
}
|
239 |
+
break;
|
240 |
+
case 'text':
|
241 |
+
$text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' ))); ?>
|
242 |
+
<h1 class="slab"><span class="slabtext"><?php echo esc_html($text_logo); ?></span></h1>
|
243 |
+
<?php
|
244 |
+
case 'disabled':
|
245 |
+
default:
|
246 |
+
break;
|
247 |
+
} ?>
|
248 |
+
</div>
|
249 |
<?php
|
250 |
+
}
|
251 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
// display title if not empty
|
253 |
if ( $body_title != '' ) { ?>
|
254 |
<h2 class="title slab">
|
365 |
|
366 |
</div> <!-- #background-wrapper -->
|
367 |
|
368 |
+
<?php
|
369 |
+
// if video ini vidim background player
|
370 |
+
if ( $niteoCS_banner == 5 ){ ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
|
372 |
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
373 |
|
374 |
<script>
|
375 |
+
|
376 |
+
<?php
|
377 |
+
if ( $video_type == 'YouTube' ) { ?>
|
378 |
+
|
379 |
+
var myBackground = new vidim( '#player', {
|
380 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
381 |
+
type: 'YouTube',
|
382 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
383 |
+
}
|
384 |
+
);
|
385 |
+
<?php
|
386 |
+
}
|
387 |
+
|
388 |
+
if ( $video_type == 'video/mp4' ) { ?>
|
389 |
+
var myBackground = new vidim( '#player', {
|
390 |
+
src: [
|
391 |
+
{
|
392 |
+
type: 'video/mp4',
|
393 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
394 |
+
},
|
395 |
+
],
|
396 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
397 |
+
});
|
398 |
+
<?php
|
399 |
+
} ?>
|
400 |
+
|
401 |
|
402 |
</script>
|
403 |
+
<?php
|
404 |
+
// add loaded class to background media
|
405 |
+
} else { ?>
|
406 |
+
<script>
|
407 |
+
window.onload = function() {
|
408 |
+
var image = document.getElementById('background-image');
|
409 |
+
image.className += " loaded";
|
410 |
+
}
|
411 |
+
</script>
|
412 |
+
<?php
|
413 |
+
|
414 |
+
}
|
415 |
|
416 |
// if counter is enabled attach counter script
|
417 |
if ( $niteoCS_counter == '1') { ?>
|
535 |
$('.content')
|
536 |
.css('left', moveX+'px')
|
537 |
.css('top', moveY+'px')
|
538 |
+
.css('transform', 'rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)')
|
539 |
+
.css('-ms-transform', 'rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)')
|
540 |
+
.css('-webkit-transform', 'rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)');
|
541 |
});
|
542 |
|
543 |
$('input[type="email"]').hover(
|
550 |
);
|
551 |
</script>
|
552 |
<?php
|
553 |
+
}
|
554 |
+
$this->niteo_redirect();
|
555 |
+
?>
|
556 |
</body>
|
557 |
</html>
|
themes/postery/style.css
CHANGED
@@ -4,7 +4,7 @@ Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=postery
|
|
4 |
Author: Niteo
|
5 |
Author URI: https//niteothemes.com
|
6 |
Version: 1.0
|
7 |
-
Details URI: {"1": "https:\/\/niteothemes.com\/cmp-screenshots\/postery\/screenshot1.jpg","2":"https:\/\/niteothemes.com\/cmp-screenshots\/postery\/screenshot2.jpg"
|
8 |
Description: <p>Postery is modern theme with trendy 3D animation and "poster-like" typography. You can set countdown timer, subscriber form, custom social icons or just insert custom text to keep things simple.</p><h4>Main Features</h4><ul><li>"Newspaper" typography and 3D animation.</li><li>Counter setup with three predefined actions.</li><li>Subscribe Form</li><li>Responsive design</li></ul>
|
9 |
|
10 |
|
@@ -72,7 +72,6 @@ a {
|
|
72 |
background-color: transparent;
|
73 |
text-decoration: none;
|
74 |
-webkit-transition: color .3s ease-in-out;
|
75 |
-
-o-transition: color .3s ease-in-out;
|
76 |
transition: color .3s ease-in-out;
|
77 |
|
78 |
}
|
@@ -130,7 +129,8 @@ figure {
|
|
130 |
}
|
131 |
|
132 |
hr {
|
133 |
-
box-sizing: content-box;
|
|
|
134 |
height: 0;
|
135 |
}
|
136 |
|
@@ -204,7 +204,8 @@ input {
|
|
204 |
|
205 |
input[type="checkbox"],
|
206 |
input[type="radio"] {
|
207 |
-
box-sizing: border-box;
|
|
|
208 |
padding: 0;
|
209 |
}
|
210 |
|
@@ -215,7 +216,8 @@ input[type="number"]::-webkit-outer-spin-button {
|
|
215 |
|
216 |
input[type="search"] {
|
217 |
-webkit-appearance: textfield;
|
218 |
-
box-sizing: content-box;
|
|
|
219 |
}
|
220 |
|
221 |
input[type="search"]::-webkit-search-cancel-button,
|
@@ -254,13 +256,18 @@ th {
|
|
254 |
}
|
255 |
|
256 |
body{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
margin:0;
|
258 |
min-height: 100vh;
|
259 |
-
position: relative;
|
260 |
-
display: flex;
|
261 |
-
justify-content: center;
|
262 |
-
align-items: center;
|
263 |
-
perspective: 2000px;
|
264 |
}
|
265 |
|
266 |
h1 {
|
@@ -306,6 +313,7 @@ h2,h3,h4,h5,h6 {
|
|
306 |
|
307 |
#background-image {
|
308 |
opacity: 0;
|
|
|
309 |
transition: opacity 400ms;
|
310 |
}
|
311 |
|
@@ -313,7 +321,9 @@ h2,h3,h4,h5,h6 {
|
|
313 |
opacity: 1;
|
314 |
}
|
315 |
|
316 |
-
.video-banner iframe
|
|
|
|
|
317 |
transition: opacity 1500ms;
|
318 |
}
|
319 |
|
@@ -335,6 +345,8 @@ h2,h3,h4,h5,h6 {
|
|
335 |
width: 100%;
|
336 |
max-width: 600px;
|
337 |
margin: 0 auto;
|
|
|
|
|
338 |
}
|
339 |
|
340 |
|
@@ -385,13 +397,11 @@ h2,h3,h4,h5,h6 {
|
|
385 |
background-color: rgba(0,0,0,0.1);
|
386 |
text-align: center;
|
387 |
-webkit-transition: background 300ms linear;
|
388 |
-
-o-transition: background 300ms linear;
|
389 |
transition: background 300ms linear;
|
390 |
}
|
391 |
.social-list i{
|
392 |
font-size: 1em;
|
393 |
-webkit-transition: all 300ms linear;
|
394 |
-
-o-transition: all 300ms linear;
|
395 |
transition: all 300ms linear;
|
396 |
}
|
397 |
|
@@ -423,15 +433,23 @@ h2,h3,h4,h5,h6 {
|
|
423 |
.social-wrapper li,
|
424 |
input,
|
425 |
.input-icon {
|
426 |
-
transform: translateZ(0);
|
|
|
|
|
|
|
427 |
transition: transform 500ms, opacity 500ms;
|
|
|
428 |
}
|
429 |
|
430 |
.social-wrapper li:hover,
|
431 |
input:hover,
|
432 |
.input-icon.hover {
|
|
|
|
|
433 |
transition: transform 500ms, opacity 300ms;
|
434 |
-
|
|
|
|
|
435 |
}
|
436 |
|
437 |
.slabtext{
|
@@ -440,7 +458,7 @@ input:hover,
|
|
440 |
opacity:.3;
|
441 |
}
|
442 |
|
443 |
-
.slabtextdone .slabtext.hover{
|
444 |
opacity:1;
|
445 |
}
|
446 |
|
@@ -462,7 +480,8 @@ input {
|
|
462 |
display: inline-block;
|
463 |
line-height: 3em;
|
464 |
height: 3em;
|
465 |
-
box-sizing: border-box;
|
|
|
466 |
vertical-align: middle;
|
467 |
margin-bottom: 10px;
|
468 |
}
|
@@ -529,11 +548,8 @@ input[type="submit"] {
|
|
529 |
/* Mailchimp css */
|
530 |
.mc4wp-form-fields {
|
531 |
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6, BB7 */
|
532 |
-
display: -ms-flexbox; /* TWEENER - IE 10 */
|
533 |
-
display: -webkit-flex; /* NEW - Safari 6.1+. iOS 7.1+, BB10 */
|
534 |
display: flex; /* NEW, Spec - Firefox, Chrome, Opera */
|
535 |
-
-webkit-flex-wrap: wrap;
|
536 |
-
-moz-flex-wrap: wrap;
|
537 |
-ms-flex-wrap: wrap;
|
538 |
-o-flex-wrap: wrap;
|
539 |
flex-wrap: wrap;
|
@@ -541,7 +557,9 @@ input[type="submit"] {
|
|
541 |
|
542 |
.mc4wp-form input[type="email"],
|
543 |
.mc4wp-form input[type="text"] {
|
544 |
-
flex
|
|
|
|
|
545 |
}
|
546 |
|
547 |
.mc4wp-form input[type="email"],
|
@@ -572,8 +590,6 @@ input[type="submit"] {
|
|
572 |
left: 0;
|
573 |
padding: 10px;
|
574 |
-webkit-transform: translateY(-50%);
|
575 |
-
-ms-transform: translateY(-50%);
|
576 |
-
-o-transform: translateY(-50%);
|
577 |
transform: translateY(-50%);
|
578 |
}
|
579 |
|
@@ -592,7 +608,8 @@ input[type="submit"] {
|
|
592 |
|
593 |
/* 3d animation */
|
594 |
.content {
|
595 |
-
transform-style: preserve-3d;
|
|
|
596 |
transform-style: preserve-3d;
|
597 |
background: rgba(0,0,0,.1);
|
598 |
padding: 30px;
|
@@ -606,8 +623,10 @@ input[type="submit"] {
|
|
606 |
width:90%; height:90%;
|
607 |
border-radius: inherit;
|
608 |
background: rgba(0,0,0,.1);
|
609 |
-
box-shadow: 0 0 40px 20px rgba(0,0,0,.1);
|
610 |
-
|
|
|
|
|
611 |
}
|
612 |
|
613 |
|
4 |
Author: Niteo
|
5 |
Author URI: https//niteothemes.com
|
6 |
Version: 1.0
|
7 |
+
Details URI: {"1": "https:\/\/niteothemes.com\/cmp-screenshots\/postery\/screenshot1.jpg","2":"https:\/\/niteothemes.com\/cmp-screenshots\/postery\/screenshot2.jpg"}
|
8 |
Description: <p>Postery is modern theme with trendy 3D animation and "poster-like" typography. You can set countdown timer, subscriber form, custom social icons or just insert custom text to keep things simple.</p><h4>Main Features</h4><ul><li>"Newspaper" typography and 3D animation.</li><li>Counter setup with three predefined actions.</li><li>Subscribe Form</li><li>Responsive design</li></ul>
|
9 |
|
10 |
|
72 |
background-color: transparent;
|
73 |
text-decoration: none;
|
74 |
-webkit-transition: color .3s ease-in-out;
|
|
|
75 |
transition: color .3s ease-in-out;
|
76 |
|
77 |
}
|
129 |
}
|
130 |
|
131 |
hr {
|
132 |
+
-webkit-box-sizing: content-box;
|
133 |
+
box-sizing: content-box;
|
134 |
height: 0;
|
135 |
}
|
136 |
|
204 |
|
205 |
input[type="checkbox"],
|
206 |
input[type="radio"] {
|
207 |
+
-webkit-box-sizing: border-box;
|
208 |
+
box-sizing: border-box;
|
209 |
padding: 0;
|
210 |
}
|
211 |
|
216 |
|
217 |
input[type="search"] {
|
218 |
-webkit-appearance: textfield;
|
219 |
+
-webkit-box-sizing: content-box;
|
220 |
+
box-sizing: content-box;
|
221 |
}
|
222 |
|
223 |
input[type="search"]::-webkit-search-cancel-button,
|
256 |
}
|
257 |
|
258 |
body{
|
259 |
+
position: relative;
|
260 |
+
display: -webkit-box;
|
261 |
+
display: -ms-flexbox;
|
262 |
+
display: flex;
|
263 |
+
-webkit-box-pack: center;
|
264 |
+
-ms-flex-pack: center;
|
265 |
+
justify-content: center;
|
266 |
+
-webkit-box-align: center;
|
267 |
+
-ms-flex-align: center;
|
268 |
+
align-items: center;
|
269 |
margin:0;
|
270 |
min-height: 100vh;
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
|
273 |
h1 {
|
313 |
|
314 |
#background-image {
|
315 |
opacity: 0;
|
316 |
+
-webkit-transition: opacity 400ms;
|
317 |
transition: opacity 400ms;
|
318 |
}
|
319 |
|
321 |
opacity: 1;
|
322 |
}
|
323 |
|
324 |
+
.video-banner iframe,
|
325 |
+
.video-banner video {
|
326 |
+
-webkit-transition: opacity 1500ms;
|
327 |
transition: opacity 1500ms;
|
328 |
}
|
329 |
|
345 |
width: 100%;
|
346 |
max-width: 600px;
|
347 |
margin: 0 auto;
|
348 |
+
-webkit-perspective: 2000px;
|
349 |
+
perspective: 2000px;
|
350 |
}
|
351 |
|
352 |
|
397 |
background-color: rgba(0,0,0,0.1);
|
398 |
text-align: center;
|
399 |
-webkit-transition: background 300ms linear;
|
|
|
400 |
transition: background 300ms linear;
|
401 |
}
|
402 |
.social-list i{
|
403 |
font-size: 1em;
|
404 |
-webkit-transition: all 300ms linear;
|
|
|
405 |
transition: all 300ms linear;
|
406 |
}
|
407 |
|
433 |
.social-wrapper li,
|
434 |
input,
|
435 |
.input-icon {
|
436 |
+
-webkit-transform: translateZ(0);
|
437 |
+
transform: translateZ(0);
|
438 |
+
-webkit-transition: opacity 500ms, -webkit-transform 500ms;
|
439 |
+
transition: opacity 500ms, -webkit-transform 500ms;
|
440 |
transition: transform 500ms, opacity 500ms;
|
441 |
+
transition: transform 500ms, opacity 500ms, -webkit-transform 500ms;
|
442 |
}
|
443 |
|
444 |
.social-wrapper li:hover,
|
445 |
input:hover,
|
446 |
.input-icon.hover {
|
447 |
+
-webkit-transition: opacity 300ms, -webkit-transform 500ms;
|
448 |
+
transition: opacity 300ms, -webkit-transform 500ms;
|
449 |
transition: transform 500ms, opacity 300ms;
|
450 |
+
transition: transform 500ms, opacity 300ms, -webkit-transform 500ms;
|
451 |
+
-webkit-transform: translateZ(20px);
|
452 |
+
transform: translateZ(20px);
|
453 |
}
|
454 |
|
455 |
.slabtext{
|
458 |
opacity:.3;
|
459 |
}
|
460 |
|
461 |
+
.slabtextdone .slabtext.hover {
|
462 |
opacity:1;
|
463 |
}
|
464 |
|
480 |
display: inline-block;
|
481 |
line-height: 3em;
|
482 |
height: 3em;
|
483 |
+
-webkit-box-sizing: border-box;
|
484 |
+
box-sizing: border-box;
|
485 |
vertical-align: middle;
|
486 |
margin-bottom: 10px;
|
487 |
}
|
548 |
/* Mailchimp css */
|
549 |
.mc4wp-form-fields {
|
550 |
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6, BB7 */
|
551 |
+
display: -ms-flexbox; /* TWEENER - IE 10 */ /* NEW - Safari 6.1+. iOS 7.1+, BB10 */
|
|
|
552 |
display: flex; /* NEW, Spec - Firefox, Chrome, Opera */
|
|
|
|
|
553 |
-ms-flex-wrap: wrap;
|
554 |
-o-flex-wrap: wrap;
|
555 |
flex-wrap: wrap;
|
557 |
|
558 |
.mc4wp-form input[type="email"],
|
559 |
.mc4wp-form input[type="text"] {
|
560 |
+
-webkit-box-flex: 1;
|
561 |
+
-ms-flex-positive: 1;
|
562 |
+
flex-grow: 1;
|
563 |
}
|
564 |
|
565 |
.mc4wp-form input[type="email"],
|
590 |
left: 0;
|
591 |
padding: 10px;
|
592 |
-webkit-transform: translateY(-50%);
|
|
|
|
|
593 |
transform: translateY(-50%);
|
594 |
}
|
595 |
|
608 |
|
609 |
/* 3d animation */
|
610 |
.content {
|
611 |
+
-webkit-transform-style: preserve-3d;
|
612 |
+
transform-style: preserve-3d;
|
613 |
transform-style: preserve-3d;
|
614 |
background: rgba(0,0,0,.1);
|
615 |
padding: 30px;
|
623 |
width:90%; height:90%;
|
624 |
border-radius: inherit;
|
625 |
background: rgba(0,0,0,.1);
|
626 |
+
-webkit-box-shadow: 0 0 40px 20px rgba(0,0,0,.1);
|
627 |
+
box-shadow: 0 0 40px 20px rgba(0,0,0,.1);
|
628 |
+
-webkit-transform: translateZ(-100px);
|
629 |
+
transform: translateZ(-100px);
|
630 |
}
|
631 |
|
632 |
|