Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 1.12.0 |
Comparing to | |
See all releases |
Code changes from version 1.11.1 to 1.12.0
- cmp-help.php +15 -3
- cmp-settings.php +57 -65
- cmp-sidebar.php +19 -8
- cmp-subscribers.php +19 -6
- cmp-translate.php +77 -0
- cmp-upload.php +45 -0
- css/cmp-settings-style.css +50 -11
- img/alex.jpg +0 -0
- img/paul.jpg +0 -0
- inc/class-cmp-customizer.php +15 -0
- inc/class-cmp-render_html.php +483 -0
- inc/class-cmp-subscribers.php +34 -27
- inc/class-cmp-translate.php +96 -0
- inc/helper-functions.php +0 -55
- inc/settings-background.php +53 -6
- inc/settings-counter.php +15 -15
- inc/settings-counter_disabled.php +6 -6
- inc/settings-footer.php +22 -0
- inc/settings-footer_disabled.php +14 -0
- inc/settings-logo_disabled.php +1 -1
- inc/settings-slider_disabled.php +1 -1
- inc/settings-subscribe_disabled.php +1 -1
- js/settings.js +59 -13
- js/settings.min.js +1 -1
- languages/coming-soon-default.mo +0 -0
- languages/coming-soon-default.po +35 -27
- niteo-cmp.php +95 -195
- readme.txt +38 -31
- themes/construct.txt +2 -1
- themes/construct/construct-theme.php +55 -233
- themes/construct/style.css +2 -5
- themes/countdown.txt +1 -1
- themes/countdown/countdown-settings.php +5 -5
- themes/countdown/countdown-social_settings.php +3 -3
- themes/countdown/countdown-theme.php +72 -260
- themes/countdown/style.css +39 -15
- themes/fifty.txt +2 -1
- themes/frame.txt +1 -1
- themes/hardwork.txt +4 -1
- themes/hardwork/hardwork-theme.php +44 -200
- themes/hardwork/style.css +8 -12
- themes/hardwork_premium.txt +1 -1
- themes/postery.txt +1 -1
- themes/postery/postery-settings.php +5 -5
- themes/postery/postery-theme.php +59 -224
- themes/postery/style.css +5 -8
cmp-help.php
CHANGED
@@ -9,8 +9,20 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
9 |
|
10 |
<div class="wrap">
|
11 |
<div id="icon-users" class="icon32"></div>
|
12 |
-
<h3><?php _e('Thank you for using our CMP - Coming Soon, Maintenance & Landing Page NiteoThemes`s plugin for Wordpress', 'cmp-coming-soon-maintenance');?></h3>
|
13 |
-
<p><?php _e('If you have any question or issue feel free to ask Wordpress Community or for our expert support on Wordpress Support Forum!', 'cmp-coming-soon-maintenance');?></p>
|
14 |
|
15 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
</div>
|
9 |
|
10 |
<div class="wrap">
|
11 |
<div id="icon-users" class="icon32"></div>
|
|
|
|
|
12 |
|
13 |
+
<div class="cmp-inputs-wrapper help-settings">
|
14 |
+
|
15 |
+
<h3><?php _e('Thank you for using our CMP - Coming Soon, Maintenance & Landing Page NiteoThemes`s plugin for Wordpress', 'cmp-coming-soon-maintenance');?></h3>
|
16 |
+
<p><?php _e('If you have any question or issue feel free to ask Wordpress Community or for our expert support on Wordpress Support Forum!', 'cmp-coming-soon-maintenance');?></p>
|
17 |
+
|
18 |
+
<p><a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance" class="button" target="_blank"><?php _e('GET SUPPORT!', 'cmp-coming-soon-maintenance');?></a></p>
|
19 |
+
</div>
|
20 |
+
|
21 |
+
<?php
|
22 |
+
// get sidebar with "widgets"
|
23 |
+
if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
|
24 |
+
require (dirname(__FILE__) . '/cmp-sidebar.php');
|
25 |
+
}
|
26 |
+
|
27 |
+
?>
|
28 |
</div>
|
cmp-settings.php
CHANGED
@@ -50,12 +50,26 @@ if (isset($_POST['niteoCS_banner_color_'.$themeslug])) {
|
|
50 |
update_option('niteoCS_banner_color['.$themeslug.']', sanitize_text_field($_POST['niteoCS_banner_color_'.$themeslug]));
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
if (isset($_POST['niteoCS_banner_pattern_'.$themeslug])) {
|
54 |
update_option('niteoCS_banner_pattern['.$themeslug.']', sanitize_text_field($_POST['niteoCS_banner_pattern_'.$themeslug]));
|
55 |
}
|
56 |
|
57 |
if (isset($_POST['niteoCS_banner_pattern_custom_'.$themeslug])) {
|
58 |
-
update_option('niteoCS_banner_pattern_custom['.$themeslug.']',
|
59 |
}
|
60 |
|
61 |
if (isset($_POST['niteoCS_banner_video_'.$themeslug])) {
|
@@ -243,7 +257,7 @@ $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
|
|
243 |
//get theme specific settings
|
244 |
$niteoCS_logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
|
245 |
$niteoCS_logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
246 |
-
$niteoCS_text_logo = get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' ));
|
247 |
$niteoCS_font_content_custom = get_option('niteoCS_font_content_custom['.$themeslug.']', '');
|
248 |
$niteoCS_font_headings_custom = get_option('niteoCS_font_headings_custom['.$themeslug.']', '');
|
249 |
|
@@ -255,6 +269,19 @@ $niteoCS_unsplash_3 = get_option('niteoCS_unsplash_3['.$themeslug.']');
|
|
255 |
$niteoCS_unsplash_category = get_option('niteoCS_unsplash_category['.$themeslug.']', 'buildings');
|
256 |
$niteoCS_cat_keyword = get_option('niteoCS_cat_keyword['.$themeslug.']');
|
257 |
$niteoCS_banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#bdc3c7');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
$niteoCS_banner_pattern = get_option('niteoCS_banner_pattern['.$themeslug.']', 'sakura');
|
259 |
$niteoCS_banner_pattern_custom = get_option('niteoCS_banner_pattern_custom['.$themeslug.']');
|
260 |
$niteoCS_banner_video = get_option('niteoCS_banner_video['.$themeslug.']');
|
@@ -296,7 +323,11 @@ if ( $niteoCS_favicon_id != '' ) {
|
|
296 |
|
297 |
// get logo url from id
|
298 |
if ( $niteoCS_banner_pattern == 'custom' && $niteoCS_banner_pattern_custom != '' ) {
|
299 |
-
|
|
|
|
|
|
|
|
|
300 |
|
301 |
} else {
|
302 |
$pattern_url = plugins_url('/img/patterns/'.esc_attr($niteoCS_banner_pattern).'.png', __FILE__);
|
@@ -352,6 +383,7 @@ if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_G
|
|
352 |
|
353 |
add_thickbox();
|
354 |
|
|
|
355 |
?>
|
356 |
<noscript>
|
357 |
<div class='updated'>
|
@@ -362,7 +394,11 @@ add_thickbox();
|
|
362 |
</style>
|
363 |
</noscript>
|
364 |
|
|
|
|
|
365 |
<div class="wrap">
|
|
|
|
|
366 |
|
367 |
<div id="icon-options-general" class="icon32">
|
368 |
<br />
|
@@ -382,7 +418,6 @@ add_thickbox();
|
|
382 |
|
383 |
<a class="nav-tab theme-preview" href="<?php echo get_home_url(); ?>?cmp_preview=true" data-tab="theme-preview" target="_blank" ><i class="fa fa-external-link" aria-hidden="true"></i><?php _e('Preview', 'cmp-coming-soon-maintenance');?></a>
|
384 |
|
385 |
-
<a class="nav-tab install" href="<?php echo admin_url(); ?>admin.php?page=cmp-settings" data-tab="install"><i class="fa fa-plus" aria-hidden="true"></i><?php _e('Install New Theme', 'cmp-coming-soon-maintenance');?></a>
|
386 |
</h2>
|
387 |
|
388 |
<div class="cmp-settings-wrapper">
|
@@ -420,9 +455,11 @@ add_thickbox();
|
|
420 |
<legend title="maintanance" <?php echo ($this->cmp_status() == 3) ? 'class="active"' : '';?>>
|
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 |
-
<
|
424 |
-
|
425 |
-
|
|
|
|
|
426 |
</legend>
|
427 |
|
428 |
</fieldset>
|
@@ -736,42 +773,20 @@ add_thickbox();
|
|
736 |
</tbody>
|
737 |
</table>
|
738 |
</div>
|
739 |
-
|
740 |
-
|
741 |
-
<div class="table-wrapper content" id="copyright-section">
|
742 |
-
<h3><?php _e('Footer Content', 'cmp-coming-soon-maintenance');?></h3>
|
743 |
-
<table class="content">
|
744 |
-
<tbody>
|
745 |
-
<?php
|
746 |
-
if ( $theme_supports['footer'] ) { ?>
|
747 |
-
<tr>
|
748 |
-
<th><h4><?php _e('Copyright', 'cmp-coming-soon-maintenance');?></h4></th>
|
749 |
-
<td>
|
750 |
-
<fieldset>
|
751 |
-
<input type="text" name="niteoCS_copyright" id="niteoCS_copyright" value="<?php echo esc_attr( $this->niteo_sanitize_html($niteoCS_copyright)); ?>" class="regular-text code">
|
752 |
-
</fieldset>
|
753 |
-
</td>
|
754 |
-
</tr>
|
755 |
-
<tr><th>
|
756 |
-
<p class="cmp-submit">
|
757 |
-
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
758 |
-
<input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
|
759 |
-
</p>
|
760 |
-
</th></tr>
|
761 |
-
<?php
|
762 |
-
} else { ?>
|
763 |
-
<tr>
|
764 |
-
<th><h4><?php _e('Disabled', 'cmp-coming-soon-maintenance');?></h4></th>
|
765 |
-
<td>
|
766 |
-
<p class="no-margin"><?php _e('Footer is not supported by selected Theme.', 'cmp-coming-soon-maintenance');?></p>
|
767 |
-
</td>
|
768 |
-
</tr>
|
769 |
-
<?php
|
770 |
-
} ?>
|
771 |
-
</tbody>
|
772 |
-
</table>
|
773 |
-
</div>
|
774 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
// get logo settings
|
776 |
if ( $theme_supports['logo'] ) {
|
777 |
if ( file_exists(dirname(__FILE__) . '/inc/settings-logo.php') ) {
|
@@ -962,29 +977,6 @@ add_thickbox();
|
|
962 |
|
963 |
</form>
|
964 |
|
965 |
-
<div class="upload-plugin comingsoon install">
|
966 |
-
<form action="admin.php?page=cmp-settings" class="wp-upload-form" method="post" enctype="multipart/form-data">
|
967 |
-
<table class="install">
|
968 |
-
<tbody>
|
969 |
-
<tr>
|
970 |
-
<td>
|
971 |
-
<h3><?php _e('Install New CMP Coming Soon & Maintenance Theme', 'cmp-coming-soon-maintenance');?></h3>
|
972 |
-
</td>
|
973 |
-
</tr>
|
974 |
-
<tr>
|
975 |
-
<td>
|
976 |
-
<?php _e('Select Theme ZIP file to upload','cmp-coming-soon-maintenance');?>:
|
977 |
-
<input type="file" name="fileToUpload" id="fileToUpload">
|
978 |
-
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
979 |
-
<input id="install-theme" type="submit" value="Install Theme" name="submit_theme">
|
980 |
-
</td>
|
981 |
-
</tr>
|
982 |
-
</tbody>
|
983 |
-
</table>
|
984 |
-
|
985 |
-
</form>
|
986 |
-
</div>
|
987 |
-
|
988 |
</div> <!-- <div class="cmp-settings-wrapper"> -->
|
989 |
|
990 |
<?php
|
50 |
update_option('niteoCS_banner_color['.$themeslug.']', sanitize_text_field($_POST['niteoCS_banner_color_'.$themeslug]));
|
51 |
}
|
52 |
|
53 |
+
|
54 |
+
if (isset($_POST['niteoCS_gradient_'.$themeslug])) {
|
55 |
+
update_option('niteoCS_gradient['.$themeslug.']', sanitize_text_field($_POST['niteoCS_gradient_'.$themeslug]));
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
if (isset($_POST['niteoCS_banner_gradient_one_'.$themeslug])) {
|
60 |
+
update_option('niteoCS_banner_gradient_one['.$themeslug.']', sanitize_text_field($_POST['niteoCS_banner_gradient_one_'.$themeslug]));
|
61 |
+
}
|
62 |
+
|
63 |
+
if (isset($_POST['niteoCS_banner_gradient_two_'.$themeslug])) {
|
64 |
+
update_option('niteoCS_banner_gradient_two['.$themeslug.']', sanitize_text_field($_POST['niteoCS_banner_gradient_two_'.$themeslug]));
|
65 |
+
}
|
66 |
+
|
67 |
if (isset($_POST['niteoCS_banner_pattern_'.$themeslug])) {
|
68 |
update_option('niteoCS_banner_pattern['.$themeslug.']', sanitize_text_field($_POST['niteoCS_banner_pattern_'.$themeslug]));
|
69 |
}
|
70 |
|
71 |
if (isset($_POST['niteoCS_banner_pattern_custom_'.$themeslug])) {
|
72 |
+
update_option('niteoCS_banner_pattern_custom['.$themeslug.']', sanitize_text_field($_POST['niteoCS_banner_pattern_custom_'.$themeslug]));
|
73 |
}
|
74 |
|
75 |
if (isset($_POST['niteoCS_banner_video_'.$themeslug])) {
|
257 |
//get theme specific settings
|
258 |
$niteoCS_logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
|
259 |
$niteoCS_logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
260 |
+
$niteoCS_text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));
|
261 |
$niteoCS_font_content_custom = get_option('niteoCS_font_content_custom['.$themeslug.']', '');
|
262 |
$niteoCS_font_headings_custom = get_option('niteoCS_font_headings_custom['.$themeslug.']', '');
|
263 |
|
269 |
$niteoCS_unsplash_category = get_option('niteoCS_unsplash_category['.$themeslug.']', 'buildings');
|
270 |
$niteoCS_cat_keyword = get_option('niteoCS_cat_keyword['.$themeslug.']');
|
271 |
$niteoCS_banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#bdc3c7');
|
272 |
+
$niteoCS_gradient = get_option('niteoCS_gradient['.$themeslug.']', '#ED5565:#D62739');
|
273 |
+
$niteoCS_gradient_one_custom = get_option('niteoCS_banner_gradient_one['.$themeslug.']', '#bdc3c7');
|
274 |
+
$niteoCS_gradient_two_custom = get_option('niteoCS_banner_gradient_two['.$themeslug.']', '#bdc3c7');
|
275 |
+
|
276 |
+
if ( $niteoCS_gradient != 'custom' ) {
|
277 |
+
$gradient = explode(":", $niteoCS_gradient);
|
278 |
+
$niteoCS_gradient_one = $gradient[0];
|
279 |
+
$niteoCS_gradient_two = $gradient[1];
|
280 |
+
} else {
|
281 |
+
$niteoCS_gradient_one = '';
|
282 |
+
$niteoCS_gradient_two = '';
|
283 |
+
}
|
284 |
+
|
285 |
$niteoCS_banner_pattern = get_option('niteoCS_banner_pattern['.$themeslug.']', 'sakura');
|
286 |
$niteoCS_banner_pattern_custom = get_option('niteoCS_banner_pattern_custom['.$themeslug.']');
|
287 |
$niteoCS_banner_video = get_option('niteoCS_banner_video['.$themeslug.']');
|
323 |
|
324 |
// get logo url from id
|
325 |
if ( $niteoCS_banner_pattern == 'custom' && $niteoCS_banner_pattern_custom != '' ) {
|
326 |
+
$pattern_url = wp_get_attachment_image_src($niteoCS_banner_pattern_custom, 'thumbnail');
|
327 |
+
if ( isset($pattern_url[0]) ){
|
328 |
+
$pattern_url = $pattern_url[0];
|
329 |
+
}
|
330 |
+
|
331 |
|
332 |
} else {
|
333 |
$pattern_url = plugins_url('/img/patterns/'.esc_attr($niteoCS_banner_pattern).'.png', __FILE__);
|
383 |
|
384 |
add_thickbox();
|
385 |
|
386 |
+
|
387 |
?>
|
388 |
<noscript>
|
389 |
<div class='updated'>
|
394 |
</style>
|
395 |
</noscript>
|
396 |
|
397 |
+
|
398 |
+
|
399 |
<div class="wrap">
|
400 |
+
|
401 |
+
<h1></h1>
|
402 |
|
403 |
<div id="icon-options-general" class="icon32">
|
404 |
<br />
|
418 |
|
419 |
<a class="nav-tab theme-preview" href="<?php echo get_home_url(); ?>?cmp_preview=true" data-tab="theme-preview" target="_blank" ><i class="fa fa-external-link" aria-hidden="true"></i><?php _e('Preview', 'cmp-coming-soon-maintenance');?></a>
|
420 |
|
|
|
421 |
</h2>
|
422 |
|
423 |
<div class="cmp-settings-wrapper">
|
455 |
<legend title="maintanance" <?php echo ($this->cmp_status() == 3) ? 'class="active"' : '';?>>
|
456 |
<input type="radio" name="activate" value="3" <?php echo ($this->cmp_status() == 3) ? 'checked="checked"' : '';?>> <?php _e('Redirect Mode', 'cmp-coming-soon-maintenance');?><br>
|
457 |
<span class="info redirect"><?php _e('Choose Redirect Mode if you want to redirect your website to another URL.','cmp-coming-soon-maintenance')?></span>
|
458 |
+
<div class="redirect-inputs" <?php echo ($this->cmp_status() == 3) ? 'style="display: block"' : 'style="display: none"';?>>
|
459 |
+
<input type="text" id="niteoCS_URL_redirect" name="niteoCS_URL_redirect" value="<?php echo esc_url( $niteoCS_URL_redirect); ?>" class="regular-text code"><br>
|
460 |
+
<label for="niteoCS_redirect_time"><?php _e('Delay Time in Seconds', 'cmp-coming-soon-maintenance');?></label>
|
461 |
+
<input type="text" id="niteoCS_redirect_time" name="niteoCS_redirect_time" value="<?php echo esc_attr( $niteoCS_redirect_time); ?>" class="regular-text code"><br>
|
462 |
+
</div>
|
463 |
</legend>
|
464 |
|
465 |
</fieldset>
|
773 |
</tbody>
|
774 |
</table>
|
775 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
<?php
|
777 |
+
// get footer
|
778 |
+
if ( $theme_supports['footer'] ) {
|
779 |
+
if ( file_exists(dirname(__FILE__) . '/inc/settings-footer.php') ) {
|
780 |
+
require_once (dirname(__FILE__) . '/inc/settings-footer.php');
|
781 |
+
}
|
782 |
+
|
783 |
+
} else {
|
784 |
+
if ( file_exists(dirname(__FILE__) . '/inc/settings-footer_disabled.php') ) {
|
785 |
+
require_once (dirname(__FILE__) . '/inc/settings-footer_disabled.php');
|
786 |
+
}
|
787 |
+
|
788 |
+
}
|
789 |
+
|
790 |
// get logo settings
|
791 |
if ( $theme_supports['logo'] ) {
|
792 |
if ( file_exists(dirname(__FILE__) . '/inc/settings-logo.php') ) {
|
977 |
|
978 |
</form>
|
979 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
980 |
</div> <!-- <div class="cmp-settings-wrapper"> -->
|
981 |
|
982 |
<?php
|
cmp-sidebar.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<div class="cmp-sidebar-wrapper">
|
2 |
<div class="cmp-rate-us widget">
|
3 |
<h3 class="cmp-rate-us title"><?php _e('Thank you for rating us with five stars!', 'cmp-coming-soon-maintenance');?></h3>
|
4 |
-
<p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give
|
5 |
<a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/?rate=5#new-post" target="_blank" style="text-decoration:none;">
|
6 |
|
7 |
<p class="button button-primary"><?php _e('Rate Us', 'cmp-coming-soon-maintenance');?></p>
|
@@ -16,14 +16,17 @@
|
|
16 |
|
17 |
</div>
|
18 |
|
19 |
-
<div class="request-feature widget">
|
20 |
-
<h3 class="cmp-rate-us title"><?php _e('Request new features', 'cmp-coming-soon-maintenance');?></h3>
|
21 |
-
<p><?php echo sprintf(__('Do you think some useful feature is missing or you have idea how to improve CMP plugin? You can %s on official Wordpress Support Forum and if we find it useful we will implement it in next CMP Plugin update', 'cmp-coming-soon-maintenance'), '<a href="https://wordpress.org/support/topic/request-features-3/" target="_blank" style="text-decoration:none;">request feature</a>');?> <i class="fa fa-smile-o" aria-hidden="true"></i></p>
|
22 |
-
|
23 |
-
</div>
|
24 |
-
|
25 |
<div class="donate widget">
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
29 |
<input type="hidden" name="cmd" value="_s-xclick">
|
@@ -34,4 +37,12 @@
|
|
34 |
</form>
|
35 |
</div>
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
</div>
|
1 |
<div class="cmp-sidebar-wrapper">
|
2 |
<div class="cmp-rate-us widget">
|
3 |
<h3 class="cmp-rate-us title"><?php _e('Thank you for rating us with five stars!', 'cmp-coming-soon-maintenance');?></h3>
|
4 |
+
<p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give 5%s feedback by pressing button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-star" aria-hidden="true"></i>');?></p>
|
5 |
<a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/?rate=5#new-post" target="_blank" style="text-decoration:none;">
|
6 |
|
7 |
<p class="button button-primary"><?php _e('Rate Us', 'cmp-coming-soon-maintenance');?></p>
|
16 |
|
17 |
</div>
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
<div class="donate widget">
|
20 |
+
|
21 |
+
|
22 |
+
<h4><a href="https://niteothemes.com" target="_blank">NiteoThemes</a> <?php _e('team', 'cmp-coming-soon-maintenance');?>:</h4>
|
23 |
+
<p>
|
24 |
+
<img src="<?php echo plugins_url('/img/alex.jpg', __FILE__);?>" alt="Alex, NiteoThemes">
|
25 |
+
<img src="<?php echo plugins_url('/img/paul.jpg', __FILE__);?>" alt="Paul, NiteoThemes">
|
26 |
+
</p>
|
27 |
+
|
28 |
+
<p><?php echo sprintf(__('If you really love our CMP plugin you can also donate few bucks by clicking Donate button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-usd" aria-hidden="true"></i><i class="fa fa-usd" aria-hidden="true"></i><i class="fa fa-usd" aria-hidden="true"></i>');?> <i class="fa fa-smile-o" aria-hidden="true"></i>
|
29 |
+
</p>
|
30 |
|
31 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
32 |
<input type="hidden" name="cmd" value="_s-xclick">
|
37 |
</form>
|
38 |
</div>
|
39 |
|
40 |
+
<div class="request-feature widget">
|
41 |
+
<h3 class="cmp-rate-us title"><?php _e('Request new features', 'cmp-coming-soon-maintenance');?></h3>
|
42 |
+
<p><?php echo sprintf(__('Do you think some useful feature is missing or you have idea how to improve CMP plugin? You can %s on official Wordpress Support Forum and if we find it useful we will implement it in next CMP Plugin update', 'cmp-coming-soon-maintenance'), '<a href="https://wordpress.org/support/topic/request-features-3/" target="_blank" style="text-decoration:none;">request feature</a>');?> <i class="fa fa-smile-o" aria-hidden="true"></i></p>
|
43 |
+
|
44 |
+
</div>
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
</div>
|
cmp-subscribers.php
CHANGED
@@ -34,16 +34,29 @@ $cmp_subs_list_table = new cmp_subs_list_table();
|
|
34 |
$cmp_subs_list_table->prepare_items();
|
35 |
?>
|
36 |
|
37 |
-
|
38 |
<div class="wrap">
|
39 |
<div id="icon-users" class="icon32"></div>
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
</div>
|
44 |
-
</form>
|
45 |
|
46 |
-
|
|
|
47 |
|
48 |
|
49 |
<script type="text/javascript">
|
34 |
$cmp_subs_list_table->prepare_items();
|
35 |
?>
|
36 |
|
37 |
+
|
38 |
<div class="wrap">
|
39 |
<div id="icon-users" class="icon32"></div>
|
40 |
+
<div class="cmp-inputs-wrapper subscribers-settings">
|
41 |
+
<?php wp_nonce_field('cmp_process_bulk_action', '_nonce'); ?>
|
42 |
+
<h2><?php _e('View / Edit Subscribers', 'cmp-coming-soon-maintenance');?></h2>
|
43 |
+
<form name="cmp_subscribe_form" method="post" action="admin.php?page=cmp-subscribers">
|
44 |
+
<?php $cmp_subs_list_table->display(); ?>
|
45 |
+
</form>
|
46 |
+
|
47 |
+
<button id="export_csv" class="button"><?php _e('Export All Subscribers','cmp-coming-soon-maintenance');?></button>
|
48 |
+
</div>
|
49 |
+
<?php
|
50 |
+
// get sidebar with "widgets"
|
51 |
+
if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
|
52 |
+
require (dirname(__FILE__) . '/cmp-sidebar.php');
|
53 |
+
}
|
54 |
+
|
55 |
+
?>
|
56 |
</div>
|
|
|
57 |
|
58 |
+
|
59 |
+
|
60 |
|
61 |
|
62 |
<script type="text/javascript">
|
cmp-translate.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
|
4 |
+
// check onces and wordpress rights, else DIE
|
5 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
6 |
+
if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
|
7 |
+
die('Sorry, but this request is invalid');
|
8 |
+
}
|
9 |
+
|
10 |
+
$translation = array(
|
11 |
+
0 => array('id' => 0, 'string' => 'Seconds', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_0'] ) ),
|
12 |
+
1 => array('id' => 1, 'string' => 'Minutes', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_1'] )),
|
13 |
+
2 => array('id' => 2, 'string' => 'Hours', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_2'] )),
|
14 |
+
3 => array('id' => 3, 'string' => 'Days', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_3'] )),
|
15 |
+
4 => array('id' => 4, 'string' => 'Insert your email address.', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_4'] )),
|
16 |
+
5 => array('id' => 5, 'string' => 'This email address has already been on our subscriber list.', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_5'] )),
|
17 |
+
6 => array('id' => 6, 'string' => 'Please insert valid email.', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_6'] )),
|
18 |
+
7 => array('id' => 7, 'string' => 'Thank you, your sign-up request was successful!', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_7'] )),
|
19 |
+
8 => array('id' => 8, 'string' => 'Submit', 'translation' => sanitize_text_field( $_POST['niteoCS_translate_8'] )),
|
20 |
+
);
|
21 |
+
|
22 |
+
update_option('niteoCS_translation', wp_json_encode($translation));
|
23 |
+
}
|
24 |
+
|
25 |
+
// Populate translation list, if not yet created
|
26 |
+
if ( !get_option('niteoCS_translation') ) {
|
27 |
+
$translation = array(
|
28 |
+
0 => array('id' => 0, 'string' => 'Seconds', 'translation' => 'Seconds' ),
|
29 |
+
1 => array('id' => 1, 'string' => 'Minutes', 'translation' => 'Minutes' ),
|
30 |
+
2 => array('id' => 2, 'string' => 'Hours', 'translation' => 'Hours' ),
|
31 |
+
3 => array('id' => 3, 'string' => 'Days', 'translation' => 'Days' ),
|
32 |
+
4 => array('id' => 4, 'string' => 'Insert your email address.', 'translation' => 'Insert your email address.' ),
|
33 |
+
5 => array('id' => 5, 'string' => 'This email address has already been on our subscriber list.', 'translation' => 'This email address has already been on our subscriber list.'),
|
34 |
+
6 => array('id' => 6, 'string' => 'Please insert valid email.', 'translation' => 'Please insert valid email.'),
|
35 |
+
7 => array('id' => 7, 'string' => 'Thank you, your sign-up request was successful!', 'translation' => 'Thank you, your sign-up request was successful!'),
|
36 |
+
8 => array('id' => 8, 'string' => 'Submit', 'translation' => 'Submit'),
|
37 |
+
);
|
38 |
+
|
39 |
+
update_option('niteoCS_translation', wp_json_encode($translation));
|
40 |
+
}
|
41 |
+
|
42 |
+
// WP_List_Table is not loaded automatically so we need to load it in our application
|
43 |
+
if( ! class_exists( 'WP_List_Table' ) ) {
|
44 |
+
require( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
45 |
+
}
|
46 |
+
// load WP_List_Table extension
|
47 |
+
if( ! class_exists( 'cmp_translate_table' ) ) {
|
48 |
+
require( dirname(__FILE__).'/inc/class-cmp-translate.php' );
|
49 |
+
}
|
50 |
+
|
51 |
+
// create subscriber table
|
52 |
+
$cmp_translate_table = new cmp_translate_table();
|
53 |
+
$cmp_translate_table->prepare_items();
|
54 |
+
?>
|
55 |
+
|
56 |
+
<div class="wrap">
|
57 |
+
<h1></h1>
|
58 |
+
<div id="icon-users" class="icon32"></div>
|
59 |
+
<div class="cmp-inputs-wrapper translate-settings">
|
60 |
+
<h2><?php _e('Edit Translation Variables', 'cmp-coming-soon-maintenance');?></h2>
|
61 |
+
<form name="cmp_translate_form" method="post" action="admin.php?page=cmp-translate&status=settings-saved">
|
62 |
+
<?php $cmp_translate_table->display(); ?>
|
63 |
+
<p class="cmp-submit">
|
64 |
+
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
65 |
+
<input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
|
66 |
+
</p>
|
67 |
+
</form>
|
68 |
+
|
69 |
+
</div>
|
70 |
+
<?php
|
71 |
+
// get sidebar with "widgets"
|
72 |
+
if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
|
73 |
+
require (dirname(__FILE__) . '/cmp-sidebar.php');
|
74 |
+
}
|
75 |
+
|
76 |
+
?>
|
77 |
+
</div>
|
cmp-upload.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
|
4 |
+
?>
|
5 |
+
|
6 |
+
<style>
|
7 |
+
h3, p {text-align: center;}
|
8 |
+
.wrap {margin-top: 5em;}
|
9 |
+
</style>
|
10 |
+
|
11 |
+
<div class="wrap">
|
12 |
+
<div id="icon-users" class="icon32"></div>
|
13 |
+
|
14 |
+
<div class="cmp-inputs-wrapper help-settings">
|
15 |
+
|
16 |
+
<form action="admin.php?page=cmp-settings" class="wp-upload-form" method="post" enctype="multipart/form-data">
|
17 |
+
<table class="install">
|
18 |
+
<tbody>
|
19 |
+
<tr>
|
20 |
+
<td>
|
21 |
+
<h3 style="text-align:left"><?php _e('Install New CMP Coming Soon & Maintenance Theme', 'cmp-coming-soon-maintenance');?></h3>
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
<tr>
|
25 |
+
<td>
|
26 |
+
<?php _e('Select Theme ZIP file to upload','cmp-coming-soon-maintenance');?>:
|
27 |
+
<input type="file" name="fileToUpload" id="fileToUpload">
|
28 |
+
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
29 |
+
<input id="install-theme" type="submit" value="Install Theme" name="submit_theme">
|
30 |
+
</td>
|
31 |
+
</tr>
|
32 |
+
</tbody>
|
33 |
+
</table>
|
34 |
+
|
35 |
+
</form>
|
36 |
+
</div>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
// get sidebar with "widgets"
|
40 |
+
if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
|
41 |
+
require (dirname(__FILE__) . '/cmp-sidebar.php');
|
42 |
+
}
|
43 |
+
|
44 |
+
?>
|
45 |
+
</div>
|
css/cmp-settings-style.css
CHANGED
@@ -11,6 +11,10 @@
|
|
11 |
margin-top: 1em;
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
14 |
.comingsoon-error,
|
15 |
.comingsoon-success{
|
16 |
padding: 1em;
|
@@ -50,7 +54,10 @@ input[type="text"], textarea{width:100%;}
|
|
50 |
margin-bottom: 0;
|
51 |
}
|
52 |
|
53 |
-
.table-wrapper
|
|
|
|
|
|
|
54 |
background-color: #ffffff;
|
55 |
border:1px solid #dedede;
|
56 |
margin:1em 0;
|
@@ -58,6 +65,24 @@ input[type="text"], textarea{width:100%;}
|
|
58 |
max-width: 920px;
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
.table-wrapper h3 {
|
62 |
position: relative;
|
63 |
padding: .5em 0;
|
@@ -79,10 +104,12 @@ input[type="text"], textarea{width:100%;}
|
|
79 |
-moz-osx-font-smoothing: grayscale;
|
80 |
}
|
81 |
|
82 |
-
.table-wrapper h3.
|
83 |
-
font-family: fontAwesome;
|
84 |
content: "\f196";
|
85 |
-
|
|
|
|
|
|
|
86 |
}
|
87 |
|
88 |
.table-wrapper h4 {margin:0;}
|
@@ -178,7 +205,8 @@ th label {font-weight: 600;}
|
|
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;
|
@@ -441,7 +469,7 @@ p.cmp-submit {
|
|
441 |
}
|
442 |
|
443 |
.theme-description ul {
|
444 |
-
list-style:
|
445 |
padding-left: 2em;
|
446 |
}
|
447 |
|
@@ -450,24 +478,29 @@ p.cmp-submit {
|
|
450 |
font-size: 13px;
|
451 |
}
|
452 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
|
454 |
.wp-list-table .column-id { width: 5%; }
|
455 |
|
456 |
|
457 |
/* SIDEBAR */
|
458 |
-
.cmp-inputs-wrapper {
|
459 |
-
display: inline-block;
|
460 |
-
max-width: 70%;
|
461 |
-
min-width: 920px;
|
462 |
-
}
|
463 |
|
464 |
.cmp-sidebar-wrapper {
|
465 |
display: inline-block;
|
466 |
width: calc(100% - 6em - 920px);
|
467 |
max-width: 350px;
|
|
|
468 |
margin-left: 1em;
|
469 |
padding-top: 0;
|
470 |
vertical-align: top;
|
|
|
471 |
}
|
472 |
|
473 |
.cmp-sidebar-wrapper .widget {
|
@@ -476,6 +509,12 @@ p.cmp-submit {
|
|
476 |
background: white;
|
477 |
}
|
478 |
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
.cmp-rate-us a,
|
480 |
.cmp-rate-us .button {display: block;
|
481 |
text-align:center;
|
11 |
margin-top: 1em;
|
12 |
}
|
13 |
|
14 |
+
.wrapper-disabled {
|
15 |
+
opacity: .4;
|
16 |
+
}
|
17 |
+
|
18 |
.comingsoon-error,
|
19 |
.comingsoon-success{
|
20 |
padding: 1em;
|
54 |
margin-bottom: 0;
|
55 |
}
|
56 |
|
57 |
+
.table-wrapper,
|
58 |
+
.help-settings,
|
59 |
+
.subscribers-settings,
|
60 |
+
.translate-settings {
|
61 |
background-color: #ffffff;
|
62 |
border:1px solid #dedede;
|
63 |
margin:1em 0;
|
65 |
max-width: 920px;
|
66 |
}
|
67 |
|
68 |
+
.cmp-inputs-wrapper {
|
69 |
+
display: inline-block;
|
70 |
+
max-width: 920px;
|
71 |
+
min-width: 920px;
|
72 |
+
}
|
73 |
+
|
74 |
+
.help-settings,
|
75 |
+
.subscribers-settings,
|
76 |
+
.translate-settings {
|
77 |
+
max-width: calc(920px - 2em);
|
78 |
+
min-width: calc(920px - 2em);
|
79 |
+
padding: 1em;
|
80 |
+
}
|
81 |
+
|
82 |
+
.translate-settings tfoot {
|
83 |
+
display: none;
|
84 |
+
}
|
85 |
+
|
86 |
.table-wrapper h3 {
|
87 |
position: relative;
|
88 |
padding: .5em 0;
|
104 |
-moz-osx-font-smoothing: grayscale;
|
105 |
}
|
106 |
|
107 |
+
.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after {
|
|
|
108 |
content: "\f196";
|
109 |
+
}
|
110 |
+
|
111 |
+
.table-wrapper.closed table {
|
112 |
+
display: none;
|
113 |
}
|
114 |
|
115 |
.table-wrapper h4 {margin:0;}
|
205 |
#unsplash-media{padding-top: 1em;}
|
206 |
.unsplash-feed{display: none;}
|
207 |
.pattern-wrapper,
|
208 |
+
.color-preview,
|
209 |
+
.gradient-preview {
|
210 |
background-repeat: repeat;
|
211 |
height: 200px;
|
212 |
border: 1px solid #ededed;
|
469 |
}
|
470 |
|
471 |
.theme-description ul {
|
472 |
+
list-style: none;
|
473 |
padding-left: 2em;
|
474 |
}
|
475 |
|
478 |
font-size: 13px;
|
479 |
}
|
480 |
|
481 |
+
.theme-description .supported i {
|
482 |
+
color: green;
|
483 |
+
}
|
484 |
+
|
485 |
+
.theme-description .not-supported i {
|
486 |
+
color: red;
|
487 |
+
}
|
488 |
+
|
489 |
|
490 |
.wp-list-table .column-id { width: 5%; }
|
491 |
|
492 |
|
493 |
/* SIDEBAR */
|
|
|
|
|
|
|
|
|
|
|
494 |
|
495 |
.cmp-sidebar-wrapper {
|
496 |
display: inline-block;
|
497 |
width: calc(100% - 6em - 920px);
|
498 |
max-width: 350px;
|
499 |
+
min-width: 300px;
|
500 |
margin-left: 1em;
|
501 |
padding-top: 0;
|
502 |
vertical-align: top;
|
503 |
+
text-align: center;
|
504 |
}
|
505 |
|
506 |
.cmp-sidebar-wrapper .widget {
|
509 |
background: white;
|
510 |
}
|
511 |
|
512 |
+
|
513 |
+
|
514 |
+
.widget.donate img {
|
515 |
+
max-width: 50px;
|
516 |
+
}
|
517 |
+
|
518 |
.cmp-rate-us a,
|
519 |
.cmp-rate-us .button {display: block;
|
520 |
text-align:center;
|
img/alex.jpg
ADDED
Binary file
|
img/paul.jpg
ADDED
Binary file
|
inc/class-cmp-customizer.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// class cmp_customizer {
|
4 |
+
// public function __construct() {
|
5 |
+
|
6 |
+
// }
|
7 |
+
|
8 |
+
// public function customizer() {
|
9 |
+
// $this->__construct();
|
10 |
+
// }
|
11 |
+
|
12 |
+
// public function render() {
|
13 |
+
// echo 'test';
|
14 |
+
// }
|
15 |
+
// }
|
inc/class-cmp-render_html.php
ADDED
@@ -0,0 +1,483 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Create a new table class that will extend the WP_List_Table
|
6 |
+
*/
|
7 |
+
class cmp_render_html extends niteo_cmp {
|
8 |
+
|
9 |
+
// Render Background
|
10 |
+
public function cmp_background( $niteoCS_banner, $themeslug ) {
|
11 |
+
$size = $this->isMobile() ? 'large' : 'full';
|
12 |
+
|
13 |
+
switch ( $niteoCS_banner ) {
|
14 |
+
// custom media
|
15 |
+
case '0':
|
16 |
+
$banner_id = get_option('niteoCS_banner_id['.$themeslug.']');
|
17 |
+
if ( $banner_id != '' ) {
|
18 |
+
$banner_ids = explode(',', $banner_id);
|
19 |
+
$banner_url = wp_get_attachment_image_src( $banner_ids[mt_rand(0, count( $banner_ids ) - 1)], $size);
|
20 |
+
if ( isset($banner_url[0]) ) {
|
21 |
+
$banner_url = $banner_url[0];
|
22 |
+
}
|
23 |
+
|
24 |
+
} else {
|
25 |
+
// send default image
|
26 |
+
$banner_url = $this->cmp_themeURL($themeslug).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
|
27 |
+
}
|
28 |
+
|
29 |
+
$html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
|
30 |
+
|
31 |
+
return $html;
|
32 |
+
|
33 |
+
case '1':
|
34 |
+
// unsplash
|
35 |
+
$background_class = 'image';
|
36 |
+
$unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
|
37 |
+
switch ( $unplash_feed ) {
|
38 |
+
// SINGLE IMAGE
|
39 |
+
case '0':
|
40 |
+
$params = array('feed' => '0', 'url' => get_option('niteoCS_unsplash_0['.$themeslug.']', '') );
|
41 |
+
$banner_url = $this->niteo_unsplash( $params );
|
42 |
+
|
43 |
+
// category random
|
44 |
+
case '1':
|
45 |
+
$params = array('feed' => '1', 'cat' => get_option('niteoCS_unsplash_category['.$themeslug.']'), 'custom_str' => get_option('niteoCS_cat_keyword['.$themeslug.']', '') );
|
46 |
+
$banner_url = $this->niteo_unsplash( $params );
|
47 |
+
|
48 |
+
// collection
|
49 |
+
case '2':
|
50 |
+
$params = array('feed' => '2', 'url' => get_option('niteoCS_unsplash_2['.$themeslug.']', '') );
|
51 |
+
$banner_url = $this->niteo_unsplash( $params );
|
52 |
+
|
53 |
+
// random photo
|
54 |
+
case '3':
|
55 |
+
$params = array('feed' => '3', 'url' => get_option('niteoCS_unsplash_3['.$themeslug.']', ''), 'cat' => get_option('niteoCS_unsplash_feat['.$themeslug.']', '0') );
|
56 |
+
$banner_url = $this->niteo_unsplash( $params );
|
57 |
+
default:
|
58 |
+
break;
|
59 |
+
}
|
60 |
+
|
61 |
+
$html = '<script>
|
62 |
+
var screenWidth = Math.round(screen.width*window.devicePixelRatio);
|
63 |
+
var screenHeight = screenWidth / 1.77777;
|
64 |
+
screenHeight = screenHeight.toFixed(0);
|
65 |
+
|
66 |
+
var banner = \'<div id="background-image" style="background-image:url(\\\''.esc_url( $banner_url ).'\\\')"></div>\';
|
67 |
+
banner = banner.replace("WIDTHxHEIGHT", screenWidth + "x" + screenHeight);
|
68 |
+
var container = document.getElementById("background-wrapper");
|
69 |
+
|
70 |
+
if ( container == null ) {
|
71 |
+
container = document.getElementById("banner-wrapper");
|
72 |
+
}
|
73 |
+
|
74 |
+
container.innerHTML = banner;
|
75 |
+
|
76 |
+
</script>';
|
77 |
+
|
78 |
+
return $html;
|
79 |
+
|
80 |
+
case '2':
|
81 |
+
// default image
|
82 |
+
$banner_url = $this->cmp_themeURL($themeslug).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
|
83 |
+
$html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
|
84 |
+
|
85 |
+
return $html;
|
86 |
+
|
87 |
+
case '3':
|
88 |
+
// Pattern
|
89 |
+
$niteoCS_banner_pattern = get_option('niteoCS_banner_pattern['.$themeslug.']', 'sakura');
|
90 |
+
|
91 |
+
if ( $niteoCS_banner_pattern != 'custom' ) {
|
92 |
+
$banner_url = plugin_dir_url( dirname( __FILE__ ) ).'img/patterns/'.esc_attr($niteoCS_banner_pattern).'.png';
|
93 |
+
|
94 |
+
} else {
|
95 |
+
$banner_url = get_option('niteoCS_banner_pattern_custom['.$themeslug.']');
|
96 |
+
$banner_url = wp_get_attachment_image_src( $banner_url, 'large' );
|
97 |
+
if ( isset($banner_url[0]) ){
|
98 |
+
$banner_url = $banner_url[0];
|
99 |
+
}
|
100 |
+
}
|
101 |
+
$html = '<div id="background-image" class="pattern" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
|
102 |
+
|
103 |
+
return $html;
|
104 |
+
|
105 |
+
case '4':
|
106 |
+
// Color
|
107 |
+
$color = get_option('niteoCS_banner_color['.$themeslug.']', '#bdc3c7');
|
108 |
+
$html ='<div id="background-image" class="color" style="background-color:'.esc_url( $color ).'"></div>';
|
109 |
+
|
110 |
+
return $html;
|
111 |
+
|
112 |
+
case '5':
|
113 |
+
$html = '<div id="player" class="video-banner"></div>';
|
114 |
+
|
115 |
+
return $html;
|
116 |
+
|
117 |
+
case '6':
|
118 |
+
// Gradient
|
119 |
+
$background_class = 'gradient';
|
120 |
+
$niteoCS_gradient = get_option('niteoCS_gradient['.$themeslug.']', '#ED5565:#D62739');
|
121 |
+
if ( $niteoCS_gradient == 'custom' ) {
|
122 |
+
$niteoCS_gradient_one = get_option('niteoCS_banner_gradient_one['.$themeslug.']', '#bdc3c7');
|
123 |
+
$niteoCS_gradient_two = get_option('niteoCS_banner_gradient_two['.$themeslug.']', '#bdc3c7');
|
124 |
+
} else {
|
125 |
+
$gradient = explode(":", $niteoCS_gradient);
|
126 |
+
$niteoCS_gradient_one = $gradient[0];
|
127 |
+
$niteoCS_gradient_two = $gradient[1];
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
+
$html = '<div id="background-image" class="gradient" style="background:-moz-linear-gradient(-45deg, '.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%);background:-webkit-linear-gradient(-45deg, '.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%);background:linear-gradient(135deg,'.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%)"></div>';
|
132 |
+
|
133 |
+
return $html;
|
134 |
+
|
135 |
+
default:
|
136 |
+
break;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
// render slider
|
141 |
+
public function cmp_slider( $themeslug ) {
|
142 |
+
$size = $this->isMobile() ? 'large' : 'full'; ?>
|
143 |
+
<div id="slider-wrapper">
|
144 |
+
<div id="slider">
|
145 |
+
<?php
|
146 |
+
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '2');
|
147 |
+
$slider_count = get_option('niteoCS_slider_count['.$themeslug.']', '3');
|
148 |
+
$slider_fade = get_option('niteoCS_slider_effect['.$themeslug.']', 'false');
|
149 |
+
$slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
150 |
+
switch ( $niteoCS_banner ) {
|
151 |
+
// custom media
|
152 |
+
case '0':
|
153 |
+
$banner_id = get_option('niteoCS_banner_id['.$themeslug.']');
|
154 |
+
|
155 |
+
if ( $banner_id != '' ) {
|
156 |
+
$banner_ids = explode(',', $banner_id);
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( isset( $banner_ids ) ) {
|
160 |
+
foreach ( $banner_ids as $id ) {
|
161 |
+
$slide_url = wp_get_attachment_image_src( $id, $size);
|
162 |
+
|
163 |
+
if ( isset( $slide_url[0] ) ) {
|
164 |
+
$slide_url = $slide_url[0];
|
165 |
+
} ?>
|
166 |
+
<div class="slide">
|
167 |
+
<div class="slide-background" style="background-image:url('<?php echo esc_url( $slide_url ); ?>')"></div>
|
168 |
+
</div>
|
169 |
+
<?php
|
170 |
+
}
|
171 |
+
}
|
172 |
+
break;
|
173 |
+
|
174 |
+
case '1':
|
175 |
+
// unsplash feed
|
176 |
+
$unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
|
177 |
+
switch ( $unplash_feed ) {
|
178 |
+
// SINGLE IMAGE
|
179 |
+
case '0':
|
180 |
+
$params = array('feed' => '0', 'url' => get_option('niteoCS_unsplash_0['.$themeslug.']', '') );
|
181 |
+
|
182 |
+
// category random
|
183 |
+
case '1':
|
184 |
+
$params = array('feed' => '1', 'cat' => get_option('niteoCS_unsplash_category['.$themeslug.']'), 'custom_str' => get_option('niteoCS_cat_keyword['.$themeslug.']', '') );
|
185 |
+
|
186 |
+
// collection
|
187 |
+
case '2':
|
188 |
+
$params = array('feed' => '2', 'url' => get_option('niteoCS_unsplash_2['.$themeslug.']', '') );
|
189 |
+
|
190 |
+
// random photo
|
191 |
+
case '3':
|
192 |
+
$params = array('feed' => '3', 'url' => get_option('niteoCS_unsplash_3['.$themeslug.']', ''), 'cat' => get_option('niteoCS_unsplash_feat['.$themeslug.']', '0') );
|
193 |
+
default:
|
194 |
+
break;
|
195 |
+
} ?>
|
196 |
+
|
197 |
+
<script>
|
198 |
+
var screenWidth = Math.round(screen.width*window.devicePixelRatio);
|
199 |
+
var screenHeight = screenWidth / 1.77777;
|
200 |
+
screenHeight = screenHeight.toFixed(0);
|
201 |
+
|
202 |
+
if ( !navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i) && screenWidth > 1200 ) {
|
203 |
+
screenWidth = screenWidth / 2;
|
204 |
+
}
|
205 |
+
|
206 |
+
for (i=0; i<<?php echo esc_attr($slider_count);?>; i++) {
|
207 |
+
<?php $banner_url = $this->niteo_unsplash( $params ); ?>
|
208 |
+
var slide = document.createElement('div');
|
209 |
+
slide.className = 'slide';
|
210 |
+
var slide_background = '<div class="slide-background" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>'+Math.floor(Math.random() * 1000) + 1 +'\')"></div>';
|
211 |
+
slide_background = slide_background.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
|
212 |
+
|
213 |
+
slide.innerHTML = slide_background;
|
214 |
+
document.getElementById('slider').appendChild(slide);
|
215 |
+
}
|
216 |
+
</script>
|
217 |
+
<?php
|
218 |
+
default:
|
219 |
+
break;
|
220 |
+
} ?>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
+
|
224 |
+
<div class="prev"></div>
|
225 |
+
<div class="next"></div>
|
226 |
+
|
227 |
+
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
|
228 |
+
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.js'></script>
|
229 |
+
<script>
|
230 |
+
$('#slider').slick({
|
231 |
+
slide: '.slide',
|
232 |
+
slidesToShow: 1,
|
233 |
+
arrows: false,
|
234 |
+
fade: <?php echo esc_attr($slider_fade);?>,
|
235 |
+
autoplay: <?php echo esc_attr($slider_auto);?>,
|
236 |
+
autoplaySpeed: 10000,
|
237 |
+
});
|
238 |
+
|
239 |
+
$('.prev').click(function() {
|
240 |
+
$('#slider').slick('slickPrev');
|
241 |
+
});
|
242 |
+
|
243 |
+
$('.next').click(function() {
|
244 |
+
$('#slider').slick('slickNext');
|
245 |
+
});
|
246 |
+
</script>
|
247 |
+
<?php
|
248 |
+
|
249 |
+
return;
|
250 |
+
}
|
251 |
+
|
252 |
+
// render Social Icons
|
253 |
+
public function cmp_social_icons( ) {
|
254 |
+
// migrade social media to new option after update 1.4.0
|
255 |
+
if ( !get_option('niteoCS_socialmedia') ) {
|
256 |
+
$social_media = array('facebook', 'google-plus', 'twitter', 'instagram', 'skype', '500px', 'deviantart', 'behance', 'dribbble', 'pinterest', 'linkedin', 'tumblr', 'youtube', 'vimeo', 'flickr', 'vk','envelope-o');
|
257 |
+
$i = 0;
|
258 |
+
$new_socials = array();
|
259 |
+
foreach ( $social_media as $social ) {
|
260 |
+
|
261 |
+
$social_field = get_option('niteoCS_'.$social);
|
262 |
+
|
263 |
+
$new_socials[$i]['name'] = $social;
|
264 |
+
$new_socials[$i]['url'] = $social_field;
|
265 |
+
$new_socials[$i]['active'] = '1';
|
266 |
+
$new_socials[$i]['hidden'] = $social_field ? '0' : '1';
|
267 |
+
$new_socials[$i]['order'] = $i;
|
268 |
+
$i++;
|
269 |
+
|
270 |
+
}
|
271 |
+
|
272 |
+
$socialmedia = $new_socials;
|
273 |
+
|
274 |
+
} else {
|
275 |
+
$socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
|
276 |
+
$socialmedia = json_decode( $socialmedia, true );
|
277 |
+
}
|
278 |
+
|
279 |
+
//sort social icons array by hidden, then order key
|
280 |
+
uasort( $socialmedia , array($this,'sort_social') );
|
281 |
+
|
282 |
+
$html = '<ul class="social-list">';
|
283 |
+
|
284 |
+
ob_start();
|
285 |
+
|
286 |
+
foreach ( $socialmedia as $social ) {
|
287 |
+
|
288 |
+
if ( $social['hidden'] == '0' && $social['active'] == '1') {
|
289 |
+
|
290 |
+
if ( $social['name'] == 'envelope-o' ) {
|
291 |
+
echo '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
292 |
+
|
293 |
+
} else {
|
294 |
+
echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
295 |
+
}
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
$social_list = ob_get_clean();
|
300 |
+
|
301 |
+
if ( $social_list != '' ) {
|
302 |
+
return $html.$social_list.'</ul>';
|
303 |
+
|
304 |
+
} else {
|
305 |
+
return;
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
// Render Logo
|
310 |
+
public function cmp_logo( $themeslug ) {
|
311 |
+
$logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
|
312 |
+
$size = $this->isMobile() ? 'large' : 'full';
|
313 |
+
$html = '';
|
314 |
+
switch ( $logo_type ) {
|
315 |
+
case 'graphic':
|
316 |
+
// get logo id
|
317 |
+
$logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
318 |
+
// get logo
|
319 |
+
if ( $logo_id != '' ) {
|
320 |
+
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
321 |
+
}
|
322 |
+
if ( isset($logo_url[0]) ) {
|
323 |
+
$html = '<div class="logo-wrapper"><img src="'.esc_url( $logo_url[0] ).'" class="graphic-logo" alt="logo"></div>';
|
324 |
+
|
325 |
+
}
|
326 |
+
break;
|
327 |
+
|
328 |
+
case 'text':
|
329 |
+
$text_logo = stripslashes(get_option('niteoCS_text_logo['.$themeslug.']', get_bloginfo( 'name', 'display' )));
|
330 |
+
$html = '<h1 class="text-logo">'.esc_html( $text_logo ).'</h1>';
|
331 |
+
break;
|
332 |
+
case 'disabled':
|
333 |
+
default:
|
334 |
+
break;
|
335 |
+
}
|
336 |
+
return $html;
|
337 |
+
}
|
338 |
+
|
339 |
+
// Render Javascripts
|
340 |
+
public function cmp_javascripts( $background, $themeslug ) {
|
341 |
+
|
342 |
+
// if video background ini vidim background player
|
343 |
+
if ( $background == 5 ) { ?>
|
344 |
+
|
345 |
+
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
346 |
+
<script>
|
347 |
+
<?php
|
348 |
+
$video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
|
349 |
+
|
350 |
+
if ( !empty( $video_poster ) ) {
|
351 |
+
$video_poster = $video_poster[0];
|
352 |
+
}
|
353 |
+
// video
|
354 |
+
$source = get_option('niteoCS_banner_video['.$themeslug.']');
|
355 |
+
|
356 |
+
switch ( $source ) {
|
357 |
+
case 'YouTube':
|
358 |
+
$banner_url = get_option('niteoCS_youtube_url['.$themeslug.']'); ?>
|
359 |
+
|
360 |
+
var myBackground = new vidim( '#player', {
|
361 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
362 |
+
type: 'YouTube',
|
363 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
364 |
+
}
|
365 |
+
);
|
366 |
+
|
367 |
+
<?php
|
368 |
+
break;
|
369 |
+
|
370 |
+
case 'vimeo':
|
371 |
+
$banner_url = get_option('niteoCS_vimeo_url['.$themeslug.']'); ?>
|
372 |
+
var myBackground = new vidim( '#player', {
|
373 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
374 |
+
type: 'vimeo',
|
375 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
376 |
+
}
|
377 |
+
);
|
378 |
+
<?php
|
379 |
+
break;
|
380 |
+
|
381 |
+
case 'video/mp4':
|
382 |
+
$banner_url = get_option('niteoCS_video_file_url['.$themeslug.']');
|
383 |
+
$banner_url = wp_get_attachment_url( $banner_url ); ?>
|
384 |
+
var myBackground = new vidim( '#player', {
|
385 |
+
src: [
|
386 |
+
{
|
387 |
+
type: 'video/mp4',
|
388 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
389 |
+
},
|
390 |
+
],
|
391 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
392 |
+
});
|
393 |
+
<?php
|
394 |
+
break;
|
395 |
+
default:
|
396 |
+
break;
|
397 |
+
} ?>
|
398 |
+
</script>
|
399 |
+
<?php
|
400 |
+
// add loaded class to background media
|
401 |
+
} else { ?>
|
402 |
+
<script>
|
403 |
+
window.onload = function() {
|
404 |
+
var image = document.getElementById('background-image');
|
405 |
+
if ( image != null ) {
|
406 |
+
image.className += " loaded";
|
407 |
+
}
|
408 |
+
|
409 |
+
}
|
410 |
+
</script>
|
411 |
+
<?php
|
412 |
+
}
|
413 |
+
|
414 |
+
return;
|
415 |
+
}
|
416 |
+
|
417 |
+
// return script for redirect
|
418 |
+
public function niteo_redirect() {
|
419 |
+
if ( $this->cmp_status() == 3 ) {
|
420 |
+
$url = get_option('niteoCS_URL_redirect');
|
421 |
+
$time = get_option('niteoCS_redirect_time'); ?>
|
422 |
+
<script>
|
423 |
+
setTimeout(function() {
|
424 |
+
window.location.href = "<?php echo esc_url($url);?>";
|
425 |
+
}, <?php echo esc_attr($time * 1000);?>);
|
426 |
+
</script>';
|
427 |
+
<?php
|
428 |
+
}
|
429 |
+
|
430 |
+
return;
|
431 |
+
}
|
432 |
+
|
433 |
+
// render subscribe form
|
434 |
+
public function cmp_subscribe_form() {
|
435 |
+
$subscribe = get_option('niteoCS_subscribe_type', '2');
|
436 |
+
$html = '';
|
437 |
+
// if subscribers is 3rd party plugin, render form by shortcode
|
438 |
+
if ( $subscribe == '1' ) {
|
439 |
+
$replace = array('<p>', '</p>' );
|
440 |
+
$html = str_replace($replace, '', do_shortcode( stripslashes( get_option('niteoCS_subscribe_code') ))) ;
|
441 |
+
|
442 |
+
// if subsctbiers is niteo, render our html form
|
443 |
+
} else if ( $subscribe == '2' ) {
|
444 |
+
$niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
|
445 |
+
|
446 |
+
if ( get_option('niteoCS_translation') ) {
|
447 |
+
$translation = json_decode( get_option('niteoCS_translation'), true );
|
448 |
+
$placeholder = $translation[4]['translation'];
|
449 |
+
$submit = $translation[8]['translation'];
|
450 |
+
} else {
|
451 |
+
$placeholder = 'Insert your email address.';
|
452 |
+
$submit = 'Submit';
|
453 |
+
}
|
454 |
+
|
455 |
+
if ($this->cmp_selectedTheme() == 'postery' || (isset($_GET['theme']) && $_GET['theme'] == 'postery') ) {
|
456 |
+
$submit = '';
|
457 |
+
}
|
458 |
+
?>
|
459 |
+
|
460 |
+
<form id="subscribe-form" method="post">
|
461 |
+
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
462 |
+
<?php
|
463 |
+
if ( $niteoCS_subscribe_label != '' ) { ?>
|
464 |
+
<label for="EMAIL"><?php echo esc_html($niteoCS_subscribe_label);?></label>
|
465 |
+
<?php
|
466 |
+
} ?>
|
467 |
+
<input type="email" name="EMAIL" placeholder="<?php echo esc_attr($placeholder);?>" required>
|
468 |
+
|
469 |
+
<input type="submit" value="<?php echo esc_attr($submit);?>">
|
470 |
+
|
471 |
+
<div style="display: none;">
|
472 |
+
<input type="text" name="form_honeypot" value="" tabindex="-1" autocomplete="off">
|
473 |
+
</div>
|
474 |
+
|
475 |
+
<div class="subsribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
|
476 |
+
</form>
|
477 |
+
<?php
|
478 |
+
}
|
479 |
+
|
480 |
+
return $html;
|
481 |
+
|
482 |
+
}
|
483 |
+
}
|
inc/class-cmp-subscribers.php
CHANGED
@@ -12,8 +12,8 @@ class cmp_subs_list_table extends WP_List_Table {
|
|
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 |
}
|
19 |
/**
|
@@ -62,13 +62,27 @@ class cmp_subs_list_table extends WP_List_Table {
|
|
62 |
*/
|
63 |
function get_bulk_actions() {
|
64 |
$actions = array(
|
65 |
-
'delete' => __( 'Delete Selected' , 'cmp'),
|
66 |
-
// 'export' => __( 'Export Selected' , 'cmp')
|
67 |
);
|
68 |
|
69 |
return $actions;
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
/**
|
73 |
* Process bulk actions
|
74 |
*
|
@@ -78,16 +92,21 @@ class cmp_subs_list_table extends WP_List_Table {
|
|
78 |
|
79 |
// security check!
|
80 |
// check onces and wordpress rights, else DIE
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
// check onces and wordpress rights, else DIE
|
88 |
if ( $_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['id'])) {
|
89 |
if( !wp_verify_nonce($_GET['_nonce'], 'cmp_delete_subscriber' ) || !current_user_can('publish_pages') ) {
|
90 |
-
die('Sorry, but this request is invalid');
|
91 |
}
|
92 |
}
|
93 |
|
@@ -147,10 +166,10 @@ class cmp_subs_list_table extends WP_List_Table {
|
|
147 |
function get_columns() {
|
148 |
$columns = array(
|
149 |
'cb' => '<input type="checkbox" />',
|
150 |
-
'id' => __('ID', 'cmp'),
|
151 |
-
'email' => __('Email', 'cmp'),
|
152 |
-
'timestamp' => __('Time', 'cmp'),
|
153 |
-
'ip_address' => __('IP Address', 'cmp'),
|
154 |
|
155 |
);
|
156 |
return $columns;
|
@@ -203,19 +222,7 @@ class cmp_subs_list_table extends WP_List_Table {
|
|
203 |
}
|
204 |
}
|
205 |
|
206 |
-
/**
|
207 |
-
* Display delete action at each email row.
|
208 |
-
*
|
209 |
-
* @return Mixed
|
210 |
-
*/
|
211 |
-
function column_email($item) {
|
212 |
-
$complete_url = wp_nonce_url( sprintf('?page=%s&action=%s&id=%s', $_REQUEST['page'],'delete',$item['id']), 'cmp_delete_subscriber', '_nonce' );
|
213 |
-
$actions = array(
|
214 |
-
'delete' => '<a href="'.$complete_url.'">'.__('Delete', 'cmp').'</a>',
|
215 |
-
);
|
216 |
|
217 |
-
return sprintf('%1$s %2$s', $item['email'], $this->row_actions($actions) );
|
218 |
-
}
|
219 |
/**
|
220 |
* Allows you to sort the data by the variables set in the $_GET
|
221 |
*
|
@@ -244,6 +251,6 @@ class cmp_subs_list_table extends WP_List_Table {
|
|
244 |
}
|
245 |
|
246 |
function no_items() {
|
247 |
-
_e( 'No subscribers yet!', 'cmp' );
|
248 |
}
|
249 |
}
|
12 |
$this->subscriber_list = get_option('niteoCS_subscribers_list');
|
13 |
$this->dateformat = get_option('date_format');
|
14 |
parent::__construct( array(
|
15 |
+
'singular' => __( 'subscriber', 'cmp-coming-soon-maintenance' ), //singular name of the listed records
|
16 |
+
'plural' => __( 'subscribers', 'cmp-coming-soon-maintenance' ), //plural name of the listed records
|
17 |
));
|
18 |
}
|
19 |
/**
|
62 |
*/
|
63 |
function get_bulk_actions() {
|
64 |
$actions = array(
|
65 |
+
'delete' => __( 'Delete Selected' , 'cmp-coming-soon-maintenance'),
|
66 |
+
// 'export' => __( 'Export Selected' , 'cmp-coming-soon-maintenance')
|
67 |
);
|
68 |
|
69 |
return $actions;
|
70 |
}
|
71 |
|
72 |
+
/**
|
73 |
+
* Display delete action at each email row.
|
74 |
+
*
|
75 |
+
* @return Mixed
|
76 |
+
*/
|
77 |
+
function column_email($item) {
|
78 |
+
$complete_url = wp_nonce_url( sprintf('?page=%s&action=%s&id=%s', $_REQUEST['page'],'delete',$item['id']), 'cmp_delete_subscriber', '_nonce' );
|
79 |
+
$actions = array(
|
80 |
+
'delete' => '<a href="'.$complete_url.'">'.__('Delete', 'cmp-coming-soon-maintenance').'</a>',
|
81 |
+
);
|
82 |
+
|
83 |
+
return sprintf('%1$s %2$s', $item['email'], $this->row_actions($actions) );
|
84 |
+
}
|
85 |
+
|
86 |
/**
|
87 |
* Process bulk actions
|
88 |
*
|
92 |
|
93 |
// security check!
|
94 |
// check onces and wordpress rights, else DIE
|
95 |
+
// security check!
|
96 |
+
if ( isset( $_POST['_wpnonce'] ) && ! empty( $_POST['_wpnonce'] ) ) {
|
97 |
+
|
98 |
+
$nonce = filter_input( INPUT_POST, '_wpnonce', FILTER_SANITIZE_STRING );
|
99 |
+
$action = 'bulk-' . $this->_args['plural'];
|
100 |
+
|
101 |
+
if ( ! wp_verify_nonce( $nonce, $action ) )
|
102 |
+
wp_die( 'Sorry, but this request is invalid.' );
|
103 |
+
|
104 |
+
}
|
105 |
|
106 |
// check onces and wordpress rights, else DIE
|
107 |
if ( $_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['id'])) {
|
108 |
if( !wp_verify_nonce($_GET['_nonce'], 'cmp_delete_subscriber' ) || !current_user_can('publish_pages') ) {
|
109 |
+
die('Sorry, but this request is invalid.');
|
110 |
}
|
111 |
}
|
112 |
|
166 |
function get_columns() {
|
167 |
$columns = array(
|
168 |
'cb' => '<input type="checkbox" />',
|
169 |
+
'id' => __('ID', 'cmp-coming-soon-maintenance'),
|
170 |
+
'email' => __('Email', 'cmp-coming-soon-maintenance'),
|
171 |
+
'timestamp' => __('Time', 'cmp-coming-soon-maintenance'),
|
172 |
+
'ip_address' => __('IP Address', 'cmp-coming-soon-maintenance'),
|
173 |
|
174 |
);
|
175 |
return $columns;
|
222 |
}
|
223 |
}
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
|
|
|
|
226 |
/**
|
227 |
* Allows you to sort the data by the variables set in the $_GET
|
228 |
*
|
251 |
}
|
252 |
|
253 |
function no_items() {
|
254 |
+
_e( 'No subscribers yet!', 'cmp-coming-soon-maintenance' );
|
255 |
}
|
256 |
}
|
inc/class-cmp-translate.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Create a new table class that will extend the WP_List_Table
|
6 |
+
*/
|
7 |
+
class cmp_translate_table extends WP_List_Table {
|
8 |
+
|
9 |
+
var $translate_list;
|
10 |
+
|
11 |
+
function __construct(){
|
12 |
+
|
13 |
+
if ( get_option('niteoCS_translation') ) {
|
14 |
+
$this->translate_list = json_decode( get_option('niteoCS_translation'), true );
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
parent::__construct( array(
|
19 |
+
'singular' => __( 'Translation string', 'cmp-coming-soon-maintenance' ), //singular name of the listed records
|
20 |
+
'plural' => __( 'Tranlation String', 'cmp-coming-soon-maintenance' ), //plural name of the listed records
|
21 |
+
));
|
22 |
+
|
23 |
+
}
|
24 |
+
/**
|
25 |
+
* Prepare the items for the table to process
|
26 |
+
*
|
27 |
+
* @return Void
|
28 |
+
*/
|
29 |
+
function prepare_items() {
|
30 |
+
|
31 |
+
$columns = $this->get_columns();
|
32 |
+
$hidden = $this->get_hidden_columns();
|
33 |
+
$this->process_bulk_action();
|
34 |
+
$data = $this->table_data();
|
35 |
+
$this->_column_headers = array($columns, $hidden);
|
36 |
+
$this->items = $data;
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Override the parent columns method. Defines the columns to use in your listing table
|
43 |
+
*
|
44 |
+
* @return Array
|
45 |
+
*/
|
46 |
+
function get_columns() {
|
47 |
+
$columns = array(
|
48 |
+
'string' => __('String', 'cmp-coming-soon-maintenance'),
|
49 |
+
'translation' => __('Translation', 'cmp-coming-soon-maintenance'),
|
50 |
+
|
51 |
+
|
52 |
+
);
|
53 |
+
return $columns;
|
54 |
+
}
|
55 |
+
/**
|
56 |
+
* Define which columns are hidden
|
57 |
+
*
|
58 |
+
* @return Array
|
59 |
+
*/
|
60 |
+
function get_hidden_columns() {
|
61 |
+
return array();
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Get the table data
|
66 |
+
*
|
67 |
+
* @return Array
|
68 |
+
*/
|
69 |
+
function table_data() {
|
70 |
+
return $this->translate_list;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Define what data to show on each column of the table
|
75 |
+
*
|
76 |
+
* @param Array $item Data
|
77 |
+
* @param String $column_name - Current column name
|
78 |
+
*
|
79 |
+
* @return Mixed
|
80 |
+
*/
|
81 |
+
function column_default( $item, $column_name ) {
|
82 |
+
switch( $column_name ) {
|
83 |
+
case 'string':
|
84 |
+
return $item[ $column_name ];
|
85 |
+
case 'translation':
|
86 |
+
return '<input type="text" name="niteoCS_translate_'.$item['id'].'" value="'.$item[ $column_name ].'" class="regular-text code">';
|
87 |
+
|
88 |
+
default:
|
89 |
+
return print_r( $item, true ) ;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
function no_items() {
|
94 |
+
_e( 'No Translation Variables!', 'cmp-coming-soon-maintenance' );
|
95 |
+
}
|
96 |
+
}
|
inc/helper-functions.php
DELETED
@@ -1,55 +0,0 @@
|
|
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
@@ -44,6 +44,11 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
44 |
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="4"<?php if ( $niteoCS_banner == 4) { echo ' checked="checked"'; } ?>> <?php _e('Solid Color', 'cmp-coming-soon-maintenance');?>
|
45 |
</label>
|
46 |
</p>
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
</fieldset>
|
49 |
</th>
|
@@ -72,7 +77,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
72 |
|
73 |
<fieldset id="unsplash_banner">
|
74 |
<p class="unplash-description"><a href="http://unsplash.com" target="_blank">Unsplash</a> <?php _e('is a world leading source for free to use high quality stock images. All of the images that are submitted and published on Unsplash fall under under the Creative Commons Zero (CC0) license, which means you can use the image for any personal or commercial use.', 'cmp-coming-soon-maintenance');?></p>
|
75 |
-
<label for="unsplash_feed_<?php echo esc_attr($themeslug);?>"><?php _e('Choose Unsplash Feed', 'cmp-coming-soon-maintenance');?></label
|
76 |
<select name="unsplash_feed_<?php echo esc_attr($themeslug);?>">
|
77 |
<option value="0" <?php if ( $niteoCS_unsplash_feed == '0' ) { echo ' selected="selected"'; } ?>><?php _e('Specific Photo', 'cmp-coming-soon-maintenance');?></option>
|
78 |
<option value="1" <?php if ( $niteoCS_unsplash_feed == '1' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Category', 'cmp-coming-soon-maintenance');?></option>
|
@@ -86,7 +91,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
86 |
</p>
|
87 |
|
88 |
<p class="unsplash-feed" id="unsplash-feed-1">
|
89 |
-
<label for="unsplash_category_<?php echo esc_attr($themeslug);?>"><?php _e('Select Category', 'cmp-coming-soon-maintenance');?></label
|
90 |
<select name="unsplash_category_<?php echo esc_attr($themeslug);?>">
|
91 |
<option value="buildings" <?php if ( $niteoCS_unsplash_category == 'buildings') { echo ' selected="selected"'; } ?>><?php _e('Buildings', 'cmp-coming-soon-maintenance');?></option>
|
92 |
<option value="food" <?php if ( $niteoCS_unsplash_category == 'food') { echo ' selected="selected"'; } ?>><?php _e('Food', 'cmp-coming-soon-maintenance');?></option>
|
@@ -94,7 +99,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
94 |
<option value="people" <?php if ( $niteoCS_unsplash_category == 'people') { echo ' selected="selected"'; } ?>><?php _e('People', 'cmp-coming-soon-maintenance');?></option>
|
95 |
<option value="technology" <?php if ( $niteoCS_unsplash_category == 'technology') { echo ' selected="selected"'; } ?>><?php _e('Technology', 'cmp-coming-soon-maintenance');?></option>
|
96 |
<option value="objects" <?php if ( $niteoCS_unsplash_category == 'objects') { echo ' selected="selected"'; } ?>><?php _e('Objects', 'cmp-coming-soon-maintenance');?></option>
|
97 |
-
</select
|
98 |
|
99 |
<label for="niteoCS_cat_keyword"><?php _e('You can limit Category to Specific Keyword', 'cmp-coming-soon-maintenance');?></label>
|
100 |
<input type="text" class="widefat" id="niteoCS-category-keyword" name="niteoCS_cat_keyword_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_cat_keyword); ?>" />
|
@@ -122,7 +127,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
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
|
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
|
128 |
foreach ($patterns as $pattern) { ?>
|
@@ -132,7 +137,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
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="
|
136 |
|
137 |
<input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ($niteoCS_banner_pattern == 'custom') ? 'block' : 'none'?>;"/>
|
138 |
|
@@ -146,7 +151,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
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
|
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>
|
@@ -195,6 +200,48 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
195 |
|
196 |
<input id="delete-video-thumb" type="button" class="button" value="Remove Thumbnail" />
|
197 |
</fieldset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
</td>
|
199 |
</tr>
|
200 |
<tr><th>
|
44 |
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="4"<?php if ( $niteoCS_banner == 4) { echo ' checked="checked"'; } ?>> <?php _e('Solid Color', 'cmp-coming-soon-maintenance');?>
|
45 |
</label>
|
46 |
</p>
|
47 |
+
<p>
|
48 |
+
<label title="Gradient Banner">
|
49 |
+
<input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="6"<?php if ( $niteoCS_banner == 6) { echo ' checked="checked"'; } ?>> <?php _e('Gradient Color', 'cmp-coming-soon-maintenance');?>
|
50 |
+
</label>
|
51 |
+
</p>
|
52 |
|
53 |
</fieldset>
|
54 |
</th>
|
77 |
|
78 |
<fieldset id="unsplash_banner">
|
79 |
<p class="unplash-description"><a href="http://unsplash.com" target="_blank">Unsplash</a> <?php _e('is a world leading source for free to use high quality stock images. All of the images that are submitted and published on Unsplash fall under under the Creative Commons Zero (CC0) license, which means you can use the image for any personal or commercial use.', 'cmp-coming-soon-maintenance');?></p>
|
80 |
+
<label for="unsplash_feed_<?php echo esc_attr($themeslug);?>"><?php _e('Choose Unsplash Feed', 'cmp-coming-soon-maintenance');?></label><br>
|
81 |
<select name="unsplash_feed_<?php echo esc_attr($themeslug);?>">
|
82 |
<option value="0" <?php if ( $niteoCS_unsplash_feed == '0' ) { echo ' selected="selected"'; } ?>><?php _e('Specific Photo', 'cmp-coming-soon-maintenance');?></option>
|
83 |
<option value="1" <?php if ( $niteoCS_unsplash_feed == '1' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Category', 'cmp-coming-soon-maintenance');?></option>
|
91 |
</p>
|
92 |
|
93 |
<p class="unsplash-feed" id="unsplash-feed-1">
|
94 |
+
<label for="unsplash_category_<?php echo esc_attr($themeslug);?>"><?php _e('Select Category', 'cmp-coming-soon-maintenance');?></label><br>
|
95 |
<select name="unsplash_category_<?php echo esc_attr($themeslug);?>">
|
96 |
<option value="buildings" <?php if ( $niteoCS_unsplash_category == 'buildings') { echo ' selected="selected"'; } ?>><?php _e('Buildings', 'cmp-coming-soon-maintenance');?></option>
|
97 |
<option value="food" <?php if ( $niteoCS_unsplash_category == 'food') { echo ' selected="selected"'; } ?>><?php _e('Food', 'cmp-coming-soon-maintenance');?></option>
|
99 |
<option value="people" <?php if ( $niteoCS_unsplash_category == 'people') { echo ' selected="selected"'; } ?>><?php _e('People', 'cmp-coming-soon-maintenance');?></option>
|
100 |
<option value="technology" <?php if ( $niteoCS_unsplash_category == 'technology') { echo ' selected="selected"'; } ?>><?php _e('Technology', 'cmp-coming-soon-maintenance');?></option>
|
101 |
<option value="objects" <?php if ( $niteoCS_unsplash_category == 'objects') { echo ' selected="selected"'; } ?>><?php _e('Objects', 'cmp-coming-soon-maintenance');?></option>
|
102 |
+
</select><br>
|
103 |
|
104 |
<label for="niteoCS_cat_keyword"><?php _e('You can limit Category to Specific Keyword', 'cmp-coming-soon-maintenance');?></label>
|
105 |
<input type="text" class="widefat" id="niteoCS-category-keyword" name="niteoCS_cat_keyword_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr($niteoCS_cat_keyword); ?>" />
|
127 |
</fieldset>
|
128 |
|
129 |
<fieldset id="graphic_pattern">
|
130 |
+
<label for="niteoCS_banner_pattern_<?php echo esc_attr($themeslug);?>"><?php _e('Select Pattern', 'cmp-coming-soon-maintenance');?></label><br>
|
131 |
<select name="niteoCS_banner_pattern_<?php echo esc_attr($themeslug);?>" data-url="<?php echo esc_url(WP_PLUGIN_URL . '/cmp-coming-soon-maintenance/img/patterns/');?>">
|
132 |
<?php
|
133 |
foreach ($patterns as $pattern) { ?>
|
137 |
<option value="custom" <?php if ( $niteoCS_banner_pattern == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Pattern...', 'cmp-coming-soon-maintenance');?></option>
|
138 |
</select><br>
|
139 |
|
140 |
+
<input type="hidden" class="widefat" id="niteoCS-pattern-id" name="niteoCS_banner_pattern_custom_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_pattern_custom ); ?>" />
|
141 |
|
142 |
<input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ($niteoCS_banner_pattern == 'custom') ? 'block' : 'none'?>;"/>
|
143 |
|
151 |
</fieldset>
|
152 |
|
153 |
<fieldset id="video_banner">
|
154 |
+
<label for="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>"><?php _e('Select Video Source', 'cmp-coming-soon-maintenance');?></label><br>
|
155 |
<select name="niteoCS_banner_video_<?php echo esc_attr($themeslug);?>" class="banner-video-source">
|
156 |
<option value="YouTube" <?php if ( $niteoCS_banner_video == 'YouTube' ) { echo ' selected="selected"'; } ?>><?php _e('YouTube', 'cmp-coming-soon-maintenance');?></option>
|
157 |
<option value="video/mp4" <?php if ( $niteoCS_banner_video == 'video/mp4' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Video File', 'cmp-coming-soon-maintenance');?></option>
|
200 |
|
201 |
<input id="delete-video-thumb" type="button" class="button" value="Remove Thumbnail" />
|
202 |
</fieldset>
|
203 |
+
|
204 |
+
<fieldset id="gradient_background">
|
205 |
+
|
206 |
+
<label for="niteoCS_gradient_<?php echo esc_attr($themeslug);?>"><?php _e('Select Gradient Background', 'cmp-coming-soon-maintenance');?></label><br>
|
207 |
+
|
208 |
+
<select name="niteoCS_gradient_<?php echo esc_attr($themeslug);?>" class="background-gradient">
|
209 |
+
<option value="#d53369:#cbad6d" <?php if ( $niteoCS_gradient == '#d53369:#cbad6d' ) { echo ' selected="selected"'; } ?>><?php _e('Blury Beach', 'cmp-coming-soon-maintenance');?></option>
|
210 |
+
<option value="#FC354C:#0ABFBC" <?php if ( $niteoCS_gradient == '#FC354C:#0ABFBC' ) { echo ' selected="selected"'; } ?>><?php _e('Miaka', 'cmp-coming-soon-maintenance');?></option>
|
211 |
+
<option value="#C04848:#480048" <?php if ( $niteoCS_gradient == '#C04848:#480048' ) { echo ' selected="selected"'; } ?>><?php _e('Influenza', 'cmp-coming-soon-maintenance');?></option>
|
212 |
+
<option value="#5f2c82:#49a09d" <?php if ( $niteoCS_gradient == '#5f2c82:#49a09d' ) { echo ' selected="selected"'; } ?>><?php _e('Calm Darya', 'cmp-coming-soon-maintenance');?></option>
|
213 |
+
<option value="#5C258D:#4389A2" <?php if ( $niteoCS_gradient == '#5C258D:#4389A2' ) { echo ' selected="selected"'; } ?>><?php _e('Shroom Haze', 'cmp-coming-soon-maintenance');?></option>
|
214 |
+
<option value="#1D2B64:#F8CDDA" <?php if ( $niteoCS_gradient == '#1D2B64:#F8CDDA' ) { echo ' selected="selected"'; } ?>><?php _e('Purlple Paradise', 'cmp-coming-soon-maintenance');?></option>
|
215 |
+
<option value="#1A2980:#26D0CE" <?php if ( $niteoCS_gradient == '#1A2980:#26D0CE' ) { echo ' selected="selected"'; } ?>><?php _e('Aqua Marine', 'cmp-coming-soon-maintenance');?></option>
|
216 |
+
<option value="#FF512F:#DD2476" <?php if ( $niteoCS_gradient == '#FF512F:#DD2476' ) { echo ' selected="selected"'; } ?>><?php _e('Bloody Mary', 'cmp-coming-soon-maintenance');?></option>
|
217 |
+
<option value="#E55D87:#5FC3E4" <?php if ( $niteoCS_gradient == '#E55D87:#5FC3E4' ) { echo ' selected="selected"'; } ?>><?php _e('Rose Water', 'cmp-coming-soon-maintenance');?></option>
|
218 |
+
<option value="#003973:#E5E5BE" <?php if ( $niteoCS_gradient == '#003973:#E5E5BE' ) { echo ' selected="selected"'; } ?>><?php _e('Horizon', 'cmp-coming-soon-maintenance');?></option>
|
219 |
+
<option value="#e52d27:#b31217" <?php if ( $niteoCS_gradient == '#e52d27:#b31217' ) { echo ' selected="selected"'; } ?>><?php _e('Youtube', 'cmp-coming-soon-maintenance');?></option>
|
220 |
+
<option value="#FC466B:#3F5EFB" <?php if ( $niteoCS_gradient == '#FC466B:#3F5EFB' ) { echo ' selected="selected"'; } ?>><?php _e('Sublime Vivid', 'cmp-coming-soon-maintenance');?></option>
|
221 |
+
<option value="#ED5565:#D62739" <?php if ( $niteoCS_gradient == '#ED5565:#D62739' ) { echo ' selected="selected"'; } ?>><?php _e('Red', 'cmp-coming-soon-maintenance');?></option>
|
222 |
+
<option value="#FC6E51:#DB391E" <?php if ( $niteoCS_gradient == '#FC6E51:#DB391E' ) { echo ' selected="selected"'; } ?>><?php _e('Orange', 'cmp-coming-soon-maintenance');?></option>
|
223 |
+
<option value="#FFDA7C:#F6A742" <?php if ( $niteoCS_gradient == '#FFDA7C:#F6A742' ) { echo ' selected="selected"'; } ?>><?php _e('Yellow', 'cmp-coming-soon-maintenance');?></option>
|
224 |
+
<option value="#A0D468:#6EAF26" <?php if ( $niteoCS_gradient == '#A0D468:#6EAF26' ) { echo ' selected="selected"'; } ?>><?php _e('Green', 'cmp-coming-soon-maintenance');?></option>
|
225 |
+
<option value="#48CFAD:#19A784" <?php if ( $niteoCS_gradient == '#48CFAD:#19A784' ) { echo ' selected="selected"'; } ?>><?php _e('Green Pastel', 'cmp-coming-soon-maintenance');?></option>
|
226 |
+
<option value="#4FC1E9:#0B9BD0" <?php if ( $niteoCS_gradient == '#4FC1E9:#0B9BD0' ) { echo ' selected="selected"'; } ?>><?php _e('Sky blue', 'cmp-coming-soon-maintenance');?></option>
|
227 |
+
<option value="#5D9CEC:#0D65D8" <?php if ( $niteoCS_gradient == '#5D9CEC:#0D65D8' ) { echo ' selected="selected"'; } ?>><?php _e('Purple', 'cmp-coming-soon-maintenance');?></option>
|
228 |
+
<option value="#EC87C0:#BF4C90" <?php if ( $niteoCS_gradient == '#EC87C0:#BF4C90' ) { echo ' selected="selected"'; } ?>><?php _e('Violet', 'cmp-coming-soon-maintenance');?></option>
|
229 |
+
<option value="#EDF1F7:#C9D7E9" <?php if ( $niteoCS_gradient == '#EDF1F7:#C9D7E9' ) { echo ' selected="selected"'; } ?>><?php _e('Light grey', 'cmp-coming-soon-maintenance');?></option>
|
230 |
+
<option value="#CCD1D9:#8F9AA8" <?php if ( $niteoCS_gradient == '#CCD1D9:#8F9AA8' ) { echo ' selected="selected"'; } ?>><?php _e('Grey', 'cmp-coming-soon-maintenance');?></option>
|
231 |
+
<option value="#656D78:#2F3640" <?php if ( $niteoCS_gradient == '#656D78:#2F3640' ) { echo ' selected="selected"'; } ?>><?php _e('Dark grey', 'cmp-coming-soon-maintenance');?></option>
|
232 |
+
<option value="custom" <?php if ( $niteoCS_gradient == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Gradient', 'cmp-coming-soon-maintenance');?></option>
|
233 |
+
</select><br>
|
234 |
+
|
235 |
+
<p class="custom-gradient" style="display:<?php echo ( $niteoCS_gradient == 'custom' ) ? 'block' : 'none'; ?>">
|
236 |
+
<label for="niteoCS_banner_gradient_one_<?php echo esc_attr($themeslug);?>"><?php _e('Select first gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
|
237 |
+
<input type="text" name="niteoCS_banner_gradient_one_<?php echo esc_attr($themeslug);?>" id="niteoCS_gradient_one" value="<?php echo esc_attr( $niteoCS_gradient_one_custom); ?>" data-default-color="#bdc3c7" class="regular-text code"><br>
|
238 |
+
<label for="niteoCS_banner_gradient_two_<?php echo esc_attr($themeslug);?>"><?php _e('Select second gradient color:', 'cmp-coming-soon-maintenance');?></label><br>
|
239 |
+
<input type="text" name="niteoCS_banner_gradient_two_<?php echo esc_attr($themeslug);?>" id="niteoCS_gradient_two" value="<?php echo esc_attr( $niteoCS_gradient_two_custom); ?>" data-default-color="#bdc3c7" class="regular-text code"><br>
|
240 |
+
</p>
|
241 |
+
|
242 |
+
<div class="gradient-preview" style="background:-moz-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:-webkit-linear-gradient(-45deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%);background:linear-gradient(135deg, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_one_custom ) : esc_attr( $niteoCS_gradient_one ); ?> 0%, <?php echo ( $niteoCS_gradient == 'custom' ) ? esc_attr( $niteoCS_gradient_two_custom ) : esc_attr( $niteoCS_gradient_two ); ?> 100%)"></div>
|
243 |
+
</fieldset>
|
244 |
+
|
245 |
</td>
|
246 |
</tr>
|
247 |
<tr><th>
|
inc/settings-counter.php
CHANGED
@@ -43,24 +43,24 @@ $niteoCS_countdown_redirect = get_option('niteoCS_countdown_redirect');
|
|
43 |
|
44 |
|
45 |
<div class="table-wrapper content">
|
46 |
-
<h3><?php _e('Countdown Timer Setup', 'cmp');?></h3>
|
47 |
<table class="content">
|
48 |
<tr>
|
49 |
<th>
|
50 |
<fieldset>
|
51 |
<legend class="screen-reader-text">
|
52 |
-
<span><?php _e('Counter setup', 'cmp');?></span>
|
53 |
</legend>
|
54 |
|
55 |
<p>
|
56 |
<label title="Enabled">
|
57 |
-
<input type="radio" name="niteoCS_counter" value="1"<?php if ( $niteoCS_counter == 1) { echo ' checked="checked"'; } ?>> <?php _e('Enabled', 'cmp');?>
|
58 |
</label>
|
59 |
</p>
|
60 |
|
61 |
<p>
|
62 |
<label title="Disabled">
|
63 |
-
<input type="radio" name="niteoCS_counter" value="0"<?php if ( $niteoCS_counter == 0) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp');?>
|
64 |
</label>
|
65 |
</p>
|
66 |
|
@@ -68,31 +68,31 @@ $niteoCS_countdown_redirect = get_option('niteoCS_countdown_redirect');
|
|
68 |
</th>
|
69 |
|
70 |
<td id="counter-disabled">
|
71 |
-
<p><?php _e('Countdown Timer is disabled.', 'cmp');?></p>
|
72 |
</td>
|
73 |
|
74 |
<td id="counter-enabled">
|
75 |
-
<p><?php _e('Click on date input and set a date & time for a Countdown timer.', 'cmp');?></p>
|
76 |
<fieldset>
|
77 |
<legend class="screen-reader-text">
|
78 |
-
<span><?php _e('Counter setup', 'cmp');?></span>
|
79 |
</legend>
|
80 |
|
81 |
-
<input type="text" name="niteoCS_counter_date" id="niteoCS_counter_date" placeholder="<?php _e('Select Date..','cmp');?>" value="<?php echo esc_attr( $niteoCS_counter_date); ?>" class="regular-text code"><br>
|
82 |
|
83 |
-
<label for="niteoCS_countdown_action"><?php _e('Countdown action:', 'cmp');?></label>
|
84 |
<select name="niteoCS_countdown_action">
|
85 |
-
<option value="no-action" <?php if ( $niteoCS_countdown_action == 'no-action' ) { echo ' selected="selected"'; } ?>><?php _e('No action', 'cmp');?></option>
|
86 |
-
<!-- <option value="display-text" <?php if ( $niteoCS_countdown_action == 'display-text' ) { echo ' selected="selected"'; } ?>><?php _e('Display custom text', 'cmp');?></option> -->
|
87 |
-
<option value="disable-cmp" <?php if ( $niteoCS_countdown_action == 'disable-cmp' ) { echo ' selected="selected"'; } ?>><?php _e('Disable CMP Plugin Page', 'cmp');?></option>
|
88 |
-
<option value="redirect" <?php if ( $niteoCS_countdown_action == 'redirect' ) { echo ' selected="selected"'; } ?>><?php _e('URL redirect', 'cmp');?></option>
|
89 |
</select>
|
90 |
|
91 |
-
<label for="niteoCS_countdown_text" id="niteoCS_countdown_text"><?php _e('Enter custom text', 'cmp');?>
|
92 |
<input type="text" name="niteoCS_countdown_text" value="<?php echo esc_attr( $niteoCS_countdown_text); ?>" class="regular-text code"><br>
|
93 |
</label>
|
94 |
|
95 |
-
<label for="niteoCS_countdown_redirect" id="niteoCS_countdown_redirect"><?php _e('Enter redirect URL', 'cmp');?>
|
96 |
<input type="text" name="niteoCS_countdown_redirect" value="<?php echo esc_url( $niteoCS_countdown_redirect); ?>" class="regular-text code"><br>
|
97 |
</label>
|
98 |
</fieldset>
|
43 |
|
44 |
|
45 |
<div class="table-wrapper content">
|
46 |
+
<h3><?php _e('Countdown Timer Setup', 'cmp-coming-soon-maintenance');?></h3>
|
47 |
<table class="content">
|
48 |
<tr>
|
49 |
<th>
|
50 |
<fieldset>
|
51 |
<legend class="screen-reader-text">
|
52 |
+
<span><?php _e('Counter setup', 'cmp-coming-soon-maintenance');?></span>
|
53 |
</legend>
|
54 |
|
55 |
<p>
|
56 |
<label title="Enabled">
|
57 |
+
<input type="radio" name="niteoCS_counter" value="1"<?php if ( $niteoCS_counter == 1) { echo ' checked="checked"'; } ?>> <?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
|
58 |
</label>
|
59 |
</p>
|
60 |
|
61 |
<p>
|
62 |
<label title="Disabled">
|
63 |
+
<input type="radio" name="niteoCS_counter" value="0"<?php if ( $niteoCS_counter == 0) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
64 |
</label>
|
65 |
</p>
|
66 |
|
68 |
</th>
|
69 |
|
70 |
<td id="counter-disabled">
|
71 |
+
<p><?php _e('Countdown Timer is disabled.', 'cmp-coming-soon-maintenance');?></p>
|
72 |
</td>
|
73 |
|
74 |
<td id="counter-enabled">
|
75 |
+
<p><?php _e('Click on date input and set a date & time for a Countdown timer.', 'cmp-coming-soon-maintenance');?></p>
|
76 |
<fieldset>
|
77 |
<legend class="screen-reader-text">
|
78 |
+
<span><?php _e('Counter setup', 'cmp-coming-soon-maintenance');?></span>
|
79 |
</legend>
|
80 |
|
81 |
+
<input type="text" name="niteoCS_counter_date" id="niteoCS_counter_date" placeholder="<?php _e('Select Date..','cmp-coming-soon-maintenance');?>" value="<?php echo esc_attr( $niteoCS_counter_date); ?>" class="regular-text code"><br>
|
82 |
|
83 |
+
<label for="niteoCS_countdown_action"><?php _e('Countdown action:', 'cmp-coming-soon-maintenance');?></label>
|
84 |
<select name="niteoCS_countdown_action">
|
85 |
+
<option value="no-action" <?php if ( $niteoCS_countdown_action == 'no-action' ) { echo ' selected="selected"'; } ?>><?php _e('No action', 'cmp-coming-soon-maintenance');?></option>
|
86 |
+
<!-- <option value="display-text" <?php if ( $niteoCS_countdown_action == 'display-text' ) { echo ' selected="selected"'; } ?>><?php _e('Display custom text', 'cmp-coming-soon-maintenance');?></option> -->
|
87 |
+
<option value="disable-cmp" <?php if ( $niteoCS_countdown_action == 'disable-cmp' ) { echo ' selected="selected"'; } ?>><?php _e('Disable CMP Plugin Page', 'cmp-coming-soon-maintenance');?></option>
|
88 |
+
<option value="redirect" <?php if ( $niteoCS_countdown_action == 'redirect' ) { echo ' selected="selected"'; } ?>><?php _e('URL redirect', 'cmp-coming-soon-maintenance');?></option>
|
89 |
</select>
|
90 |
|
91 |
+
<label for="niteoCS_countdown_text" id="niteoCS_countdown_text"><?php _e('Enter custom text', 'cmp-coming-soon-maintenance');?>
|
92 |
<input type="text" name="niteoCS_countdown_text" value="<?php echo esc_attr( $niteoCS_countdown_text); ?>" class="regular-text code"><br>
|
93 |
</label>
|
94 |
|
95 |
+
<label for="niteoCS_countdown_redirect" id="niteoCS_countdown_redirect"><?php _e('Enter redirect URL', 'cmp-coming-soon-maintenance');?>
|
96 |
<input type="text" name="niteoCS_countdown_redirect" value="<?php echo esc_url( $niteoCS_countdown_redirect); ?>" class="regular-text code"><br>
|
97 |
</label>
|
98 |
</fieldset>
|
inc/settings-counter_disabled.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
<div class="table-wrapper content">
|
2 |
-
<h3><?php _e('Countdown Timer Setup', 'cmp');?></h3>
|
3 |
<table class="content">
|
4 |
<tr>
|
5 |
<th>
|
6 |
<fieldset>
|
7 |
<legend class="screen-reader-text">
|
8 |
-
<span><?php _e('Counter setup', 'cmp');?></span>
|
9 |
</legend>
|
10 |
|
11 |
<p>
|
12 |
<label title="Enabled">
|
13 |
-
<input disabled type="radio" name="niteoCS_counter" value="1"> <?php _e('Enabled', 'cmp');?>
|
14 |
</label>
|
15 |
</p>
|
16 |
|
17 |
<p>
|
18 |
<label title="Disabled">
|
19 |
-
<input disabled type="radio" name="niteoCS_counter" value="0" checked="checked"> <?php _e('Disabled', 'cmp');?>
|
20 |
</label>
|
21 |
</p>
|
22 |
|
@@ -24,7 +24,7 @@
|
|
24 |
</th>
|
25 |
|
26 |
<td id="counter-disabled">
|
27 |
-
<p><?php _e('Countdown Timer is disabled or is not supported by selected Theme.', 'cmp');?></p>
|
28 |
</td>
|
29 |
|
30 |
</tr>
|
1 |
+
<div class="table-wrapper content wrapper-disabled closed">
|
2 |
+
<h3><?php _e('Countdown Timer Setup', 'cmp-coming-soon-maintenance');?></h3>
|
3 |
<table class="content">
|
4 |
<tr>
|
5 |
<th>
|
6 |
<fieldset>
|
7 |
<legend class="screen-reader-text">
|
8 |
+
<span><?php _e('Counter setup', 'cmp-coming-soon-maintenance');?></span>
|
9 |
</legend>
|
10 |
|
11 |
<p>
|
12 |
<label title="Enabled">
|
13 |
+
<input disabled type="radio" name="niteoCS_counter" value="1"> <?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
|
14 |
</label>
|
15 |
</p>
|
16 |
|
17 |
<p>
|
18 |
<label title="Disabled">
|
19 |
+
<input disabled type="radio" name="niteoCS_counter" value="0" checked="checked"> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
20 |
</label>
|
21 |
</p>
|
22 |
|
24 |
</th>
|
25 |
|
26 |
<td id="counter-disabled">
|
27 |
+
<p><?php _e('Countdown Timer is disabled or is not supported by selected Theme.', 'cmp-coming-soon-maintenance');?></p>
|
28 |
</td>
|
29 |
|
30 |
</tr>
|
inc/settings-footer.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="table-wrapper content" id="copyright-section">
|
2 |
+
<h3><?php _e('Footer Content', 'cmp-coming-soon-maintenance');?></h3>
|
3 |
+
<table class="content">
|
4 |
+
<tbody>
|
5 |
+
<tr>
|
6 |
+
<th><h4><?php _e('Copyright', 'cmp-coming-soon-maintenance');?></h4></th>
|
7 |
+
<td>
|
8 |
+
<fieldset>
|
9 |
+
<input type="text" name="niteoCS_copyright" id="niteoCS_copyright" value="<?php echo esc_attr( $this->niteo_sanitize_html($niteoCS_copyright)); ?>" class="regular-text code">
|
10 |
+
</fieldset>
|
11 |
+
</td>
|
12 |
+
</tr>
|
13 |
+
<tr><th>
|
14 |
+
<p class="cmp-submit">
|
15 |
+
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
16 |
+
<input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
|
17 |
+
</p>
|
18 |
+
</th></tr>
|
19 |
+
|
20 |
+
</tbody>
|
21 |
+
</table>
|
22 |
+
</div>
|
inc/settings-footer_disabled.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="table-wrapper content wrapper-disabled closed" id="copyright-section">
|
2 |
+
<h3><?php _e('Footer Content', 'cmp-coming-soon-maintenance');?></h3>
|
3 |
+
<table class="content">
|
4 |
+
<tbody>
|
5 |
+
<tr>
|
6 |
+
<th><h4><?php _e('Disabled', 'cmp-coming-soon-maintenance');?></h4></th>
|
7 |
+
<td>
|
8 |
+
<p class="no-margin"><?php _e('Footer is not supported by selected Theme.', 'cmp-coming-soon-maintenance');?></p>
|
9 |
+
</td>
|
10 |
+
</tr>
|
11 |
+
|
12 |
+
</tbody>
|
13 |
+
</table>
|
14 |
+
</div>
|
inc/settings-logo_disabled.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('Logo Setup', 'cmp-coming-soon-maintenance');?></h3>
|
6 |
<table class="theme-setup">
|
7 |
<tbody>
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
?>
|
4 |
+
<div class="table-wrapper theme-setup wrapper-disabled closed">
|
5 |
<h3><?php _e('Logo Setup', 'cmp-coming-soon-maintenance');?></h3>
|
6 |
<table class="theme-setup">
|
7 |
<tbody>
|
inc/settings-slider_disabled.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 slider">
|
5 |
<h3><?php _e('Image Slider Setup', 'cmp-coming-soon-maintenance');?></h3>
|
6 |
<table class="theme-setup slider">
|
7 |
<tr>
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
?>
|
4 |
+
<div class="table-wrapper theme-setup slider wrapper-disabled closed">
|
5 |
<h3><?php _e('Image Slider Setup', 'cmp-coming-soon-maintenance');?></h3>
|
6 |
<table class="theme-setup slider">
|
7 |
<tr>
|
inc/settings-subscribe_disabled.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
?>
|
4 |
|
5 |
-
<div class="table-wrapper content" id="subscribe-section">
|
6 |
<h3><?php _e('Subscribe Form', 'cmp-coming-soon-maintenance');?></h3>
|
7 |
<table class="content">
|
8 |
<tbody>
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
?>
|
4 |
|
5 |
+
<div class="table-wrapper content wrapper-disabled closed" id="subscribe-section">
|
6 |
<h3><?php _e('Subscribe Form', 'cmp-coming-soon-maintenance');?></h3>
|
7 |
<table class="content">
|
8 |
<tbody>
|
js/settings.js
CHANGED
@@ -48,18 +48,15 @@ jQuery(document).ready(function($){
|
|
48 |
jQuery(this).addClass('active');
|
49 |
$children.trigger('change');
|
50 |
if ( $children.val() == '3' ) {
|
51 |
-
jQuery('
|
52 |
-
jQuery('#niteoCS_redirect_time').prop('disabled', false);
|
53 |
} else {
|
54 |
-
jQuery('
|
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');
|
62 |
-
jQuery(this).next().toggle();
|
63 |
});
|
64 |
|
65 |
// Logo type inputs
|
@@ -136,13 +133,20 @@ jQuery(document).ready(function($){
|
|
136 |
$.post(ajaxurl, data, function(response) {
|
137 |
jQuery('#unsplash_img').remove();
|
138 |
img_url = response.replace('WIDTHxHEIGHT', '588x330');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
jQuery('<img />', {src: img_url, id: 'unsplash_img'}).
|
140 |
-
|
141 |
one('load', function() { //Set something to run when it finishes loading
|
142 |
jQuery(this).appendTo(media_wrapper);
|
143 |
jQuery(this).fadeIn();
|
144 |
jQuery('#test-unsplash').prop('disabled', false);
|
145 |
jQuery('#test-unsplash').text('Test Unsplash');
|
|
|
146 |
});
|
147 |
});
|
148 |
|
@@ -226,7 +230,6 @@ jQuery(document).ready(function($){
|
|
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');
|
@@ -281,6 +284,10 @@ jQuery(document).ready(function($){
|
|
281 |
jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');
|
282 |
videoPreview();
|
283 |
break;
|
|
|
|
|
|
|
|
|
284 |
default:
|
285 |
jQuery('#custom_banner').css('display','block');
|
286 |
jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');
|
@@ -299,6 +306,24 @@ jQuery(document).ready(function($){
|
|
299 |
})
|
300 |
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
// banner background colorpicker
|
303 |
jQuery('#niteoCS_banner_color').wpColorPicker({
|
304 |
change: function(event, ui){
|
@@ -307,6 +332,24 @@ jQuery(document).ready(function($){
|
|
307 |
}
|
308 |
});
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
// banner pattern on change image preview
|
311 |
jQuery('select[name^="niteoCS_banner_pattern"]').on('change', function() {
|
312 |
var pattern = jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();
|
@@ -314,12 +357,12 @@ jQuery(document).ready(function($){
|
|
314 |
if (pattern != 'custom') {
|
315 |
var pattern_url = jQuery(this).data('url');
|
316 |
jQuery('#add-pattern').css('display', 'none');
|
317 |
-
jQuery('.pattern-
|
318 |
|
319 |
} else {
|
320 |
var pattern_url = jQuery('#niteoCS_banner_pattern_custom').val();
|
321 |
jQuery('#add-pattern').css('display', 'block');
|
322 |
-
jQuery('.pattern-
|
323 |
|
324 |
}
|
325 |
});
|
@@ -731,7 +774,7 @@ jQuery(document).ready(function($){
|
|
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>',
|
@@ -836,6 +879,8 @@ jQuery(document).ready(function($){
|
|
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
|
@@ -851,9 +896,9 @@ jQuery(document).ready(function($){
|
|
851 |
}
|
852 |
|
853 |
var media_uploader = wp.media({
|
854 |
-
title: 'Select '+
|
855 |
button: {
|
856 |
-
text: 'Insert '+
|
857 |
},
|
858 |
multiple: multiple, // Set this to true to allow multiple files to be selected
|
859 |
library: {
|
@@ -894,6 +939,7 @@ jQuery(document).ready(function($){
|
|
894 |
|
895 |
}
|
896 |
// update hidden input with media id and trigger change
|
|
|
897 |
jQuery('#niteoCS-'+name+'-id').val( imgID).trigger('change');
|
898 |
|
899 |
})
|
48 |
jQuery(this).addClass('active');
|
49 |
$children.trigger('change');
|
50 |
if ( $children.val() == '3' ) {
|
51 |
+
jQuery('.redirect-inputs').fadeIn('fast');
|
|
|
52 |
} else {
|
53 |
+
jQuery('.redirect-inputs').fadeOut('fast');
|
|
|
54 |
}
|
55 |
});
|
56 |
|
57 |
// expandable tabs
|
58 |
jQuery('.table-wrapper h3').click(function(){
|
59 |
+
jQuery(this).parent().toggleClass('closed');
|
|
|
60 |
});
|
61 |
|
62 |
// Logo type inputs
|
133 |
$.post(ajaxurl, data, function(response) {
|
134 |
jQuery('#unsplash_img').remove();
|
135 |
img_url = response.replace('WIDTHxHEIGHT', '588x330');
|
136 |
+
|
137 |
+
var loadingTimeout = setTimeout(function(){
|
138 |
+
jQuery('#test-unsplash').prop('disabled', false);
|
139 |
+
jQuery('#test-unsplash').text('Test Again');
|
140 |
+
jQuery('#unsplash-media').html('<p>It seems <a href="http://source.unsplash.com" target="_blank">source.unsplash.com</a> is not responding. Please try again later.');
|
141 |
+
}, 5000);
|
142 |
+
|
143 |
jQuery('<img />', {src: img_url, id: 'unsplash_img'}).
|
|
|
144 |
one('load', function() { //Set something to run when it finishes loading
|
145 |
jQuery(this).appendTo(media_wrapper);
|
146 |
jQuery(this).fadeIn();
|
147 |
jQuery('#test-unsplash').prop('disabled', false);
|
148 |
jQuery('#test-unsplash').text('Test Unsplash');
|
149 |
+
clearTimeout(loadingTimeout);
|
150 |
});
|
151 |
});
|
152 |
|
230 |
|
231 |
// hiding video source inputs
|
232 |
jQuery('#csoptions .banner-video-source').change(function() {
|
|
|
233 |
switch(jQuery('#csoptions .banner-video-source' ).val() ) {
|
234 |
case 'YouTube':
|
235 |
jQuery('.youtube-source-input').css('display','block');
|
284 |
jQuery('.theme_background fieldset:not(#video_banner)').css('display','none');
|
285 |
videoPreview();
|
286 |
break;
|
287 |
+
case '6':
|
288 |
+
jQuery('#gradient_background').css('display','block');
|
289 |
+
jQuery('.theme_background fieldset:not(#gradient_background)').css('display','none');
|
290 |
+
break;
|
291 |
default:
|
292 |
jQuery('#custom_banner').css('display','block');
|
293 |
jQuery('.theme_background fieldset:not(#custom_banner)').css('display','none');
|
306 |
})
|
307 |
|
308 |
|
309 |
+
// preview gradient on select change
|
310 |
+
jQuery('select.background-gradient').on('change', function() {
|
311 |
+
var gradient = jQuery('select.background-gradient option:selected').val();
|
312 |
+
|
313 |
+
if ( gradient == 'custom' ) {
|
314 |
+
jQuery('.custom-gradient').css('display', 'block');
|
315 |
+
jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
|
316 |
+
'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
|
317 |
+
'background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'});
|
318 |
+
} else {
|
319 |
+
colors = gradient.split(':');
|
320 |
+
jQuery('.custom-gradient').css('display', 'none');
|
321 |
+
jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
|
322 |
+
'background':'-webkit-linear-gradient(-45deg, '+colors[0]+' 0%, '+colors[1]+' 100%)',
|
323 |
+
'background':'linear-gradient(135deg, '+colors[0]+' 0%, '+colors[1]+' 100%)'});
|
324 |
+
}
|
325 |
+
});
|
326 |
+
|
327 |
// banner background colorpicker
|
328 |
jQuery('#niteoCS_banner_color').wpColorPicker({
|
329 |
change: function(event, ui){
|
332 |
}
|
333 |
});
|
334 |
|
335 |
+
// banner gradient background colorpicker
|
336 |
+
jQuery('#niteoCS_gradient_one').wpColorPicker({
|
337 |
+
change: function(event, ui){
|
338 |
+
jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
|
339 |
+
'background':'-webkit-linear-gradient(-45deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)',
|
340 |
+
'background':'linear-gradient(135deg, '+ui.color.toString()+' 0%, '+jQuery('#niteoCS_gradient_two').val()+' 100%)'});
|
341 |
+
}
|
342 |
+
});
|
343 |
+
|
344 |
+
// banner gradient background colorpicker
|
345 |
+
jQuery('#niteoCS_gradient_two').wpColorPicker({
|
346 |
+
change: function(event, ui){
|
347 |
+
jQuery('.gradient-preview').css({'background':'-moz-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
|
348 |
+
'background':'-webkit-linear-gradient(-45deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)',
|
349 |
+
'background':'linear-gradient(135deg, '+jQuery('#niteoCS_gradient_one').val()+' 0%, '+ui.color.toString()+' 100%)'});
|
350 |
+
}
|
351 |
+
});
|
352 |
+
|
353 |
// banner pattern on change image preview
|
354 |
jQuery('select[name^="niteoCS_banner_pattern"]').on('change', function() {
|
355 |
var pattern = jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();
|
357 |
if (pattern != 'custom') {
|
358 |
var pattern_url = jQuery(this).data('url');
|
359 |
jQuery('#add-pattern').css('display', 'none');
|
360 |
+
jQuery('.pattern-wrapper').css('background-image', 'url(\''+pattern_url+pattern+'.png\')');
|
361 |
|
362 |
} else {
|
363 |
var pattern_url = jQuery('#niteoCS_banner_pattern_custom').val();
|
364 |
jQuery('#add-pattern').css('display', 'block');
|
365 |
+
jQuery('.pattern-wrapper').css('background-image', 'url(\''+pattern_url+'\')');
|
366 |
|
367 |
}
|
368 |
});
|
774 |
' </div>',
|
775 |
' <div class="theme-actions">',
|
776 |
' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response['name']+'">Activate</button>',
|
777 |
+
' <a href="http://cmp.niteothemes.com/?cmp_preview=true&theme='+slug+'&utm_source=cmp&utm_medium=referral&utm_campaign='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response['name']+'">Live Preview</a>',
|
778 |
' </div>',
|
779 |
' </div>',
|
780 |
'</div>',
|
879 |
var $delete_button = jQuery('#delete-'+name);
|
880 |
var image;
|
881 |
var imgID = '';
|
882 |
+
var title = name.replace('-', ' ');
|
883 |
+
title = title[0].toUpperCase() + title.slice(1);
|
884 |
|
885 |
if ( jQuery('#niteoCS-'+name+'-id').val() != '' ) {
|
886 |
// Display Delete button
|
896 |
}
|
897 |
|
898 |
var media_uploader = wp.media({
|
899 |
+
title: 'Select '+ title,
|
900 |
button: {
|
901 |
+
text: 'Insert '+ title
|
902 |
},
|
903 |
multiple: multiple, // Set this to true to allow multiple files to be selected
|
904 |
library: {
|
939 |
|
940 |
}
|
941 |
// update hidden input with media id and trigger change
|
942 |
+
console.log(imgID);
|
943 |
jQuery('#niteoCS-'+name+'-id').val( imgID).trigger('change');
|
944 |
|
945 |
})
|
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 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")});
|
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()}function s(e,t,a){var s,n=jQuery("."+e+"-wrapper"),i=jQuery("#add-"+e),o=jQuery("#delete-"+e),r="",c=e.replace("-"," ");c=c[0].toUpperCase()+c.slice(1),""!=jQuery("#niteoCS-"+e+"-id").val()&&o.css("display","block"),i.click(function(i){if(i.preventDefault(),u)u.open();else{var u=wp.media({title:"Select "+c,button:{text:"Insert "+c},multiple:t,library:{type:[a]}}).on("select",function(){var t=u.state().get("selection").toJSON();t.length>0&&(n.empty(),jQuery(t).each(function(a){s=t[a].sizes&&t[a].sizes.large?t[a].sizes.large.url:t[a].url,r+=(0===a?"":",")+t[a].id,"pattern"==e?n.css("background-image","url('"+s+"')"):"video"==e?n.append('<video width="600" height="400" controls><source src="'+s+'" type="video/mp4">Your browser does not support the video tag.</video>'):n.append('<img src="'+s+'" alt="" style="max-width:588px"/>')}),o.css("display","block")),console.log(r),jQuery("#niteoCS-"+e+"-id").val(r).trigger("change")}).open();"pattern"==e&&n.css("background-image","url('"+s+"')")}}),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(".redirect-inputs").fadeIn("fast"):jQuery(".redirect-inputs").fadeOut("fast")}),jQuery(".table-wrapper h3").click(function(){jQuery(this).parent().toggleClass("closed")}),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 a=jQuery("#unsplash-media"),s=jQuery('#unsplash_banner select[name^="unsplash_feed"] option:selected').val(),n="",i="",o="",r=jQuery(this).data("security");switch(s){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:s,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>'),a.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");var t=setTimeout(function(){jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Test Again"),jQuery("#unsplash-media").html('<p>It seems <a href="http://source.unsplash.com" target="_blank">source.unsplash.com</a> is not responding. Please try again later.')},5e3);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"),clearTimeout(t)})})}),videoPreview=function(){var t=e(".banner-video-source").val();if(e(".video-wrapper").css("padding-top","0"),"YouTube"==t){var a=e("#niteoCS-youtube-url").val();if(a.match(/(youtube.com)/))var s="v=",n=1;if(a.match(/(youtu.be)/)||a.match(/(vimeo.com\/)+[0-9]/))var s="/",n=3;if("vimeo"==t&&(a=e("#niteoCS-vimeo-url").val()).match(/(vimeo.com\/)+[a-zA-Z]/))var s="/",n=5;if(a){var i=a.split(s)[n];if(void 0!=i){var o=i.replace(/(&)+(.*)/,"");if("banner_youtube"==t&&a.match(/(youtu.be)/)||a.match(/(youtube.com)/))r="https://www.youtube.com/embed/"+o+"?autoplay=0";if("banner_vimeo"==t&&a.match(/(vimeo.com\/)+[0-9]/)||a.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(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;case"6":jQuery("#gradient_background").css("display","block"),jQuery(".theme_background fieldset:not(#gradient_background)").css("display","none");break;default:jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none")}}),jQuery("#csoptions .niteoCS_banner").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("select.background-gradient").on("change",function(){var e=jQuery("select.background-gradient option:selected").val();"custom"==e?(jQuery(".custom-gradient").css("display","block"),jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})):(colors=e.split(":"),jQuery(".custom-gradient").css("display","none"),jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"-webkit-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"linear-gradient(135deg, "+colors[0]+" 0%, "+colors[1]+" 100%)"}))}),jQuery("#niteoCS_banner_color").wpColorPicker({change:function(e,t){jQuery(".color-preview").css("background-color",t.color.toString())}}),jQuery("#niteoCS_gradient_one").wpColorPicker({change:function(e,t){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+t.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+t.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+t.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})}}),jQuery("#niteoCS_gradient_two").wpColorPicker({change:function(e,t){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+t.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+t.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+t.color.toString()+" 100%)"})}}),jQuery('select[name^="niteoCS_banner_pattern"]').on("change",function(){var e=jQuery('select[name^="niteoCS_banner_pattern"] option:selected').val();if("custom"!=e){t=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-wrapper").css("background-image","url('"+t+e+".png')")}else{var t=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-wrapper").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(a(jQuery("#niteoCS_font_headings_custom").val())):jQuery(".niteoCS_font_headings option:selected").val(),c="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(r)),t(a(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(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 u=function(t,a,s){var n=e("#niteoCS_socialmedia").attr("value");n=e.parseJSON(n),e.each(n,function(e,n){n.name==t&&(n[a]=s)}),e("#niteoCS_socialmedia").attr("value",JSON.stringify(n))},l=e(".social-inputs"),d=function(t,a){var s=l.find('input[type="text"]');a.item.index();s.each(function(t,a){var s=e(a).data("name");u(s,"order",t)})};l.sortable({stop:d}),l.on("sortchange",d),function(e){e.fn.toggleDisabled=function(){return this.each(function(){var t,a=e(this),s=a.data("name");a.attr("disabled")?(a.prop("disabled",!1),t="1"):(a.prop("disabled",!0),t="0"),u(s,"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 a=e(this),s=a.parents(".notice"),n=a.data("security"),i=a.data("slug"),o=a.data("type"),r=s.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};s.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(){s.removeClass("notice-warning").addClass("notice-success"),s.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();s.removeClass("notice-warning").addClass("notice-error"),s.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),s=a.closest(".theme-wrapper"),n=s.data("security"),i=s.data("slug"),o={action:"cmp_theme_update_install",security:n,file:{name:i,tmp_name:"",type:s.data("type"),url:s.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"),s=a.data("slug"),n=a.data("version"),i=a.data("remote_url"),o=a.data("type"),r=a.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/"+s+'-readme.php" class="view-release">View update '+m+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+s+"&type="+o+'" class="update-theme" data-type="'+o+'" data-security="'+c+'" data-slug="'+s+'" 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="'+a.find("a").attr("href")+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Buy</a></button>';var g=l.screenshots,v="";Object.keys(g).length>1&&(v='<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(\''+g[0]+"')\">"+v+"</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='+s+"&utm_source=cmp&utm_medium=referral&utm_campaign="+s+'" 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(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()==s&&(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(g).length&&(u=0),u in g&&jQuery(".screenshot").css("background-image","url('"+g[u]+"')")}),jQuery(".screenshots-nav .left").click(function(){--u<0&&(u=Object.keys(g).length-1),u in g&&jQuery(".screenshot").css("background-image","url('"+g[u]+"')")})}})}),jQuery('#csoptions input[name="niteoCS_banner"]').trigger("change"),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger("change"),s("logo",!1,"image"),s("favicon",!1,"image"),s("banner",!0,"image"),s("pattern",!1,"image"),s("video-thumb",!1,"image"),s("video",!1,"video")});
|
languages/coming-soon-default.mo
CHANGED
Binary file
|
languages/coming-soon-default.po
CHANGED
@@ -1,15 +1,15 @@
|
|
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"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit
|
13 |
"X-Poedit-Basepath: ../../../..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: _e;__\n"
|
@@ -395,11 +395,14 @@ msgstr ""
|
|
395 |
|
396 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:37
|
397 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:52
|
|
|
398 |
#: cmp-premium-themes/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 ""
|
@@ -410,16 +413,20 @@ msgstr ""
|
|
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 |
|
@@ -429,45 +436,46 @@ 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/
|
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/
|
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/
|
456 |
-
msgid "
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: cmp-premium-themes/
|
460 |
-
msgid "
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: cmp-premium-themes/
|
464 |
-
|
|
|
|
|
|
|
|
|
|
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: cmp-premium-themes/
|
468 |
-
|
|
|
|
|
|
|
|
|
|
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: cmp-premium-themes/frame/frame-
|
472 |
-
msgid "
|
473 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: cmp\n"
|
4 |
+
"POT-Creation-Date: 2017-09-28 22:25+0200\n"
|
5 |
+
"PO-Revision-Date: 2017-09-28 22:25+0200\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.0.1\n"
|
13 |
"X-Poedit-Basepath: ../../../..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: _e;__\n"
|
395 |
|
396 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:37
|
397 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:52
|
398 |
+
#: cmp-premium-themes/fifty/fifty-settings.php:33
|
399 |
#: cmp-premium-themes/frame/frame-settings.php:48
|
400 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:36
|
401 |
msgid "Customize Colors"
|
402 |
msgstr ""
|
403 |
|
404 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:40
|
405 |
+
#: cmp-premium-themes/fifty/fifty-settings.php:55
|
406 |
#: cmp-premium-themes/frame/frame-settings.php:51
|
407 |
msgid "Active Color"
|
408 |
msgstr ""
|
413 |
|
414 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:49
|
415 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:56
|
416 |
+
#: cmp-premium-themes/fifty/fifty-settings.php:37
|
417 |
#: cmp-premium-themes/frame/frame-settings.php:61
|
418 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:40
|
419 |
msgid "Font Color"
|
420 |
msgstr ""
|
421 |
|
422 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/construct/construct-settings.php:57
|
423 |
+
#: cmp-premium-themes/fifty/fifty-settings.php:46
|
424 |
msgid "Background Color"
|
425 |
msgstr ""
|
426 |
|
427 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:64
|
428 |
#: cmp-premium-themes/frame/frame-settings.php:80
|
429 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:48
|
430 |
msgid "Overlay Color"
|
431 |
msgstr ""
|
432 |
|
436 |
|
437 |
#: cmp-coming-soon-maintenance/tags/1.4.0/themes/hardwork/hardwork-settings.php:73
|
438 |
#: cmp-premium-themes/frame/frame-settings.php:86
|
439 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:53
|
440 |
msgid "Overlay Opacity"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: cmp-premium-themes/fifty/fifty-settings.php:65
|
|
|
|
|
|
|
444 |
#: cmp-premium-themes/frame/frame-settings.php:94
|
445 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-settings.php:62
|
446 |
msgid "Save All Changes"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: cmp-premium-themes/fifty/fifty-social_settings.php:20
|
450 |
+
msgid "Social Icons Location"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: cmp-premium-themes/fifty/fifty-social_settings.php:24
|
454 |
+
msgid "Below Content (big icons)"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: cmp-premium-themes/fifty/fifty-social_settings.php:25
|
458 |
+
msgid "Footer (small icons)"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: cmp-premium-themes/fifty/fifty-theme.php:194
|
462 |
+
#: cmp-premium-themes/fifty/fifty-theme.php:206
|
463 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:138
|
464 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:150
|
465 |
+
msgid ""
|
466 |
+
"To Display Graphic Media please upgrade CMP Plugin to latest version. You "
|
467 |
+
"can download latest version on "
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: cmp-premium-themes/fifty/fifty-theme.php:194
|
471 |
+
#: cmp-premium-themes/fifty/fifty-theme.php:206
|
472 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:138
|
473 |
+
#: cmp-premium-themes/hardwork_premium/hardwork_premium-theme.php:150
|
474 |
+
msgid ""
|
475 |
+
"or you can use automatic plugin update in WP-Admin > Plugins > CMP - Coming "
|
476 |
+
"Soon & Maintenance Plugin > Update Now."
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: cmp-premium-themes/frame/frame-settings.php:70
|
480 |
+
msgid "Frame Color"
|
481 |
msgstr ""
|
niteo-cmp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
-
Version: 1.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -14,27 +14,17 @@
|
|
14 |
|
15 |
|
16 |
class niteo_cmp {
|
17 |
-
|
18 |
-
var $version = '';
|
19 |
-
var $plugins_dir_path = '';
|
20 |
-
var $dev;
|
21 |
-
var $remoteServer = '';
|
22 |
-
var $theme_array = array();
|
23 |
-
var $themes_standard = array();
|
24 |
-
var $premium_installed = array();
|
25 |
-
var $countdown_themes = array();
|
26 |
-
var $minified = '';
|
27 |
-
|
28 |
-
function __construct() {
|
29 |
$this->author = 'NiteoThemes';
|
30 |
$this->author_homepage = 'https://niteothemes.com';
|
31 |
-
$this->version = '1.
|
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 |
|
@@ -48,22 +38,21 @@ class niteo_cmp {
|
|
48 |
} else {
|
49 |
$this->theme_array = $this->themes_standard;
|
50 |
}
|
|
|
51 |
// set remote server URL for updates
|
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 |
-
|
|
|
60 |
$this->__construct();
|
61 |
}
|
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')
|
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__) );
|
@@ -73,12 +62,12 @@ class niteo_cmp {
|
|
73 |
// wp_register_style( 'fastselect_css', plugins_url('/css/fastselect.min.css', __FILE__) );
|
74 |
}
|
75 |
|
76 |
-
function cmp_add_admin_style() {
|
77 |
wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__),'',$this->version);
|
78 |
wp_enqueue_style( 'cmp_admin_style' );
|
79 |
}
|
80 |
|
81 |
-
function enqueue_admin_js($hook) {
|
82 |
|
83 |
if ( 'toplevel_page_cmp-settings' == $hook ) {
|
84 |
wp_enqueue_script('cmp_settings_js');
|
@@ -86,7 +75,7 @@ class niteo_cmp {
|
|
86 |
|
87 |
}
|
88 |
|
89 |
-
function cmp_enqueueScripts() {
|
90 |
// enqueue required admin scripts and styles
|
91 |
wp_enqueue_script( 'wp-color-picker');
|
92 |
wp_enqueue_script( 'webfont' );
|
@@ -96,7 +85,7 @@ class niteo_cmp {
|
|
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 );
|
@@ -106,14 +95,16 @@ class niteo_cmp {
|
|
106 |
|
107 |
|
108 |
//register scripts and load styles
|
109 |
-
function cmp_adminMenu() {
|
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', '
|
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', '
|
|
|
|
|
117 |
|
118 |
/* Using registered $page handle to hook script load */
|
119 |
add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
|
@@ -137,25 +128,31 @@ class niteo_cmp {
|
|
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 |
|
147 |
-
function cmp_subs_page() {
|
148 |
-
// include default options page
|
149 |
require_once ('cmp-subscribers.php');
|
150 |
}
|
151 |
|
152 |
|
153 |
-
function
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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');
|
@@ -164,13 +161,17 @@ class niteo_cmp {
|
|
164 |
// }
|
165 |
|
166 |
|
167 |
-
function cmp_displayPage() {
|
|
|
|
|
|
|
168 |
|
169 |
if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
|
170 |
|
171 |
// for themes preview demos
|
172 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
173 |
$theme_preview = $_GET['theme'];
|
|
|
174 |
// if premium
|
175 |
if ( $this->niteo_in_array_r( $theme_preview, $this->cmp_plugin_premium() ) ) {
|
176 |
if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_preview.'/'.$theme_preview.'-theme.php') ) {
|
@@ -254,7 +255,7 @@ class niteo_cmp {
|
|
254 |
|
255 |
}
|
256 |
|
257 |
-
function cmp_admin_override(){
|
258 |
|
259 |
if( $this->cmp_status() == 0 ){
|
260 |
return;
|
@@ -271,7 +272,7 @@ class niteo_cmp {
|
|
271 |
}
|
272 |
|
273 |
// check plugin status
|
274 |
-
function cmp_status() {
|
275 |
|
276 |
if ( !get_option('niteoCS_activation') || get_option('niteoCS_activation') == 0 ) {
|
277 |
return '0';
|
@@ -281,7 +282,7 @@ class niteo_cmp {
|
|
281 |
}
|
282 |
|
283 |
// check selected theme
|
284 |
-
function cmp_selectedTheme() {
|
285 |
if ( !get_option('niteoCS_theme') ) { //if it's not set yet
|
286 |
update_option('niteoCS_theme', 'hardwork'); //set it
|
287 |
}
|
@@ -290,7 +291,7 @@ class niteo_cmp {
|
|
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 {
|
@@ -301,7 +302,7 @@ class niteo_cmp {
|
|
301 |
}
|
302 |
|
303 |
// return installed theme dir
|
304 |
-
function cmp_themeURL( $themeslug ) {
|
305 |
if ( $this->niteo_in_array_r( $themeslug, $this->cmp_plugin_premium() ) ) {
|
306 |
return plugins_url( '/cmp-premium-themes/');
|
307 |
} else {
|
@@ -310,9 +311,9 @@ class niteo_cmp {
|
|
310 |
}
|
311 |
}
|
312 |
|
313 |
-
// older version of cmp_themeURL function - migration after 1.9 version.
|
314 |
//can be deleted in future...
|
315 |
-
function cmp_themeDirPath() {
|
316 |
if ( $this->niteo_in_array_r( $this->cmp_selectedTheme(), $this->cmp_plugin_premium() ) ) {
|
317 |
return plugins_url( '/cmp-premium-themes/');
|
318 |
} else {
|
@@ -322,7 +323,7 @@ class niteo_cmp {
|
|
322 |
}
|
323 |
|
324 |
// display admin notice
|
325 |
-
function cmp_admin_bar(){
|
326 |
global $wp_admin_bar;
|
327 |
|
328 |
$status = $this->cmp_status();
|
@@ -349,7 +350,7 @@ class niteo_cmp {
|
|
349 |
) );
|
350 |
}
|
351 |
|
352 |
-
function cmp_activate() {
|
353 |
if ( get_option('niteoCS_archive') ) {
|
354 |
//get all the options back from the archive
|
355 |
$options = get_option('niteoCS_archive');
|
@@ -364,7 +365,7 @@ class niteo_cmp {
|
|
364 |
}
|
365 |
|
366 |
// archive plugin stuff when plugin is deactivated
|
367 |
-
function cmp_deactivate() {
|
368 |
//get all the options. store them in an array
|
369 |
$options = array();
|
370 |
|
@@ -389,12 +390,12 @@ class niteo_cmp {
|
|
389 |
}
|
390 |
|
391 |
// clean plugin stuff when plugin is deleted
|
392 |
-
function cmp_plugin_delete() {
|
393 |
delete_option('niteoCS_archive');
|
394 |
}
|
395 |
|
396 |
// returns list of premium themes => manually defined
|
397 |
-
function cmp_plugin_premium() {
|
398 |
$premium_themes = array();
|
399 |
array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://creativemarket.com/NiteoThemes/1373921-CMP-Frame-Coming-Soon-WP-Theme', 'price' => '10') );
|
400 |
array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://creativemarket.com/NiteoThemes/1385251-CMP-Hardwork-Premium-Maintenance', 'price' => '10') );
|
@@ -403,7 +404,7 @@ class niteo_cmp {
|
|
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;
|
@@ -479,7 +480,7 @@ class niteo_cmp {
|
|
479 |
return;
|
480 |
}
|
481 |
|
482 |
-
function cmp_theme_upload($zip) {
|
483 |
// allow zip file to upload
|
484 |
add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
|
485 |
|
@@ -490,7 +491,7 @@ class niteo_cmp {
|
|
490 |
|
491 |
$uploadedfile = $zip;
|
492 |
$filename = $uploadedfile['name'];
|
493 |
-
/* You can use wp_check_filetype() function to check the
|
494 |
file type and go on wit the upload or stop it.*/
|
495 |
$filetype = wp_check_filetype( $filename );
|
496 |
|
@@ -545,7 +546,7 @@ class niteo_cmp {
|
|
545 |
return;
|
546 |
}
|
547 |
|
548 |
-
function cmp_theme_update_install( $file ) {
|
549 |
$ajax = false;
|
550 |
// check for ajax
|
551 |
if ( isset( $_POST['file'] ) ) {
|
@@ -646,12 +647,12 @@ class niteo_cmp {
|
|
646 |
}
|
647 |
}
|
648 |
|
649 |
-
function cmp_textDomain() {
|
650 |
load_plugin_textdomain( 'cmp-coming-soon-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
651 |
}
|
652 |
|
653 |
// unsplash api
|
654 |
-
function niteo_unsplash( $params ) {
|
655 |
$ajax = false;
|
656 |
|
657 |
// check for ajax
|
@@ -749,7 +750,7 @@ class niteo_cmp {
|
|
749 |
}
|
750 |
|
751 |
// check value in multidimensional array
|
752 |
-
function niteo_in_array_r($needle, $haystack, $strict = false) {
|
753 |
foreach ( $haystack as $item ) {
|
754 |
if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
|
755 |
return true;
|
@@ -760,7 +761,7 @@ class niteo_cmp {
|
|
760 |
}
|
761 |
|
762 |
// save subscribe function
|
763 |
-
function niteo_subscribe( $email ) {
|
764 |
$response = '';
|
765 |
|
766 |
// validate email address
|
@@ -769,13 +770,25 @@ class niteo_cmp {
|
|
769 |
$ip_address = sanitize_text_field($_SERVER['REMOTE_ADDR']);
|
770 |
$subscribe_list = get_option('niteoCS_subscribers_list');
|
771 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
// if no subscribe list created, create first item and insert it into DB
|
773 |
if ( !$subscribe_list ) {
|
774 |
$subscribe_list = array();
|
775 |
$new_email = array('id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address);
|
776 |
array_push( $subscribe_list, $new_email );
|
777 |
update_option( 'niteoCS_subscribers_list', $subscribe_list );
|
778 |
-
$response =
|
779 |
|
780 |
} else {
|
781 |
// check if email don`t already exists
|
@@ -784,21 +797,21 @@ class niteo_cmp {
|
|
784 |
$new_email = array('id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address);
|
785 |
array_push( $subscribe_list, $new_email );
|
786 |
update_option('niteoCS_subscribers_list', $subscribe_list);
|
787 |
-
$response =
|
788 |
// if it exists return failed response
|
789 |
} else {
|
790 |
-
$response =
|
791 |
}
|
792 |
}
|
793 |
|
794 |
} else {
|
795 |
-
$response =
|
796 |
}
|
797 |
|
798 |
return $response;
|
799 |
}
|
800 |
|
801 |
-
function niteo_export_csv() {
|
802 |
// load subscribers array
|
803 |
$subscribers = get_option('niteoCS_subscribers_list');
|
804 |
|
@@ -830,7 +843,7 @@ class niteo_cmp {
|
|
830 |
die();
|
831 |
}
|
832 |
|
833 |
-
function niteo_allow_zip_mime( $existing_mimes = array() ) {
|
834 |
// add your own extension here - as many as you like
|
835 |
$existing_mimes['zip'] = 'application/zip';
|
836 |
|
@@ -838,7 +851,7 @@ class niteo_cmp {
|
|
838 |
return $existing_mimes;
|
839 |
}
|
840 |
|
841 |
-
function niteo_remove_zip_mime( $existing_mimes = array() ) {
|
842 |
// remove zip mime
|
843 |
unset ($existing_mimes['zip']);
|
844 |
|
@@ -847,8 +860,8 @@ class niteo_cmp {
|
|
847 |
}
|
848 |
|
849 |
|
850 |
-
function cmp_admin_notice() {
|
851 |
-
if ( isset($_GET['page']) && $_GET['page'] == 'cmp-settings' ) {
|
852 |
if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
|
853 |
$status = 'success';
|
854 |
$message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
|
@@ -860,7 +873,7 @@ class niteo_cmp {
|
|
860 |
}
|
861 |
|
862 |
// convert hex to rgba
|
863 |
-
function hex2rgba ( $hex, $opacity ) {
|
864 |
list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
|
865 |
|
866 |
$rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
|
@@ -869,7 +882,7 @@ class niteo_cmp {
|
|
869 |
}
|
870 |
|
871 |
// convert hex to hsl css
|
872 |
-
function hex2hsl( $hex, $opacity ) {
|
873 |
|
874 |
if ( $hex[0] != '#' ) {
|
875 |
$rgba = explode( ',', $hex);
|
@@ -938,23 +951,23 @@ class niteo_cmp {
|
|
938 |
}
|
939 |
|
940 |
// check if mobile
|
941 |
-
function isMobile() {
|
942 |
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
|
943 |
}
|
944 |
|
945 |
// sanitize function
|
946 |
-
function sanitize_checkbox( $input ) {
|
947 |
return ( ( isset( $input ) && true == $input ) ? '1' : '0' );
|
948 |
}
|
949 |
|
950 |
// sanitize function
|
951 |
-
function niteo_sanitize_html( $html ) {
|
952 |
global $allowedposttags;
|
953 |
return wp_kses( $html, $allowedposttags );
|
954 |
}
|
955 |
|
956 |
-
// function to sort social icons
|
957 |
-
function sort_social($a, $b){
|
958 |
if ( $a['hidden'] == $b['hidden'] ) {
|
959 |
if( $a['order'] == $b['order'] ) {
|
960 |
return 0;
|
@@ -965,8 +978,8 @@ class niteo_cmp {
|
|
965 |
}
|
966 |
}
|
967 |
|
968 |
-
// function to shift multidimensional array
|
969 |
-
function customShift($array, $name){
|
970 |
// var_dump($array);
|
971 |
foreach($array as $key => $val){ // loop all elements
|
972 |
if($val['name'] == $name){ // check for id $id
|
@@ -977,113 +990,7 @@ class niteo_cmp {
|
|
977 |
}
|
978 |
}
|
979 |
|
980 |
-
function
|
981 |
-
$size = $this->isMobile() ? 'large' : 'full';
|
982 |
-
|
983 |
-
switch ($niteoCS_banner) {
|
984 |
-
// custom media
|
985 |
-
case '0':
|
986 |
-
$banner_id = get_option('niteoCS_banner_id['.$themeslug.']');
|
987 |
-
$background_class = 'image';
|
988 |
-
if ( $banner_id != '' ) {
|
989 |
-
$banner_ids = explode(',', $banner_id);
|
990 |
-
$banner_url = wp_get_attachment_image_src( $banner_ids[mt_rand(0, count( $banner_ids ) - 1)], $size);
|
991 |
-
if ( isset($banner_url[0]) ) {
|
992 |
-
$banner_url = $banner_url[0];
|
993 |
-
}
|
994 |
-
|
995 |
-
} else {
|
996 |
-
// send default image
|
997 |
-
$banner_url = $this->cmp_themeURL($themeslug).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
|
998 |
-
}
|
999 |
-
|
1000 |
-
return array( $background_class, $banner_url );
|
1001 |
-
|
1002 |
-
case '1':
|
1003 |
-
// unsplash
|
1004 |
-
$background_class = 'image';
|
1005 |
-
$unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
|
1006 |
-
switch ( $unplash_feed ) {
|
1007 |
-
// SINGLE IMAGE
|
1008 |
-
case '0':
|
1009 |
-
$params = array('feed' => '0', 'url' => get_option('niteoCS_unsplash_0['.$themeslug.']', '') );
|
1010 |
-
$banner_url = $this->niteo_unsplash( $params );
|
1011 |
-
return array( $background_class, $banner_url );
|
1012 |
-
|
1013 |
-
// category random
|
1014 |
-
case '1':
|
1015 |
-
$params = array('feed' => '1', 'cat' => get_option('niteoCS_unsplash_category['.$themeslug.']'), 'custom_str' => get_option('niteoCS_cat_keyword['.$themeslug.']', '') );
|
1016 |
-
$banner_url = $this->niteo_unsplash( $params );
|
1017 |
-
return array( $background_class, $banner_url );
|
1018 |
-
|
1019 |
-
// collection
|
1020 |
-
case '2':
|
1021 |
-
$params = array('feed' => '2', 'url' => get_option('niteoCS_unsplash_2['.$themeslug.']', '') );
|
1022 |
-
$banner_url = $this->niteo_unsplash( $params );
|
1023 |
-
return array( $background_class, $banner_url );
|
1024 |
-
|
1025 |
-
// random photo
|
1026 |
-
case '3':
|
1027 |
-
$params = array('feed' => '3', 'url' => get_option('niteoCS_unsplash_3['.$themeslug.']', ''), 'cat' => get_option('niteoCS_unsplash_feat['.$themeslug.']', '0') );
|
1028 |
-
$banner_url = $this->niteo_unsplash( $params );
|
1029 |
-
return array( $background_class, $banner_url );
|
1030 |
-
|
1031 |
-
default:
|
1032 |
-
break;
|
1033 |
-
}
|
1034 |
-
|
1035 |
-
break;
|
1036 |
-
|
1037 |
-
case '2':
|
1038 |
-
// default image
|
1039 |
-
$background_class = 'image';
|
1040 |
-
$banner_url = $this->cmp_themeURL($themeslug).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
|
1041 |
-
return array($background_class, $banner_url);
|
1042 |
-
|
1043 |
-
case '3':
|
1044 |
-
// Pattern
|
1045 |
-
$background_class = 'pattern';
|
1046 |
-
$niteoCS_banner_pattern = get_option('niteoCS_banner_pattern['.$themeslug.']', 'sakura');
|
1047 |
-
|
1048 |
-
if ( $niteoCS_banner_pattern != 'custom' ) {
|
1049 |
-
$banner_url = plugins_url('/img/patterns/'.esc_attr($niteoCS_banner_pattern).'.png', __FILE__);
|
1050 |
-
} else {
|
1051 |
-
|
1052 |
-
$banner_url = get_option('niteoCS_banner_pattern_custom['.$themeslug.']');
|
1053 |
-
}
|
1054 |
-
return array( $background_class, $banner_url );
|
1055 |
-
|
1056 |
-
case '4':
|
1057 |
-
// Pattern
|
1058 |
-
$background_class = 'color';
|
1059 |
-
$niteoCS_banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#bdc3c7');
|
1060 |
-
return array( $background_class, $niteoCS_banner_color );
|
1061 |
-
|
1062 |
-
case '5':
|
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;
|
1083 |
-
}
|
1084 |
-
}
|
1085 |
-
|
1086 |
-
function get_youtube_img( $youtube_url ) {
|
1087 |
$youtube = preg_match('/.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/', $youtube_url, $url);
|
1088 |
if ( isset( $url[7] ) && $url[7] != '') {
|
1089 |
$youtube_image = 'http://img.youtube.com/vi/' . $url[7] . '/hqdefault.jpg';
|
@@ -1091,7 +998,7 @@ class niteo_cmp {
|
|
1091 |
}
|
1092 |
}
|
1093 |
|
1094 |
-
function cmp_get_pages() {
|
1095 |
$page_titles = array();
|
1096 |
$pages = array();
|
1097 |
$page_ids = get_all_page_ids();
|
@@ -1108,7 +1015,7 @@ class niteo_cmp {
|
|
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'] ) ) {
|
@@ -1142,21 +1049,14 @@ class niteo_cmp {
|
|
1142 |
}
|
1143 |
}
|
1144 |
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
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'));
|
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.12.0
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
14 |
|
15 |
|
16 |
class niteo_cmp {
|
17 |
+
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
$this->author = 'NiteoThemes';
|
19 |
$this->author_homepage = 'https://niteothemes.com';
|
20 |
+
$this->version = '1.12.0';
|
21 |
$this->dev = false;
|
22 |
$this->installedFolder = basename(dirname(__FILE__));
|
23 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
if ( $this->plugins_dir_path == './') {
|
25 |
$this->plugins_dir_path = WP_PLUGIN_DIR . '/';
|
26 |
}
|
27 |
+
$this->premium_installed = array();
|
28 |
// set array of themes with countdown
|
29 |
$this->countdown_themes = array('frame', 'countdown', 'postery');
|
30 |
|
38 |
} else {
|
39 |
$this->theme_array = $this->themes_standard;
|
40 |
}
|
41 |
+
|
42 |
// set remote server URL for updates
|
43 |
$this->remoteServer = ($this->dev == true) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
|
44 |
$this->minified = ($this->dev == true) ? '.js' : '.min.js';
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
+
|
48 |
+
public function cmp() {
|
49 |
$this->__construct();
|
50 |
}
|
51 |
|
52 |
+
public function cmp_adminInit() {
|
53 |
wp_register_style( 'cmp_style', plugins_url('/css/cmp-settings-style.css', __FILE__),'',$this->version);
|
54 |
wp_enqueue_style('cmp_style');
|
55 |
+
wp_register_script('cmp_settings_js', plugins_url('/js/settings'.$this->minified, __FILE__), array('webfont'), $this->version);
|
56 |
wp_register_style( 'font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
|
57 |
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
|
58 |
wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
62 |
// wp_register_style( 'fastselect_css', plugins_url('/css/fastselect.min.css', __FILE__) );
|
63 |
}
|
64 |
|
65 |
+
public function cmp_add_admin_style() {
|
66 |
wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__),'',$this->version);
|
67 |
wp_enqueue_style( 'cmp_admin_style' );
|
68 |
}
|
69 |
|
70 |
+
public function enqueue_admin_js($hook) {
|
71 |
|
72 |
if ( 'toplevel_page_cmp-settings' == $hook ) {
|
73 |
wp_enqueue_script('cmp_settings_js');
|
75 |
|
76 |
}
|
77 |
|
78 |
+
public function cmp_enqueueScripts() {
|
79 |
// enqueue required admin scripts and styles
|
80 |
wp_enqueue_script( 'wp-color-picker');
|
81 |
wp_enqueue_script( 'webfont' );
|
85 |
|
86 |
}
|
87 |
|
88 |
+
public function sdt_remove_ver_css_js( $src, $handle ) {
|
89 |
$handles_remove_ver = array('font_awesome', 'webfont', 'countdown_flatpicker_js', 'countdown_flatpicker_css', 'fastselect'); // <-- Adjust to your needs!
|
90 |
if ( in_array( $handle, $handles_remove_ver, true ) && strpos( $src, 'ver=' ) )
|
91 |
$src = remove_query_arg( 'ver', $src );
|
95 |
|
96 |
|
97 |
//register scripts and load styles
|
98 |
+
public function cmp_adminMenu() {
|
99 |
|
100 |
/* Register our plugin page */
|
101 |
+
$page = add_menu_page('CMP Settings', __('CMP Settings','cmp-coming-soon-maintenance'), 'activate_plugins', 'cmp-settings', array($this, 'cmp_settings_page'), plugins_url('/img/cmp.png', __FILE__));
|
102 |
+
add_submenu_page('cmp-settings', 'Content Settings', __('Content Settings','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-settings' );
|
103 |
// add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
|
104 |
+
add_submenu_page('cmp-settings', 'Subscribers', __('Subscribers','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
|
105 |
+
add_submenu_page('cmp-settings', 'Translation', __('Translation','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-translate', array($this, 'cmp_translate_page') );
|
106 |
+
add_submenu_page('cmp-settings', 'Upload New Theme', __('Upload New Theme','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-upload-theme', array($this, 'cmp_upload_page') );
|
107 |
+
add_submenu_page('cmp-settings', 'Help', __('Help','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-help', array($this, 'cmp_help_page') );
|
108 |
|
109 |
/* Using registered $page handle to hook script load */
|
110 |
add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
|
128 |
|
129 |
|
130 |
|
131 |
+
public function cmp_settings_page() {
|
132 |
// include default options page
|
133 |
// check for them updates, not sure where else this to put
|
134 |
$this->cmp_check_update( $this->cmp_selectedTheme() );
|
135 |
require_once ('cmp-settings.php');
|
136 |
}
|
137 |
|
138 |
+
public function cmp_subs_page() {
|
|
|
139 |
require_once ('cmp-subscribers.php');
|
140 |
}
|
141 |
|
142 |
|
143 |
+
public function cmp_translate_page() {
|
144 |
+
require_once ('cmp-translate.php');
|
145 |
+
}
|
146 |
+
|
147 |
+
public function cmp_upload_page() {
|
148 |
+
require_once ('cmp-upload.php');
|
149 |
+
}
|
150 |
+
|
151 |
+
public function cmp_help_page() {
|
152 |
require_once ('cmp-help.php');
|
153 |
}
|
154 |
|
155 |
+
// public function cmp_advanced_page() {
|
156 |
// // include default options page
|
157 |
// wp_enqueue_script('fastsearch_js');
|
158 |
// wp_enqueue_script('fastselect_js');
|
161 |
// }
|
162 |
|
163 |
|
164 |
+
public function cmp_displayPage() {
|
165 |
+
// register html class for rendering of HTML elements in Themes
|
166 |
+
require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
|
167 |
+
$html = new cmp_render_html();
|
168 |
|
169 |
if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
|
170 |
|
171 |
// for themes preview demos
|
172 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
173 |
$theme_preview = $_GET['theme'];
|
174 |
+
|
175 |
// if premium
|
176 |
if ( $this->niteo_in_array_r( $theme_preview, $this->cmp_plugin_premium() ) ) {
|
177 |
if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_preview.'/'.$theme_preview.'-theme.php') ) {
|
255 |
|
256 |
}
|
257 |
|
258 |
+
public function cmp_admin_override(){
|
259 |
|
260 |
if( $this->cmp_status() == 0 ){
|
261 |
return;
|
272 |
}
|
273 |
|
274 |
// check plugin status
|
275 |
+
public function cmp_status() {
|
276 |
|
277 |
if ( !get_option('niteoCS_activation') || get_option('niteoCS_activation') == 0 ) {
|
278 |
return '0';
|
282 |
}
|
283 |
|
284 |
// check selected theme
|
285 |
+
public function cmp_selectedTheme() {
|
286 |
if ( !get_option('niteoCS_theme') ) { //if it's not set yet
|
287 |
update_option('niteoCS_theme', 'hardwork'); //set it
|
288 |
}
|
291 |
}
|
292 |
|
293 |
// return installed theme path
|
294 |
+
public function cmp_themePath( $slug ) {
|
295 |
if ( $this->niteo_in_array_r( $slug, $this->cmp_plugin_premium() ) ) {
|
296 |
return $this->plugins_dir_path . 'cmp-premium-themes/';
|
297 |
} else {
|
302 |
}
|
303 |
|
304 |
// return installed theme dir
|
305 |
+
public function cmp_themeURL( $themeslug ) {
|
306 |
if ( $this->niteo_in_array_r( $themeslug, $this->cmp_plugin_premium() ) ) {
|
307 |
return plugins_url( '/cmp-premium-themes/');
|
308 |
} else {
|
311 |
}
|
312 |
}
|
313 |
|
314 |
+
// older version of cmp_themeURL public function - migration after 1.9 version.
|
315 |
//can be deleted in future...
|
316 |
+
public function cmp_themeDirPath() {
|
317 |
if ( $this->niteo_in_array_r( $this->cmp_selectedTheme(), $this->cmp_plugin_premium() ) ) {
|
318 |
return plugins_url( '/cmp-premium-themes/');
|
319 |
} else {
|
323 |
}
|
324 |
|
325 |
// display admin notice
|
326 |
+
public function cmp_admin_bar(){
|
327 |
global $wp_admin_bar;
|
328 |
|
329 |
$status = $this->cmp_status();
|
350 |
) );
|
351 |
}
|
352 |
|
353 |
+
public function cmp_activate() {
|
354 |
if ( get_option('niteoCS_archive') ) {
|
355 |
//get all the options back from the archive
|
356 |
$options = get_option('niteoCS_archive');
|
365 |
}
|
366 |
|
367 |
// archive plugin stuff when plugin is deactivated
|
368 |
+
public function cmp_deactivate() {
|
369 |
//get all the options. store them in an array
|
370 |
$options = array();
|
371 |
|
390 |
}
|
391 |
|
392 |
// clean plugin stuff when plugin is deleted
|
393 |
+
public function cmp_plugin_delete() {
|
394 |
delete_option('niteoCS_archive');
|
395 |
}
|
396 |
|
397 |
// returns list of premium themes => manually defined
|
398 |
+
public function cmp_plugin_premium() {
|
399 |
$premium_themes = array();
|
400 |
array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://creativemarket.com/NiteoThemes/1373921-CMP-Frame-Coming-Soon-WP-Theme', 'price' => '10') );
|
401 |
array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://creativemarket.com/NiteoThemes/1385251-CMP-Hardwork-Premium-Maintenance', 'price' => '10') );
|
404 |
}
|
405 |
|
406 |
// theme updates function
|
407 |
+
public function cmp_check_update( $theme_slug ) {
|
408 |
|
409 |
if ( !in_array( $theme_slug, $this->premium_installed ) ) {
|
410 |
return;
|
480 |
return;
|
481 |
}
|
482 |
|
483 |
+
public function cmp_theme_upload($zip) {
|
484 |
// allow zip file to upload
|
485 |
add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
|
486 |
|
491 |
|
492 |
$uploadedfile = $zip;
|
493 |
$filename = $uploadedfile['name'];
|
494 |
+
/* You can use wp_check_filetype() public function to check the
|
495 |
file type and go on wit the upload or stop it.*/
|
496 |
$filetype = wp_check_filetype( $filename );
|
497 |
|
546 |
return;
|
547 |
}
|
548 |
|
549 |
+
public function cmp_theme_update_install( $file ) {
|
550 |
$ajax = false;
|
551 |
// check for ajax
|
552 |
if ( isset( $_POST['file'] ) ) {
|
647 |
}
|
648 |
}
|
649 |
|
650 |
+
public function cmp_textDomain() {
|
651 |
load_plugin_textdomain( 'cmp-coming-soon-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
652 |
}
|
653 |
|
654 |
// unsplash api
|
655 |
+
public function niteo_unsplash( $params ) {
|
656 |
$ajax = false;
|
657 |
|
658 |
// check for ajax
|
750 |
}
|
751 |
|
752 |
// check value in multidimensional array
|
753 |
+
public function niteo_in_array_r($needle, $haystack, $strict = false) {
|
754 |
foreach ( $haystack as $item ) {
|
755 |
if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
|
756 |
return true;
|
761 |
}
|
762 |
|
763 |
// save subscribe function
|
764 |
+
public function niteo_subscribe( $email ) {
|
765 |
$response = '';
|
766 |
|
767 |
// validate email address
|
770 |
$ip_address = sanitize_text_field($_SERVER['REMOTE_ADDR']);
|
771 |
$subscribe_list = get_option('niteoCS_subscribers_list');
|
772 |
|
773 |
+
if ( get_option('niteoCS_translation') ) {
|
774 |
+
$translation = json_decode( get_option('niteoCS_translation'), true );
|
775 |
+
$response1 = $translation[7]['translation'];
|
776 |
+
$response2 = $translation[5]['translation'];
|
777 |
+
$response3 = $translation[6]['translation'];
|
778 |
+
|
779 |
+
} else {
|
780 |
+
$response1 = 'Thank you, your sign-up request was successful!';
|
781 |
+
$response2 = 'This email address has already been on our subscriber list.';
|
782 |
+
$response3 = 'Please insert valid email.';
|
783 |
+
}
|
784 |
+
|
785 |
// if no subscribe list created, create first item and insert it into DB
|
786 |
if ( !$subscribe_list ) {
|
787 |
$subscribe_list = array();
|
788 |
$new_email = array('id' => '0', 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address);
|
789 |
array_push( $subscribe_list, $new_email );
|
790 |
update_option( 'niteoCS_subscribers_list', $subscribe_list );
|
791 |
+
$response = $response1;
|
792 |
|
793 |
} else {
|
794 |
// check if email don`t already exists
|
797 |
$new_email = array('id' => $count, 'timestamp' => $timestamp, 'email' => $email, 'ip_address' => $ip_address);
|
798 |
array_push( $subscribe_list, $new_email );
|
799 |
update_option('niteoCS_subscribers_list', $subscribe_list);
|
800 |
+
$response = $response1;
|
801 |
// if it exists return failed response
|
802 |
} else {
|
803 |
+
$response = $response2;
|
804 |
}
|
805 |
}
|
806 |
|
807 |
} else {
|
808 |
+
$response = $response3;
|
809 |
}
|
810 |
|
811 |
return $response;
|
812 |
}
|
813 |
|
814 |
+
public function niteo_export_csv() {
|
815 |
// load subscribers array
|
816 |
$subscribers = get_option('niteoCS_subscribers_list');
|
817 |
|
843 |
die();
|
844 |
}
|
845 |
|
846 |
+
public function niteo_allow_zip_mime( $existing_mimes = array() ) {
|
847 |
// add your own extension here - as many as you like
|
848 |
$existing_mimes['zip'] = 'application/zip';
|
849 |
|
851 |
return $existing_mimes;
|
852 |
}
|
853 |
|
854 |
+
public function niteo_remove_zip_mime( $existing_mimes = array() ) {
|
855 |
// remove zip mime
|
856 |
unset ($existing_mimes['zip']);
|
857 |
|
860 |
}
|
861 |
|
862 |
|
863 |
+
public function cmp_admin_notice() {
|
864 |
+
if ( isset($_GET['page']) && ($_GET['page'] == 'cmp-settings' || $_GET['page'] == 'cmp-translate') ) {
|
865 |
if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
|
866 |
$status = 'success';
|
867 |
$message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
|
873 |
}
|
874 |
|
875 |
// convert hex to rgba
|
876 |
+
public function hex2rgba ( $hex, $opacity ) {
|
877 |
list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
|
878 |
|
879 |
$rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
|
882 |
}
|
883 |
|
884 |
// convert hex to hsl css
|
885 |
+
public function hex2hsl( $hex, $opacity ) {
|
886 |
|
887 |
if ( $hex[0] != '#' ) {
|
888 |
$rgba = explode( ',', $hex);
|
951 |
}
|
952 |
|
953 |
// check if mobile
|
954 |
+
public function isMobile() {
|
955 |
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
|
956 |
}
|
957 |
|
958 |
// sanitize function
|
959 |
+
public function sanitize_checkbox( $input ) {
|
960 |
return ( ( isset( $input ) && true == $input ) ? '1' : '0' );
|
961 |
}
|
962 |
|
963 |
// sanitize function
|
964 |
+
public function niteo_sanitize_html( $html ) {
|
965 |
global $allowedposttags;
|
966 |
return wp_kses( $html, $allowedposttags );
|
967 |
}
|
968 |
|
969 |
+
// public function to sort social icons
|
970 |
+
public function sort_social($a, $b){
|
971 |
if ( $a['hidden'] == $b['hidden'] ) {
|
972 |
if( $a['order'] == $b['order'] ) {
|
973 |
return 0;
|
978 |
}
|
979 |
}
|
980 |
|
981 |
+
// public function to shift multidimensional array
|
982 |
+
public function customShift($array, $name){
|
983 |
// var_dump($array);
|
984 |
foreach($array as $key => $val){ // loop all elements
|
985 |
if($val['name'] == $name){ // check for id $id
|
990 |
}
|
991 |
}
|
992 |
|
993 |
+
public function get_youtube_img( $youtube_url ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
994 |
$youtube = preg_match('/.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/', $youtube_url, $url);
|
995 |
if ( isset( $url[7] ) && $url[7] != '') {
|
996 |
$youtube_image = 'http://img.youtube.com/vi/' . $url[7] . '/hqdefault.jpg';
|
998 |
}
|
999 |
}
|
1000 |
|
1001 |
+
public function cmp_get_pages() {
|
1002 |
$page_titles = array();
|
1003 |
$pages = array();
|
1004 |
$page_ids = get_all_page_ids();
|
1015 |
}
|
1016 |
|
1017 |
// send json data for theme info overlay AJAX request
|
1018 |
+
public function niteo_themeinfo( ) {
|
1019 |
|
1020 |
// check for ajax
|
1021 |
if ( isset( $_POST['theme_slug'] ) ) {
|
1049 |
}
|
1050 |
}
|
1051 |
|
1052 |
+
// legacy function for premium themes redirect
|
1053 |
+
public function niteo_redirect() {
|
1054 |
+
return;
|
1055 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1056 |
|
1057 |
}
|
1058 |
|
1059 |
+
|
1060 |
$cmpPlugin = new niteo_cmp();
|
1061 |
|
1062 |
add_action( 'admin_notices', array($cmpPlugin, 'cmp_admin_notice'));
|
readme.txt
CHANGED
@@ -4,18 +4,19 @@ 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 |
|
11 |
-
|
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
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>
|
@@ -24,10 +25,26 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
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>
|
29 |
<li>Works with any WordPress Theme and on all devices</li>
|
30 |
-
<li>
|
31 |
<li>Customize Logo, Fonts and Colors</li>
|
32 |
<li>Setup custom Social Icons</li>
|
33 |
<li>Subscribe form works with any 3rd party plugin(Mailchimp, CF7, etc)</li>
|
@@ -48,7 +65,7 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
48 |
<h3>Install from WordPress Plugin Dashboard</h3>
|
49 |
<ul>
|
50 |
<li>Navigate to the 'Add New' in the plugins dashboard</li>
|
51 |
-
<li>Search for '
|
52 |
<li>Click 'Install Now'</li>
|
53 |
<li>Activate the plugin on the Plugin dashboard</li>
|
54 |
<li>To Setup click Settings->CMP Settings and change the settings there</li>
|
@@ -58,7 +75,7 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
58 |
<ul>
|
59 |
<li>Navigate to the 'Add New' in the plugins dashboard</li>
|
60 |
<li>Navigate to the 'Upload' area</li>
|
61 |
-
<li>Download <code>
|
62 |
<li>Click 'Install Now'</li>
|
63 |
<li>Activate the plugin in the Plugin dashboard</li>
|
64 |
<li>To Setup click Settings->CMP Settings and change the settings there</li>
|
@@ -68,29 +85,13 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
68 |
<ul>
|
69 |
<li>Navigate to the 'Add New' in the plugins dashboard</li>
|
70 |
<li>Navigate to the 'Upload' area</li>
|
71 |
-
<li>Download <code>
|
72 |
-
<li>Upload the extracted <code>
|
73 |
<li>Activate the plugin in the Plugin dashboard</li>
|
74 |
<li>To Setup click Settings->CMP Settings and change the settings there</li>
|
75 |
</ul>
|
76 |
|
77 |
|
78 |
-
== Screenshots ==
|
79 |
-
1. CMP - Coming Soon Plugin
|
80 |
-
2. CMP - Theme Selector
|
81 |
-
3. CMP - Subscriber List
|
82 |
-
4. CMP - Theme Selector detail
|
83 |
-
5. CMP - Global Settings
|
84 |
-
6. CMP - Theme Content Settings
|
85 |
-
7. CMP - SEO Settings
|
86 |
-
8. CMP - Construct Theme
|
87 |
-
9. CMP - Countdown Theme
|
88 |
-
10. CMP - Fifty Theme
|
89 |
-
11. CMP - Fifty Theme
|
90 |
-
12. CMP - Frame Theme
|
91 |
-
13. CMP - Hardwork Theme
|
92 |
-
14. CMP - Hardwork Premium Theme
|
93 |
-
|
94 |
== Frequently Asked Questions ==
|
95 |
<h4>I can't see the landing page I`ve just created!</h4>
|
96 |
<p>As long as you're logged in as admin, you cannot see it. That`s what this plugin does! It displays Maintenance or Landing page only to non-logged or non-admin logged visitors of your page. By this way you can work on your real website and display different page to your visitors. You can preview the page by clicking on "preview" tab, loggout from Wordpress or access your website from different browser.</p>
|
@@ -100,10 +101,10 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
100 |
<p>On the other hand if you have your website already up and running but you are doing only a short maintenance it`s better to send out response 503 HTTP Service unavailable code. By that way you make sure the search engines do not index your temporarily website while it`s down to maintenance and do not lower your website SEO score.</p>
|
101 |
|
102 |
<h4>Is it a bug? Noone likes BUGS!</h4>
|
103 |
-
<p>This is awkward and shame on us:(. Fortunately we are nice guys and if you let us know about it trough <a href="
|
104 |
|
105 |
<h4>Features requests or you have new idea?</h4>
|
106 |
-
<p>That`s perfect because we want to make our plugin great and to fit exactly your needs! Just let us know <a href="
|
107 |
|
108 |
|
109 |
<h4>I really like your plugin and I want to support it!</h4>
|
@@ -112,9 +113,15 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
|
|
112 |
|
113 |
|
114 |
== Changelog ==
|
115 |
-
<h4>1.
|
116 |
-
<
|
117 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
</ul>
|
119 |
|
120 |
<h4>1.11.0</h4>
|
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.12.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Select Theme, select your images/videos and insert custom content (including custom logo, social icons, subscribe forms, and many more).
|
12 |
+
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
CMP brings premium features for free, no PRO versions! It is very user friendly plugin to create and customize your own Coming Soon, Maintenance or landing page. Select a Theme from our predefined templates, setup custom logo, background graphics (including videos), custom content, subscribe forms, your social networks icons, fonts and colors, SEO, and many more.
|
17 |
|
18 |
+
<h3>Live Preview</h3>
|
19 |
+
<a href="http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork&video=true&utm_source=wp&utm_medium=referral" target="_blank">Click for preview of Hardwork Theme with video background>></a>
|
20 |
<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>
|
21 |
<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>
|
22 |
<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>
|
25 |
<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>
|
26 |
<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>
|
27 |
|
28 |
+
== Screenshots ==
|
29 |
+
1. CMP - Coming Soon Plugin
|
30 |
+
2. CMP - Theme Selector
|
31 |
+
3. CMP - Subscriber List
|
32 |
+
4. CMP - Theme Selector detail
|
33 |
+
5. CMP - Global Settings
|
34 |
+
6. CMP - Theme Content Settings
|
35 |
+
7. CMP - SEO Settings
|
36 |
+
8. CMP - Construct Theme
|
37 |
+
9. CMP - Countdown Theme
|
38 |
+
10. CMP - Fifty Theme
|
39 |
+
11. CMP - Fifty Theme
|
40 |
+
12. CMP - Frame Theme
|
41 |
+
13. CMP - Hardwork Theme
|
42 |
+
14. CMP - Hardwork Premium Theme
|
43 |
+
|
44 |
<h3>Features</h3>
|
45 |
<ul>
|
46 |
<li>Works with any WordPress Theme and on all devices</li>
|
47 |
+
<li>Fully responsive and Retina ready</li>
|
48 |
<li>Customize Logo, Fonts and Colors</li>
|
49 |
<li>Setup custom Social Icons</li>
|
50 |
<li>Subscribe form works with any 3rd party plugin(Mailchimp, CF7, etc)</li>
|
65 |
<h3>Install from WordPress Plugin Dashboard</h3>
|
66 |
<ul>
|
67 |
<li>Navigate to the 'Add New' in the plugins dashboard</li>
|
68 |
+
<li>Search for 'CMP NiteoThemes'</li>
|
69 |
<li>Click 'Install Now'</li>
|
70 |
<li>Activate the plugin on the Plugin dashboard</li>
|
71 |
<li>To Setup click Settings->CMP Settings and change the settings there</li>
|
75 |
<ul>
|
76 |
<li>Navigate to the 'Add New' in the plugins dashboard</li>
|
77 |
<li>Navigate to the 'Upload' area</li>
|
78 |
+
<li>Download <code>cmp-coming-soon-maintenance.zip</code> and select <code>cmp-coming-soon-maintenance.zip</code> from your directory</li>
|
79 |
<li>Click 'Install Now'</li>
|
80 |
<li>Activate the plugin in the Plugin dashboard</li>
|
81 |
<li>To Setup click Settings->CMP Settings and change the settings there</li>
|
85 |
<ul>
|
86 |
<li>Navigate to the 'Add New' in the plugins dashboard</li>
|
87 |
<li>Navigate to the 'Upload' area</li>
|
88 |
+
<li>Download <code>cmp-coming-soon-maintenance.zip</code> and extract the <code>cmp-coming-soon-maintenance.zip</code> zip file to your computer</li>
|
89 |
+
<li>Upload the extracted <code>cmp-coming-soon-maintenance</code> directory to the <code>/wp-content/plugins/</code> directory</li>
|
90 |
<li>Activate the plugin in the Plugin dashboard</li>
|
91 |
<li>To Setup click Settings->CMP Settings and change the settings there</li>
|
92 |
</ul>
|
93 |
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
== Frequently Asked Questions ==
|
96 |
<h4>I can't see the landing page I`ve just created!</h4>
|
97 |
<p>As long as you're logged in as admin, you cannot see it. That`s what this plugin does! It displays Maintenance or Landing page only to non-logged or non-admin logged visitors of your page. By this way you can work on your real website and display different page to your visitors. You can preview the page by clicking on "preview" tab, loggout from Wordpress or access your website from different browser.</p>
|
101 |
<p>On the other hand if you have your website already up and running but you are doing only a short maintenance it`s better to send out response 503 HTTP Service unavailable code. By that way you make sure the search engines do not index your temporarily website while it`s down to maintenance and do not lower your website SEO score.</p>
|
102 |
|
103 |
<h4>Is it a bug? Noone likes BUGS!</h4>
|
104 |
+
<p>This is awkward and shame on us:(. Fortunately we are nice guys and if you let us know about it trough <a href="https://niteothemes.com">NiteoThemes website</a> contact form we promise to fix it as soon as possible!</p>
|
105 |
|
106 |
<h4>Features requests or you have new idea?</h4>
|
107 |
+
<p>That`s perfect because we want to make our plugin great and to fit exactly your needs! Just let us know <a href="https://niteothemes.com">NiteoThemes website</a> contact form and we might include it in next plugin update!</p>
|
108 |
|
109 |
|
110 |
<h4>I really like your plugin and I want to support it!</h4>
|
113 |
|
114 |
|
115 |
== Changelog ==
|
116 |
+
<h4>1.12.0</h4>
|
117 |
+
<h3>**IMPORTANT NOTICE**</h3>
|
118 |
+
<p>Once you update to new CMP version 1.12.0 you must also update your Premium themes (if you have any) due to compatibility issues!</p>
|
119 |
+
<ul>
|
120 |
+
<li>New Feature: Background Gradient support which allows you to select from our awesome predefined gradients or setup yours.</li>
|
121 |
+
<li>New Feature: Translation variables finally available. You can now translate every text on your landing page including counter and subscribe form.</li>
|
122 |
+
<li>Updated design of CMP Frame theme.</li>
|
123 |
+
<li>Many changes in CMP UI for more user friendly interface including our CMP sidebar.</li>
|
124 |
+
<li>Rewrited part of internal code for faster loading times and better PHP code maintenance.</li>
|
125 |
</ul>
|
126 |
|
127 |
<h4>1.11.0</h4>
|
themes/construct.txt
CHANGED
@@ -4,4 +4,5 @@ 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
|
|
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 class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Parallax Effect</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
8 |
+
|
themes/construct/construct-theme.php
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
3 |
$subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
|
4 |
-
|
5 |
?>
|
6 |
|
7 |
<!DOCTYPE html>
|
@@ -17,7 +21,7 @@
|
|
17 |
|
18 |
<?php
|
19 |
$themeslug = 'construct';
|
20 |
-
|
21 |
// get theme related settings
|
22 |
$active_color = get_option('niteoCS_active_color['.$themeslug.']', '#f37004');
|
23 |
$font_color = get_option('niteoCS_font_color['.$themeslug.']', '#686868');
|
@@ -25,6 +29,7 @@
|
|
25 |
$heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Fjalla One');
|
26 |
$content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Average Sans');
|
27 |
$logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
|
|
|
28 |
|
29 |
if ( $heading_font == 'custom' ) {
|
30 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
@@ -35,69 +40,10 @@
|
|
35 |
}
|
36 |
|
37 |
// get global settings
|
38 |
-
$body_title
|
39 |
-
$
|
40 |
-
$
|
41 |
-
$
|
42 |
-
$social_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
|
43 |
-
$favicon_id = get_option('niteoCS_favicon_id');
|
44 |
-
|
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';
|
66 |
-
$banner_url = '';
|
67 |
-
}
|
68 |
-
|
69 |
-
// migrate social media to new option after update 1.4.0
|
70 |
-
if ( !get_option('niteoCS_socialmedia') ) {
|
71 |
-
$social_media = array('facebook', 'google-plus', 'twitter', 'instagram', 'skype', '500px', 'deviantart', 'behance', 'dribbble', 'pinterest', 'linkedin', 'tumblr', 'youtube', 'vimeo', 'flickr', 'vk','envelope-o');
|
72 |
-
$i = 0;
|
73 |
-
$new_socials = array();
|
74 |
-
foreach ( $social_media as $social ) {
|
75 |
-
|
76 |
-
$social_field = get_option('niteoCS_'.$social);
|
77 |
-
|
78 |
-
$new_socials[$i]['name'] = $social;
|
79 |
-
$new_socials[$i]['url'] = $social_field;
|
80 |
-
$new_socials[$i]['active'] = '1';
|
81 |
-
$new_socials[$i]['hidden'] = $social_field ? '0' : '1';
|
82 |
-
$new_socials[$i]['order'] = $i;
|
83 |
-
$i++;
|
84 |
-
|
85 |
-
}
|
86 |
-
$socialmedia = $new_socials;
|
87 |
-
} else {
|
88 |
-
$socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
|
89 |
-
$socialmedia = json_decode( $socialmedia, true );
|
90 |
-
}
|
91 |
-
|
92 |
-
foreach ( $socialmedia as $social ) {
|
93 |
-
|
94 |
-
if ( $social['hidden'] == '0' && $social['active'] == '1') {
|
95 |
-
$enable_social = true;
|
96 |
-
break;
|
97 |
-
} else {
|
98 |
-
$enable_social = false;
|
99 |
-
}
|
100 |
-
}
|
101 |
|
102 |
// display favicon
|
103 |
if ( $favicon_id && $favicon_id != '' ) {
|
@@ -111,13 +57,10 @@
|
|
111 |
|
112 |
if ( get_option( 'blog_public' ) == 0 ) {
|
113 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
114 |
-
}
|
115 |
|
|
|
116 |
|
117 |
-
if ( $enable_social === true ) { ?>
|
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">
|
@@ -167,145 +110,61 @@
|
|
167 |
|
168 |
</head>
|
169 |
|
170 |
-
<?php
|
171 |
-
|
172 |
-
?>
|
173 |
-
|
174 |
<body>
|
175 |
<section class="section section-logo">
|
176 |
<?php
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
$logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
181 |
-
// get logo
|
182 |
-
if ( $logo_id != '' ) {
|
183 |
-
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
184 |
-
}
|
185 |
-
if ( isset($logo_url[0]) ) { ?>
|
186 |
-
<img src="<?php echo esc_url( $logo_url[0] ); ?>" alt="logo">
|
187 |
-
<?php
|
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':
|
195 |
-
default:
|
196 |
-
break;
|
197 |
} ?>
|
198 |
</section>
|
199 |
|
200 |
<section class="section section-banner" id="banner-wrapper">
|
201 |
-
<?php
|
202 |
-
if ( $
|
203 |
-
|
204 |
-
|
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': ?>
|
212 |
-
<div class="banner <?php echo esc_attr($background_class);?>" style="background-color:<?php echo esc_url( $banner_url ); ?>"></div>
|
213 |
-
<?php
|
214 |
-
break;
|
215 |
-
// unsplash media
|
216 |
-
case '1': ?>
|
217 |
-
<script>
|
218 |
-
var screenWidth = Math.round(screen.width*window.devicePixelRatio);
|
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 |
-
}
|
236 |
-
|
237 |
-
} else { ?>
|
238 |
-
<p class="error"><?php _e('To Display Graphic Media please upgrade CMP Plugin to latest version. You can download latest version on ', 'cmp-coming-soon-maintenance');?><a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/">Wordpress website</a> <?php _e('or you can use automatic plugin update in WP-Admin > Plugins > CMP - Coming Soon & Maintenance Plugin > Update Now.', 'cmp-coming-soon-maintenance');?></p>
|
239 |
-
<?php
|
240 |
} ?>
|
241 |
</section>
|
242 |
|
243 |
|
244 |
<section class="section section-body">
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
<?php echo apply_filters('the_content', stripslashes(get_option('niteoCS_body')));?>
|
250 |
|
251 |
-
<?php
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
} else if ( $subscribe == '2' ) { ?>
|
259 |
-
<form id="subscribe-form" method="post">
|
260 |
-
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
261 |
-
<?php
|
262 |
-
if ( $niteoCS_subscribe_label != '' ) { ?>
|
263 |
-
<label for="EMAIL"><?php echo esc_html($niteoCS_subscribe_label);?></label>
|
264 |
-
<?php
|
265 |
-
} ?>
|
266 |
-
<input type="email" name="EMAIL" placeholder="Your email address" required>
|
267 |
-
|
268 |
-
<input type="submit" value="Sign up">
|
269 |
-
|
270 |
-
<div style="display: none;">
|
271 |
-
<input type="text" name="form_honeypot" value="" tabindex="-1" autocomplete="off">
|
272 |
-
</div>
|
273 |
-
|
274 |
-
<div class="subsribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
|
275 |
-
</form>
|
276 |
-
<?php
|
277 |
-
}
|
278 |
-
?>
|
279 |
|
280 |
</section>
|
281 |
|
282 |
-
<?php
|
283 |
-
if ( $enable_social === true ) {
|
284 |
-
uasort( $socialmedia, array($this,'sort_social') ); ?>
|
285 |
|
286 |
-
|
287 |
-
|
|
|
288 |
<h2><?php echo esc_html( $social_title );?></h2>
|
289 |
-
<?php
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
} else {
|
299 |
-
echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
300 |
-
}
|
301 |
-
}
|
302 |
-
|
303 |
-
} //end foreach ?>
|
304 |
-
</ul>
|
305 |
-
</section>
|
306 |
-
<?php
|
307 |
-
}
|
308 |
|
|
|
309 |
if ( $copyright != '' ) { ?>
|
310 |
<footer class="section section-footer">
|
311 |
<p><?php echo esc_html( $copyright );?></p>
|
@@ -314,57 +173,20 @@
|
|
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 |
-
|
329 |
-
|
330 |
-
|
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 |
-
|
366 |
-
|
367 |
-
|
|
|
368 |
|
369 |
</body>
|
370 |
|
1 |
<?php
|
2 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
3 |
+
&& isset( $_POST['form_honeypot'] )
|
4 |
+
&& $_POST['form_honeypot'] === ''
|
5 |
+
&& isset( $_POST['EMAIL'] )
|
6 |
+
&& is_email( $_POST['EMAIL'] ) ) {
|
7 |
$subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
|
8 |
+
}
|
9 |
?>
|
10 |
|
11 |
<!DOCTYPE html>
|
21 |
|
22 |
<?php
|
23 |
$themeslug = 'construct';
|
24 |
+
|
25 |
// get theme related settings
|
26 |
$active_color = get_option('niteoCS_active_color['.$themeslug.']', '#f37004');
|
27 |
$font_color = get_option('niteoCS_font_color['.$themeslug.']', '#686868');
|
29 |
$heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Fjalla One');
|
30 |
$content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Average Sans');
|
31 |
$logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
|
32 |
+
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '2');
|
33 |
|
34 |
if ( $heading_font == 'custom' ) {
|
35 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
40 |
}
|
41 |
|
42 |
// get global settings
|
43 |
+
$body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
|
44 |
+
$copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
|
45 |
+
$social_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
|
46 |
+
$favicon_id = get_option('niteoCS_favicon_id');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
// display favicon
|
49 |
if ( $favicon_id && $favicon_id != '' ) {
|
57 |
|
58 |
if ( get_option( 'blog_public' ) == 0 ) {
|
59 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
60 |
+
} ?>
|
61 |
|
62 |
+
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
63 |
|
|
|
|
|
|
|
|
|
64 |
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version;?>" type="text/css" media="all">
|
65 |
|
66 |
<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 |
|
111 |
</head>
|
112 |
|
|
|
|
|
|
|
|
|
113 |
<body>
|
114 |
<section class="section section-logo">
|
115 |
<?php
|
116 |
+
// display logo
|
117 |
+
if ( method_exists ( $html, 'cmp_logo' ) ) {
|
118 |
+
echo $html->cmp_logo( $themeslug );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
} ?>
|
120 |
</section>
|
121 |
|
122 |
<section class="section section-banner" id="banner-wrapper">
|
123 |
+
<?php
|
124 |
+
if ( method_exists ( $html, 'cmp_background' ) ) {
|
125 |
+
echo $html->cmp_background( $niteoCS_banner, $themeslug );
|
126 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
} ?>
|
128 |
</section>
|
129 |
|
130 |
|
131 |
<section class="section section-body">
|
132 |
+
|
133 |
+
<?php
|
134 |
+
// display body title
|
135 |
+
if ( $body_title != '' ) { ?>
|
136 |
+
<h2><?php echo esc_html( $body_title );?></h2>
|
137 |
+
<?php
|
138 |
+
} ?>
|
139 |
+
|
140 |
|
141 |
<?php echo apply_filters('the_content', stripslashes(get_option('niteoCS_body')));?>
|
142 |
|
143 |
+
<?php
|
144 |
+
if ( method_exists ( $html, 'cmp_subscribe_form' ) ) {
|
145 |
+
echo $html->cmp_subscribe_form( );
|
146 |
+
|
147 |
+
} ?>
|
148 |
+
|
149 |
+
<div class="subscribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
</section>
|
152 |
|
|
|
|
|
|
|
153 |
|
154 |
+
<section class="section section-social">
|
155 |
+
<?php
|
156 |
+
if ( $social_title != '') { ?>
|
157 |
<h2><?php echo esc_html( $social_title );?></h2>
|
158 |
+
<?php
|
159 |
+
}
|
160 |
+
|
161 |
+
// display social icons
|
162 |
+
if ( method_exists ( $html, 'cmp_social_icons' ) ) {
|
163 |
+
echo $html->cmp_social_icons();
|
164 |
+
} ?>
|
165 |
+
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
+
<?php
|
168 |
if ( $copyright != '' ) { ?>
|
169 |
<footer class="section section-footer">
|
170 |
<p><?php echo esc_html( $copyright );?></p>
|
173 |
}
|
174 |
|
175 |
if ( $niteoCS_banner != 5 && $niteoCS_banner != 4 ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
<script type='text/javascript' src='<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug .'/paraxify.min.js';?>'></script>
|
177 |
<?php
|
178 |
|
179 |
}
|
180 |
|
181 |
+
// render javascripts
|
182 |
+
if ( method_exists ( $html, 'cmp_javascripts' ) ) {
|
183 |
+
$html->cmp_javascripts( $niteoCS_banner, $themeslug );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
}
|
185 |
|
186 |
+
// render script for redirect
|
187 |
+
if ( method_exists ( $html, 'niteo_redirect' ) ) {
|
188 |
+
$html->niteo_redirect();
|
189 |
+
} ?>
|
190 |
|
191 |
</body>
|
192 |
|
themes/construct/style.css
CHANGED
@@ -3,9 +3,6 @@ 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 |
-
Details URI: {"1": "https:\/\/niteothemes.com\/cmp-screenshots\/construct\/screenshot1.jpg"}
|
8 |
-
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>
|
9 |
|
10 |
Normalizing styles have been helped along thanks to the fine work of
|
11 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
@@ -55,11 +52,11 @@ h1,h2,h3,h4,h5,h6{font-weight: 400;font-size:2em;}
|
|
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 |
-
.
|
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;}
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=construct
|
4 |
Author: Niteo
|
5 |
Author URI: https://niteothemes.com
|
|
|
|
|
|
|
6 |
|
7 |
Normalizing styles have been helped along thanks to the fine work of
|
8 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
52 |
.section-body p{width:70%;max-width: 900px;margin:1em auto;}
|
53 |
.section-social{background-color: #f8f8f8;}
|
54 |
.section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;}
|
55 |
+
#background-image, .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;}
|
56 |
#background-image {opacity: 0; -webkit-transition: opacity 400ms; transition: opacity 400ms;}
|
57 |
#background-image.loaded {opacity: 1;}
|
|
|
58 |
|
59 |
+
#background-image.pattern{background-size: initial; background-repeat: repeat;}
|
60 |
.social-list{padding:0;margin-bottom: 0;}
|
61 |
.social-list li{list-style: none;display: inline-block; padding: 0 5px;}
|
62 |
.section-body form{width: 400px;max-width:100%;margin: 0 auto;margin-top: 70px;margin-bottom: 30px;text-align:left;}
|
themes/countdown.txt
CHANGED
@@ -4,4 +4,4 @@ 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>
|
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 class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Countdown Timer</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
themes/countdown/countdown-settings.php
CHANGED
@@ -41,10 +41,10 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
|
|
41 |
|
42 |
|
43 |
<div class="table-wrapper theme-setup">
|
44 |
-
<h3><?php _e('Customize Colors', 'cmp');?></h3>
|
45 |
<table class="theme-setup">
|
46 |
<tr>
|
47 |
-
<th><h4><?php _e('Active Color', 'cmp');?></h4></th>
|
48 |
<td>
|
49 |
|
50 |
<fieldset>
|
@@ -54,7 +54,7 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
|
|
54 |
</td>
|
55 |
</tr>
|
56 |
<tr>
|
57 |
-
<th><h4><?php _e('Font Color', 'cmp');?></h4></th>
|
58 |
<td>
|
59 |
|
60 |
<fieldset>
|
@@ -63,13 +63,13 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
|
|
63 |
</td>
|
64 |
</tr>
|
65 |
<tr>
|
66 |
-
<th><h4><?php _e('Overlay Color', 'cmp');?></h4></th>
|
67 |
<td>
|
68 |
|
69 |
<fieldset id="overlay-color">
|
70 |
<input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
|
71 |
|
72 |
-
<label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
|
73 |
<input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
|
74 |
|
75 |
</fieldset>
|
41 |
|
42 |
|
43 |
<div class="table-wrapper theme-setup">
|
44 |
+
<h3><?php _e('Customize Colors', 'cmp-coming-soon-maintenance');?></h3>
|
45 |
<table class="theme-setup">
|
46 |
<tr>
|
47 |
+
<th><h4><?php _e('Active Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
48 |
<td>
|
49 |
|
50 |
<fieldset>
|
54 |
</td>
|
55 |
</tr>
|
56 |
<tr>
|
57 |
+
<th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
58 |
<td>
|
59 |
|
60 |
<fieldset>
|
63 |
</td>
|
64 |
</tr>
|
65 |
<tr>
|
66 |
+
<th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
67 |
<td>
|
68 |
|
69 |
<fieldset id="overlay-color">
|
70 |
<input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
|
71 |
|
72 |
+
<label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
|
73 |
<input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
|
74 |
|
75 |
</fieldset>
|
themes/countdown/countdown-social_settings.php
CHANGED
@@ -17,12 +17,12 @@ $social_location = get_option('social_location', 'footer');
|
|
17 |
|
18 |
?>
|
19 |
<tr>
|
20 |
-
<th><h4><?php _e('Social Icons Location', 'cmp');?></h4></th>
|
21 |
<td>
|
22 |
<fieldset>
|
23 |
<select name="social_location">
|
24 |
-
<option value="body" <?php if ( $social_location == 'body' ) { echo ' selected="selected"'; } ?>><?php _e('Below Content (big icons)', 'cmp');?></option>
|
25 |
-
<option value="footer" <?php if ( $social_location == 'footer' ) { echo ' selected="selected"'; } ?>><?php _e('Footer (small icons)', 'cmp');?></option>
|
26 |
</select>
|
27 |
</fieldset>
|
28 |
</td>
|
17 |
|
18 |
?>
|
19 |
<tr>
|
20 |
+
<th><h4><?php _e('Social Icons Location', 'cmp-coming-soon-maintenance');?></h4></th>
|
21 |
<td>
|
22 |
<fieldset>
|
23 |
<select name="social_location">
|
24 |
+
<option value="body" <?php if ( $social_location == 'body' ) { echo ' selected="selected"'; } ?>><?php _e('Below Content (big icons)', 'cmp-coming-soon-maintenance');?></option>
|
25 |
+
<option value="footer" <?php if ( $social_location == 'footer' ) { echo ' selected="selected"'; } ?>><?php _e('Footer (small icons)', 'cmp-coming-soon-maintenance');?></option>
|
26 |
</select>
|
27 |
</fieldset>
|
28 |
</td>
|
themes/countdown/countdown-theme.php
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
3 |
$subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
|
4 |
-
|
5 |
?>
|
6 |
<!DOCTYPE html>
|
7 |
|
@@ -16,7 +20,7 @@
|
|
16 |
|
17 |
<?php
|
18 |
$themeslug = 'countdown';
|
19 |
-
|
20 |
// get theme related settings
|
21 |
$niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
|
22 |
$niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
|
@@ -26,9 +30,7 @@
|
|
26 |
$background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
|
27 |
$content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
|
28 |
$heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
|
29 |
-
$logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
|
30 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
31 |
-
$unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
|
32 |
|
33 |
if ( $heading_font == 'custom' ) {
|
34 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
@@ -38,8 +40,6 @@
|
|
38 |
$content_font = get_option('niteoCS_font_content_custom['.$themeslug.']');
|
39 |
}
|
40 |
// get global settings
|
41 |
-
$subscribe = get_option('niteoCS_subscribe_type', '2');
|
42 |
-
$niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
|
43 |
$niteoCS_counter = get_option('niteoCS_counter', '1');
|
44 |
$niteoCS_counter_date = get_option('niteoCS_counter_date', time()+86400);
|
45 |
$countdown_action = get_option('niteoCS_countdown_action', 'no-action');
|
@@ -47,46 +47,7 @@
|
|
47 |
$body = get_option('niteoCS_body');
|
48 |
$copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
|
49 |
$favicon_id = get_option('niteoCS_favicon_id');
|
50 |
-
|
51 |
-
$socialmedia = stripslashes(get_option('niteoCS_socialmedia'));
|
52 |
-
$socialmedia = json_decode($socialmedia, true);
|
53 |
$social_location = get_option('social_location', 'footer');
|
54 |
-
$enable_social = false;
|
55 |
-
|
56 |
-
if ( is_array($socialmedia) ) {
|
57 |
-
foreach ( $socialmedia as $social ) {
|
58 |
-
|
59 |
-
if ( $social['hidden'] == '0' && $social['active'] == '1') {
|
60 |
-
$enable_social = true;
|
61 |
-
//sort array by hidden, then order key
|
62 |
-
uasort( $socialmedia , array($this,'sort_social') );
|
63 |
-
break;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
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';
|
88 |
-
$banner_url = '';
|
89 |
-
}
|
90 |
|
91 |
// override options if theme preview isset
|
92 |
if ( isset( $theme_preview ) && $theme_preview == 'countdown' ) {
|
@@ -108,11 +69,8 @@
|
|
108 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
109 |
} ?>
|
110 |
|
111 |
-
|
112 |
-
|
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">
|
@@ -126,29 +84,14 @@
|
|
126 |
::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
127 |
:-ms-input-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
128 |
::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
129 |
-
.input-icon:before,input[type="email"]{color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
130 |
-
input[type="email"] {border:1px solid <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
131 |
.background-overlay{background-color:<?php echo esc_attr($background_overlay);?>;}
|
132 |
-
.counter-wrap {border: 1px solid <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
133 |
-
.counter-wrap span {color: <?php echo esc_attr($niteoCS_active_color);?>;}
|
134 |
footer, footer a {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
135 |
.social-list.body a {background-color: <?php echo esc_attr( $niteoCS_font_color ); ?>;}
|
136 |
.social-list.body a:hover {background-color: <?php echo esc_attr( $niteoCS_active_color ); ?>;}
|
137 |
.social-list.footer a:hover {color: <?php echo esc_attr( $niteoCS_active_color ); ?>;}
|
138 |
.social-list.footer li:not(:last-of-type)::after {background-color: <?php echo esc_attr( $niteoCS_font_color_light ); ?>;}
|
139 |
-
<?php
|
140 |
-
// if graphic banner, display transparent counter and input
|
141 |
-
$types = array('0', '1', '2', '5');
|
142 |
-
if ( in_array($niteoCS_banner, $types) ) { ?>
|
143 |
-
.counter-wrap,
|
144 |
-
input[type="email"],
|
145 |
-
.social-list.body a {background:rgba(255, 255, 255, 0.10);}
|
146 |
-
input[type="submit"] {border:1px solid <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
147 |
-
<?php
|
148 |
-
} else { ?>
|
149 |
-
.counter-wrap p {color:#494949;}
|
150 |
-
<?php
|
151 |
-
} ?>
|
152 |
</style>
|
153 |
|
154 |
<?php
|
@@ -177,6 +120,11 @@
|
|
177 |
|
178 |
</script>
|
179 |
<?php
|
|
|
|
|
|
|
|
|
|
|
180 |
} ?>
|
181 |
|
182 |
</head>
|
@@ -185,44 +133,10 @@
|
|
185 |
|
186 |
<div id="background-wrapper">
|
187 |
<?php
|
188 |
-
if ( $
|
189 |
-
|
190 |
-
// custom media / default / pattern / color
|
191 |
-
case '0':
|
192 |
-
case '2':
|
193 |
-
case '3': ?>
|
194 |
-
<div id="background-image" class="<?php echo esc_attr($background_class);?>" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
|
195 |
-
<?php
|
196 |
-
break;
|
197 |
-
|
198 |
-
case '4': ?>
|
199 |
-
<div id="background-image" class="<?php echo esc_attr($background_class);?>" style="background-color:<?php echo esc_url( $banner_url ); ?>"></div>
|
200 |
-
<?php
|
201 |
-
break;
|
202 |
-
// unsplash media
|
203 |
-
case '1': ?>
|
204 |
-
<script>
|
205 |
-
var screenWidth = Math.round(screen.width*window.devicePixelRatio);
|
206 |
-
var screenHeight = screenWidth / 1.77777;
|
207 |
-
screenHeight = screenHeight.toFixed(0);
|
208 |
-
|
209 |
-
var banner = '<div id="background-image" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>\')"></div>';
|
210 |
-
banner = banner.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
|
211 |
-
document.getElementById('background-wrapper').innerHTML = banner;
|
212 |
-
</script>
|
213 |
-
<?php
|
214 |
-
// video media
|
215 |
-
case '5': ?>
|
216 |
-
<div id="player" class="video-banner"></div>
|
217 |
-
<?php
|
218 |
-
default:
|
219 |
-
break;
|
220 |
-
}
|
221 |
|
222 |
-
}
|
223 |
-
<p class="error"><?php _e('To Display Graphic Media please upgrade CMP Plugin to latest version. You can download latest version on ', 'cmp-coming-soon-maintenance');?><a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/">Wordpress website</a> <?php _e('or you can use automatic plugin update in WP-Admin > Plugins > CMP - Coming Soon & Maintenance Plugin > Update Now.', 'cmp-coming-soon-maintenance');?></p>
|
224 |
-
<?php
|
225 |
-
}
|
226 |
|
227 |
if ( $niteoCS_overlay_opacity != '0' ) { ?>
|
228 |
|
@@ -231,69 +145,58 @@
|
|
231 |
} ?>
|
232 |
|
233 |
<div class="inner-content">
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
// get logo id
|
240 |
-
$logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
241 |
-
// get logo
|
242 |
-
if ( $logo_id != '' ) {
|
243 |
-
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
244 |
-
}
|
245 |
-
if ( isset($logo_url[0]) ) { ?>
|
246 |
-
<img src="<?php echo esc_url( $logo_url[0] ); ?>" alt="logo">
|
247 |
-
<?php
|
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':
|
255 |
-
default:
|
256 |
-
break;
|
257 |
-
} ?>
|
258 |
-
</div>
|
259 |
|
260 |
-
<?php
|
261 |
// display body content
|
262 |
if ($body_title != '') { ?>
|
263 |
-
<h2 class="title">
|
264 |
-
<?php echo esc_html($body_title);?>
|
265 |
-
</h2>
|
266 |
<?php
|
267 |
}
|
268 |
|
269 |
// display counter
|
270 |
-
if ( $niteoCS_counter == '1') {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
<div id="counter" data-date="<?php echo esc_attr($niteoCS_counter_date);?>">
|
272 |
<div class="counter-wrap">
|
273 |
<div class="inner-counter">
|
274 |
<span id="counter-day">00</span>
|
275 |
-
<p><?php
|
276 |
</div>
|
277 |
</div>
|
278 |
|
279 |
<div class="counter-wrap">
|
280 |
<div class="inner-counter">
|
281 |
<span id="counter-hour">00</span>
|
282 |
-
<p><?php
|
283 |
</div>
|
284 |
</div>
|
285 |
|
286 |
<div class="counter-wrap">
|
287 |
<div class="inner-counter">
|
288 |
<span id="counter-minute">00</span>
|
289 |
-
<p><?php
|
290 |
</div>
|
291 |
</div>
|
292 |
|
293 |
<div class="counter-wrap">
|
294 |
<div class="inner-counter">
|
295 |
<span id="counter-second">00</span>
|
296 |
-
<p><?php
|
297 |
</div>
|
298 |
</div>
|
299 |
</div>
|
@@ -301,99 +204,48 @@
|
|
301 |
}
|
302 |
|
303 |
// display body content
|
304 |
-
if ($body != '') { ?>
|
305 |
-
<div class="
|
306 |
<?php echo apply_filters('the_content', stripslashes($body));?>
|
307 |
</div>
|
308 |
<?php
|
309 |
}
|
310 |
|
311 |
// display social if in body
|
312 |
-
if ( $
|
313 |
|
314 |
-
<div class="social-wrapper">
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
if ( $social['name'] == 'envelope-o' ) {
|
321 |
-
echo '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
322 |
-
|
323 |
-
} else {
|
324 |
-
echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
325 |
-
}
|
326 |
-
}
|
327 |
-
|
328 |
-
} //end foreach socialmedia
|
329 |
-
?>
|
330 |
-
</ul>
|
331 |
</div>
|
332 |
<?php
|
333 |
}
|
334 |
|
335 |
-
//
|
336 |
-
if ( $
|
337 |
-
echo
|
338 |
-
}
|
339 |
-
|
340 |
-
if ( $subscribe == '1' ) {
|
341 |
-
$replace = array('<p>', '</p>' );
|
342 |
-
echo str_replace($replace, '', do_shortcode( stripslashes( get_option('niteoCS_subscribe_code') ))) ;
|
343 |
-
|
344 |
-
// if subsctbiers is niteo, render our html form
|
345 |
-
} else if ( $subscribe == '2' ) { ?>
|
346 |
-
<form id="subscribe-form" method="post">
|
347 |
-
|
348 |
-
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
349 |
-
<?php
|
350 |
-
if ( $niteoCS_subscribe_label != '' ) { ?>
|
351 |
-
<label for="EMAIL"><?php echo esc_html($niteoCS_subscribe_label);?></label>
|
352 |
-
<?php
|
353 |
-
} ?>
|
354 |
-
<div class="input-icon"></div>
|
355 |
-
<input type="email" name="EMAIL" class="subscribe-input" placeholder="<?php _e('Insert your email address', 'cmp');?>" required>
|
356 |
-
|
357 |
-
<input type="submit" value="SUBMIT">
|
358 |
-
|
359 |
-
<div style="display: none;">
|
360 |
-
<input type="text" name="form_honeypot" value="" tabindex="-1" autocomplete="off">
|
361 |
-
</div>
|
362 |
-
|
363 |
-
<div class="subsribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
|
364 |
-
</form>
|
365 |
-
<?php
|
366 |
-
}
|
367 |
-
|
368 |
-
if ( $subscribe != '0' ) {
|
369 |
-
echo '</div>';
|
370 |
} ?>
|
371 |
|
|
|
|
|
372 |
</div>
|
373 |
|
374 |
<?php
|
375 |
-
if (
|
376 |
|
377 |
echo '<footer>';
|
378 |
|
379 |
-
if ( $
|
380 |
|
381 |
<div class="social-wrapper">
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
if ( $social['name'] == 'envelope-o' ) {
|
388 |
-
echo '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
389 |
-
|
390 |
-
} else {
|
391 |
-
echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
392 |
-
}
|
393 |
-
}
|
394 |
-
|
395 |
-
} //end foreach ?>
|
396 |
-
</ul>
|
397 |
</div>
|
398 |
<?php
|
399 |
}
|
@@ -407,52 +259,15 @@
|
|
407 |
</div>
|
408 |
|
409 |
<?php
|
410 |
-
//
|
411 |
-
if
|
412 |
-
|
413 |
-
|
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,9 +325,6 @@
|
|
510 |
}, 1000);
|
511 |
</script>
|
512 |
<?php
|
513 |
-
}
|
514 |
-
|
515 |
-
$this->niteo_redirect();
|
516 |
-
?>
|
517 |
</body>
|
518 |
</html>
|
1 |
<?php
|
2 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
3 |
+
&& isset( $_POST['form_honeypot'] )
|
4 |
+
&& $_POST['form_honeypot'] === ''
|
5 |
+
&& isset( $_POST['EMAIL'] )
|
6 |
+
&& is_email( $_POST['EMAIL'] ) ) {
|
7 |
$subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
|
8 |
+
}
|
9 |
?>
|
10 |
<!DOCTYPE html>
|
11 |
|
20 |
|
21 |
<?php
|
22 |
$themeslug = 'countdown';
|
23 |
+
|
24 |
// get theme related settings
|
25 |
$niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
|
26 |
$niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
|
30 |
$background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
|
31 |
$content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
|
32 |
$heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
|
|
|
33 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
|
|
34 |
|
35 |
if ( $heading_font == 'custom' ) {
|
36 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
40 |
$content_font = get_option('niteoCS_font_content_custom['.$themeslug.']');
|
41 |
}
|
42 |
// get global settings
|
|
|
|
|
43 |
$niteoCS_counter = get_option('niteoCS_counter', '1');
|
44 |
$niteoCS_counter_date = get_option('niteoCS_counter_date', time()+86400);
|
45 |
$countdown_action = get_option('niteoCS_countdown_action', 'no-action');
|
47 |
$body = get_option('niteoCS_body');
|
48 |
$copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
|
49 |
$favicon_id = get_option('niteoCS_favicon_id');
|
|
|
|
|
|
|
50 |
$social_location = get_option('social_location', 'footer');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
// override options if theme preview isset
|
53 |
if ( isset( $theme_preview ) && $theme_preview == 'countdown' ) {
|
69 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
70 |
} ?>
|
71 |
|
72 |
+
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
73 |
+
|
|
|
|
|
|
|
74 |
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
|
75 |
|
76 |
<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">
|
84 |
::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
85 |
:-ms-input-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
86 |
::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
87 |
+
.input-icon:before,input[type="email"],input[type="text"]{color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
88 |
+
/* input[type="email"],input[type="text"] {border:1px solid <?php echo esc_attr($niteoCS_font_color_light);?>;} */
|
89 |
.background-overlay{background-color:<?php echo esc_attr($background_overlay);?>;}
|
|
|
|
|
90 |
footer, footer a {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
|
91 |
.social-list.body a {background-color: <?php echo esc_attr( $niteoCS_font_color ); ?>;}
|
92 |
.social-list.body a:hover {background-color: <?php echo esc_attr( $niteoCS_active_color ); ?>;}
|
93 |
.social-list.footer a:hover {color: <?php echo esc_attr( $niteoCS_active_color ); ?>;}
|
94 |
.social-list.footer li:not(:last-of-type)::after {background-color: <?php echo esc_attr( $niteoCS_font_color_light ); ?>;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
</style>
|
96 |
|
97 |
<?php
|
120 |
|
121 |
</script>
|
122 |
<?php
|
123 |
+
}
|
124 |
+
|
125 |
+
// echo pattern copyright
|
126 |
+
if ( $niteoCS_banner == 3 ) {
|
127 |
+
echo '<!-- Background pattern from Subtle Patterns --!>';
|
128 |
} ?>
|
129 |
|
130 |
</head>
|
133 |
|
134 |
<div id="background-wrapper">
|
135 |
<?php
|
136 |
+
if ( method_exists ( $html, 'cmp_background' ) ) {
|
137 |
+
echo $html->cmp_background( $niteoCS_banner, $themeslug );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
+
}
|
|
|
|
|
|
|
140 |
|
141 |
if ( $niteoCS_overlay_opacity != '0' ) { ?>
|
142 |
|
145 |
} ?>
|
146 |
|
147 |
<div class="inner-content">
|
148 |
+
<?php
|
149 |
+
// display logo
|
150 |
+
if ( method_exists ( $html, 'cmp_logo' ) ) {
|
151 |
+
echo $html->cmp_logo( $themeslug );
|
152 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
|
|
154 |
// display body content
|
155 |
if ($body_title != '') { ?>
|
156 |
+
<h2 class="title"><?php echo esc_html($body_title);?></h2>
|
|
|
|
|
157 |
<?php
|
158 |
}
|
159 |
|
160 |
// display counter
|
161 |
+
if ( $niteoCS_counter == '1') {
|
162 |
+
if ( get_option('niteoCS_translation') ) {
|
163 |
+
$translation = json_decode( get_option('niteoCS_translation'), true );
|
164 |
+
$seconds = $translation[0]['translation'];
|
165 |
+
$minutes = $translation[1]['translation'];
|
166 |
+
$hours = $translation[2]['translation'];
|
167 |
+
$days = $translation[3]['translation'];
|
168 |
+
} else {
|
169 |
+
$seconds = 'seconds';
|
170 |
+
$minutes = 'minutes';
|
171 |
+
$hours = 'hours';
|
172 |
+
$days = 'days';
|
173 |
+
} ?>
|
174 |
<div id="counter" data-date="<?php echo esc_attr($niteoCS_counter_date);?>">
|
175 |
<div class="counter-wrap">
|
176 |
<div class="inner-counter">
|
177 |
<span id="counter-day">00</span>
|
178 |
+
<p><?php echo esc_html($days);?></p>
|
179 |
</div>
|
180 |
</div>
|
181 |
|
182 |
<div class="counter-wrap">
|
183 |
<div class="inner-counter">
|
184 |
<span id="counter-hour">00</span>
|
185 |
+
<p><?php echo esc_html($hours);?></p>
|
186 |
</div>
|
187 |
</div>
|
188 |
|
189 |
<div class="counter-wrap">
|
190 |
<div class="inner-counter">
|
191 |
<span id="counter-minute">00</span>
|
192 |
+
<p><?php echo esc_html($minutes);?></p>
|
193 |
</div>
|
194 |
</div>
|
195 |
|
196 |
<div class="counter-wrap">
|
197 |
<div class="inner-counter">
|
198 |
<span id="counter-second">00</span>
|
199 |
+
<p><?php echo esc_html($seconds);?></p>
|
200 |
</div>
|
201 |
</div>
|
202 |
</div>
|
204 |
}
|
205 |
|
206 |
// display body content
|
207 |
+
if ( $body != '' ) { ?>
|
208 |
+
<div class="content">
|
209 |
<?php echo apply_filters('the_content', stripslashes($body));?>
|
210 |
</div>
|
211 |
<?php
|
212 |
}
|
213 |
|
214 |
// display social if in body
|
215 |
+
if ( $social_location == 'body') { ?>
|
216 |
|
217 |
+
<div class="social-wrapper <?php echo esc_attr($social_location );?>">
|
218 |
+
<?php
|
219 |
+
// display social icons
|
220 |
+
if ( method_exists ( $html, 'cmp_social_icons' ) ) {
|
221 |
+
echo $html->cmp_social_icons();
|
222 |
+
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
</div>
|
224 |
<?php
|
225 |
}
|
226 |
|
227 |
+
// display subscribe form
|
228 |
+
if ( method_exists ( $html, 'cmp_subscribe_form' ) ) {
|
229 |
+
echo $html->cmp_subscribe_form( );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
} ?>
|
231 |
|
232 |
+
<div class="subscribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
|
233 |
+
|
234 |
</div>
|
235 |
|
236 |
<?php
|
237 |
+
if ( $social_location == 'footer' || $copyright != '') {
|
238 |
|
239 |
echo '<footer>';
|
240 |
|
241 |
+
if ( $social_location == 'footer') { ?>
|
242 |
|
243 |
<div class="social-wrapper">
|
244 |
+
<?php
|
245 |
+
// display social icons
|
246 |
+
if ( method_exists ( $html, 'cmp_social_icons' ) ) {
|
247 |
+
echo $html->cmp_social_icons();
|
248 |
+
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
</div>
|
250 |
<?php
|
251 |
}
|
259 |
</div>
|
260 |
|
261 |
<?php
|
262 |
+
// render javascripts
|
263 |
+
if ( method_exists ( $html, 'cmp_javascripts' ) ) {
|
264 |
+
$html->cmp_javascripts( $niteoCS_banner, $themeslug );
|
265 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
|
267 |
+
// render script for redirect
|
268 |
+
if ( method_exists ( $html, 'niteo_redirect' ) ) {
|
269 |
+
$html->niteo_redirect();
|
270 |
+
}
|
271 |
|
272 |
if ( $niteoCS_counter == '1') { ?>
|
273 |
<script>
|
325 |
}, 1000);
|
326 |
</script>
|
327 |
<?php
|
328 |
+
} ?>
|
|
|
|
|
|
|
329 |
</body>
|
330 |
</html>
|
themes/countdown/style.css
CHANGED
@@ -3,10 +3,6 @@ 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 |
-
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 |
-
|
10 |
|
11 |
Normalizing styles have been helped along thanks to the fine work of
|
12 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
@@ -156,7 +152,6 @@ textarea {
|
|
156 |
margin: 0;
|
157 |
box-shadow: inset 0 0 0 0 !important;
|
158 |
-webkit-box-shadow: inset 0 0 0 0 !important;
|
159 |
-
border-radius: 0 !important;
|
160 |
-webkit-appearance: none;
|
161 |
outline: none;
|
162 |
}
|
@@ -374,6 +369,10 @@ footer {
|
|
374 |
opacity: .9;
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
377 |
|
378 |
footer {
|
379 |
-webkit-box-pack: end;
|
@@ -392,15 +391,19 @@ footer {
|
|
392 |
-webkit-flex-grow: 0;
|
393 |
}
|
394 |
|
395 |
-
.logo {
|
396 |
padding: 30px 0;
|
397 |
}
|
398 |
|
399 |
-
.logo img {
|
400 |
max-width: 700px;
|
401 |
max-height: 500px;
|
402 |
}
|
403 |
|
|
|
|
|
|
|
|
|
404 |
.body p {
|
405 |
font-size: 1.1em;
|
406 |
}
|
@@ -434,8 +437,14 @@ footer {
|
|
434 |
transition: all 300ms linear;
|
435 |
}
|
436 |
|
437 |
-
.social-list
|
438 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
}
|
440 |
|
441 |
.social-list.body i {
|
@@ -511,17 +520,27 @@ input[type="email"].subscribe-input {
|
|
511 |
text-indent: 35px;
|
512 |
}
|
513 |
|
|
|
|
|
|
|
|
|
|
|
514 |
input:focus {
|
515 |
border: 1px solid #ffffff;
|
516 |
}
|
517 |
input[type="email"],
|
518 |
input[type="text"] {
|
519 |
width: 75%;
|
520 |
-
background-color:
|
521 |
text-indent: 15px;
|
522 |
font-style: italic;
|
523 |
-
border: 1px solid
|
|
|
|
|
524 |
|
|
|
|
|
|
|
525 |
}
|
526 |
|
527 |
input[type="text"] {
|
@@ -533,10 +552,13 @@ input[type="submit"] {
|
|
533 |
margin-left:-6px;
|
534 |
color: white;
|
535 |
font-weight:700;
|
536 |
-
border:
|
|
|
537 |
letter-spacing: 1px;
|
538 |
cursor:pointer;
|
539 |
text-transform: uppercase;
|
|
|
|
|
540 |
}
|
541 |
|
542 |
|
@@ -559,7 +581,9 @@ input[type="submit"] {
|
|
559 |
position: relative;
|
560 |
display: inline-block;
|
561 |
width: calc(25% - 22px);
|
562 |
-
background-color:
|
|
|
|
|
563 |
}
|
564 |
|
565 |
.counter-wrap::before {
|
@@ -620,7 +644,7 @@ input[type="submit"] {
|
|
620 |
}
|
621 |
|
622 |
@media only screen and (max-width : 768px) {
|
623 |
-
.logo img {max-width: 100%; }
|
624 |
.inner-content, footer {width:auto;}
|
625 |
}
|
626 |
|
@@ -628,7 +652,7 @@ input[type="submit"] {
|
|
628 |
.counter-wrap span {font-size: 2em;}
|
629 |
.counter-wrap {width: calc(25% - 17px);}
|
630 |
.counter-wrap:not(:last-of-type) {margin-right: 15px;}
|
631 |
-
.logo {padding-bottom: 30px;}
|
632 |
}
|
633 |
|
634 |
@media only screen and (max-width : 520px) {
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=countdown
|
4 |
Author: Niteo
|
5 |
Author URI: https//niteothemes.com
|
|
|
|
|
|
|
|
|
6 |
|
7 |
Normalizing styles have been helped along thanks to the fine work of
|
8 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
152 |
margin: 0;
|
153 |
box-shadow: inset 0 0 0 0 !important;
|
154 |
-webkit-box-shadow: inset 0 0 0 0 !important;
|
|
|
155 |
-webkit-appearance: none;
|
156 |
outline: none;
|
157 |
}
|
369 |
opacity: .9;
|
370 |
}
|
371 |
|
372 |
+
.content {
|
373 |
+
margin-bottom: 3em;
|
374 |
+
}
|
375 |
+
|
376 |
|
377 |
footer {
|
378 |
-webkit-box-pack: end;
|
391 |
-webkit-flex-grow: 0;
|
392 |
}
|
393 |
|
394 |
+
.logo-wrapper {
|
395 |
padding: 30px 0;
|
396 |
}
|
397 |
|
398 |
+
.logo-wrapper img {
|
399 |
max-width: 700px;
|
400 |
max-height: 500px;
|
401 |
}
|
402 |
|
403 |
+
.text-logo {
|
404 |
+
font-size: 3em;
|
405 |
+
}
|
406 |
+
|
407 |
.body p {
|
408 |
font-size: 1.1em;
|
409 |
}
|
437 |
transition: all 300ms linear;
|
438 |
}
|
439 |
|
440 |
+
.body .social-list i{
|
441 |
+
font-size: 2em;
|
442 |
+
-webkit-transition: all 300ms linear;
|
443 |
+
transition: all 300ms linear;
|
444 |
+
}
|
445 |
+
|
446 |
+
.body .social-list li {
|
447 |
+
padding: 1em 1.5em;
|
448 |
}
|
449 |
|
450 |
.social-list.body i {
|
520 |
text-indent: 35px;
|
521 |
}
|
522 |
|
523 |
+
.subscribe-response {
|
524 |
+
text-align: left;
|
525 |
+
padding-left: 5px;
|
526 |
+
}
|
527 |
+
|
528 |
input:focus {
|
529 |
border: 1px solid #ffffff;
|
530 |
}
|
531 |
input[type="email"],
|
532 |
input[type="text"] {
|
533 |
width: 75%;
|
534 |
+
background-color: rgba(0, 0, 0, 0.5);
|
535 |
text-indent: 15px;
|
536 |
font-style: italic;
|
537 |
+
border: 1px solid rgba(255,255,255,0.3);
|
538 |
+
border-radius: 5px;
|
539 |
+
}
|
540 |
|
541 |
+
input[type="email"] {
|
542 |
+
border-top-right-radius: 0;
|
543 |
+
border-bottom-right-radius: 0;
|
544 |
}
|
545 |
|
546 |
input[type="text"] {
|
552 |
margin-left:-6px;
|
553 |
color: white;
|
554 |
font-weight:700;
|
555 |
+
border: 1px solid rgba(255,255,255,0.3);
|
556 |
+
border-left: none;
|
557 |
letter-spacing: 1px;
|
558 |
cursor:pointer;
|
559 |
text-transform: uppercase;
|
560 |
+
border-top-right-radius: 5px;
|
561 |
+
border-bottom-right-radius: 5px;
|
562 |
}
|
563 |
|
564 |
|
581 |
position: relative;
|
582 |
display: inline-block;
|
583 |
width: calc(25% - 22px);
|
584 |
+
background-color: rgba(0, 0, 0, 0.5);
|
585 |
+
border: 1px solid rgba(255,255,255,0.3);
|
586 |
+
border-radius: 5px;
|
587 |
}
|
588 |
|
589 |
.counter-wrap::before {
|
644 |
}
|
645 |
|
646 |
@media only screen and (max-width : 768px) {
|
647 |
+
.logo-wrapper img {max-width: 100%; }
|
648 |
.inner-content, footer {width:auto;}
|
649 |
}
|
650 |
|
652 |
.counter-wrap span {font-size: 2em;}
|
653 |
.counter-wrap {width: calc(25% - 17px);}
|
654 |
.counter-wrap:not(:last-of-type) {margin-right: 15px;}
|
655 |
+
.logo-wrapper {padding-bottom: 30px;}
|
656 |
}
|
657 |
|
658 |
@media only screen and (max-width : 520px) {
|
themes/fifty.txt
CHANGED
@@ -4,4 +4,5 @@ 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>
|
|
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 class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
8 |
+
|
themes/frame.txt
CHANGED
@@ -4,4 +4,4 @@ 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>
|
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 class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Countdown Timer</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
themes/hardwork.txt
CHANGED
@@ -4,4 +4,7 @@ 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>
|
|
|
|
|
|
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>Supported Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
8 |
+
|
9 |
+
|
10 |
+
|
themes/hardwork/hardwork-theme.php
CHANGED
@@ -11,16 +11,14 @@
|
|
11 |
|
12 |
<?php
|
13 |
$themeslug = 'hardwork';
|
14 |
-
$size = $this->isMobile() ? 'large' : 'full';
|
15 |
// get theme related settings
|
16 |
-
$font_color
|
17 |
-
$background_color
|
18 |
-
$background_opa
|
19 |
-
$heading_font
|
20 |
-
$content_font
|
21 |
-
$
|
22 |
-
$
|
23 |
-
$unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
|
24 |
|
25 |
if ( $heading_font == 'custom' ) {
|
26 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
@@ -31,11 +29,11 @@
|
|
31 |
}
|
32 |
|
33 |
// get global settings
|
34 |
-
$social_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
|
35 |
$body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
|
36 |
$body = get_option('niteoCS_body');
|
37 |
$favicon_id = get_option('niteoCS_favicon_id');
|
38 |
// override options if theme preview isset
|
|
|
39 |
if ( isset( $theme_preview ) && $theme_preview == 'hardwork' ) {
|
40 |
$body_title = 'We will be back soon!';
|
41 |
$body = '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas. Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
|
@@ -43,69 +41,12 @@
|
|
43 |
}
|
44 |
|
45 |
if ( isset($_GET['video']) && !empty($_GET['video']) && $_GET['video'] == 'true') {
|
46 |
-
$
|
47 |
-
$niteoCS_banner = '5';
|
48 |
$font_color = '#ffffff';
|
49 |
$background_color = '#000000';
|
50 |
$background_opa = '0.5';
|
51 |
-
|
52 |
-
}
|
53 |
-
|
54 |
-
// migrade social media to new option after update 1.4.0
|
55 |
-
if ( !get_option('niteoCS_socialmedia') ) {
|
56 |
-
$social_media = array('facebook', 'google-plus', 'twitter', 'instagram', 'skype', '500px', 'deviantart', 'behance', 'dribbble', 'pinterest', 'linkedin', 'tumblr', 'youtube', 'vimeo', 'flickr', 'vk','envelope-o');
|
57 |
-
$i = 0;
|
58 |
-
$new_socials = array();
|
59 |
-
foreach ( $social_media as $social ) {
|
60 |
-
|
61 |
-
$social_field = get_option('niteoCS_'.$social);
|
62 |
-
|
63 |
-
$new_socials[$i]['name'] = $social;
|
64 |
-
$new_socials[$i]['url'] = $social_field;
|
65 |
-
$new_socials[$i]['active'] = '1';
|
66 |
-
$new_socials[$i]['hidden'] = $social_field ? '0' : '1';
|
67 |
-
$new_socials[$i]['order'] = $i;
|
68 |
-
$i++;
|
69 |
-
|
70 |
-
}
|
71 |
-
$socialmedia = $new_socials;
|
72 |
-
} else {
|
73 |
-
$socialmedia = stripslashes(get_option('niteoCS_socialmedia'));
|
74 |
-
$socialmedia = json_decode($socialmedia, true);
|
75 |
-
}
|
76 |
-
|
77 |
-
foreach ($socialmedia as $social) {
|
78 |
-
|
79 |
-
if ( $social['hidden'] == '0' && $social['active'] == '1') {
|
80 |
-
$enable_social = true;
|
81 |
-
break;
|
82 |
-
} else {
|
83 |
-
$enable_social = false;
|
84 |
-
}
|
85 |
}
|
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';
|
107 |
-
$banner_url = '';
|
108 |
-
}
|
109 |
|
110 |
// display favicon
|
111 |
if ( $favicon_id && $favicon_id != '' ) {
|
@@ -121,14 +62,12 @@
|
|
121 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
122 |
} ?>
|
123 |
|
124 |
-
|
125 |
-
if ( $enable_social === true ) { ?>
|
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 |
|
133 |
<style>
|
134 |
body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
|
@@ -169,154 +108,59 @@
|
|
169 |
|
170 |
</script>
|
171 |
<?php
|
|
|
|
|
|
|
|
|
|
|
172 |
} ?>
|
173 |
|
174 |
</head>
|
175 |
|
176 |
|
177 |
<body id="body">
|
178 |
-
|
179 |
-
if ( $background_class != 'error' ) {
|
180 |
-
switch ( $niteoCS_banner ) {
|
181 |
-
// custom media / default / pattern / color
|
182 |
-
case '0':
|
183 |
-
case '2':
|
184 |
-
case '3':?>
|
185 |
-
<div id="background-image" class="<?php echo esc_attr( $background_class );?>" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
|
186 |
-
<?php
|
187 |
-
break;
|
188 |
-
case '4': ?>
|
189 |
-
<div id="background-image" class="<?php echo esc_attr($background_class);?>" style="background-color:<?php echo esc_url( $banner_url ); ?>"></div>
|
190 |
-
<?php
|
191 |
-
break;
|
192 |
-
// unsplash media
|
193 |
-
case '1': ?>
|
194 |
-
<script>
|
195 |
-
var screenWidth = Math.round(screen.width*window.devicePixelRatio);
|
196 |
-
var screenHeight = screenWidth / 1.77777;
|
197 |
-
screenHeight = screenHeight.toFixed(0);
|
198 |
-
|
199 |
-
var banner = '<div id="background-image" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>\')"></div>';
|
200 |
-
banner = banner.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
|
201 |
-
document.getElementById('body').innerHTML = banner;
|
202 |
-
</script>
|
203 |
-
<?php
|
204 |
-
// video media
|
205 |
-
case '5': ?>
|
206 |
-
<div id="player" class="video-banner"></div>
|
207 |
-
<?php
|
208 |
-
default:
|
209 |
-
break;
|
210 |
-
}
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
}
|
216 |
?>
|
|
|
217 |
<div id="background-color"></div>
|
|
|
218 |
<section class="section section-body">
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
$logo_id = get_option('niteoCS_logo_id['.$themeslug.']');
|
225 |
-
// get logo
|
226 |
-
if ( $logo_id != '' ) {
|
227 |
-
$logo_url = wp_get_attachment_image_src( $logo_id, $size );
|
228 |
-
}
|
229 |
-
if ( isset($logo_url[0]) ) { ?>
|
230 |
-
<img src="<?php echo esc_url( $logo_url[0] ); ?>" alt="logo">
|
231 |
-
<?php
|
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':
|
239 |
-
default:
|
240 |
-
break;
|
241 |
-
} ?>
|
242 |
-
</div>
|
243 |
|
244 |
-
<?php
|
245 |
// display Title
|
246 |
if ( $body_title != '' ) { ?>
|
247 |
<h2><?php echo esc_html( $body_title );?></h2>
|
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 |
-
|
266 |
-
|
267 |
-
}
|
268 |
-
}
|
269 |
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
}
|
274 |
</section>
|
275 |
|
276 |
-
<?php
|
277 |
-
//
|
278 |
-
if
|
279 |
-
|
280 |
-
|
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 |
-
|
295 |
-
|
296 |
-
|
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>
|
11 |
|
12 |
<?php
|
13 |
$themeslug = 'hardwork';
|
|
|
14 |
// get theme related settings
|
15 |
+
$font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
|
16 |
+
$background_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
|
17 |
+
$background_opa = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.0');
|
18 |
+
$heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Playfair Display');
|
19 |
+
$content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Montserrat');
|
20 |
+
$niteoCS_background = get_option('niteoCS_banner['.$themeslug.']', '4');
|
21 |
+
$unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
|
|
|
22 |
|
23 |
if ( $heading_font == 'custom' ) {
|
24 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
29 |
}
|
30 |
|
31 |
// get global settings
|
|
|
32 |
$body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
|
33 |
$body = get_option('niteoCS_body');
|
34 |
$favicon_id = get_option('niteoCS_favicon_id');
|
35 |
// override options if theme preview isset
|
36 |
+
|
37 |
if ( isset( $theme_preview ) && $theme_preview == 'hardwork' ) {
|
38 |
$body_title = 'We will be back soon!';
|
39 |
$body = '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas. Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
|
41 |
}
|
42 |
|
43 |
if ( isset($_GET['video']) && !empty($_GET['video']) && $_GET['video'] == 'true') {
|
44 |
+
$niteoCS_background = '5';
|
|
|
45 |
$font_color = '#ffffff';
|
46 |
$background_color = '#000000';
|
47 |
$background_opa = '0.5';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
// display favicon
|
52 |
if ( $favicon_id && $favicon_id != '' ) {
|
62 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
63 |
} ?>
|
64 |
|
65 |
+
|
|
|
|
|
|
|
|
|
66 |
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version ;?>" type="text/css" media="all">
|
67 |
|
68 |
<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">
|
69 |
+
|
70 |
+
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
71 |
|
72 |
<style>
|
73 |
body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
|
108 |
|
109 |
</script>
|
110 |
<?php
|
111 |
+
}
|
112 |
+
|
113 |
+
// echo pattern copyright
|
114 |
+
if ( $niteoCS_background == 3 ) {
|
115 |
+
echo '<!-- Background pattern from Subtle Patterns --!>';
|
116 |
} ?>
|
117 |
|
118 |
</head>
|
119 |
|
120 |
|
121 |
<body id="body">
|
122 |
+
<div id="background-wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
+
<?php
|
125 |
+
if ( method_exists ( $html, 'cmp_background' ) ) {
|
126 |
+
echo $html->cmp_background( $niteoCS_background, $themeslug );
|
127 |
+
}
|
128 |
?>
|
129 |
+
</div>
|
130 |
<div id="background-color"></div>
|
131 |
+
|
132 |
<section class="section section-body">
|
133 |
+
<?php
|
134 |
+
// display logo
|
135 |
+
if ( method_exists ( $html, 'cmp_logo' ) ) {
|
136 |
+
echo $html->cmp_logo( $themeslug );
|
137 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
|
|
139 |
// display Title
|
140 |
if ( $body_title != '' ) { ?>
|
141 |
<h2><?php echo esc_html( $body_title );?></h2>
|
142 |
<?php
|
143 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
+
// display body
|
146 |
+
echo apply_filters( 'the_content', stripslashes( $body ) );
|
|
|
|
|
147 |
|
148 |
+
// display social icons
|
149 |
+
if ( method_exists ( $html, 'cmp_social_icons' ) ) {
|
150 |
+
echo $html->cmp_social_icons();
|
151 |
+
} ?>
|
152 |
</section>
|
153 |
|
154 |
+
<?php
|
155 |
+
// render javascripts
|
156 |
+
if ( method_exists ( $html, 'cmp_javascripts' ) ) {
|
157 |
+
$html->cmp_javascripts( $niteoCS_background, $themeslug );
|
158 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
+
// render script for redirect
|
161 |
+
if ( method_exists ( $html, 'niteo_redirect' ) ) {
|
162 |
+
$html->niteo_redirect();
|
163 |
+
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
</body>
|
165 |
|
166 |
</html>
|
themes/hardwork/style.css
CHANGED
@@ -3,9 +3,6 @@ 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 |
-
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 |
|
10 |
Normalizing styles have been helped along thanks to the fine work of
|
11 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
@@ -56,17 +53,17 @@ h1,h2,h3,h4,h5,h6{
|
|
56 |
}
|
57 |
|
58 |
|
59 |
-
.logo-wrapper {
|
60 |
-
width: 500px;
|
61 |
-
max-width: 100%;
|
62 |
-
margin: 0 auto;
|
63 |
-
}
|
64 |
|
65 |
-
.logo
|
66 |
-
|
|
|
67 |
max-height: 300px;
|
|
|
68 |
}
|
69 |
|
|
|
|
|
|
|
70 |
|
71 |
.section-body p {
|
72 |
width: 70%;
|
@@ -179,12 +176,11 @@ h1,h2,h3,h4,h5,h6{
|
|
179 |
}
|
180 |
|
181 |
@media only screen and (max-width : 1024px) {
|
182 |
-
.logo
|
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;}
|
190 |
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=hardwork
|
4 |
Author: Niteo
|
5 |
Author URI: https://niteothemes.com
|
|
|
|
|
|
|
6 |
|
7 |
Normalizing styles have been helped along thanks to the fine work of
|
8 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
53 |
}
|
54 |
|
55 |
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
.graphic-logo {
|
58 |
+
width: auto;
|
59 |
+
max-width: 500px;
|
60 |
max-height: 300px;
|
61 |
+
margin: 0 auto;
|
62 |
}
|
63 |
|
64 |
+
.text-logo {
|
65 |
+
font-size: 4em;
|
66 |
+
}
|
67 |
|
68 |
.section-body p {
|
69 |
width: 70%;
|
176 |
}
|
177 |
|
178 |
@media only screen and (max-width : 1024px) {
|
179 |
+
.graphic-logo { padding: 20px 0;}
|
180 |
}
|
181 |
|
182 |
@media only screen and (max-width : 560px) {
|
183 |
.section {padding: 0 10px;}
|
|
|
184 |
h2 {font-size: 2.5em;}
|
185 |
.section-body p {font-size: 1em;}
|
186 |
|
themes/hardwork_premium.txt
CHANGED
@@ -4,4 +4,4 @@ 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>
|
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 class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
themes/postery.txt
CHANGED
@@ -4,4 +4,4 @@ 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>"
|
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 class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Countdown Timer</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|
themes/postery/postery-settings.php
CHANGED
@@ -41,10 +41,10 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
|
|
41 |
|
42 |
|
43 |
<div class="table-wrapper theme-setup">
|
44 |
-
<h3><?php _e('Customize Colors', 'cmp');?></h3>
|
45 |
<table class="theme-setup">
|
46 |
<tr>
|
47 |
-
<th><h4><?php _e('Active Color', 'cmp');?></h4></th>
|
48 |
<td>
|
49 |
|
50 |
<fieldset>
|
@@ -54,7 +54,7 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
|
|
54 |
</td>
|
55 |
</tr>
|
56 |
<tr>
|
57 |
-
<th><h4><?php _e('Font Color', 'cmp');?></h4></th>
|
58 |
<td>
|
59 |
|
60 |
<fieldset>
|
@@ -63,13 +63,13 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
|
|
63 |
</td>
|
64 |
</tr>
|
65 |
<tr>
|
66 |
-
<th><h4><?php _e('Overlay Color', 'cmp');?></h4></th>
|
67 |
<td>
|
68 |
|
69 |
<fieldset id="overlay-color">
|
70 |
<input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
|
71 |
|
72 |
-
<label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
|
73 |
<input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
|
74 |
|
75 |
</fieldset>
|
41 |
|
42 |
|
43 |
<div class="table-wrapper theme-setup">
|
44 |
+
<h3><?php _e('Customize Colors', 'cmp-coming-soon-maintenance');?></h3>
|
45 |
<table class="theme-setup">
|
46 |
<tr>
|
47 |
+
<th><h4><?php _e('Active Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
48 |
<td>
|
49 |
|
50 |
<fieldset>
|
54 |
</td>
|
55 |
</tr>
|
56 |
<tr>
|
57 |
+
<th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
58 |
<td>
|
59 |
|
60 |
<fieldset>
|
63 |
</td>
|
64 |
</tr>
|
65 |
<tr>
|
66 |
+
<th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
|
67 |
<td>
|
68 |
|
69 |
<fieldset id="overlay-color">
|
70 |
<input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
|
71 |
|
72 |
+
<label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
|
73 |
<input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
|
74 |
|
75 |
</fieldset>
|
themes/postery/postery-theme.php
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
<?php
|
2 |
-
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
?>
|
6 |
<!DOCTYPE html>
|
@@ -16,7 +20,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
16 |
|
17 |
<?php
|
18 |
$themeslug = 'postery';
|
19 |
-
$size = $this->isMobile() ? 'large' : 'full';
|
20 |
// get theme related settings
|
21 |
$niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
|
22 |
$niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
|
@@ -25,9 +28,7 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
25 |
$background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
|
26 |
$content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
|
27 |
$heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
|
28 |
-
$logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
|
29 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
30 |
-
$unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
|
31 |
|
32 |
if ( $heading_font == 'custom' ) {
|
33 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
@@ -37,8 +38,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
37 |
$content_font = get_option('niteoCS_font_content_custom['.$themeslug.']');
|
38 |
}
|
39 |
// get global settings
|
40 |
-
$subscribe = get_option('niteoCS_subscribe_type', '2');
|
41 |
-
$niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
|
42 |
$niteoCS_counter = get_option('niteoCS_counter', '1');
|
43 |
$niteoCS_counter_date = get_option('niteoCS_counter_date', time()+86400);
|
44 |
$countdown_action = get_option('niteoCS_countdown_action', 'no-action');
|
@@ -47,22 +46,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
47 |
$copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
|
48 |
$favicon_id = get_option('niteoCS_favicon_id');
|
49 |
|
50 |
-
$socialmedia = stripslashes(get_option('niteoCS_socialmedia'));
|
51 |
-
$socialmedia = json_decode($socialmedia, true);
|
52 |
-
$enable_social = false;
|
53 |
-
|
54 |
-
if ( is_array($socialmedia) ) {
|
55 |
-
foreach ( $socialmedia as $social ) {
|
56 |
-
|
57 |
-
if ( $social['hidden'] == '0' && $social['active'] == '1') {
|
58 |
-
$enable_social = true;
|
59 |
-
//sort array by hidden, then order key
|
60 |
-
uasort( $socialmedia , array($this,'sort_social') );
|
61 |
-
break;
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
// override options if theme preview isset
|
67 |
if ( isset( $theme_preview ) && $theme_preview == 'postery' ) {
|
68 |
$body_title = 'OUR NEW WEBSITE';
|
@@ -70,29 +53,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
70 |
SOON!';
|
71 |
}
|
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';
|
93 |
-
$banner_url = '';
|
94 |
-
}
|
95 |
-
|
96 |
// display favicon
|
97 |
if ( $favicon_id && $favicon_id != '' ) {
|
98 |
$favicon_url = wp_get_attachment_image_src($favicon_id, 'thumbnail');
|
@@ -107,14 +67,10 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
107 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
108 |
} ?>
|
109 |
|
110 |
-
|
111 |
-
|
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>
|
119 |
body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $niteoCS_font_color ); ?>;}
|
120 |
h1, h2, h3, h4, h5, h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
|
@@ -168,6 +124,11 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
168 |
|
169 |
</script>
|
170 |
<?php
|
|
|
|
|
|
|
|
|
|
|
171 |
} ?>
|
172 |
|
173 |
</head>
|
@@ -177,77 +138,19 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
177 |
|
178 |
<div id="background-wrapper">
|
179 |
<?php
|
180 |
-
if ( $
|
181 |
-
|
182 |
-
// custom media / default / pattern / color
|
183 |
-
case '0':
|
184 |
-
case '2':
|
185 |
-
case '3': ?>
|
186 |
-
<div id="background-image" class="<?php echo esc_attr($background_class);?>" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
|
187 |
-
<?php
|
188 |
-
break;
|
189 |
-
case '4': ?>
|
190 |
-
<div id="background-image" class="loaded <?php echo esc_attr($background_class);?>" style="background-color:<?php echo esc_url( $banner_url ); ?>"></div>
|
191 |
-
<?php
|
192 |
-
break;
|
193 |
-
// unsplash media
|
194 |
-
case '1': ?>
|
195 |
-
<script>
|
196 |
-
var screenWidth = Math.round(screen.width*window.devicePixelRatio);
|
197 |
-
var screenHeight = screenWidth / 1.77777;
|
198 |
-
screenHeight = screenHeight.toFixed(0);
|
199 |
-
|
200 |
-
var banner = '<div id="background-image" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>\')"></div>';
|
201 |
-
banner = banner.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
|
202 |
-
document.getElementById('background-wrapper').innerHTML = banner;
|
203 |
-
</script>
|
204 |
-
<?php
|
205 |
-
// video media
|
206 |
-
case '5': ?>
|
207 |
-
<div id="player" class="video-banner"></div>
|
208 |
-
<?php
|
209 |
-
default:
|
210 |
-
break;
|
211 |
-
}
|
212 |
|
213 |
-
} else { ?>
|
214 |
-
<p class="error"><?php _e('To Display Graphic Media please upgrade CMP Plugin to latest version. You can download latest version on ', 'cmp-coming-soon-maintenance');?><a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/">Wordpress website</a> <?php _e('or you can use automatic plugin update in WP-Admin > Plugins > CMP - Coming Soon & Maintenance Plugin > Update Now.', 'cmp-coming-soon-maintenance');?></p>
|
215 |
-
<?php
|
216 |
} ?>
|
217 |
-
|
218 |
|
219 |
<div class="inner-content">
|
220 |
<div class="content">
|
221 |
-
<!-- logo -->
|
222 |
<?php
|
223 |
-
|
224 |
-
if ( $
|
225 |
-
|
226 |
-
|
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 != '' ) { ?>
|
@@ -270,148 +173,82 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
270 |
}
|
271 |
|
272 |
// display countdown timer if set
|
273 |
-
if ( $niteoCS_counter == '1') {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
<div id="counter" data-date="<?php echo esc_attr($niteoCS_counter_date);?>">
|
275 |
<div class="counter-wrap">
|
276 |
<div class="inner-counter">
|
277 |
<span id="counter-day">00</span>
|
278 |
-
<p><?php
|
279 |
</div>
|
280 |
</div>
|
281 |
|
282 |
<div class="counter-wrap">
|
283 |
<div class="inner-counter">
|
284 |
<span id="counter-hour">00</span>
|
285 |
-
<p><?php
|
286 |
</div>
|
287 |
</div>
|
288 |
|
289 |
<div class="counter-wrap">
|
290 |
<div class="inner-counter">
|
291 |
<span id="counter-minute">00</span>
|
292 |
-
<p><?php
|
293 |
</div>
|
294 |
</div>
|
295 |
|
296 |
<div class="counter-wrap">
|
297 |
<div class="inner-counter">
|
298 |
<span id="counter-second">00</span>
|
299 |
-
<p><?php
|
300 |
</div>
|
301 |
</div>
|
302 |
</div>
|
303 |
<?php
|
304 |
}
|
305 |
|
|
|
|
|
|
|
|
|
306 |
|
307 |
-
|
308 |
-
if ( $subscribe == '1' ) {
|
309 |
-
$replace = array('<p>', '</p>' );
|
310 |
-
echo '<div class="subscribe">';
|
311 |
-
echo str_replace($replace, '', do_shortcode( stripslashes( get_option('niteoCS_subscribe_code') ))) ;
|
312 |
-
echo '</div>';
|
313 |
-
|
314 |
-
// if subsctbiers is niteo, render our html form
|
315 |
-
} else if ( $subscribe == '2' ) { ?>
|
316 |
-
<div class="subscribe">
|
317 |
-
<form id="subscribe-form" method="post">
|
318 |
-
|
319 |
-
<?php wp_nonce_field('save_options','save_options_field'); ?>
|
320 |
-
<?php
|
321 |
-
if ( $niteoCS_subscribe_label != '' ) { ?>
|
322 |
-
<label for="EMAIL"><?php echo esc_html($niteoCS_subscribe_label);?></label>
|
323 |
-
<?php
|
324 |
-
} ?>
|
325 |
-
<div class="input-icon"></div>
|
326 |
-
<input type="email" name="EMAIL" class="subscribe-input" placeholder="<?php _e('Insert your email address', 'cmp');?>" required>
|
327 |
-
|
328 |
-
<input type="submit" value="">
|
329 |
-
|
330 |
-
<div style="display: none;">
|
331 |
-
<input type="text" name="form_honeypot" value="" tabindex="-1" autocomplete="off">
|
332 |
-
</div>
|
333 |
|
334 |
-
|
335 |
-
</form>
|
336 |
-
</div>
|
337 |
-
<?php
|
338 |
-
}
|
339 |
|
340 |
-
// display social icons
|
341 |
-
if ( $
|
342 |
-
|
343 |
-
|
344 |
-
<ul class="social-list">
|
345 |
-
<?php
|
346 |
-
foreach ( $socialmedia as $social ) {
|
347 |
-
if ($social['active'] == '1' && $social['hidden'] == '0') {
|
348 |
-
if ( $social['name'] == 'envelope-o' ) {
|
349 |
-
echo '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
350 |
-
|
351 |
-
} else {
|
352 |
-
echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
|
353 |
-
}
|
354 |
-
}
|
355 |
-
|
356 |
-
} //end foreach socialmedia
|
357 |
-
?>
|
358 |
-
</ul>
|
359 |
-
</div>
|
360 |
-
<?php
|
361 |
} ?>
|
|
|
362 |
</div>
|
363 |
|
364 |
</div> <!-- .inner-content -->
|
365 |
|
366 |
</div> <!-- #background-wrapper -->
|
367 |
|
368 |
-
<?php
|
369 |
-
//
|
370 |
-
if
|
371 |
-
|
372 |
-
|
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') { ?>
|
@@ -478,7 +315,7 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
478 |
<script>
|
479 |
// Function to slabtext the H1 headings
|
480 |
function slabText() {
|
481 |
-
$(".slab").slabText({
|
482 |
'maxFontSize': 450,
|
483 |
// Don't slabtext the headers if the viewport is under 380px
|
484 |
'onRender': function() {
|
@@ -550,8 +387,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_honeypot']) && $
|
|
550 |
);
|
551 |
</script>
|
552 |
<?php
|
553 |
-
}
|
554 |
-
$this->niteo_redirect();
|
555 |
-
?>
|
556 |
</body>
|
557 |
</html>
|
1 |
<?php
|
2 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
3 |
+
&& isset( $_POST['form_honeypot'] )
|
4 |
+
&& $_POST['form_honeypot'] === ''
|
5 |
+
&& isset( $_POST['EMAIL'] )
|
6 |
+
&& is_email( $_POST['EMAIL'] ) ) {
|
7 |
+
$subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
|
8 |
}
|
9 |
?>
|
10 |
<!DOCTYPE html>
|
20 |
|
21 |
<?php
|
22 |
$themeslug = 'postery';
|
|
|
23 |
// get theme related settings
|
24 |
$niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
|
25 |
$niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
|
28 |
$background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
|
29 |
$content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
|
30 |
$heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
|
|
|
31 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
|
|
32 |
|
33 |
if ( $heading_font == 'custom' ) {
|
34 |
$heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
|
38 |
$content_font = get_option('niteoCS_font_content_custom['.$themeslug.']');
|
39 |
}
|
40 |
// get global settings
|
|
|
|
|
41 |
$niteoCS_counter = get_option('niteoCS_counter', '1');
|
42 |
$niteoCS_counter_date = get_option('niteoCS_counter_date', time()+86400);
|
43 |
$countdown_action = get_option('niteoCS_countdown_action', 'no-action');
|
46 |
$copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
|
47 |
$favicon_id = get_option('niteoCS_favicon_id');
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
// override options if theme preview isset
|
50 |
if ( isset( $theme_preview ) && $theme_preview == 'postery' ) {
|
51 |
$body_title = 'OUR NEW WEBSITE';
|
53 |
SOON!';
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
// display favicon
|
57 |
if ( $favicon_id && $favicon_id != '' ) {
|
58 |
$favicon_url = wp_get_attachment_image_src($favicon_id, 'thumbnail');
|
67 |
echo "<meta name='robots' content='noindex,nofollow' />";
|
68 |
} ?>
|
69 |
|
70 |
+
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
71 |
+
|
|
|
|
|
|
|
72 |
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
|
73 |
|
|
|
74 |
<style>
|
75 |
body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $niteoCS_font_color ); ?>;}
|
76 |
h1, h2, h3, h4, h5, h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
|
124 |
|
125 |
</script>
|
126 |
<?php
|
127 |
+
}
|
128 |
+
|
129 |
+
// echo pattern copyright
|
130 |
+
if ( $niteoCS_banner == 3 ) {
|
131 |
+
echo '<!-- Background pattern from Subtle Patterns --!>';
|
132 |
} ?>
|
133 |
|
134 |
</head>
|
138 |
|
139 |
<div id="background-wrapper">
|
140 |
<?php
|
141 |
+
if ( method_exists ( $html, 'cmp_background' ) ) {
|
142 |
+
echo $html->cmp_background( $niteoCS_banner, $themeslug );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
|
|
|
|
|
|
144 |
} ?>
|
145 |
+
</div>
|
146 |
|
147 |
<div class="inner-content">
|
148 |
<div class="content">
|
|
|
149 |
<?php
|
150 |
+
// display logo
|
151 |
+
if ( method_exists ( $html, 'cmp_logo' ) ) {
|
152 |
+
echo $html->cmp_logo( $themeslug );
|
153 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
// display title if not empty
|
156 |
if ( $body_title != '' ) { ?>
|
173 |
}
|
174 |
|
175 |
// display countdown timer if set
|
176 |
+
if ( $niteoCS_counter == '1') {
|
177 |
+
if ( get_option('niteoCS_translation') ) {
|
178 |
+
$translation = json_decode( get_option('niteoCS_translation'), true );
|
179 |
+
$seconds = $translation[0]['translation'];
|
180 |
+
$minutes = $translation[1]['translation'];
|
181 |
+
$hours = $translation[2]['translation'];
|
182 |
+
$days = $translation[3]['translation'];
|
183 |
+
} else {
|
184 |
+
$seconds = 'seconds';
|
185 |
+
$minutes = 'minutes';
|
186 |
+
$hours = 'hours';
|
187 |
+
$days = 'days';
|
188 |
+
} ?>
|
189 |
+
|
190 |
<div id="counter" data-date="<?php echo esc_attr($niteoCS_counter_date);?>">
|
191 |
<div class="counter-wrap">
|
192 |
<div class="inner-counter">
|
193 |
<span id="counter-day">00</span>
|
194 |
+
<p><?php echo esc_html($days);?></p>
|
195 |
</div>
|
196 |
</div>
|
197 |
|
198 |
<div class="counter-wrap">
|
199 |
<div class="inner-counter">
|
200 |
<span id="counter-hour">00</span>
|
201 |
+
<p><?php echo esc_html($hours);?></p>
|
202 |
</div>
|
203 |
</div>
|
204 |
|
205 |
<div class="counter-wrap">
|
206 |
<div class="inner-counter">
|
207 |
<span id="counter-minute">00</span>
|
208 |
+
<p><?php echo esc_html($minutes);?></p>
|
209 |
</div>
|
210 |
</div>
|
211 |
|
212 |
<div class="counter-wrap">
|
213 |
<div class="inner-counter">
|
214 |
<span id="counter-second">00</span>
|
215 |
+
<p><?php echo esc_html($seconds);?></p>
|
216 |
</div>
|
217 |
</div>
|
218 |
</div>
|
219 |
<?php
|
220 |
}
|
221 |
|
222 |
+
// display subscribe form
|
223 |
+
if ( method_exists ( $html, 'cmp_subscribe_form' ) ) {
|
224 |
+
echo $html->cmp_subscribe_form( );
|
225 |
+
} ?>
|
226 |
|
227 |
+
<div class="subsribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
+
<?php
|
|
|
|
|
|
|
|
|
230 |
|
231 |
+
// display social icons
|
232 |
+
if ( method_exists ( $html, 'cmp_social_icons' ) ) {
|
233 |
+
echo $html->cmp_social_icons();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
} ?>
|
235 |
+
|
236 |
</div>
|
237 |
|
238 |
</div> <!-- .inner-content -->
|
239 |
|
240 |
</div> <!-- #background-wrapper -->
|
241 |
|
242 |
+
<?php
|
243 |
+
// render javascripts
|
244 |
+
if ( method_exists ( $html, 'cmp_javascripts' ) ) {
|
245 |
+
$html->cmp_javascripts( $niteoCS_banner, $themeslug );
|
246 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
+
// render script for redirect
|
249 |
+
if ( method_exists ( $html, 'niteo_redirect' ) ) {
|
250 |
+
$html->niteo_redirect();
|
251 |
+
}
|
252 |
|
253 |
// if counter is enabled attach counter script
|
254 |
if ( $niteoCS_counter == '1') { ?>
|
315 |
<script>
|
316 |
// Function to slabtext the H1 headings
|
317 |
function slabText() {
|
318 |
+
$(".slab, .text-logo").slabText({
|
319 |
'maxFontSize': 450,
|
320 |
// Don't slabtext the headers if the viewport is under 380px
|
321 |
'onRender': function() {
|
387 |
);
|
388 |
</script>
|
389 |
<?php
|
390 |
+
} ?>
|
|
|
|
|
391 |
</body>
|
392 |
</html>
|
themes/postery/style.css
CHANGED
@@ -3,10 +3,6 @@ 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 |
-
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 |
|
11 |
Normalizing styles have been helped along thanks to the fine work of
|
12 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
@@ -416,7 +412,7 @@ h2,h3,h4,h5,h6 {
|
|
416 |
|
417 |
#counter,
|
418 |
.subscribe,
|
419 |
-
.social-
|
420 |
margin: 1em 0;
|
421 |
}
|
422 |
|
@@ -430,7 +426,7 @@ h2,h3,h4,h5,h6 {
|
|
430 |
}
|
431 |
|
432 |
|
433 |
-
.social-
|
434 |
input,
|
435 |
.input-icon {
|
436 |
-webkit-transform: translateZ(0);
|
@@ -441,7 +437,7 @@ input,
|
|
441 |
transition: transform 500ms, opacity 500ms, -webkit-transform 500ms;
|
442 |
}
|
443 |
|
444 |
-
.social-
|
445 |
input:hover,
|
446 |
.input-icon.hover {
|
447 |
-webkit-transition: opacity 300ms, -webkit-transform 500ms;
|
@@ -464,7 +460,7 @@ input:hover,
|
|
464 |
|
465 |
|
466 |
|
467 |
-
.social-
|
468 |
/* transform: translateZ(30px); */
|
469 |
}
|
470 |
|
@@ -591,6 +587,7 @@ input[type="submit"] {
|
|
591 |
padding: 10px;
|
592 |
-webkit-transform: translateY(-50%);
|
593 |
transform: translateY(-50%);
|
|
|
594 |
}
|
595 |
|
596 |
.counter-wrap p {
|
3 |
Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=postery
|
4 |
Author: Niteo
|
5 |
Author URI: https//niteothemes.com
|
|
|
|
|
|
|
|
|
6 |
|
7 |
Normalizing styles have been helped along thanks to the fine work of
|
8 |
Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
|
412 |
|
413 |
#counter,
|
414 |
.subscribe,
|
415 |
+
.social-list {
|
416 |
margin: 1em 0;
|
417 |
}
|
418 |
|
426 |
}
|
427 |
|
428 |
|
429 |
+
.social-list li,
|
430 |
input,
|
431 |
.input-icon {
|
432 |
-webkit-transform: translateZ(0);
|
437 |
transition: transform 500ms, opacity 500ms, -webkit-transform 500ms;
|
438 |
}
|
439 |
|
440 |
+
.social-list li:hover,
|
441 |
input:hover,
|
442 |
.input-icon.hover {
|
443 |
-webkit-transition: opacity 300ms, -webkit-transform 500ms;
|
460 |
|
461 |
|
462 |
|
463 |
+
.social-list li {
|
464 |
/* transform: translateZ(30px); */
|
465 |
}
|
466 |
|
587 |
padding: 10px;
|
588 |
-webkit-transform: translateY(-50%);
|
589 |
transform: translateY(-50%);
|
590 |
+
text-align: center;
|
591 |
}
|
592 |
|
593 |
.counter-wrap p {
|