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

Version Description

Download this release

Release Info

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

Code changes from version 1.6.0 to 1.7.0

cmp-options.php CHANGED
@@ -163,8 +163,9 @@ if (isset($_POST['niteoCS_copyright'])) {
163
  update_option('niteoCS_copyright', $this->niteo_sanitize_html( $_POST['niteoCS_copyright']));
164
  }
165
 
 
 
166
  // get saved options
167
- $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
168
  $title = stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!'));
169
  $descr = stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page'));
170
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
@@ -188,8 +189,8 @@ $niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
188
  $niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
189
  $subscriber_list = get_option('niteoCS_subscribers_list');
190
  $niteoCS_csv_export_time = get_option('niteoCS_csv_export_time');
191
- $niteoCS_font_content = get_option('niteoCS_font_content', 'Average Sans');
192
- $niteoCS_font_headings = get_option('niteoCS_font_headings', 'Fjalla One');
193
  $niteoCS_font_content_custom = get_option('niteoCS_font_content_custom');
194
  $niteoCS_font_headings_custom = get_option('niteoCS_font_headings_custom');
195
  $niteoCS_body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
@@ -283,7 +284,7 @@ add_thickbox();
283
  ?>
284
  <noscript>
285
  <div class='updated'>
286
- <p class="error"><?php _e('JavaScript appears to be disabled in your browser. For this plugin to work correctly, please enable JavaScript or switch to a more modern browser.', 'cmp');?></p>
287
  </div>
288
  <style>
289
  .themes{display: :none;}
@@ -291,117 +292,243 @@ add_thickbox();
291
  </noscript>
292
 
293
  <div class="wrap">
294
-
295
  <div id="icon-options-general" class="icon32">
296
  <br />
297
  </div>
298
  <form method="post" action="options-general.php?page=cmp-settings&status=settings-saved" id="csoptions">
299
 
300
  <h2 class="nav-tab-wrapper">
301
- <a class="nav-tab nav-tab-active settings" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="general"><i class="fa fa-cog" aria-hidden="true"></i><?php _e('Settings', 'cmp');?></a>
302
- <a class="nav-tab content" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="content"><i class="fa fa-wrench" aria-hidden="true"></i><?php _e('Content', 'cmp');?></a>
303
- <a class="nav-tab seo" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="seo"><i class="fa fa-users" aria-hidden="true"></i><?php _e('SEO', 'cmp');?></a>
304
- <a class="nav-tab custom_css" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="custom_css"><i class="fa fa-code" aria-hidden="true"></i><?php _e('Custom CSS', 'cmp');?></a>
305
- <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');?></a>
306
- <a class="nav-tab install" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="install"><i class="fa fa-plus" aria-hidden="true"></i><?php _e('Install New Theme', 'cmp');?></a>
307
  </h2>
308
 
309
  <div class="table-wrapper general">
310
- <h3><?php _e('General Settings', 'cmp');?></h3>
311
  <table class="general">
312
  <tr>
313
- <th><h4><?php _e('Status', 'cmp');?></h4></th>
314
  <td>
315
  <fieldset>
316
  <legend class="screen-reader-text">
317
- <span><?php _e('Status', 'cmp');?></span>
318
  </legend>
319
  <label title="disabled">
320
- <input type="radio" name="activate" value="0"<?php if ($this->cmp_status() == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp');?>
321
- <p class="info"><?php _e('Disable plugin and display standard WordPress page to all users and indexing engines.','cmp')?></p>
322
  </label><br />
323
- <label title="maintanance">
324
- <input type="radio" name="activate" value="1"<?php if ($this->cmp_status() == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Maintanance Mode', 'cmp');?>
325
- <p class="info"><?php _e('Returns 503 HTTP Service unavailable code to indexing robots. Set this option if your site is down due to maintanance and you want to display Maintanance page.','cmp')?></p>
326
- </label><br />
327
  <label title="cmp">
328
- <input type="radio" name="activate" value="2"<?php if ($this->cmp_status() == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Coming Soon & Landing Page', 'cmp');?>
329
- <p class="info"><?php _e('Returns standard 200 HTTP OK response code to indexing robots. Set this option if you want to use our plugin as "Coming Soon" page.','cmp')?></p>
330
  </label>
 
 
 
 
 
331
  </fieldset>
332
  </td>
333
  </tr>
 
334
  </table>
 
 
 
 
335
  </div>
 
336
  <div class="table-wrapper general">
337
- <h3><?php _e('Select Theme', 'cmp');?></h3>
338
- <table class="general">
339
- <tr>
340
- <th><h4><?php _e('Free Themes', 'cmp');?></h4></th>
341
  <td class="theme-selector">
342
  <fieldset>
343
  <legend class="screen-reader-text">
344
- <span><?php _e('Free Themes', 'cmp');?> </span>
345
  </legend>
346
- <?php
 
 
 
 
 
 
 
 
 
 
 
347
  $i = 0;
348
- foreach ( $this->themes_standard as $theme ) { ?>
349
- <div class="thumbnail-holder">
350
- <label title="<?php echo esc_attr($theme);?>">
351
- <img src="<?php echo esc_url( plugins_url().'/'.$this->installedFolder.'\/themes/'. $theme . '/img/'. $theme . '_thumbnail.jpg' );?>" alt="<?php echo esc_attr($theme);?>">
352
- <input type="radio" name="select_theme" value="<?php echo esc_attr($theme);?>" id="displayOption-<?php echo esc_attr($theme);?>"<?php if ( $this->cmp_selectedTheme() == $theme ) { echo ' checked="checked"'; } ?>>&nbsp;<?php echo ucwords(esc_html(str_replace('_', ' ', $theme)));?>
353
- </label>
354
- </div>
355
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  $i++;
357
  } ?>
358
  </fieldset>
359
  </td>
360
  </tr>
361
-
362
- <?php
363
- if ( !empty($premium_themes) ) { ?>
364
- <tr>
365
- <th><h4><?php _e('Premium Themes', 'cmp');?></h4></th>
 
 
 
 
 
 
 
366
  <td class="theme-selector">
367
  <fieldset>
368
  <legend class="screen-reader-text">
369
- <span><?php _e('Premium Themes', 'cmp');?> </span>
370
  </legend>
371
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
 
373
- foreach ( $premium_themes as $premium_theme ) {
374
- echo '<div class="thumbnail-holder">';
375
- // if not in available themes array, display buy button
376
- if ( !in_array( $premium_theme['name'], $this->theme_array) ) { ?>
377
 
378
- <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=<?php echo esc_attr($premium_theme['name']);?>" target="_blank"><img src="<?php echo esc_url( plugins_url().'/'.$this->installedFolder.'\/themes/'. $premium_theme['name']. '_thumbnail.jpg' );?>" alt="<?php echo esc_attr(ucwords($premium_theme['name']));?> Premium Theme"></a>
379
- <a class="button" href="<?php echo esc_url($premium_theme['url']);?>" target="_blank">Buy for <?php echo esc_html($premium_theme['price']);?> USD</a>
380
- </div>
381
- <?php
382
- } else { ?>
383
- <label title="<?php echo esc_attr($premium_theme['name']);?>">
384
- <img src="<?php echo esc_url( plugins_url().'/cmp-premium-themes/'. $premium_theme['name'] . '/img/'. $premium_theme['name'] . '_thumbnail.jpg' );?>" alt="<?php echo esc_attr(ucwords($premium_theme['name']));?> Premium Theme">
385
- <input type="radio" name="select_theme" value="<?php echo esc_attr($premium_theme['name']);?>" id="displayOption-<?php echo esc_attr($premium_theme['name']);?>"<?php if ( $this->cmp_selectedTheme() == $premium_theme['name'] ) { echo ' checked="checked"'; } ?>>&nbsp;<?php echo ucwords(esc_html(str_replace('_', ' ', $premium_theme['name'])));?>
386
- </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
 
388
  </div>
389
- <?php
390
- }
391
- } ?>
 
392
  </fieldset>
393
  </td>
394
  </tr>
395
  <?php
396
- } ?>
 
 
 
397
  </table>
 
 
 
 
398
  </div>
399
 
400
  <div class="table-wrapper content">
401
- <h3><?php _e('Logo', 'cmp');?></h3>
402
  <table class="content">
403
  <tr>
404
- <th><h4><?php _e('Upload or select Logo', 'cmp');?></h4></th>
405
  <td>
406
  <fieldset>
407
  <input type="hidden" class="widefat" id="niteoCS-logo-id" name="niteoCS_logo_id" type="text" value="<?php echo esc_attr( $logo_id ); ?>" />
@@ -419,13 +546,17 @@ add_thickbox();
419
  </td>
420
  </tr>
421
  </table>
 
 
 
 
422
  </div>
423
 
424
  <div class="table-wrapper content">
425
- <h3><?php _e('Content', 'cmp');?></h3>
426
  <table class="content">
427
  <tr class="body-title">
428
- <th><h4><?php _e('Body Title', 'cmp');?></h4></th>
429
  <td>
430
  <fieldset>
431
  <input type="text" name="niteoCS_body_title" id="niteoCS_body_title" value="<?php echo stripslashes(esc_attr( $niteoCS_body_title)); ?>" class="regular-text code">
@@ -434,50 +565,53 @@ add_thickbox();
434
  </tr>
435
 
436
  <tr>
437
- <th><h4><?php _e('Body Message', 'cmp');?></h4></th>
438
  <td>
439
  <?php wp_editor( stripslashes( $this->niteo_sanitize_html( $body ) ), 'niteoCS_body', $settings = array('textarea_name'=>'niteoCS_body', 'editor_height'=>'300') ); ?>
440
  </td>
441
  </tr>
442
-
443
  </table>
 
 
 
 
444
  </div>
445
 
446
  <div class="table-wrapper content">
447
- <h3><?php _e('Theme Background', 'cmp');?></h3>
448
  <table class="content">
449
  <tr>
450
  <th>
451
  <fieldset>
452
  <legend class="screen-reader-text">
453
- <span><?php _e('Banner Settings', 'cmp');?></span>
454
  </legend>
455
 
456
  <p>
457
  <label title="Custom Media">
458
- <input type="radio" name="niteoCS_banner" value="0"<?php if ( $niteoCS_banner == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Custom Media', 'cmp');?>
459
  </label>
460
  </p>
461
 
462
  <p>
463
  <label title="Unsplash Media">
464
- <input type="radio" name="niteoCS_banner" value="1"<?php if ( $niteoCS_banner == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Unsplash library', 'cmp');?>
465
  </label>
466
  </p>
467
 
468
  <p>
469
  <label title="Default Banner">
470
- <input type="radio" name="niteoCS_banner" value="2"<?php if ( $niteoCS_banner == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Default Media', 'cmp');?>
471
  </label>
472
  </p>
473
  <p>
474
  <label title="Graphic Pattern">
475
- <input type="radio" name="niteoCS_banner" value="3"<?php if ( $niteoCS_banner == 3) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Graphic Pattern', 'cmp');?>
476
  </label>
477
  </p>
478
  <p>
479
  <label title="Solid Color">
480
- <input type="radio" name="niteoCS_banner" value="4"<?php if ( $niteoCS_banner == 4) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Solid Color', 'cmp');?>
481
  </label>
482
  </p>
483
 
@@ -489,7 +623,7 @@ add_thickbox();
489
  <fieldset id="custom_banner">
490
  <input type="hidden" class="widefat" id="niteoCS-banner-id" name="niteoCS_banner_id" type="text" value="<?php echo esc_attr( $banner_id ); ?>" />
491
  <input id="add-banner" type="button" class="button" value="Media Library" />
492
- <p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp')?></p>
493
  <div class="banner-wrapper">
494
  <?php
495
  if ( isset( $banner_id ) && $banner_id != '' ) {
@@ -507,49 +641,49 @@ add_thickbox();
507
  </fieldset>
508
 
509
  <fieldset id="unsplash_banner">
510
- <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');?></p>
511
- <label for="unsplash_feed"><?php _e('Choose Unsplash Feed', 'cmp');?></label></br>
512
  <select name="unsplash_feed">
513
- <option value="0" <?php if ( $unsplash_feed == '0' ) { echo ' selected="selected"'; } ?>><?php _e('Specific Photo', 'cmp');?></option>
514
- <option value="1" <?php if ( $unsplash_feed == '1' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Category', 'cmp');?></option>
515
- <option value="2" <?php if ( $unsplash_feed == '2' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Collection', 'cmp');?></option>
516
- <option value="3" <?php if ( $unsplash_feed == '3' ) { echo ' selected="selected"'; } ?>><?php _e('Random Photo', 'cmp');?></option>
517
  </select>
518
 
519
  <p class="unsplash-feed" id="unsplash-feed-0">
520
- <label for="niteoCS_unsplash_0"><?php _e('Enter Unsplash Photo URL or Photo ID', 'cmp');?></label>
521
  <input type="text" class="widefat" id="niteoCS-unsplash-0" name="niteoCS_unsplash_0" type="text" value="<?php echo esc_attr($niteoCS_unsplash_0); ?>" />
522
  </p>
523
 
524
  <p class="unsplash-feed" id="unsplash-feed-1">
525
- <label for="unsplash_category"><?php _e('Select Category', 'cmp');?></label></br>
526
  <select name="unsplash_category">
527
- <option value="buildings" <?php if ( $unsplash_category == 'buildings') { echo ' selected="selected"'; } ?>><?php _e('Buildings', 'cmp');?></option>
528
- <option value="food" <?php if ( $unsplash_category == 'food') { echo ' selected="selected"'; } ?>><?php _e('Food', 'cmp');?></option>
529
- <option value="nature" <?php if ( $unsplash_category == 'nature') { echo ' selected="selected"'; } ?>><?php _e('Nature', 'cmp');?></option>
530
- <option value="people" <?php if ( $unsplash_category == 'people') { echo ' selected="selected"'; } ?>><?php _e('People', 'cmp');?></option>
531
- <option value="technology" <?php if ( $unsplash_category == 'technology') { echo ' selected="selected"'; } ?>><?php _e('Technology', 'cmp');?></option>
532
- <option value="objects" <?php if ( $unsplash_category == 'objects') { echo ' selected="selected"'; } ?>><?php _e('Objects', 'cmp');?></option>
533
  </select></br>
534
 
535
- <label for="niteoCS_cat_keyword"><?php _e('You can limit Category to Specific Keyword', 'cmp');?></label>
536
  <input type="text" class="widefat" id="niteoCS-category-keyword" name="niteoCS_cat_keyword" type="text" value="<?php echo esc_attr($niteoCS_cat_keyword); ?>" />
537
  </p>
538
 
539
  <p class="unsplash-feed" id="unsplash-feed-2">
540
- <label for="niteoCS_unsplash_2"><?php _e('Enter Unsplash Collection URL or Collection ID. Doesn`t work for Curated Collections.', 'cmp');?></label>
541
  <input type="text" class="widefat" id="niteoCS-unsplash-2" name="niteoCS_unsplash_2" type="text" value="<?php echo esc_attr($niteoCS_unsplash_2); ?>" />
542
  </p>
543
 
544
  <p class="unsplash-feed" id="unsplash-feed-3">
545
- <label for="niteoCS_unsplash_3"><?php _e('Specify search terms', 'cmp');?></label>
546
  <input type="text" class="widefat" id="niteoCS-unsplash-3" name="niteoCS_unsplash_3" type="text" value="<?php echo esc_attr($niteoCS_unsplash_3); ?>" />
547
 
548
  </br>
549
- <input type="checkbox" name="niteoCS_unsplash_feat" id="niteoCS_unsplash_feat" value="1" <?php checked( '1', get_option( 'niteoCS_unsplash_feat', '0' ) ); ?> class="regular-text code"><label for="niteoCS_unsplash_feat"><?php _e('Limit search only to Featured/Curated Photos', 'cmp');?></label>
550
  </p>
551
 
552
- <button id="test-unsplash" class="button">Test Unsplash</button>
553
  <div id="unsplash-media"></div>
554
  </fieldset>
555
 
@@ -561,14 +695,14 @@ add_thickbox();
561
 
562
  <fieldset id="graphic_pattern">
563
  <div class="banner-wrapper default">
564
- <label for="niteoCS_banner_pattern"><?php _e('Select Pattern', 'cmp');?></label></br>
565
  <select name="niteoCS_banner_pattern" data-url="<?php echo esc_url(WP_PLUGIN_URL . '/cmp-coming-soon-maintenance/img/patterns/');?>">
566
  <?php
567
  foreach ($patterns as $pattern) { ?>
568
  <option value="<?php echo esc_attr($pattern);?>" <?php if ( $niteoCS_banner_pattern == $pattern ) { echo ' selected="selected"'; } ?>><?php echo esc_html(ucfirst(str_replace('_', ' ', $pattern)));?></option>
569
  <?php
570
  } ?>
571
- <option value="custom" <?php if ( $niteoCS_banner_pattern == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Pattern...', 'cmp');?></option>
572
  </select><br>
573
 
574
  <input type="hidden" class="widefat" id="niteoCS_banner_pattern_custom" name="niteoCS_banner_pattern_custom" type="text" value="<?php echo esc_attr( $niteoCS_banner_pattern_custom ); ?>" />
@@ -576,12 +710,13 @@ add_thickbox();
576
  <input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ($niteoCS_banner_pattern == 'custom') ? 'block' : 'none'?>;"/>
577
 
578
  <div class="pattern-preview" style="background-image: url('<?php echo esc_url($pattern_url);?>');"></div>
 
579
  </div>
580
  </fieldset>
581
 
582
  <fieldset id="solid_color">
583
  <div class="banner-wrapper default">
584
- <label for="niteoCS_banner_color"><?php _e('Select Color', 'cmp');?></label><br>
585
  <input type="text" name="niteoCS_banner_color" id="niteoCS_banner_color" value="<?php echo esc_attr( $niteoCS_banner_color); ?>" data-default-color="#bdc3c7" class="regular-text code"><br>
586
  <div class="color-preview" style="background-color:<?php echo esc_attr( $niteoCS_banner_color); ?>"></div>
587
  </div>
@@ -589,6 +724,10 @@ add_thickbox();
589
  </td>
590
  </tr>
591
  </table>
 
 
 
 
592
  </div>
593
 
594
  <?php
@@ -604,26 +743,26 @@ add_thickbox();
604
  ?>
605
 
606
  <div class="table-wrapper content">
607
- <h3><?php _e('Customize Fonts', 'cmp');?></h3>
608
  <table class="content">
609
 
610
  <tr>
611
- <th><h4><?php _e('Headings Font', 'cmp');?></h4></th>
612
  <td>
613
  <fieldset>
614
- <label for="niteoCS_font_headings"><?php _e('Select from predefined Google Fonts or insert Custom font', 'cmp');?></label></br>
615
  <select name="niteoCS_font_headings">
616
  <?php
617
  foreach ($fonts as $font) { ?>
618
  <option value="<?php echo esc_attr($font);?>" <?php if ( $niteoCS_font_headings == $font ) { echo ' selected="selected"'; } ?>><?php echo esc_html($font);?></option>
619
  <?php
620
  } ?>
621
- <option value="custom" <?php if ( $niteoCS_font_headings == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom font...', 'cmp');?></option>
622
  </select><br>
623
  </fieldset>
624
 
625
  <fieldset id="custom_headings_font" <?php if ( $niteoCS_font_headings == 'custom' ) { echo 'style="display:block"'; } ?>>
626
- <label for="niteoCS_font_headings_custom"><?php _e('Enter name of ', 'cmp');?><a href="https://fonts.google.com/" target="_blank">Google font</a></label>
627
  <input type="text" name="niteoCS_font_headings_custom" id="niteoCS_font_headings_custom" value="<?php echo esc_attr( $niteoCS_font_headings_custom); ?>" class="regular-text code">
628
  </fieldset>
629
 
@@ -631,22 +770,22 @@ add_thickbox();
631
  </tr>
632
 
633
  <tr>
634
- <th><h4><?php _e('Content Font', 'cmp');?></h4></th>
635
  <td>
636
  <fieldset>
637
- <label for="niteoCS_font_content"><?php _e('Select from predefined Google Fonts or insert Custom font', 'cmp');?></label></br>
638
  <select name="niteoCS_font_content">
639
  <?php
640
  foreach ($fonts as $font) { ?>
641
  <option value="<?php echo esc_attr($font);?>" <?php if ( $niteoCS_font_content == $font ) { echo ' selected="selected"'; } ?>><?php echo esc_html($font);?></option>
642
  <?php
643
  } ?>
644
- <option value="custom" <?php if ( $niteoCS_font_content == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom font...', 'cmp');?></option>
645
  </select><br>
646
  </fieldset>
647
 
648
  <fieldset id="custom_content_font" <?php if ( $niteoCS_font_content == 'custom' ) { echo 'style="display:block"'; } ?>>
649
- <label for="niteoCS_font_content_custom"><?php _e('Enter name of ', 'cmp');?><a href="https://fonts.google.com/" target="_blank">Google font</a></label>
650
  <input type="text" name="niteoCS_font_content_custom" id="niteoCS_font_content_custom" value="<?php echo esc_attr( $niteoCS_font_content_custom); ?>" class="regular-text code">
651
  </fieldset>
652
 
@@ -660,34 +799,38 @@ add_thickbox();
660
 
661
  </tr>
662
  </table>
 
 
 
 
663
  </div>
664
 
665
 
666
  <div class="table-wrapper content" id="subscribe-section">
667
- <h3><?php _e('Subscribe Form', 'cmp');?></h3>
668
  <table class="content">
669
  <tr>
670
  <th>
671
  <fieldset>
672
  <legend class="screen-reader-text">
673
- <span><?php _e('Subscribe Form Options', 'cmp');?></span>
674
  </legend>
675
 
676
  <p>
677
  <label title="Disabled">
678
- <input type="radio" name="niteoCS_subscribe_type" value="0"<?php if ( $niteoCS_subscribe_type == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp');?>
679
  </label>
680
  </p>
681
 
682
  <p>
683
  <label title="3rd Party Plugin">
684
- <input type="radio" name="niteoCS_subscribe_type" value="1"<?php if ( $niteoCS_subscribe_type == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('3rd Party Plugin', 'cmp');?>
685
  </label>
686
  </p>
687
 
688
  <p>
689
  <label title="Niteo Subscribe">
690
- <input type="radio" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Niteo Subscribe', 'cmp');?>
691
  </label>
692
  </p>
693
 
@@ -695,7 +838,7 @@ add_thickbox();
695
  </th>
696
 
697
  <td id="subscribe-disabled">
698
- <p><?php _e('Subscribe Form is disabled.', 'cmp');?></p>
699
  </td>
700
 
701
  <td id="subscribe-3rdparty">
@@ -704,10 +847,10 @@ add_thickbox();
704
  <input type="text" name="niteoCS_subscribe_code" id="niteoCS_subscribe_code" value="<?php echo stripslashes( esc_attr($niteoCS_subscribe_code ));?>" class="regular-text code">
705
  </label>
706
 
707
- <p><?php _e('You can find Shortode in your Contact Form Plugin settings. Should be something similar to code below: ', 'cmp');?><br><code>[contact-form-7 id="8" title='Contact form 1']</code> or <code>[mc4wp_form id='7']</code></p>
708
 
709
- <p><?php _e('Your Subscribe Form should have only one input (type=email) and submit (input=submit). If you have more than one input field, our design will not work and you need to use custom CSS to style your Subscribe form.', 'cmp');?></p>
710
- <p><?php _e('Example of Subscribe Form code for ', 'cmp');?><a href="https://wordpress.org/plugins/mailchimp-for-wp/">MailChimp</a> plugin:</p>
711
  <code>
712
  &lt;p&gt
713
  &lt;input type="email" name="EMAIL" placeholder="Your email address" required />
@@ -719,30 +862,34 @@ add_thickbox();
719
 
720
  <td id="subscribe-niteo">
721
  <fieldset>
722
- <p><?php _e('Default subscribe form will be displayed to visitors. Only export of email addresses to .csv file is supported. Mailing List will be deleted after deletion of CMP plugin.', 'cmp');?></p>
723
 
724
  <label class="subscribe" for="niteoCS_subscribe_label">Subscribe form Label
725
  <input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr($niteoCS_subscribe_label );?>" class="regular-text code">
726
  </label>
727
 
728
- <p><?php _e('Total Subscribers: ', 'cmp'); echo $subscriber_list ? count( $subscriber_list ) : '0';?></p>
729
- <p><?php _e('Since last export: ', 'cmp'); echo $new_subs;?></p>
730
- <p><?php _e('Last Export Date: ', 'cmp'); echo $niteoCS_csv_export_time ? date('Y-m-d\ H:i:s\ ', $niteoCS_csv_export_time) : __('Never exported', 'cmp');?></p>
731
- <a href="#generate-mailinglist" id="csv-generate" class="button"><?php _e('Generate CSV', 'cmp');?></a>
732
 
733
  </fieldset>
734
  </td>
735
 
736
  </tr>
737
  </table>
 
 
 
 
738
  </div>
739
 
740
  <div class="table-wrapper content" id="social-section">
741
- <h3><?php _e('Social Media', 'cmp');?></h3>
742
  <table class="content">
743
 
744
  <tr>
745
- <th><h4><?php _e('Social Section Title', 'cmp');?></h4></th>
746
  <td>
747
  <fieldset>
748
  <input type="text" name="niteoCS_soc_title" id="niteoCS_soc_title" value="<?php echo esc_attr( $niteoCS_soc_title); ?>" class="regular-text code">
@@ -751,9 +898,9 @@ add_thickbox();
751
  </tr>
752
 
753
  <tr>
754
- <th><h4><?php _e('Social Media Icons', 'cmp');?></h4></th>
755
  <td>
756
- <p class="social-description"><?php _e('Click on Social Icons below to enable Social Media settings.', 'cmp');?></p>
757
  <ul class="social-media">
758
  <?php
759
  $socialmedia = json_decode($niteoCS_socialmedia, true);
@@ -780,7 +927,7 @@ add_thickbox();
780
  }
781
  ?>
782
  <li>
783
- <i class="fa fa-<?php echo esc_attr($social['name']) . ' '. $social_active;?>" title="<?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp');?>" data-name="<?php echo esc_attr($social['name']);?>" aria-hidden="true"></i>
784
  </li>
785
  <?php
786
  } ?>
@@ -789,7 +936,7 @@ add_thickbox();
789
 
790
 
791
  <ul class="social-inputs">
792
- <span class="label"><?php _e('Position', 'cmp');?></span><span class="label"><?php _e('Active', 'cmp');?></span><span class="label"><?php _e('Website URL', 'cmp');?></span>
793
  <?php
794
  foreach ( $socialmedia as $social ) {
795
 
@@ -799,7 +946,7 @@ add_thickbox();
799
  ?>
800
  <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
801
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
802
- <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp');?></label>
803
 
804
  <input type="text" <?php echo $disabled;?>name="niteoCS_<?php echo esc_attr($social['name']);?>" id="niteoCS_<?php echo esc_attr($social['name']);?>" value="<?php echo esc_attr( $social['url'] ); ?>" class="regular-text code <?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>">
805
 
@@ -821,16 +968,19 @@ add_thickbox();
821
  include ( $this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php' );
822
  }
823
  ?>
824
-
825
  </table>
 
 
 
 
826
  </div>
827
 
828
  <div class="table-wrapper content" id="copyright-section">
829
- <h3><?php _e('Footer Content', 'cmp');?></h3>
830
  <table class="content">
831
 
832
  <tr>
833
- <th><h4><?php _e('Copyright', 'cmp');?></h4></th>
834
  <td>
835
  <fieldset>
836
  <input type="text" name="niteoCS_copyright" id="niteoCS_copyright" value="<?php echo esc_attr( $this->niteo_sanitize_html($niteoCS_copyright)); ?>" class="regular-text code">
@@ -838,15 +988,19 @@ add_thickbox();
838
  </td>
839
  </tr>
840
  </table>
 
 
 
 
841
  </div>
842
 
843
 
844
  <div class="table-wrapper seo">
845
- <h3><?php _e('SEO Settings', 'cmp');?></h3>
846
  <table class="seo">
847
 
848
  <tr class="seo-title">
849
- <th><h4><?php _e('Header Title', 'cmp');?></h4></th>
850
  <td>
851
  <fieldset>
852
  <input type="text" name="niteoCS_title" id="niteoCS_title" value="<?php echo esc_attr( $title); ?>" class="regular-text code">
@@ -855,7 +1009,7 @@ add_thickbox();
855
  </tr>
856
 
857
  <tr>
858
- <th><h4><?php _e('Description', 'cmp');?></h4></th>
859
  <td>
860
  <fieldset>
861
  <textarea name="niteoCS_descr" id="niteoCS_descr" class="code"><?php echo esc_attr( $descr); ?></textarea>
@@ -863,7 +1017,7 @@ add_thickbox();
863
  </td>
864
  </tr>
865
  <tr>
866
- <th><h4><?php _e('Google Analytics Tracking ID', 'cmp');?></h4></th>
867
  <td>
868
  <fieldset>
869
  <input type="text" name="niteoCS_analytics" id="niteoCS_analytics" value="<?php echo esc_attr( $niteoCS_analytics); ?>" class="regular-text code">
@@ -871,10 +1025,14 @@ add_thickbox();
871
  </td>
872
  </tr>
873
  </table>
 
 
 
 
874
  </div>
875
 
876
  <div class="table-wrapper custom_css">
877
- <h3><?php _e('Enter Custom CSS', 'cmp');?></h3>
878
  <table class="custom_css">
879
  <tr>
880
  <td>
@@ -884,13 +1042,12 @@ add_thickbox();
884
  </td>
885
  </tr>
886
  </table>
 
 
 
 
887
  </div>
888
 
889
- <p class="submit">
890
- <?php wp_nonce_field('save_options','save_options_field'); ?>
891
- <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes', 'cmp'); ?>" id="submitChanges" />
892
- </p>
893
-
894
  </form>
895
 
896
  <div class="upload-plugin comingsoon install">
@@ -898,12 +1055,12 @@ add_thickbox();
898
  <table class="install">
899
  <tr>
900
  <td>
901
- <h3><?php _e('Install New CMP Coming Soon & Maintenance Theme', 'cmp');?></h3>
902
  </td>
903
  </tr>
904
  <tr>
905
  <td>
906
- <?php _e('Select Theme ZIP file to upload','cmp');?>:
907
  <input type="file" name="fileToUpload" id="fileToUpload">
908
  <?php wp_nonce_field('save_options','save_options_field'); ?>
909
  <input id="install-theme" type="submit" value="Install Theme" name="submit_theme">
@@ -915,122 +1072,3 @@ add_thickbox();
915
  </div>
916
 
917
  </div>
918
-
919
-
920
-
921
- <script>
922
- // test Unsplash
923
- jQuery(document).ready(function($){
924
-
925
- jQuery('#test-unsplash').click(function(e){
926
- e.preventDefault();
927
-
928
- var media_wrapper = jQuery('#unsplash-media');
929
- var unsplash_feed = jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();
930
- var unsp_url = '';
931
- var cat = '';
932
- var custom_str = '';
933
-
934
- switch( unsplash_feed ) {
935
- case '0':
936
- unsp_url = jQuery('#niteoCS-unsplash-0').val();
937
- break;
938
-
939
- case '1':
940
- unsp_url = jQuery('#niteoCS-unsplash-1').val();
941
- cat = jQuery('#unsplash_banner select[name="unsplash_category"] option:selected').val();
942
- custom_str = jQuery('#niteoCS-category-keyword').val();
943
- break;
944
-
945
- case '2':
946
- unsp_url = jQuery('#niteoCS-unsplash-2').val();
947
- break;
948
-
949
- case '3':
950
- unsp_url = jQuery('#niteoCS-unsplash-3').val();
951
- if ( jQuery('#niteoCS_unsplash_feat' ).is( ':checked' ) ) {
952
- cat = '1';
953
- } else {
954
- cat = '0';
955
- }
956
- break;
957
-
958
- default:
959
- // code block
960
- }
961
-
962
- var params = {feed: unsplash_feed, url: unsp_url, cat: cat, custom_str: custom_str, security: '<?php echo $ajax_nonce; ?>'};
963
-
964
- jQuery(this).prop('disabled', true);
965
- jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');
966
- media_wrapper.html('');
967
-
968
-
969
- var data = {
970
- action: 'niteo_unsplash',
971
- security: '<?php echo $ajax_nonce; ?>',
972
- params: params
973
- };
974
-
975
- $.post(ajaxurl, data, function(response) {
976
- jQuery('#unsplash_img').remove();
977
- img_url = response.replace('WIDTHxHEIGHT', '400x225');
978
- jQuery('<img />', {src: img_url, id: 'unsplash_img'}).
979
-
980
- one('load', function() { //Set something to run when it finishes loading
981
- jQuery(this).appendTo(media_wrapper);
982
- jQuery(this).fadeIn();
983
- jQuery('#test-unsplash').prop('disabled', false);
984
- jQuery('#test-unsplash').text('Test Unsplash');
985
- });
986
- });
987
-
988
- });
989
-
990
-
991
- // ----------------------- AJAX Update Theme -----------------------
992
- jQuery('.update-theme').click(function(e) {
993
- e.preventDefault();
994
- var $this = $(this);
995
- var $parent = $this.parents('.notice');
996
- var slug = $this.data('slug');
997
- var type = $this.data('type');
998
- var themeName = $parent.find('.theme-name').text();
999
- var remoteUrl = jQuery(this).data('remote_url');
1000
-
1001
- update = {
1002
- 'name': slug,
1003
- 'tmp_name': '',
1004
- 'type': type,
1005
- 'url': remoteUrl+'?action=download&slug='+slug,
1006
- 'security': '<?php echo $ajax_nonce; ?>'
1007
- }
1008
-
1009
- var data = {
1010
- action: 'cmp_theme_update_install',
1011
- security: '<?php echo $ajax_nonce; ?>',
1012
- file: update
1013
- };
1014
-
1015
- $.post(ajaxurl, data, function(response) {
1016
- $parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');
1017
-
1018
- if (response == 'success') {
1019
- setTimeout(function(){
1020
-
1021
- $parent.removeClass('notice-warning').addClass('notice-success');
1022
- $parent.find('.message').html('<span> '+themeName+' Theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
1023
- }, 1500);
1024
-
1025
- } else {
1026
- response = response.slice(0,-1);
1027
- var error = $('p', $(response)).text();
1028
- $parent.removeClass('notice-warning').addClass('notice-error');
1029
- $parent.find('.message').html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+error+'</span>');
1030
- }
1031
- });
1032
-
1033
- });
1034
-
1035
- });
1036
- </script>
163
  update_option('niteoCS_copyright', $this->niteo_sanitize_html( $_POST['niteoCS_copyright']));
164
  }
165
 
166
+
167
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
168
  // get saved options
 
169
  $title = stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!'));
170
  $descr = stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page'));
171
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
189
  $niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
190
  $subscriber_list = get_option('niteoCS_subscribers_list');
191
  $niteoCS_csv_export_time = get_option('niteoCS_csv_export_time');
192
+ $niteoCS_font_content = get_option('niteoCS_font_content', 'Playfair Display');
193
+ $niteoCS_font_headings = get_option('niteoCS_font_headings', 'Raleway');
194
  $niteoCS_font_content_custom = get_option('niteoCS_font_content_custom');
195
  $niteoCS_font_headings_custom = get_option('niteoCS_font_headings_custom');
196
  $niteoCS_body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
284
  ?>
285
  <noscript>
286
  <div class='updated'>
287
+ <p class="error"><?php _e('JavaScript appears to be disabled in your browser. For this plugin to work correctly, please enable JavaScript or switch to a more modern browser.', 'cmp-coming-soon-maintenance');?></p>
288
  </div>
289
  <style>
290
  .themes{display: :none;}
292
  </noscript>
293
 
294
  <div class="wrap">
295
+
296
  <div id="icon-options-general" class="icon32">
297
  <br />
298
  </div>
299
  <form method="post" action="options-general.php?page=cmp-settings&status=settings-saved" id="csoptions">
300
 
301
  <h2 class="nav-tab-wrapper">
302
+ <a class="nav-tab nav-tab-active settings" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="general"><i class="fa fa-cog" aria-hidden="true"></i><?php _e('Settings', 'cmp-coming-soon-maintenance');?></a>
303
+ <a class="nav-tab content" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="content"><i class="fa fa-wrench" aria-hidden="true"></i><?php _e('Content', 'cmp-coming-soon-maintenance');?></a>
304
+ <a class="nav-tab seo" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="seo"><i class="fa fa-users" aria-hidden="true"></i><?php _e('SEO', 'cmp-coming-soon-maintenance');?></a>
305
+ <a class="nav-tab custom_css" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="custom_css"><i class="fa fa-code" aria-hidden="true"></i><?php _e('Custom CSS', 'cmp-coming-soon-maintenance');?></a>
306
+ <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>
307
+ <a class="nav-tab install" href="<?php echo admin_url(); ?>options-general.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>
308
  </h2>
309
 
310
  <div class="table-wrapper general">
311
+ <h3><?php _e('General Settings', 'cmp-coming-soon-maintenance');?></h3>
312
  <table class="general">
313
  <tr>
314
+ <th><h4><?php _e('Status', 'cmp-coming-soon-maintenance');?></h4></th>
315
  <td>
316
  <fieldset>
317
  <legend class="screen-reader-text">
318
+ <span><?php _e('Status', 'cmp-coming-soon-maintenance');?></span>
319
  </legend>
320
  <label title="disabled">
321
+ <input type="radio" name="activate" value="0"<?php if ($this->cmp_status() == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
322
+ <p class="info"><?php _e('Disable plugin and display standard WordPress page to all users and indexing engines.','cmp-coming-soon-maintenance')?></p>
323
  </label><br />
 
 
 
 
324
  <label title="cmp">
325
+ <input type="radio" name="activate" value="2"<?php if ($this->cmp_status() == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Coming Soon & Landing Page', 'cmp-coming-soon-maintenance');?>
326
+ <p class="info"><?php _e('Returns standard 200 HTTP OK response code to indexing robots. Set this option if you want to use our plugin as "Coming Soon" page.','cmp-coming-soon-maintenance')?></p>
327
  </label>
328
+ <label title="maintanance">
329
+ <input type="radio" name="activate" value="1"<?php if ($this->cmp_status() == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Maintanance Mode', 'cmp-coming-soon-maintenance');?>
330
+ <p class="info"><?php _e('Returns 503 HTTP Service unavailable code to indexing robots. Set this option if your site is down due to maintanance and you want to display Maintanance page.','cmp-coming-soon-maintenance')?></p>
331
+ </label><br />
332
+
333
  </fieldset>
334
  </td>
335
  </tr>
336
+
337
  </table>
338
+ <p class="cmp-submit">
339
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
340
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
341
+ </p>
342
  </div>
343
+
344
  <div class="table-wrapper general">
345
+ <h3><?php _e('Free Themes', 'cmp-coming-soon-maintenance');?></h3>
346
+ <table class="general theme-selector">
347
+ <tr>
 
348
  <td class="theme-selector">
349
  <fieldset>
350
  <legend class="screen-reader-text">
351
+ <span><?php _e('Free Themes', 'cmp-coming-soon-maintenance');?> </span>
352
  </legend>
353
+ <?php
354
+ // define what attribute we want from style.css header
355
+ $headers = array('Version');
356
+
357
+ // move active theme to beginning
358
+ $key = array_search ($this->cmp_selectedTheme(), $this->themes_standard);
359
+ if ($key) {
360
+ $active = $this->themes_standard[$key];
361
+ unset($this->themes_standard[$key]);
362
+ array_unshift($this->themes_standard, $active);
363
+ }
364
+
365
  $i = 0;
366
+ foreach ( $this->themes_standard as $theme_slug ) {
367
+
368
+ // get theme update transient if set
369
+ $theme_update = false;
370
+ $transient = get_transient( $theme_slug.'_updatecheck' );
371
+ if ( $transient != false && $transient =! '' ) {
372
+ $theme_update = true;
373
+ }
374
+
375
+ // get thumbnail
376
+ $thumbnail = plugins_url().'/'.$this->installedFolder.'\/themes/'. $theme_slug . '/img/'. $theme_slug . '_thumbnail.jpg';
377
+
378
+ // get theme version
379
+ $version = '';
380
+ if (file_exists(plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css')) {
381
+ $version = get_file_data( plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css', $headers, '');
382
+ if (isset($version[0])) {
383
+ $version = $version[0];
384
+ }
385
+ }
386
+ ?>
387
+ <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-type="standard" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
388
+ <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
389
+
390
+ <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
391
+
392
+ <span class="theme-version">ver.<?php echo esc_html($version);?></span>
393
+
394
+ <div class="theme-inputs">
395
+
396
+ <div class="button theme-select hide <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
397
+ <input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
398
+ <span class="input-label"><?php if ( $this->cmp_selectedTheme() == $theme_slug ) { _e('Active', 'cmp-coming-soon-maintenance'); } else { _e('Select', 'cmp-coming-soon-maintenance'); }?></span>
399
+ </div>
400
+
401
+ <?php
402
+ // echo update button if update is available
403
+ if ($theme_update === true) { ?>
404
+ <button type="button" class="theme-update button hide"><i class="fa fa-refresh" aria-hidden="true"></i><?php _e('Update', 'cmp-coming-soon-maintenance');?></button>
405
+ <?php
406
+ } ?>
407
+
408
+ <button type="button" class="theme-details button hide"><i class="fa fa-eye" aria-hidden="true"></i><?php _e('DETAILS', 'cmp-coming-soon-maintenance');?></button>
409
+
410
+ </div> <!-- theme-inputs -->
411
+ </div> <!-- theme-wrapper -->
412
+
413
+ <?php
414
  $i++;
415
  } ?>
416
  </fieldset>
417
  </td>
418
  </tr>
419
+ </table>
420
+ <p class="cmp-submit">
421
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
422
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
423
+ </p>
424
+ </div>
425
+ <?php
426
+ if ( !empty($premium_themes) ) { ?>
427
+ <div class="table-wrapper general">
428
+ <h3><?php _e('Premium Themes', 'cmp-coming-soon-maintenance');?></h3>
429
+ <table class="general theme-selector">
430
+ <tr>
431
  <td class="theme-selector">
432
  <fieldset>
433
  <legend class="screen-reader-text">
434
+ <span><?php _e('Premium Themes', 'cmp-coming-soon-maintenance');?> </span>
435
  </legend>
436
  <?php
437
+ // move active theme to beginning if active is not already set in standard themes
438
+ if ($key === false) {
439
+ $premium_themes = $this->customShift($premium_themes, $this->cmp_selectedTheme());
440
+ }
441
+
442
+ // build previews for premium themes
443
+ foreach ( $premium_themes as $premium_theme ) {
444
+ $theme_slug = $premium_theme['name'];
445
+
446
+ // if premium theme is not in themes array, display buy button
447
+ if ( !in_array( $theme_slug, $this->theme_array) ) {
448
+ $purchased = false;
449
+ $version = '';
450
+ $thumbnail = plugins_url().'/'.$this->installedFolder.'\/themes/'. $theme_slug. '_thumbnail.jpg';
451
+
452
+ }
453
+
454
+ // if premium theme has been installed
455
+ if ( in_array( $theme_slug, $this->theme_array) ) {
456
+ $purchased = true;
457
+ $thumbnail = plugins_url().'/cmp-premium-themes/'. $theme_slug . '/img/'. $theme_slug . '_thumbnail.jpg';
458
+ $version = '';
459
+ // get theme version
460
+ if (file_exists(plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/'.$theme_slug.'/style.css')) {
461
+ $version = get_file_data( plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
462
+ if (isset($version[0])) {$version = $version[0];}
463
+ }
464
+ }
465
+ ?>
466
+
467
+ <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium" data-purchased="<?php echo esc_attr($purchased);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
468
 
 
 
 
 
469
 
470
+ <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
471
+
472
+
473
+
474
+ <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
475
+
476
+ <?php echo $purchased ? '<span class="theme-version">ver.'.esc_html($version).'</span>' : ''; ?>
477
+
478
+ <div class="theme-inputs">
479
+
480
+ <?php
481
+ if ($purchased === true) { ?>
482
+ <div class="button theme-select hide<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' activated'; } ?>">
483
+ <input type="radio" name="select_theme" value="<?php echo esc_attr($theme_slug);?>" id="displayOption-<?php echo esc_attr($theme_slug);?>"<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' checked="checked"'; } ?>>
484
+ <span class="input-label"><?php if ( $this->cmp_selectedTheme() == $theme_slug ) { _e('Active', 'cmp-coming-soon-maintenance'); } else { _e('Select', 'cmp-coming-soon-maintenance'); }?></span>
485
+ </div>
486
+
487
+ <?php
488
+ $theme_update = false;
489
+ $transient = get_transient( $theme_slug.'_updatecheck' );
490
+ if ( $transient != false && $transient =! '' ) {
491
+ $theme_update = true;
492
+ }
493
+ // echo update button if update is available
494
+ if ( $theme_update === true ) { ?>
495
+ <button type="button" class="theme-update button hide"><i class="fa fa-refresh" aria-hidden="true"></i><?php _e('Update', 'cmp-coming-soon-maintenance');?></button>
496
+ <?php
497
+ }
498
+ // if not purchased, display buy button
499
+ } else { ?>
500
+
501
+ <button type="button" class="theme-purchase button hide"><a href="<?php echo esc_url($premium_theme['url']);?>" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i><?php _e('Buy', 'cmp-coming-soon-maintenance');?></a></button>
502
+ <?php
503
+ } ?>
504
+
505
+ <button type="button" class="theme-details button hide"><i class="fa fa-eye" aria-hidden="true"></i><?php _e('DETAILS', 'cmp-coming-soon-maintenance');?></button>
506
 
507
  </div>
508
+ </div>
509
+
510
+ <?php
511
+ } //endforeach $premium_themes ?>
512
  </fieldset>
513
  </td>
514
  </tr>
515
  <?php
516
+ } // if !empty($premium_themes ?>
517
+
518
+ <div class="theme-overlay cmp"></div>
519
+
520
  </table>
521
+ <p class="cmp-submit">
522
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
523
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
524
+ </p>
525
  </div>
526
 
527
  <div class="table-wrapper content">
528
+ <h3><?php _e('Logo', 'cmp-coming-soon-maintenance');?></h3>
529
  <table class="content">
530
  <tr>
531
+ <th><h4><?php _e('Upload or select Logo', 'cmp-coming-soon-maintenance');?></h4></th>
532
  <td>
533
  <fieldset>
534
  <input type="hidden" class="widefat" id="niteoCS-logo-id" name="niteoCS_logo_id" type="text" value="<?php echo esc_attr( $logo_id ); ?>" />
546
  </td>
547
  </tr>
548
  </table>
549
+ <p class="cmp-submit">
550
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
551
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
552
+ </p>
553
  </div>
554
 
555
  <div class="table-wrapper content">
556
+ <h3><?php _e('Content', 'cmp-coming-soon-maintenance');?></h3>
557
  <table class="content">
558
  <tr class="body-title">
559
+ <th><h4><?php _e('Title', 'cmp-coming-soon-maintenance');?></h4></th>
560
  <td>
561
  <fieldset>
562
  <input type="text" name="niteoCS_body_title" id="niteoCS_body_title" value="<?php echo stripslashes(esc_attr( $niteoCS_body_title)); ?>" class="regular-text code">
565
  </tr>
566
 
567
  <tr>
568
+ <th><h4><?php _e('Message', 'cmp-coming-soon-maintenance');?></h4></th>
569
  <td>
570
  <?php wp_editor( stripslashes( $this->niteo_sanitize_html( $body ) ), 'niteoCS_body', $settings = array('textarea_name'=>'niteoCS_body', 'editor_height'=>'300') ); ?>
571
  </td>
572
  </tr>
 
573
  </table>
574
+ <p class="cmp-submit">
575
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
576
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
577
+ </p>
578
  </div>
579
 
580
  <div class="table-wrapper content">
581
+ <h3><?php _e('Theme Background', 'cmp-coming-soon-maintenance');?></h3>
582
  <table class="content">
583
  <tr>
584
  <th>
585
  <fieldset>
586
  <legend class="screen-reader-text">
587
+ <span><?php _e('Banner Settings', 'cmp-coming-soon-maintenance');?></span>
588
  </legend>
589
 
590
  <p>
591
  <label title="Custom Media">
592
+ <input type="radio" name="niteoCS_banner" value="0"<?php if ( $niteoCS_banner == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Custom Media', 'cmp-coming-soon-maintenance');?>
593
  </label>
594
  </p>
595
 
596
  <p>
597
  <label title="Unsplash Media">
598
+ <input type="radio" name="niteoCS_banner" value="1"<?php if ( $niteoCS_banner == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Unsplash library', 'cmp-coming-soon-maintenance');?>
599
  </label>
600
  </p>
601
 
602
  <p>
603
  <label title="Default Banner">
604
+ <input type="radio" name="niteoCS_banner" value="2"<?php if ( $niteoCS_banner == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
605
  </label>
606
  </p>
607
  <p>
608
  <label title="Graphic Pattern">
609
+ <input type="radio" name="niteoCS_banner" value="3"<?php if ( $niteoCS_banner == 3) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Graphic Pattern', 'cmp-coming-soon-maintenance');?>
610
  </label>
611
  </p>
612
  <p>
613
  <label title="Solid Color">
614
+ <input type="radio" name="niteoCS_banner" value="4"<?php if ( $niteoCS_banner == 4) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Solid Color', 'cmp-coming-soon-maintenance');?>
615
  </label>
616
  </p>
617
 
623
  <fieldset id="custom_banner">
624
  <input type="hidden" class="widefat" id="niteoCS-banner-id" name="niteoCS_banner_id" type="text" value="<?php echo esc_attr( $banner_id ); ?>" />
625
  <input id="add-banner" type="button" class="button" value="Media Library" />
626
+ <p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp-coming-soon-maintenance')?></p>
627
  <div class="banner-wrapper">
628
  <?php
629
  if ( isset( $banner_id ) && $banner_id != '' ) {
641
  </fieldset>
642
 
643
  <fieldset id="unsplash_banner">
644
+ <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>
645
+ <label for="unsplash_feed"><?php _e('Choose Unsplash Feed', 'cmp-coming-soon-maintenance');?></label></br>
646
  <select name="unsplash_feed">
647
+ <option value="0" <?php if ( $unsplash_feed == '0' ) { echo ' selected="selected"'; } ?>><?php _e('Specific Photo', 'cmp-coming-soon-maintenance');?></option>
648
+ <option value="1" <?php if ( $unsplash_feed == '1' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Category', 'cmp-coming-soon-maintenance');?></option>
649
+ <option value="2" <?php if ( $unsplash_feed == '2' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Collection', 'cmp-coming-soon-maintenance');?></option>
650
+ <option value="3" <?php if ( $unsplash_feed == '3' ) { echo ' selected="selected"'; } ?>><?php _e('Random Photo', 'cmp-coming-soon-maintenance');?></option>
651
  </select>
652
 
653
  <p class="unsplash-feed" id="unsplash-feed-0">
654
+ <label for="niteoCS_unsplash_0"><?php _e('Enter Unsplash Photo URL or Photo ID', 'cmp-coming-soon-maintenance');?></label>
655
  <input type="text" class="widefat" id="niteoCS-unsplash-0" name="niteoCS_unsplash_0" type="text" value="<?php echo esc_attr($niteoCS_unsplash_0); ?>" />
656
  </p>
657
 
658
  <p class="unsplash-feed" id="unsplash-feed-1">
659
+ <label for="unsplash_category"><?php _e('Select Category', 'cmp-coming-soon-maintenance');?></label></br>
660
  <select name="unsplash_category">
661
+ <option value="buildings" <?php if ( $unsplash_category == 'buildings') { echo ' selected="selected"'; } ?>><?php _e('Buildings', 'cmp-coming-soon-maintenance');?></option>
662
+ <option value="food" <?php if ( $unsplash_category == 'food') { echo ' selected="selected"'; } ?>><?php _e('Food', 'cmp-coming-soon-maintenance');?></option>
663
+ <option value="nature" <?php if ( $unsplash_category == 'nature') { echo ' selected="selected"'; } ?>><?php _e('Nature', 'cmp-coming-soon-maintenance');?></option>
664
+ <option value="people" <?php if ( $unsplash_category == 'people') { echo ' selected="selected"'; } ?>><?php _e('People', 'cmp-coming-soon-maintenance');?></option>
665
+ <option value="technology" <?php if ( $unsplash_category == 'technology') { echo ' selected="selected"'; } ?>><?php _e('Technology', 'cmp-coming-soon-maintenance');?></option>
666
+ <option value="objects" <?php if ( $unsplash_category == 'objects') { echo ' selected="selected"'; } ?>><?php _e('Objects', 'cmp-coming-soon-maintenance');?></option>
667
  </select></br>
668
 
669
+ <label for="niteoCS_cat_keyword"><?php _e('You can limit Category to Specific Keyword', 'cmp-coming-soon-maintenance');?></label>
670
  <input type="text" class="widefat" id="niteoCS-category-keyword" name="niteoCS_cat_keyword" type="text" value="<?php echo esc_attr($niteoCS_cat_keyword); ?>" />
671
  </p>
672
 
673
  <p class="unsplash-feed" id="unsplash-feed-2">
674
+ <label for="niteoCS_unsplash_2"><?php _e('Enter Unsplash Collection URL or Collection ID. Doesn`t work for Curated Collections.', 'cmp-coming-soon-maintenance');?></label>
675
  <input type="text" class="widefat" id="niteoCS-unsplash-2" name="niteoCS_unsplash_2" type="text" value="<?php echo esc_attr($niteoCS_unsplash_2); ?>" />
676
  </p>
677
 
678
  <p class="unsplash-feed" id="unsplash-feed-3">
679
+ <label for="niteoCS_unsplash_3"><?php _e('Specify search terms', 'cmp-coming-soon-maintenance');?></label>
680
  <input type="text" class="widefat" id="niteoCS-unsplash-3" name="niteoCS_unsplash_3" type="text" value="<?php echo esc_attr($niteoCS_unsplash_3); ?>" />
681
 
682
  </br>
683
+ <input type="checkbox" name="niteoCS_unsplash_feat" id="niteoCS_unsplash_feat" value="1" <?php checked( '1', get_option( 'niteoCS_unsplash_feat', '0' ) ); ?> class="regular-text code"><label for="niteoCS_unsplash_feat"><?php _e('Limit search only to Featured/Curated Photos', 'cmp-coming-soon-maintenance');?></label>
684
  </p>
685
 
686
+ <button id="test-unsplash" class="button" data-security="<?php echo esc_attr($ajax_nonce);?>">Test Unsplash</button>
687
  <div id="unsplash-media"></div>
688
  </fieldset>
689
 
695
 
696
  <fieldset id="graphic_pattern">
697
  <div class="banner-wrapper default">
698
+ <label for="niteoCS_banner_pattern"><?php _e('Select Pattern', 'cmp-coming-soon-maintenance');?></label></br>
699
  <select name="niteoCS_banner_pattern" data-url="<?php echo esc_url(WP_PLUGIN_URL . '/cmp-coming-soon-maintenance/img/patterns/');?>">
700
  <?php
701
  foreach ($patterns as $pattern) { ?>
702
  <option value="<?php echo esc_attr($pattern);?>" <?php if ( $niteoCS_banner_pattern == $pattern ) { echo ' selected="selected"'; } ?>><?php echo esc_html(ucfirst(str_replace('_', ' ', $pattern)));?></option>
703
  <?php
704
  } ?>
705
+ <option value="custom" <?php if ( $niteoCS_banner_pattern == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Pattern...', 'cmp-coming-soon-maintenance');?></option>
706
  </select><br>
707
 
708
  <input type="hidden" class="widefat" id="niteoCS_banner_pattern_custom" name="niteoCS_banner_pattern_custom" type="text" value="<?php echo esc_attr( $niteoCS_banner_pattern_custom ); ?>" />
710
  <input id="add-pattern" type="button" class="button" value="Media Library" style="display:<?php echo ($niteoCS_banner_pattern == 'custom') ? 'block' : 'none'?>;"/>
711
 
712
  <div class="pattern-preview" style="background-image: url('<?php echo esc_url($pattern_url);?>');"></div>
713
+ <span><?php _e('Get more subtle patterns on', 'cmp-coming-soon-maintenance');?> <a href="https://www.toptal.com/designers/subtlepatterns/" target="_blank">Toptal</a>.</span>
714
  </div>
715
  </fieldset>
716
 
717
  <fieldset id="solid_color">
718
  <div class="banner-wrapper default">
719
+ <label for="niteoCS_banner_color"><?php _e('Select Color', 'cmp-coming-soon-maintenance');?></label><br>
720
  <input type="text" name="niteoCS_banner_color" id="niteoCS_banner_color" value="<?php echo esc_attr( $niteoCS_banner_color); ?>" data-default-color="#bdc3c7" class="regular-text code"><br>
721
  <div class="color-preview" style="background-color:<?php echo esc_attr( $niteoCS_banner_color); ?>"></div>
722
  </div>
724
  </td>
725
  </tr>
726
  </table>
727
+ <p class="cmp-submit">
728
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
729
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
730
+ </p>
731
  </div>
732
 
733
  <?php
743
  ?>
744
 
745
  <div class="table-wrapper content">
746
+ <h3><?php _e('Customize Fonts', 'cmp-coming-soon-maintenance');?></h3>
747
  <table class="content">
748
 
749
  <tr>
750
+ <th><h4><?php _e('Headings Font', 'cmp-coming-soon-maintenance');?></h4></th>
751
  <td>
752
  <fieldset>
753
+ <label for="niteoCS_font_headings"><?php _e('Select from predefined Google Fonts or insert Custom font', 'cmp-coming-soon-maintenance');?></label></br>
754
  <select name="niteoCS_font_headings">
755
  <?php
756
  foreach ($fonts as $font) { ?>
757
  <option value="<?php echo esc_attr($font);?>" <?php if ( $niteoCS_font_headings == $font ) { echo ' selected="selected"'; } ?>><?php echo esc_html($font);?></option>
758
  <?php
759
  } ?>
760
+ <option value="custom" <?php if ( $niteoCS_font_headings == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom font...', 'cmp-coming-soon-maintenance');?></option>
761
  </select><br>
762
  </fieldset>
763
 
764
  <fieldset id="custom_headings_font" <?php if ( $niteoCS_font_headings == 'custom' ) { echo 'style="display:block"'; } ?>>
765
+ <label for="niteoCS_font_headings_custom"><?php _e('Enter name of ', 'cmp-coming-soon-maintenance');?><a href="https://fonts.google.com/" target="_blank">Google font</a></label>
766
  <input type="text" name="niteoCS_font_headings_custom" id="niteoCS_font_headings_custom" value="<?php echo esc_attr( $niteoCS_font_headings_custom); ?>" class="regular-text code">
767
  </fieldset>
768
 
770
  </tr>
771
 
772
  <tr>
773
+ <th><h4><?php _e('Content Font', 'cmp-coming-soon-maintenance');?></h4></th>
774
  <td>
775
  <fieldset>
776
+ <label for="niteoCS_font_content"><?php _e('Select from predefined Google Fonts or insert Custom font', 'cmp-coming-soon-maintenance');?></label></br>
777
  <select name="niteoCS_font_content">
778
  <?php
779
  foreach ($fonts as $font) { ?>
780
  <option value="<?php echo esc_attr($font);?>" <?php if ( $niteoCS_font_content == $font ) { echo ' selected="selected"'; } ?>><?php echo esc_html($font);?></option>
781
  <?php
782
  } ?>
783
+ <option value="custom" <?php if ( $niteoCS_font_content == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom font...', 'cmp-coming-soon-maintenance');?></option>
784
  </select><br>
785
  </fieldset>
786
 
787
  <fieldset id="custom_content_font" <?php if ( $niteoCS_font_content == 'custom' ) { echo 'style="display:block"'; } ?>>
788
+ <label for="niteoCS_font_content_custom"><?php _e('Enter name of ', 'cmp-coming-soon-maintenance');?><a href="https://fonts.google.com/" target="_blank">Google font</a></label>
789
  <input type="text" name="niteoCS_font_content_custom" id="niteoCS_font_content_custom" value="<?php echo esc_attr( $niteoCS_font_content_custom); ?>" class="regular-text code">
790
  </fieldset>
791
 
799
 
800
  </tr>
801
  </table>
802
+ <p class="cmp-submit">
803
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
804
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
805
+ </p>
806
  </div>
807
 
808
 
809
  <div class="table-wrapper content" id="subscribe-section">
810
+ <h3><?php _e('Subscribe Form', 'cmp-coming-soon-maintenance');?></h3>
811
  <table class="content">
812
  <tr>
813
  <th>
814
  <fieldset>
815
  <legend class="screen-reader-text">
816
+ <span><?php _e('Subscribe Form Options', 'cmp-coming-soon-maintenance');?></span>
817
  </legend>
818
 
819
  <p>
820
  <label title="Disabled">
821
+ <input type="radio" name="niteoCS_subscribe_type" value="0"<?php if ( $niteoCS_subscribe_type == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
822
  </label>
823
  </p>
824
 
825
  <p>
826
  <label title="3rd Party Plugin">
827
+ <input type="radio" name="niteoCS_subscribe_type" value="1"<?php if ( $niteoCS_subscribe_type == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('3rd Party Plugin', 'cmp-coming-soon-maintenance');?>
828
  </label>
829
  </p>
830
 
831
  <p>
832
  <label title="Niteo Subscribe">
833
+ <input type="radio" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Niteo Subscribe', 'cmp-coming-soon-maintenance');?>
834
  </label>
835
  </p>
836
 
838
  </th>
839
 
840
  <td id="subscribe-disabled">
841
+ <p><?php _e('Subscribe Form is disabled.', 'cmp-coming-soon-maintenance');?></p>
842
  </td>
843
 
844
  <td id="subscribe-3rdparty">
847
  <input type="text" name="niteoCS_subscribe_code" id="niteoCS_subscribe_code" value="<?php echo stripslashes( esc_attr($niteoCS_subscribe_code ));?>" class="regular-text code">
848
  </label>
849
 
850
+ <p><?php _e('You can find Shortode in your Contact Form Plugin settings. Should be something similar to code below: ', 'cmp-coming-soon-maintenance');?><br><code>[contact-form-7 id="8" title='Contact form 1']</code> or <code>[mc4wp_form id='7']</code></p>
851
 
852
+ <p><?php _e('Your Subscribe Form should have only one input (type=email) and submit (input=submit). If you have more than one input field, our design will not work and you need to use custom CSS to style your Subscribe form.', 'cmp-coming-soon-maintenance');?></p>
853
+ <p><?php _e('Example of Subscribe Form code for ', 'cmp-coming-soon-maintenance');?><a href="https://wordpress.org/plugins/mailchimp-for-wp/">MailChimp</a> plugin:</p>
854
  <code>
855
  &lt;p&gt
856
  &lt;input type="email" name="EMAIL" placeholder="Your email address" required />
862
 
863
  <td id="subscribe-niteo">
864
  <fieldset>
865
+ <p><?php _e('Default subscribe form will be displayed to visitors. Only export of email addresses to .csv file is supported. Mailing List will be deleted after deletion of CMP plugin.', 'cmp-coming-soon-maintenance');?></p>
866
 
867
  <label class="subscribe" for="niteoCS_subscribe_label">Subscribe form Label
868
  <input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr($niteoCS_subscribe_label );?>" class="regular-text code">
869
  </label>
870
 
871
+ <p><?php _e('Total Subscribers: ', 'cmp-coming-soon-maintenance'); echo $subscriber_list ? count( $subscriber_list ) : '0';?></p>
872
+ <p><?php _e('Since last export: ', 'cmp-coming-soon-maintenance'); echo $new_subs;?></p>
873
+ <p><?php _e('Last Export Date: ', 'cmp-coming-soon-maintenance'); echo $niteoCS_csv_export_time ? date('Y-m-d\ H:i:s\ ', $niteoCS_csv_export_time) : __('Never exported', 'cmp-coming-soon-maintenance');?></p>
874
+ <a href="#generate-mailinglist" id="csv-generate" class="button"><?php _e('Generate CSV', 'cmp-coming-soon-maintenance');?></a>
875
 
876
  </fieldset>
877
  </td>
878
 
879
  </tr>
880
  </table>
881
+ <p class="cmp-submit">
882
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
883
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
884
+ </p>
885
  </div>
886
 
887
  <div class="table-wrapper content" id="social-section">
888
+ <h3><?php _e('Social Media', 'cmp-coming-soon-maintenance');?></h3>
889
  <table class="content">
890
 
891
  <tr>
892
+ <th><h4><?php _e('Social Section Title', 'cmp-coming-soon-maintenance');?></h4></th>
893
  <td>
894
  <fieldset>
895
  <input type="text" name="niteoCS_soc_title" id="niteoCS_soc_title" value="<?php echo esc_attr( $niteoCS_soc_title); ?>" class="regular-text code">
898
  </tr>
899
 
900
  <tr>
901
+ <th><h4><?php _e('Social Media Icons', 'cmp-coming-soon-maintenance');?></h4></th>
902
  <td>
903
+ <p class="social-description"><?php _e('Click on Social Icons below to enable Social Media settings.', 'cmp-coming-soon-maintenance');?></p>
904
  <ul class="social-media">
905
  <?php
906
  $socialmedia = json_decode($niteoCS_socialmedia, true);
927
  }
928
  ?>
929
  <li>
930
+ <i class="fa fa-<?php echo esc_attr($social['name']) . ' '. $social_active;?>" title="<?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp-coming-soon-maintenance');?>" data-name="<?php echo esc_attr($social['name']);?>" aria-hidden="true"></i>
931
  </li>
932
  <?php
933
  } ?>
936
 
937
 
938
  <ul class="social-inputs">
939
+ <span class="label"><?php _e('Position', 'cmp-coming-soon-maintenance');?></span><span class="label"><?php _e('Active', 'cmp-coming-soon-maintenance');?></span><span class="label"><?php _e('Website URL', 'cmp-coming-soon-maintenance');?></span>
940
  <?php
941
  foreach ( $socialmedia as $social ) {
942
 
946
  ?>
947
  <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
948
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
949
+ <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp-coming-soon-maintenance');?></label>
950
 
951
  <input type="text" <?php echo $disabled;?>name="niteoCS_<?php echo esc_attr($social['name']);?>" id="niteoCS_<?php echo esc_attr($social['name']);?>" value="<?php echo esc_attr( $social['url'] ); ?>" class="regular-text code <?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>">
952
 
968
  include ( $this->cmp_themePath().$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php' );
969
  }
970
  ?>
 
971
  </table>
972
+ <p class="cmp-submit">
973
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
974
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
975
+ </p>
976
  </div>
977
 
978
  <div class="table-wrapper content" id="copyright-section">
979
+ <h3><?php _e('Footer Content', 'cmp-coming-soon-maintenance');?></h3>
980
  <table class="content">
981
 
982
  <tr>
983
+ <th><h4><?php _e('Copyright', 'cmp-coming-soon-maintenance');?></h4></th>
984
  <td>
985
  <fieldset>
986
  <input type="text" name="niteoCS_copyright" id="niteoCS_copyright" value="<?php echo esc_attr( $this->niteo_sanitize_html($niteoCS_copyright)); ?>" class="regular-text code">
988
  </td>
989
  </tr>
990
  </table>
991
+ <p class="cmp-submit">
992
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
993
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
994
+ </p>
995
  </div>
996
 
997
 
998
  <div class="table-wrapper seo">
999
+ <h3><?php _e('SEO Settings', 'cmp-coming-soon-maintenance');?></h3>
1000
  <table class="seo">
1001
 
1002
  <tr class="seo-title">
1003
+ <th><h4><?php _e('Header Title', 'cmp-coming-soon-maintenance');?></h4></th>
1004
  <td>
1005
  <fieldset>
1006
  <input type="text" name="niteoCS_title" id="niteoCS_title" value="<?php echo esc_attr( $title); ?>" class="regular-text code">
1009
  </tr>
1010
 
1011
  <tr>
1012
+ <th><h4><?php _e('Description', 'cmp-coming-soon-maintenance');?></h4></th>
1013
  <td>
1014
  <fieldset>
1015
  <textarea name="niteoCS_descr" id="niteoCS_descr" class="code"><?php echo esc_attr( $descr); ?></textarea>
1017
  </td>
1018
  </tr>
1019
  <tr>
1020
+ <th><h4><?php _e('Google Analytics Tracking ID', 'cmp-coming-soon-maintenance');?></h4></th>
1021
  <td>
1022
  <fieldset>
1023
  <input type="text" name="niteoCS_analytics" id="niteoCS_analytics" value="<?php echo esc_attr( $niteoCS_analytics); ?>" class="regular-text code">
1025
  </td>
1026
  </tr>
1027
  </table>
1028
+ <p class="cmp-submit">
1029
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
1030
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
1031
+ </p>
1032
  </div>
1033
 
1034
  <div class="table-wrapper custom_css">
1035
+ <h3><?php _e('Enter Custom CSS', 'cmp-coming-soon-maintenance');?></h3>
1036
  <table class="custom_css">
1037
  <tr>
1038
  <td>
1042
  </td>
1043
  </tr>
1044
  </table>
1045
+ <p class="cmp-submit">
1046
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
1047
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
1048
+ </p>
1049
  </div>
1050
 
 
 
 
 
 
1051
  </form>
1052
 
1053
  <div class="upload-plugin comingsoon install">
1055
  <table class="install">
1056
  <tr>
1057
  <td>
1058
+ <h3><?php _e('Install New CMP Coming Soon & Maintenance Theme', 'cmp-coming-soon-maintenance');?></h3>
1059
  </td>
1060
  </tr>
1061
  <tr>
1062
  <td>
1063
+ <?php _e('Select Theme ZIP file to upload','cmp-coming-soon-maintenance');?>:
1064
  <input type="file" name="fileToUpload" id="fileToUpload">
1065
  <?php wp_nonce_field('save_options','save_options_field'); ?>
1066
  <input id="install-theme" type="submit" value="Install Theme" name="submit_theme">
1072
  </div>
1073
 
1074
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
comingsoon.js CHANGED
@@ -48,8 +48,84 @@ jQuery(document).ready(function($){
48
  unsplasfeed = jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();
49
  jQuery('.unsplash-feed').css('display', 'none');
50
  jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
 
 
 
 
 
 
51
  })
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  // script for logo upload
55
  var logoContainer = jQuery('.logo-wrapper');
@@ -503,8 +579,9 @@ jQuery(document).ready(function($){
503
  jQuery('.social-inputs .label').css('display', 'block');
504
  }
505
 
506
- // ----------------------- Theme release notes -----------------------
507
 
 
508
  jQuery('.view-release').click(function(e) {
509
  e.preventDefault();
510
  $this = jQuery(this);
@@ -518,6 +595,244 @@ jQuery(document).ready(function($){
518
  });
519
  });
520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
 
522
  });
523
 
48
  unsplasfeed = jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();
49
  jQuery('.unsplash-feed').css('display', 'none');
50
  jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
51
+ // set slider disabled/enabled
52
+ if (unsplasfeed == 0) {
53
+ jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
54
+ } else {
55
+ jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', false);
56
+ }
57
  })
58
 
59
+ jQuery('#unsplash_banner select[name="unsplash_feed"]').trigger('change');
60
+
61
+
62
+ // test unsplash image
63
+ jQuery('#test-unsplash').click(function(e){
64
+ e.preventDefault();
65
+
66
+ var media_wrapper = jQuery('#unsplash-media'),
67
+ unsplash_feed = jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val(),
68
+ unsp_url = '',
69
+ cat = '',
70
+ custom_str = '',
71
+ security = jQuery(this).data('security');
72
+
73
+ switch( unsplash_feed ) {
74
+ case '0':
75
+ unsp_url = jQuery('#niteoCS-unsplash-0').val();
76
+ break;
77
+
78
+ case '1':
79
+ unsp_url = jQuery('#niteoCS-unsplash-1').val();
80
+ cat = jQuery('#unsplash_banner select[name="unsplash_category"] option:selected').val();
81
+ custom_str = jQuery('#niteoCS-category-keyword').val();
82
+ break;
83
+
84
+ case '2':
85
+ unsp_url = jQuery('#niteoCS-unsplash-2').val();
86
+ break;
87
+
88
+ case '3':
89
+ unsp_url = jQuery('#niteoCS-unsplash-3').val();
90
+ if ( jQuery('#niteoCS_unsplash_feat' ).is( ':checked' ) ) {
91
+ cat = '1';
92
+ } else {
93
+ cat = '0';
94
+ }
95
+ break;
96
+
97
+ default:
98
+ // code block
99
+ }
100
+
101
+ var params = {feed: unsplash_feed, url: unsp_url, cat: cat, custom_str: custom_str};
102
+
103
+ jQuery(this).prop('disabled', true);
104
+ jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');
105
+ media_wrapper.html('');
106
+
107
+
108
+ var data = {
109
+ action: 'niteo_unsplash',
110
+ security: security,
111
+ params: params
112
+ };
113
+
114
+ $.post(ajaxurl, data, function(response) {
115
+ jQuery('#unsplash_img').remove();
116
+ img_url = response.replace('WIDTHxHEIGHT', '400x225');
117
+ jQuery('<img />', {src: img_url, id: 'unsplash_img'}).
118
+
119
+ one('load', function() { //Set something to run when it finishes loading
120
+ jQuery(this).appendTo(media_wrapper);
121
+ jQuery(this).fadeIn();
122
+ jQuery('#test-unsplash').prop('disabled', false);
123
+ jQuery('#test-unsplash').text('Test Unsplash');
124
+ });
125
+ });
126
+
127
+ });
128
+
129
 
130
  // script for logo upload
131
  var logoContainer = jQuery('.logo-wrapper');
579
  jQuery('.social-inputs .label').css('display', 'block');
580
  }
581
 
582
+
583
 
584
+ // theme update admin notice view release notes
585
  jQuery('.view-release').click(function(e) {
586
  e.preventDefault();
587
  $this = jQuery(this);
595
  });
596
  });
597
 
598
+ // theme update via admin notice
599
+ jQuery('.update-theme').click(function(e) {
600
+ e.preventDefault();
601
+ var $this = $(this),
602
+ $parent = $this.parents('.notice'),
603
+ security = $this.data('security'),
604
+ slug = $this.data('slug'),
605
+ type = $this.data('type'),
606
+ themeName = $parent.find('.theme-name').text(),
607
+ remoteUrl = jQuery(this).data('remote_url');
608
+ update = {
609
+ 'name': slug,
610
+ 'tmp_name': '',
611
+ 'type': type,
612
+ 'url': remoteUrl+'?action=download&slug='+slug,
613
+ }
614
+
615
+ var data = {
616
+ action: 'cmp_theme_update_install',
617
+ security: security,
618
+ file: update
619
+ };
620
+
621
+ $parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');
622
+
623
+ $.post(ajaxurl, data, function(response) {
624
+ if (response == 'success') {
625
+ setTimeout(function(){
626
+
627
+ $parent.removeClass('notice-warning').addClass('notice-success');
628
+ $parent.find('.message').html('<span> '+themeName+' Theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
629
+ }, 1500);
630
+
631
+ } else {
632
+ response = response.slice(0,-1);
633
+ var error = $('p', $(response)).text();
634
+ $parent.removeClass('notice-warning').addClass('notice-error');
635
+ $parent.find('.message').html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+error+'</span>');
636
+ }
637
+ });
638
+ });
639
+
640
+ // theme-selector scripts
641
+ // select theme by click on thumbnail or select button
642
+ jQuery('.theme-select').click(function(){
643
+ jQuery(this).parent().find('input[name="select_theme"]').prop("checked", true);
644
+ jQuery('.theme-select').removeClass('selected');
645
+ jQuery(this).parent().find('.theme-select').addClass('selected');
646
+ });
647
+
648
+
649
+ // theme update via theme button
650
+ jQuery('.theme-update.button').one('click',function(e) {
651
+ e.preventDefault();
652
+ var $this = $(this),
653
+ $wrapper = $this.closest('.theme-wrapper'),
654
+ security = $wrapper.data('security'),
655
+ slug = $wrapper.data('slug'),
656
+ type = $wrapper.data('type'),
657
+ remoteUrl = $wrapper.data('remote_url');
658
+
659
+ var update = {
660
+ 'name': slug,
661
+ 'tmp_name': '',
662
+ 'type': type,
663
+ 'url': remoteUrl+'?action=download&slug='+slug,
664
+ }
665
+
666
+ var data = {
667
+ action: 'cmp_theme_update_install',
668
+ security: security,
669
+ file: update
670
+ };
671
+
672
+ $this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');
673
+
674
+ $.post(ajaxurl, data, function(response) {
675
+ if (response == 'success') {
676
+ setTimeout(function(){
677
+ $this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');
678
+ setTimeout(function(){
679
+ $this.fadeOut();
680
+ }, 1500);
681
+ }, 1500);
682
+
683
+ } else {
684
+ response = response.slice(0,-1);
685
+ $this.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>');
686
+ }
687
+ });
688
+ });
689
+
690
+ // display theme details overlay
691
+ jQuery('.theme-details').click(function() {
692
+ var $this = $(this),
693
+ $wrapper = $this.closest('.theme-wrapper'),
694
+ slug = $wrapper.data('slug'),
695
+ version = $wrapper.data('version'),
696
+ remoteUrl = $wrapper.data('remote_url'),
697
+ type = $wrapper.data('type'),
698
+ purchased = $wrapper.data('purchased'),
699
+ noticeHtml = '',
700
+ security = jQuery('.update-theme').data('security'),
701
+ i = 1;
702
+
703
+
704
+ $.getJSON(remoteUrl+'?action=get_metadata&slug='+slug, function(data){
705
+ // overflow body hidden
706
+ jQuery('body').addClass('modal-open');
707
+
708
+
709
+ // if installed theme
710
+ if ( purchased == '1' ) {
711
+ // generate update notice
712
+ if ( version < data['version'] ) {
713
+ noticeHtml = '<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+data['name']+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+data['version']+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'&type='+type+'" class="update-theme" data-type="'+type+'" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>';
714
+ }
715
+ // generate up-to-date notice
716
+ if ( version == data['version'] ) {
717
+ noticeHtml = '<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';
718
+ }
719
+
720
+ var versionInfo = '<span class="theme-version">Version: '+version+'</span>';
721
+ var buttonDisabled = '';
722
+ var buyButton = '';
723
+
724
+ // not installed to purchase
725
+ } else {
726
+ var versionInfo = '';
727
+ var buttonDisabled = 'disabled ';
728
+ var buyURL = $wrapper.find('a').attr('href');
729
+ var buyButton = '<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Buy</a></button>';
730
+ }
731
+
732
+ // get screenshots JSON into object
733
+ var screenshots = $.parseJSON(data['details_url']);
734
+
735
+ var arrows = '';
736
+ // if we have more screenshots, generate navigation arrows
737
+ if (Object.keys(screenshots).length > 1) {
738
+ arrows = '<div class="screenshots-nav"><div class="left"><i class="fa fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fa fa-chevron-right" aria-hidden="true"></i></div></div>';
739
+ }
740
+
741
+ // generate html to append to theme-overlay
742
+ var html = $([
743
+ '<div class="theme-backdrop">',
744
+ ' <div class="theme-wrap">',
745
+ ' <div class="theme-header">',
746
+ ' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',
747
+ ' </div>',
748
+ ' <div class="theme-about">',
749
+ ' <div class="theme-screenshots">',
750
+ ' <div class="screenshot" style="background-image:url(\''+screenshots['1']+'\')">'+arrows+'</div>',
751
+ ' </div>',
752
+ ' <div class="theme-info">',
753
+ ' <h2 class="theme-name">'+data['name'] + versionInfo + '</h2>',
754
+ ' <p class="theme-author">By <a href="'+data['author_homepage']+'">'+data['author']+'</a></p>',
755
+ noticeHtml,
756
+ ' <div class="theme-description">'+data['description']+'</div>',
757
+ buyButton,
758
+ ' </div>',
759
+ ' </div>',
760
+ ' <div class="theme-actions">',
761
+ ' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+data['name']+'">Activate</button>',
762
+ ' <a href="http://cmp.niteo.cz/?cmp_preview=true&theme='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+data['name']+'">Live Preview</a>',
763
+ ' </div>',
764
+ ' </div>',
765
+ '</div>',
766
+ ].join("\n"));
767
+
768
+ // append html to overlay
769
+ jQuery('.theme-overlay.cmp').append(html);
770
+
771
+ // attach view-release handler
772
+ jQuery('.theme-overlay.cmp .view-release').click(function(e) {
773
+ e.preventDefault();
774
+ $this = jQuery(this);
775
+ var release_url = $this.attr('href');
776
+ jQuery.get(release_url, function( release ) {
777
+ $this.closest('.notice').find('.release-note .notes').remove();
778
+ $this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>');
779
+ }).fail(function() {
780
+ $this.closest('.notice').find('.release-note p').remove();
781
+ $this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>');
782
+ });
783
+ });
784
+
785
+ // attach close button handler
786
+ jQuery('.theme-overlay.cmp .close').click(function(e) {
787
+ e.preventDefault();
788
+ // overflow body hidden
789
+ jQuery('body').removeClass('modal-open');
790
+ jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast');
791
+ });
792
+
793
+ // attach select theme handler
794
+ jQuery('.theme-overlay.cmp .activate').click(function(e) {
795
+ e.preventDefault();
796
+ // select theme
797
+ jQuery('input[name="select_theme"]').each(function() {
798
+ if ( jQuery(this).val() == slug ) {
799
+ jQuery(this).prop('checked', true);
800
+ jQuery('.theme-select').removeClass('selected');
801
+ jQuery(this).parent().addClass('selected');
802
+ }
803
+ });
804
+
805
+ jQuery( '#csoptions' ).submit();
806
+ });
807
+
808
+ // attach arrows navigation handler
809
+ jQuery('.screenshots-nav .right').click(function() {
810
+ i++;
811
+
812
+ if (i > Object.keys(screenshots).length) {
813
+ i = 1;
814
+ }
815
+
816
+ if ((i in screenshots)) {
817
+ jQuery('.screenshot').css('background-image', 'url(\''+screenshots[i]+'\')');
818
+ }
819
+ });
820
+
821
+ // attach arrows navigation handler
822
+ jQuery('.screenshots-nav .left').click(function() {
823
+ i--;
824
+
825
+ if (i < 1) {
826
+ i = Object.keys(screenshots).length;
827
+ }
828
+
829
+ if ((i in screenshots)) {
830
+ jQuery('.screenshot').css('background-image', 'url(\''+screenshots[i]+'\')');
831
+ }
832
+ });
833
+ });
834
+
835
+ });
836
 
837
  });
838
 
comingsoon.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){function e(a){return(a+"").replace(/^([a-z])|\s+([a-z])/g,function(a){return a.toUpperCase()})}function f(a){return(a+"").toLowerCase()}navtab=function(a){jQuery(".nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+a).addClass("nav-tab-active"),!jQuery(".table-wrapper.content.slider").length||0!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()&&1!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery(".table-wrapper."+a+":not(.slider)").css("display","block"),jQuery(".comingsoon."+a+":not(.slider)").css("display","block")):(jQuery(".table-wrapper."+a).css("display","block"),jQuery(".comingsoon."+a).css("display","block")),jQuery(".table-wrapper:not(."+a+")").css("display","none"),jQuery(".comingsoon:not(."+a+")").css("display","none"),"install"==a?jQuery(".submit").css("display","none"):jQuery(".submit").css("display","block")};var b=document.location.hash.substring(1);""!=b&&navtab(b),window.onhashchange=function(){b=document.location.hash.substring(1),navtab(b)},a(".nav-tab:not(.theme-preview)").click(function(c){c.preventDefault(),b=a(this).data("tab"),document.location.hash=b});var c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+c).css("display","block"),jQuery('#unsplash_banner select[name="unsplash_feed"]').on("change",function(){c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+c).css("display","block")});var d=jQuery(".logo-wrapper");""!=jQuery("#niteoCS-logo-id").val()&&(jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block")),jQuery("#add-logo").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Logo",button:{text:"Insert Logo"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();jQuery(".logo-wrapper").empty(),d.append('<img src="'+a.url+'" alt="" style="max-width:588px"/>'),jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block"),jQuery("#niteoCS-logo-id").val(a.id)}).open()}),jQuery("#delete-logo").click(function(a){jQuery(".logo-wrapper").empty(),jQuery("#add-logo").val("Select Logo"),jQuery(this).css("display","none"),jQuery("#niteoCS-logo-id").val("")}),""!=jQuery("#niteoCS-banner-id").val()&&jQuery("#delete-banner").css("display","block"),jQuery("#add-banner").click(function(a){var b=jQuery(".banner-wrapper:not(.default)");if(a.preventDefault(),c)return void c.open();var c=wp.media({title:"Select Photos",button:{text:"Insert Photos"},multiple:!0,type:"image"}).on("select",function(){var a=c.state().get("selection").toJSON(),d="";a.length>0&&(b.empty(),jQuery(a).each(function(c){b.append('<img src="'+a[c].sizes.large.url+'" alt="" style="max-width:588px;"/>'),jQuery("#delete-banner").css("display","block"),d+=(0===c?"":",")+a[c].id}),jQuery("#niteoCS-banner-id").val(d))}).open()}),jQuery("#delete-banner").click(function(a){jQuery(".banner-wrapper:not(.default)").empty(),jQuery(this).css("display","none"),jQuery("#niteoCS-banner-id").val("")}),jQuery('#csoptions input[name="niteoCS_banner"]').change(function(){switch(jQuery('#csoptions input[name="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;default:jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none")}}),jQuery('#csoptions input[name="niteoCS_banner"]').trigger("change"),jQuery("#niteoCS_banner_color").wpColorPicker({change:function(a,b){jQuery(".color-preview").css("background-color",b.color.toString())}}),jQuery('select[name="niteoCS_banner_pattern"]').on("change",function(){var a=jQuery('select[name="niteoCS_banner_pattern"] option:selected').val();if("custom"!=a){var b=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-preview").css("background-image","url('"+b+a+".png')")}else{var b=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-preview").css("background-image","url('"+b+"')")}}),jQuery("#add-pattern").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Pattern",button:{text:"Select Pattern"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();if(jQuery(".pattern-preview").css("background-image",""),void 0===a.sizes.large)var c=a.url;else var c=a.sizes.large.url;jQuery(".pattern-preview").css("background-image","url('"+c+"')"),jQuery("#niteoCS_banner_pattern_custom").val(a.url)}).open()}),1==jQuery("#niteoCS_subscribe").prop("checked")&&jQuery(".subscribe").css("display","block"),jQuery("#niteoCS_subscribe").change(function(){jQuery(this)[0].checked?jQuery(".subscribe").css("display","block"):jQuery(".subscribe").css("display","none")}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block"))}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger("change"),jQuery("#csv-generate").click(function(b){b.preventDefault(),jQuery("#csv-download").length&&jQuery("#csv-download").remove(),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"niteo_export_csv"},success:function(b){b=b.slice(0,-1);var c=a("<a />",{id:"csv-download",href:"data:text/plain;charset=UTF-8,"+encodeURIComponent(b),text:"Download CSV",download:"subscriber_list.csv"});jQuery("#subscribe-niteo").append(c)}})});var g="",h="";g="custom"==jQuery('select[name="niteoCS_font_headings"] option:selected').val()?e(f(jQuery("#niteoCS_font_headings_custom").val())):jQuery('select[name="niteoCS_font_headings"] option:selected').val(),h="custom"==jQuery('select[name="niteoCS_font_content"] option:selected').val()?e(f(jQuery("#niteoCS_font_content_custom").val())):jQuery('select[name="niteoCS_font_content"] option:selected').val(),WebFont.load({google:{families:[e(f(g)),e(f(h))]},active:function(){a("#heading-example").css("font-family",g),a("#content-example").css("font-family",h)}}),jQuery('select[name="niteoCS_font_headings"]').on("change",function(){niteoCS_font_headings=jQuery('select[name="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:[e(f(jQuery("#niteoCS_font_headings_custom").val()))]},active:function(){a("#heading-example").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(){a("#heading-example").css("font-family",niteoCS_font_headings||"")}}))}),jQuery('select[name="niteoCS_font_content"]').on("change",function(){niteoCS_font_content=jQuery('select[name="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:[e(f(jQuery("#niteoCS_font_content_custom").val()))]},active:function(){a("#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(){a("#content-example").css("font-family",niteoCS_font_content||"")}}))});var i=function(b,c,d){var e=a("#niteoCS_socialmedia").attr("value");e=a.parseJSON(e),a.each(e,function(a,e){e.name==b&&(e[c]=d)}),a("#niteoCS_socialmedia").attr("value",JSON.stringify(e))},j=a(".social-inputs"),k=function(b,c){var d=j.find('input[type="text"]');c.item.index();d.each(function(b,c){var d=a(c).data("name");i(d,"order",b)})};j.sortable({stop:k}),j.on("sortchange",k),function(a){a.fn.toggleDisabled=function(){return this.each(function(){var c,b=a(this),d=b.data("name");b.attr("disabled")?(b.prop("disabled",!1),c="1"):(b.prop("disabled",!0),c="0"),i(d,"active",c)})}}(jQuery),jQuery('.social-inputs input[type="text"]').focusout(function(){var a=jQuery(this).data("name"),b=jQuery(this).attr("value");i(a,"url",b)}),jQuery('.social-inputs input[type="checkbox"]').click(function(b){a(this).siblings('input[type="text"]').toggleDisabled()}),jQuery(".social-media i").click(function(){var a=jQuery(this).data("name");jQuery(this).toggleClass("active"),jQuery(".social-inputs li."+a).toggleClass("active"),jQuery(this).hasClass("active")?i(a,"hidden","0"):i(a,"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(a){a.preventDefault(),$this=jQuery(this);var b=$this.attr("href");jQuery.get(b,function(a){$this.closest(".notice").find(".release-note .notes").remove(),$this.closest(".notice").find(".release-note").append('<div class="notes">'+a+"</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>")})})});
1
+ jQuery(document).ready(function(a){function e(a){return(a+"").replace(/^([a-z])|\s+([a-z])/g,function(a){return a.toUpperCase()})}function f(a){return(a+"").toLowerCase()}navtab=function(a){jQuery(".nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+a).addClass("nav-tab-active"),!jQuery(".table-wrapper.content.slider").length||0!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()&&1!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery(".table-wrapper."+a+":not(.slider)").css("display","block"),jQuery(".comingsoon."+a+":not(.slider)").css("display","block")):(jQuery(".table-wrapper."+a).css("display","block"),jQuery(".comingsoon."+a).css("display","block")),jQuery(".table-wrapper:not(."+a+")").css("display","none"),jQuery(".comingsoon:not(."+a+")").css("display","none"),"install"==a?jQuery(".submit").css("display","none"):jQuery(".submit").css("display","block")};var b=document.location.hash.substring(1);""!=b&&navtab(b),window.onhashchange=function(){b=document.location.hash.substring(1),navtab(b)},a(".nav-tab:not(.theme-preview)").click(function(c){c.preventDefault(),b=a(this).data("tab"),document.location.hash=b});var c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+c).css("display","block"),jQuery('#unsplash_banner select[name="unsplash_feed"]').on("change",function(){c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+c).css("display","block"),0==c?jQuery(".table-wrapper.slider input, .table-wrapper.slider select").prop("disabled",!0):jQuery(".table-wrapper.slider input, .table-wrapper.slider select").prop("disabled",!1)}),jQuery('#unsplash_banner select[name="unsplash_feed"]').trigger("change"),jQuery("#test-unsplash").click(function(b){b.preventDefault();var c=jQuery("#unsplash-media"),d=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val(),e="",f="",g="",h=jQuery(this).data("security");switch(d){case"0":e=jQuery("#niteoCS-unsplash-0").val();break;case"1":e=jQuery("#niteoCS-unsplash-1").val(),f=jQuery('#unsplash_banner select[name="unsplash_category"] option:selected').val(),g=jQuery("#niteoCS-category-keyword").val();break;case"2":e=jQuery("#niteoCS-unsplash-2").val();break;case"3":e=jQuery("#niteoCS-unsplash-3").val(),f=jQuery("#niteoCS_unsplash_feat").is(":checked")?"1":"0"}var i={feed:d,url:e,cat:f,custom_str:g};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>'),c.html("");var j={action:"niteo_unsplash",security:h,params:i};a.post(ajaxurl,j,function(a){jQuery("#unsplash_img").remove(),img_url=a.replace("WIDTHxHEIGHT","400x225"),jQuery("<img />",{src:img_url,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(c),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Test Unsplash")})})});var d=jQuery(".logo-wrapper");""!=jQuery("#niteoCS-logo-id").val()&&(jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block")),jQuery("#add-logo").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Logo",button:{text:"Insert Logo"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();jQuery(".logo-wrapper").empty(),d.append('<img src="'+a.url+'" alt="" style="max-width:588px"/>'),jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block"),jQuery("#niteoCS-logo-id").val(a.id)}).open()}),jQuery("#delete-logo").click(function(a){jQuery(".logo-wrapper").empty(),jQuery("#add-logo").val("Select Logo"),jQuery(this).css("display","none"),jQuery("#niteoCS-logo-id").val("")}),""!=jQuery("#niteoCS-banner-id").val()&&jQuery("#delete-banner").css("display","block"),jQuery("#add-banner").click(function(a){var b=jQuery(".banner-wrapper:not(.default)");if(a.preventDefault(),c)return void c.open();var c=wp.media({title:"Select Photos",button:{text:"Insert Photos"},multiple:!0,type:"image"}).on("select",function(){var a=c.state().get("selection").toJSON(),d="";a.length>0&&(b.empty(),jQuery(a).each(function(c){b.append('<img src="'+a[c].sizes.large.url+'" alt="" style="max-width:588px;"/>'),jQuery("#delete-banner").css("display","block"),d+=(0===c?"":",")+a[c].id}),jQuery("#niteoCS-banner-id").val(d))}).open()}),jQuery("#delete-banner").click(function(a){jQuery(".banner-wrapper:not(.default)").empty(),jQuery(this).css("display","none"),jQuery("#niteoCS-banner-id").val("")}),jQuery('#csoptions input[name="niteoCS_banner"]').change(function(){switch(jQuery('#csoptions input[name="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;default:jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none")}}),jQuery('#csoptions input[name="niteoCS_banner"]').trigger("change"),jQuery("#niteoCS_banner_color").wpColorPicker({change:function(a,b){jQuery(".color-preview").css("background-color",b.color.toString())}}),jQuery('select[name="niteoCS_banner_pattern"]').on("change",function(){var a=jQuery('select[name="niteoCS_banner_pattern"] option:selected').val();if("custom"!=a){var b=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-preview").css("background-image","url('"+b+a+".png')")}else{var b=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-preview").css("background-image","url('"+b+"')")}}),jQuery("#add-pattern").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Pattern",button:{text:"Select Pattern"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();if(jQuery(".pattern-preview").css("background-image",""),void 0===a.sizes.large)var c=a.url;else var c=a.sizes.large.url;jQuery(".pattern-preview").css("background-image","url('"+c+"')"),jQuery("#niteoCS_banner_pattern_custom").val(a.url)}).open()}),1==jQuery("#niteoCS_subscribe").prop("checked")&&jQuery(".subscribe").css("display","block"),jQuery("#niteoCS_subscribe").change(function(){jQuery(this)[0].checked?jQuery(".subscribe").css("display","block"):jQuery(".subscribe").css("display","none")}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block"))}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger("change"),jQuery("#csv-generate").click(function(b){b.preventDefault(),jQuery("#csv-download").length&&jQuery("#csv-download").remove(),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"niteo_export_csv"},success:function(b){b=b.slice(0,-1);var c=a("<a />",{id:"csv-download",href:"data:text/plain;charset=UTF-8,"+encodeURIComponent(b),text:"Download CSV",download:"subscriber_list.csv"});jQuery("#subscribe-niteo").append(c)}})});var g="",h="";g="custom"==jQuery('select[name="niteoCS_font_headings"] option:selected').val()?e(f(jQuery("#niteoCS_font_headings_custom").val())):jQuery('select[name="niteoCS_font_headings"] option:selected').val(),h="custom"==jQuery('select[name="niteoCS_font_content"] option:selected').val()?e(f(jQuery("#niteoCS_font_content_custom").val())):jQuery('select[name="niteoCS_font_content"] option:selected').val(),WebFont.load({google:{families:[e(f(g)),e(f(h))]},active:function(){a("#heading-example").css("font-family",g),a("#content-example").css("font-family",h)}}),jQuery('select[name="niteoCS_font_headings"]').on("change",function(){niteoCS_font_headings=jQuery('select[name="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:[e(f(jQuery("#niteoCS_font_headings_custom").val()))]},active:function(){a("#heading-example").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(){a("#heading-example").css("font-family",niteoCS_font_headings||"")}}))}),jQuery('select[name="niteoCS_font_content"]').on("change",function(){niteoCS_font_content=jQuery('select[name="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:[e(f(jQuery("#niteoCS_font_content_custom").val()))]},active:function(){a("#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(){a("#content-example").css("font-family",niteoCS_font_content||"")}}))});var i=function(b,c,d){var e=a("#niteoCS_socialmedia").attr("value");e=a.parseJSON(e),a.each(e,function(a,e){e.name==b&&(e[c]=d)}),a("#niteoCS_socialmedia").attr("value",JSON.stringify(e))},j=a(".social-inputs"),k=function(b,c){var d=j.find('input[type="text"]');c.item.index();d.each(function(b,c){var d=a(c).data("name");i(d,"order",b)})};j.sortable({stop:k}),j.on("sortchange",k),function(a){a.fn.toggleDisabled=function(){return this.each(function(){var c,b=a(this),d=b.data("name");b.attr("disabled")?(b.prop("disabled",!1),c="1"):(b.prop("disabled",!0),c="0"),i(d,"active",c)})}}(jQuery),jQuery('.social-inputs input[type="text"]').focusout(function(){var a=jQuery(this).data("name"),b=jQuery(this).attr("value");i(a,"url",b)}),jQuery('.social-inputs input[type="checkbox"]').click(function(b){a(this).siblings('input[type="text"]').toggleDisabled()}),jQuery(".social-media i").click(function(){var a=jQuery(this).data("name");jQuery(this).toggleClass("active"),jQuery(".social-inputs li."+a).toggleClass("active"),jQuery(this).hasClass("active")?i(a,"hidden","0"):i(a,"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(a){a.preventDefault(),$this=jQuery(this);var b=$this.attr("href");jQuery.get(b,function(a){$this.closest(".notice").find(".release-note .notes").remove(),$this.closest(".notice").find(".release-note").append('<div class="notes">'+a+"</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(b){b.preventDefault();var c=a(this),d=c.parents(".notice"),e=c.data("security"),f=c.data("slug"),g=c.data("type"),h=d.find(".theme-name").text(),i=jQuery(this).data("remote_url");update={name:f,tmp_name:"",type:g,url:i+"?action=download&slug="+f};var j={action:"cmp_theme_update_install",security:e,file:update};d.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>'),a.post(ajaxurl,j,function(b){if("success"==b)setTimeout(function(){d.removeClass("notice-warning").addClass("notice-success"),d.find(".message").html("<span> "+h+' Theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500);else{b=b.slice(0,-1);var c=a("p",a(b)).text();d.removeClass("notice-warning").addClass("notice-error"),d.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+c+"</span>")}})}),jQuery(".theme-select").click(function(){jQuery(this).parent().find('input[name="select_theme"]').prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().find(".theme-select").addClass("selected")}),jQuery(".theme-update.button").one("click",function(b){b.preventDefault();var c=a(this),d=c.closest(".theme-wrapper"),e=d.data("security"),f=d.data("slug"),g=d.data("type"),h=d.data("remote_url"),i={name:f,tmp_name:"",type:g,url:h+"?action=download&slug="+f},j={action:"cmp_theme_update_install",security:e,file:i};c.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),a.post(ajaxurl,j,function(a){"success"==a?setTimeout(function(){c.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){c.fadeOut()},1500)},1500):(a=a.slice(0,-1),c.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".theme-details").click(function(){var b=a(this),c=b.closest(".theme-wrapper"),d=c.data("slug"),e=c.data("version"),f=c.data("remote_url"),g=c.data("type"),h=c.data("purchased"),i="",j=jQuery(".update-theme").data("security"),k=1;a.getJSON(f+"?action=get_metadata&slug="+d,function(l){if(jQuery("body").addClass("modal-open"),"1"==h){e<l.version&&(i='<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="'+f+"readme/"+d+'-readme.php" class="view-release">View update '+l.version+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+d+"&type="+g+'" class="update-theme" data-type="'+g+'" data-security="'+j+'" data-slug="'+d+'" data-remote_url="'+f+'">Update now.</a></strong></p><div class="release-note"></div></div>'),e==l.version&&(i='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>');var m='<span class="theme-version">Version: '+e+"</span>",n="",o=""}else var m="",n="disabled ",p=c.find("a").attr("href"),o='<button type="button" class="theme-purchase button hide"><a href="'+p+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Buy</a></button>';var q=a.parseJSON(l.details_url),r="";Object.keys(q).length>1&&(r='<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 s=a(['<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(\''+q[1]+"')\">"+r+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+l.name+m+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+l.author_homepage+'">'+l.author+"</a></p>",i,'\t\t\t\t<div class="theme-description">'+l.description+"</div>",o,"\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<button type="submit" '+n+'class="button activate" name="Submit" aria-label="Select '+l.name+'">Activate</button>','\t\t\t<a href="http://cmp.niteo.cz/?cmp_preview=true&theme='+d+'" 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(s),jQuery(".theme-overlay.cmp .view-release").click(function(a){a.preventDefault(),b=jQuery(this);var c=b.attr("href");jQuery.get(c,function(a){b.closest(".notice").find(".release-note .notes").remove(),b.closest(".notice").find(".release-note").append('<div class="notes">'+a+"</div>")}).fail(function(){b.closest(".notice").find(".release-note p").remove(),b.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(a){a.preventDefault(),jQuery("body").removeClass("modal-open"),jQuery(".theme-overlay.cmp .theme-backdrop").fadeOut("fast")}),jQuery(".theme-overlay.cmp .activate").click(function(a){a.preventDefault(),jQuery('input[name="select_theme"]').each(function(){jQuery(this).val()==d&&(jQuery(this).prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().addClass("selected"))}),jQuery("#csoptions").submit()}),jQuery(".screenshots-nav .right").click(function(){k++,k>Object.keys(q).length&&(k=1),k in q&&jQuery(".screenshot").css("background-image","url('"+q[k]+"')")}),jQuery(".screenshots-nav .left").click(function(){k--,k<1&&(k=Object.keys(q).length),k in q&&jQuery(".screenshot").css("background-image","url('"+q[k]+"')")})})})});
cs_admin.css CHANGED
@@ -1 +1,6 @@
1
- #wpadminbar ul li#wp-admin-bar-cs-admin-notice{background:red;}
 
 
 
 
 
1
+ #wpadminbar ul li#wp-admin-bar-cs-admin-notice.maintenance{background:#e74c3c;}
2
+ #wpadminbar ul li#wp-admin-bar-cs-admin-notice.maintenance a:hover{background:#c0392b;color:#ffffff;}
3
+ #wpadminbar ul li#wp-admin-bar-cs-admin-notice.coming-soon{background:#46b450;}
4
+ #wpadminbar ul li#wp-admin-bar-cs-admin-notice.coming-soon a:hover{background:#59dc64;color:#ffffff;}
5
+ #wpadminbar ul li#wp-admin-bar-cs-admin-notice.coming-soon a,
6
+ #wpadminbar ul li#wp-admin-bar-cs-admin-notice.maintenance a {color:#ffffff;}
cs_style.css CHANGED
@@ -25,6 +25,10 @@ input[type="text"], textarea{width:100%;}
25
  width: 90%;
26
  }
27
 
 
 
 
 
28
  .table-wrapper select {
29
  margin-bottom: 10px;
30
  width: 100%;
@@ -87,7 +91,6 @@ input[type="text"], textarea{width:100%;}
87
  .social-inputs input[type=checkbox]:checked:before {margin: 3px 0 0 1px;}
88
 
89
 
90
-
91
  th label {font-weight: 600;}
92
  #unsplash_img{display: none;}
93
  #unsplash-media{padding-top: 1em;}
@@ -109,11 +112,253 @@ th label {font-weight: 600;}
109
  .table-wrapper table{padding:1em;}
110
  .logo-wrapper, .banner-wrapper {margin: 1em 0;}
111
  .logo-wrapper img {background-color: #efefef;padding:1em;}
112
- .logo-wrapper img, .banner-wrapper img,.thumbnail-holder img {max-width: 100%;}
113
  .logo-wrapper img {max-height: 150px;}
114
- .thumbnail-holder {display: inline-block;max-width: 250px;padding:1em;margin:1em;text-align: center;border: 1px solid #efefef;}
115
  #font-example-wrapper {padding:1em;border:1px solid #dedede;}
116
  #heading-example {padding-left: 0;border-bottom:none;}
117
  #custom_headings_font,
118
  #custom_content_font {display:none;}
119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  width: 90%;
26
  }
27
 
28
+ .table-wrapper .theme-selector {
29
+ width: 100%;
30
+ }
31
+
32
  .table-wrapper select {
33
  margin-bottom: 10px;
34
  width: 100%;
91
  .social-inputs input[type=checkbox]:checked:before {margin: 3px 0 0 1px;}
92
 
93
 
 
94
  th label {font-weight: 600;}
95
  #unsplash_img{display: none;}
96
  #unsplash-media{padding-top: 1em;}
112
  .table-wrapper table{padding:1em;}
113
  .logo-wrapper, .banner-wrapper {margin: 1em 0;}
114
  .logo-wrapper img {background-color: #efefef;padding:1em;}
115
+ .logo-wrapper img, .banner-wrapper img{max-width: 100%;}
116
  .logo-wrapper img {max-height: 150px;}
117
+
118
  #font-example-wrapper {padding:1em;border:1px solid #dedede;}
119
  #heading-example {padding-left: 0;border-bottom:none;}
120
  #custom_headings_font,
121
  #custom_content_font {display:none;}
122
 
123
+ .theme-wrapper {
124
+ display: inline-block;
125
+ padding: 0.5em;
126
+ margin: 2em 2em 2em 0;
127
+ width: calc(33.33% - 3em - 5px);
128
+ text-align: center;
129
+ border: 1px solid #efefef;
130
+ border-radius: 6px;
131
+ }
132
+
133
+ .theme-wrapper.active {
134
+ background-color: #effffc;
135
+ }
136
+
137
+ .thumbnail-holder {
138
+ position: relative;
139
+ width: 100%;
140
+ margin-bottom: 2em;
141
+ background-repeat: no-repeat;
142
+ background-size: cover;
143
+ background-position: center;
144
+ border-top-left-radius: 5px;
145
+ border-top-right-radius: 5px;
146
+ }
147
+
148
+ .thumbnail-holder::before {
149
+ content: '';
150
+ display: block;
151
+ padding-top: 56.25%;
152
+ }
153
+
154
+ .theme-title {
155
+ float: left;
156
+ text-transform: uppercase;
157
+ font-weight: 600;
158
+ }
159
+
160
+ .theme-version {
161
+ float: right;
162
+ }
163
+
164
+
165
+ .theme-wrapper .hide:not(.selected) {
166
+ opacity: 0;
167
+ transition: opacity 300ms, background-color 500ms
168
+ }
169
+
170
+
171
+ .theme-wrapper .hide.activated,
172
+ .theme-wrapper:hover .hide {
173
+ opacity: 1;
174
+ transition: opacity 300ms, background-color 500ms
175
+ }
176
+
177
+ .theme-inputs {
178
+ clear: both;
179
+ border-top: 1px solid #efefef;
180
+ padding-top: .5em;
181
+ }
182
+
183
+ .theme-wrapper .button,
184
+ .cmp-button,
185
+ .cmp-preview {
186
+ height: 28px;
187
+ line-height: 28px;
188
+ padding: 0 10px;
189
+ border-radius: 3px;
190
+ color: #ffffff!important;
191
+ -moz-appearance: none;
192
+ -webkit-appearance: none;
193
+ transition: background-color .5s;
194
+ border: none!important;
195
+ -webkit-box-shadow: none;
196
+ box-shadow: none;
197
+ -webkit-box-shadow: none;
198
+ text-shadow: none;
199
+ }
200
+
201
+ .cmp-button.submit,
202
+ .theme-actions .activate {
203
+ background-color: #c0392b;
204
+ color: #fff;
205
+ border: none;
206
+ transition: background-color .5s;
207
+ }
208
+
209
+ .cmp-button.submit:hover,
210
+ .cmp-button.submit:focus,
211
+ .theme-actions .activate:hover,
212
+ .theme-actions .activate:focus {
213
+ background-color: #e74c3c;
214
+ color: #fff;
215
+ border: none;
216
+ }
217
+
218
+ .theme-wrapper .button:hover {
219
+ border: none;
220
+ color: #ffffff!important;
221
+ }
222
+
223
+ .theme-wrapper .theme-select,
224
+ .theme-wrapper .theme-select {
225
+ float: left;
226
+ background-color: #16a085;
227
+ }
228
+
229
+ .theme-wrapper .theme-select:hover,
230
+ .theme-wrapper .theme-select:focus {
231
+ background-color: #1abc9c;
232
+ }
233
+
234
+ .theme-wrapper .theme-details.button {
235
+ float: right;
236
+ background-color: #2980b9;
237
+ }
238
+ .theme-wrapper .theme-details.button:hover,
239
+ .theme-wrapper .theme-details.button:focus {
240
+ background-color: #3498db;
241
+ }
242
+
243
+ .theme-wrapper .theme-update {
244
+ float: left;
245
+ margin: 0 5px;
246
+ background-color: #d35400;
247
+ }
248
+ .theme-wrapper .theme-update:hover,
249
+ .theme-wrapper .theme-update:focus {
250
+ background-color: #e67e22;
251
+ }
252
+
253
+ .theme-wrapper .theme-purchase {
254
+ float: left;
255
+ background-color: #2c3e50;
256
+ }
257
+
258
+ .cmp-preview {
259
+ background-color: #2485bf!important;
260
+ }
261
+
262
+ .theme-details {
263
+ cursor: pointer;
264
+ }
265
+
266
+ .cmp-preview:hover,
267
+ .cmp-preview:active {
268
+ background-color: #32b2ff!important;
269
+ }
270
+
271
+ .theme-info .theme-purchase {
272
+ width: 40%;
273
+ height: 55px;
274
+ font-size: 2em;
275
+ margin: 1em 0;
276
+ background-color: #2c3e50;
277
+ border: none;
278
+ }
279
+
280
+
281
+ .theme-wrapper .theme-purchase:hover,
282
+ .theme-wrapper .theme-purchase:focus,
283
+ .theme-info .theme-purchase:hover,
284
+ .theme-info .theme-purchase:focus {
285
+ background-color: #34495e;
286
+ }
287
+
288
+
289
+
290
+ .button i {
291
+ margin-right: 5px;
292
+ }
293
+
294
+ .theme-purchase a {
295
+ color: #ffffff;
296
+ text-decoration: none;
297
+ }
298
+
299
+
300
+ p.cmp-submit {
301
+ text-align: left;
302
+ margin-top: 0;
303
+ padding-top: 0;
304
+ margin-left: 1em;
305
+ }
306
+
307
+
308
+ .theme-overlay .screenshot {
309
+ position: relative;
310
+ background-size: cover;
311
+ background-repeat: no-repeat;
312
+ background-position: center;
313
+ -webkit-transition: background-image 0.2s ease-in-out;
314
+ transition: background-image 0.2s ease-in-out;
315
+ }
316
+
317
+ .theme-overlay .screenshots-nav {
318
+ position: absolute;
319
+ right: 0;
320
+ top: 0;
321
+ color: #ffffff;
322
+ cursor: pointer;
323
+
324
+ }
325
+
326
+ .theme-overlay .screenshots-nav div{
327
+ width: 40px;
328
+ height: 40px;
329
+ background-color: black;
330
+ line-height: 40px;
331
+ opacity: .7;
332
+ transition: opacity 500ms;
333
+ }
334
+
335
+ .theme-overlay .screenshots-nav div:hover {
336
+ opacity: 1;
337
+ }
338
+
339
+ .theme-overlay .screenshots-nav .left {
340
+ float: left;
341
+ }
342
+ .theme-overlay .screenshots-nav .right {
343
+ float: right;
344
+ }
345
+
346
+ .theme-description ul {
347
+ list-style: initial;
348
+ padding-left: 2em;
349
+ }
350
+
351
+ .theme-description h4,
352
+ .theme-description li {
353
+ font-size: 13px;
354
+ }
355
+
356
+ @media screen and (max-width: 1024px) {
357
+ .theme-wrapper { width: calc(50% - 3em - 5px);}
358
+ }
359
+ @media screen and (max-width: 600px) {
360
+ .theme-wrapper { margin-right:0;width: calc(100% - 5px);}
361
+ }
362
+
363
+
364
+
img/patterns/fabric_1.png ADDED
Binary file
img/patterns/gray_sand.png CHANGED
Binary file
img/patterns/green_dust_scratch.png CHANGED
Binary file
img/patterns/mirrored_squares.png CHANGED
Binary file
img/patterns/noisy.png CHANGED
Binary file
img/patterns/photography.png CHANGED
Binary file
img/patterns/white_sand.png CHANGED
Binary file
img/patterns/white_texture.png CHANGED
Binary file
niteo-cmp.php CHANGED
@@ -3,10 +3,10 @@
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.6.0
7
  Author: NiteoThemes
8
  Author URI: http://www.niteo.cz
9
- Text Domain: cmp
10
  Domain Path: /languages
11
  License: GPL-2.0+
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -20,14 +20,19 @@ class niteo_cmp {
20
  var $remoteServer = '';
21
  var $theme_array = array();
22
  var $premium_installed = array();
 
23
 
24
  function __construct() {
25
- $this->version = '1.6.0';
26
  $this->dev = false;
27
  $this->installedFolder = basename(dirname(__FILE__));
28
-
 
 
 
29
  // get all installed themes [folder names under /themes] and put them to array
30
  $this->themes_standard = array_map('basename', glob( plugin_dir_path( __FILE__ ) . 'themes/*', GLOB_ONLYDIR));
 
31
  // check for installed premium themes
32
  if ( file_exists(plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/') ) {
33
  $this->premium_installed = array_map('basename', glob( plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/*', GLOB_ONLYDIR));
@@ -35,15 +40,8 @@ class niteo_cmp {
35
  } else {
36
  $this->theme_array = $this->themes_standard;
37
  }
38
- $this->remoteServer = $this->dev ? 'http://niteo.cz/updates-test/' : 'http://niteo.cz/niteo-updates/';
39
- // set default settings, if theme is not yet set
40
- if ( !get_option('niteoCS_theme') ) {
41
- // set defaults
42
- update_option('niteoCS_banner', '4');
43
- update_option('niteoCS_banner_color', '#ffffff');
44
- update_option('niteoCS_overlay_checkbox[hardwork]', 'false');
45
- update_option('niteoCS_font_color[hardwork]', '#696969');
46
- }
47
  }
48
 
49
  function cmp() {
@@ -161,7 +159,7 @@ class niteo_cmp {
161
  if ( !is_user_logged_in() ) {
162
 
163
  // check for themes with countdown timer
164
- if ( in_array($this->cmp_selectedTheme(), $this->cmp_plugin_countdown_themes()) ){
165
  // if counter is enabled
166
  if ( get_option('niteoCS_counter', '1') == '1' ) {
167
  // if date is set
@@ -228,7 +226,11 @@ class niteo_cmp {
228
 
229
  // check selected theme
230
  function cmp_selectedTheme() {
231
- return get_option('niteoCS_theme', 'hardwork');
 
 
 
 
232
  }
233
 
234
  // return installed theme path
@@ -258,12 +260,14 @@ class niteo_cmp {
258
  global $wp_admin_bar;
259
 
260
  $status = $this->cmp_status();
261
-
262
  $msg= '';
263
  if ( $status == '1' ){
264
- $msg = __('Maintenance Mode Active','cmp');
 
265
  } elseif( $status == '2' ){
266
- $msg = __('Coming Soon Mode Active','cmp');
 
267
  }
268
  //Add the main siteadmin menu item
269
  $wp_admin_bar->add_menu( array(
@@ -271,7 +275,7 @@ class niteo_cmp {
271
  'href' => admin_url().'options-general.php?page=cmp-settings',
272
  'parent' => 'top-secondary',
273
  'title' => $msg,
274
- 'meta' => array( 'class' => 'coming-soon-notice' ),
275
  ) );
276
  }
277
 
@@ -372,10 +376,12 @@ class niteo_cmp {
372
 
373
  // if remote version is bigger than current, display info about new version
374
  if ((float)$remote_version > (float)$current_version) {
375
-
 
 
376
  // if admin screen is not in updating theme
377
  if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
378
- $transient = '<div class="notice notice-warning is-dismissible"><p class="message">'.__('There is a new version of ', 'cmp').'<span class="theme-name">'.esc_attr(ucwords(str_replace('_', ' ', $theme_slug))).'</span> '.__('Theme available.', 'cmp').' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.html" class="view-release">'.__('View release update notes','cmp').'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-slug="'.esc_attr($theme_slug).'" data-remote_url="'.esc_url($this->remoteServer).'">'.__('Update now.','cmp').'</a></p><div class="release-note"></div></div>';
379
  // set transient with 24 hour expire
380
  set_transient( $theme_slug.'_updatecheck', $transient, 60*60*24 );
381
  echo $transient;
@@ -388,13 +394,13 @@ class niteo_cmp {
388
  } else {
389
  // set transient no update available with 12 hours expire
390
  set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
391
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error from remote server: ','cmp').wp_remote_retrieve_response_code($request).' '.__('while checking for','cmp').' '.esc_attr(ucwords(str_replace('_', ' ', $theme_slug))).' '.__('Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp').'</p></div>';
392
  }
393
 
394
  } else {
395
  // set transient no update available with 12 hours expire
396
  set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
397
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error: Internal server error:','cmp').' '.$request->get_error_message().' '.__('while checking for Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp').'</p></div>';
398
 
399
  }
400
  }
@@ -444,16 +450,16 @@ class niteo_cmp {
444
  wp_delete_file( $source_path );
445
  $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
446
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
447
- echo '<div class="notice notice-success is-dismissible"><p class="message">'.ucwords(str_replace('_', ' ', $theme_name)).' '.__(' theme was successfully installed!', 'cmp').'</p></div>';
448
  return;
449
 
450
  } else {
451
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp').'</p></div>';
452
  return;
453
  }
454
 
455
  } else {
456
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp').'</p></div>';
457
  return;
458
  }
459
 
@@ -466,7 +472,7 @@ class niteo_cmp {
466
  return;
467
  }
468
  } else {
469
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Unable to upload new Theme file .', 'cmp'). strtoupper($filetype['ext']) .__(' file extension is not supported. Please upload ZIP file containing CMP Theme.', 'cmp').'</p></div>';
470
  return;
471
  }
472
 
@@ -529,7 +535,7 @@ class niteo_cmp {
529
  // add it to all installed themes array
530
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
531
  // reply response
532
- echo $ajax ? 'success' : '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp').'</p></div>';
533
  // set transient no update available with 24 hours expire
534
  set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
535
  // die
@@ -540,7 +546,7 @@ class niteo_cmp {
540
  }
541
 
542
  } else {
543
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp').'</p></div>';
544
  if ($ajax === true) {
545
  wp_die();
546
  } else {
@@ -549,7 +555,7 @@ class niteo_cmp {
549
  }
550
 
551
  } else {
552
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp').'</p></div>';
553
  if ($ajax === true) {
554
  wp_die();
555
  } else {
@@ -558,7 +564,7 @@ class niteo_cmp {
558
  }
559
 
560
  } else {
561
- echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp').' '.$file['tmp_name']->get_error_message().'</p></div>';
562
  if ($ajax === true) {
563
  wp_die();
564
  } else {
@@ -567,7 +573,7 @@ class niteo_cmp {
567
  }
568
  } else {
569
 
570
- echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp').'</p></div>';
571
  if ($ajax === true) {
572
  wp_die();
573
  } else {
@@ -577,14 +583,8 @@ class niteo_cmp {
577
 
578
  }
579
 
580
- // returns list of with countdown
581
- function cmp_plugin_countdown_themes() {
582
- $counter_themes = array('frame');
583
- return $counter_themes;
584
- }
585
-
586
  function cmp_textDomain() {
587
- load_plugin_textdomain( 'cmp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
588
  }
589
 
590
  // unsplash api
@@ -712,7 +712,7 @@ class niteo_cmp {
712
  $new_email = array('timestamp' => $time, 'email' => $email);
713
  array_push( $subscribe_list, $new_email );
714
  update_option( 'niteoCS_subscribers_list', $subscribe_list );
715
- $response = __('Thank you, your sign-up request was successful!', 'cmp');
716
 
717
  } else {
718
  // check if email don`t already exists
@@ -720,15 +720,15 @@ class niteo_cmp {
720
  $new_email = array('timestamp' => $time, 'email' => $email);
721
  array_push( $subscribe_list, $new_email );
722
  update_option('niteoCS_subscribers_list', $subscribe_list);
723
- $response = __('Thank you, your sign-up request was successful!', 'cmp');
724
  // if it exists return failed response
725
  } else {
726
- $response = __('This email address has already been on our subscriber list.', 'cmp');
727
  }
728
  }
729
 
730
  } else {
731
- $response = __('Please insert valid email.', 'cmp');
732
  }
733
 
734
  return $response;
@@ -850,19 +850,23 @@ class niteo_cmp {
850
 
851
  }
852
 
 
853
  function isMobile() {
854
  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"]);
855
  }
856
 
 
857
  function sanitize_checkbox( $input ) {
858
- return ( ( isset( $input ) && true == $input ) ? true : false );
859
  }
860
 
 
861
  function niteo_sanitize_html( $html ) {
862
  global $allowedposttags;
863
  return wp_kses( $html, $allowedposttags );
864
  }
865
 
 
866
  function sort_social($a, $b){
867
  if ( $a['hidden'] == $b['hidden'] ) {
868
  if( $a['order'] == $b['order'] ) {
@@ -874,19 +878,28 @@ class niteo_cmp {
874
  }
875
  }
876
 
 
 
 
 
 
 
 
 
 
 
 
 
877
  function cmp_admin_notice () {
878
 
879
  if ( isset($_GET['page']) && $_GET['page'] == 'cmp-settings' ) {
880
  if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
881
  $status = 'success';
882
- $message = __('Settings Saved', 'cmp');
883
 
884
  echo '<div class="notice notice-'.$status.' is-dismissible"><p>'.$message.'.</p></div>';
885
  }
886
-
887
-
888
  }
889
-
890
  return;
891
  }
892
 
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.0
7
  Author: NiteoThemes
8
  Author URI: http://www.niteo.cz
9
+ Text Domain: cmp-coming-soon-maintenance
10
  Domain Path: /languages
11
  License: GPL-2.0+
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20
  var $remoteServer = '';
21
  var $theme_array = array();
22
  var $premium_installed = array();
23
+ var $countdown_themes = array();
24
 
25
  function __construct() {
26
+ $this->version = '1.7.0';
27
  $this->dev = false;
28
  $this->installedFolder = basename(dirname(__FILE__));
29
+
30
+ // set array of themes with countdown
31
+ $this->countdown_themes = array('frame', 'countdown');
32
+
33
  // get all installed themes [folder names under /themes] and put them to array
34
  $this->themes_standard = array_map('basename', glob( plugin_dir_path( __FILE__ ) . 'themes/*', GLOB_ONLYDIR));
35
+
36
  // check for installed premium themes
37
  if ( file_exists(plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/') ) {
38
  $this->premium_installed = array_map('basename', glob( plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/*', GLOB_ONLYDIR));
40
  } else {
41
  $this->theme_array = $this->themes_standard;
42
  }
43
+ // set remote server URL for updates
44
+ $this->remoteServer = ($this->dev == true) ? 'http://niteo.cz/updates-test/' : 'http://niteo.cz/niteo-updates/';
 
 
 
 
 
 
 
45
  }
46
 
47
  function cmp() {
159
  if ( !is_user_logged_in() ) {
160
 
161
  // check for themes with countdown timer
162
+ if ( in_array($this->cmp_selectedTheme(), $this->countdown_themes) ){
163
  // if counter is enabled
164
  if ( get_option('niteoCS_counter', '1') == '1' ) {
165
  // if date is set
226
 
227
  // check selected theme
228
  function cmp_selectedTheme() {
229
+ if ( !get_option('niteoCS_theme') ) { //if it's not set yet
230
+ update_option('niteoCS_theme', 'hardwork'); //set it
231
+ }
232
+
233
+ return get_option('niteoCS_theme');
234
  }
235
 
236
  // return installed theme path
260
  global $wp_admin_bar;
261
 
262
  $status = $this->cmp_status();
263
+ $class = '';
264
  $msg= '';
265
  if ( $status == '1' ){
266
+ $msg = __('Maintenance Mode Active','cmp-coming-soon-maintenance');
267
+ $class = ' maintenance';
268
  } elseif( $status == '2' ){
269
+ $msg = __('Coming Soon Mode Active','cmp-coming-soon-maintenance');
270
+ $class = ' coming-soon';
271
  }
272
  //Add the main siteadmin menu item
273
  $wp_admin_bar->add_menu( array(
275
  'href' => admin_url().'options-general.php?page=cmp-settings',
276
  'parent' => 'top-secondary',
277
  'title' => $msg,
278
+ 'meta' => array( 'class' => 'coming-soon-notice'.$class ),
279
  ) );
280
  }
281
 
376
 
377
  // if remote version is bigger than current, display info about new version
378
  if ((float)$remote_version > (float)$current_version) {
379
+ $title = ucwords(str_replace('_', ' ', $theme_slug));
380
+ // create nonce
381
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
382
  // if admin screen is not in updating theme
383
  if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
384
+ $transient = '<div class="notice notice-warning is-dismissible"><p class="message">'.sprintf(__('There is a new version of %s theme available.', 'cmp-coming-soon-maintenance'), $title).' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('View update %s notes','cmp-coming-soon-maintenance'), $remote_version).'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-remote_url="'.esc_url($this->remoteServer).'">'.__('Update now.','cmp-coming-soon-maintenance').'</a></p><div class="release-note"></div></div>';
385
  // set transient with 24 hour expire
386
  set_transient( $theme_slug.'_updatecheck', $transient, 60*60*24 );
387
  echo $transient;
394
  } else {
395
  // set transient no update available with 12 hours expire
396
  set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
397
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error from remote server: ','cmp-coming-soon-maintenance').wp_remote_retrieve_response_code($request).' '.__('while checking for','cmp-coming-soon-maintenance').' '.esc_attr(ucwords(str_replace('_', ' ', $theme_slug))).' '.__('Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp-coming-soon-maintenance').'</p></div>';
398
  }
399
 
400
  } else {
401
  // set transient no update available with 12 hours expire
402
  set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
403
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error: Internal server error:','cmp-coming-soon-maintenance').' '.$request->get_error_message().' '.__('while checking for Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp-coming-soon-maintenance').'</p></div>';
404
 
405
  }
406
  }
450
  wp_delete_file( $source_path );
451
  $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
452
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
453
+ echo '<div class="notice notice-success is-dismissible"><p class="message">'.ucwords(str_replace('_', ' ', $theme_name)).' '.__(' theme was successfully installed!', 'cmp-coming-soon-maintenance').'</p></div>';
454
  return;
455
 
456
  } else {
457
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
458
  return;
459
  }
460
 
461
  } else {
462
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
463
  return;
464
  }
465
 
472
  return;
473
  }
474
  } else {
475
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Unable to upload new Theme file .', 'cmp-coming-soon-maintenance'). strtoupper($filetype['ext']) .__(' file extension is not supported. Please upload ZIP file containing CMP Theme.', 'cmp-coming-soon-maintenance').'</p></div>';
476
  return;
477
  }
478
 
535
  // add it to all installed themes array
536
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
537
  // reply response
538
+ echo $ajax ? 'success' : '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp-coming-soon-maintenance').'</p></div>';
539
  // set transient no update available with 24 hours expire
540
  set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
541
  // die
546
  }
547
 
548
  } else {
549
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
550
  if ($ajax === true) {
551
  wp_die();
552
  } else {
555
  }
556
 
557
  } else {
558
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
559
  if ($ajax === true) {
560
  wp_die();
561
  } else {
564
  }
565
 
566
  } else {
567
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp-coming-soon-maintenance').' '.$file['tmp_name']->get_error_message().'</p></div>';
568
  if ($ajax === true) {
569
  wp_die();
570
  } else {
573
  }
574
  } else {
575
 
576
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
577
  if ($ajax === true) {
578
  wp_die();
579
  } else {
583
 
584
  }
585
 
 
 
 
 
 
 
586
  function cmp_textDomain() {
587
+ load_plugin_textdomain( 'cmp-coming-soon-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
588
  }
589
 
590
  // unsplash api
712
  $new_email = array('timestamp' => $time, 'email' => $email);
713
  array_push( $subscribe_list, $new_email );
714
  update_option( 'niteoCS_subscribers_list', $subscribe_list );
715
+ $response = __('Thank you, your sign-up request was successful!', 'cmp-coming-soon-maintenance');
716
 
717
  } else {
718
  // check if email don`t already exists
720
  $new_email = array('timestamp' => $time, 'email' => $email);
721
  array_push( $subscribe_list, $new_email );
722
  update_option('niteoCS_subscribers_list', $subscribe_list);
723
+ $response = __('Thank you, your sign-up request was successful!', 'cmp-coming-soon-maintenance');
724
  // if it exists return failed response
725
  } else {
726
+ $response = __('This email address has already been on our subscriber list.', 'cmp-coming-soon-maintenance');
727
  }
728
  }
729
 
730
  } else {
731
+ $response = __('Please insert valid email.', 'cmp-coming-soon-maintenance');
732
  }
733
 
734
  return $response;
850
 
851
  }
852
 
853
+ // check if mobile
854
  function isMobile() {
855
  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"]);
856
  }
857
 
858
+ // sanitize function
859
  function sanitize_checkbox( $input ) {
860
+ return ( ( isset( $input ) && true == $input ) ? '1' : '0' );
861
  }
862
 
863
+ // sanitize function
864
  function niteo_sanitize_html( $html ) {
865
  global $allowedposttags;
866
  return wp_kses( $html, $allowedposttags );
867
  }
868
 
869
+ // function to sort social icons
870
  function sort_social($a, $b){
871
  if ( $a['hidden'] == $b['hidden'] ) {
872
  if( $a['order'] == $b['order'] ) {
878
  }
879
  }
880
 
881
+ // function to shift multidimensional array
882
+ function customShift($array, $name){
883
+ // var_dump($array);
884
+ foreach($array as $key => $val){ // loop all elements
885
+ if($val['name'] == $name){ // check for id $id
886
+ unset($array[$key]); // unset the $array with id $id
887
+ array_unshift($array, $val); // unshift the array with $val to push in the beginning of array
888
+ return $array; // return new $array
889
+ }
890
+ }
891
+ }
892
+
893
  function cmp_admin_notice () {
894
 
895
  if ( isset($_GET['page']) && $_GET['page'] == 'cmp-settings' ) {
896
  if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
897
  $status = 'success';
898
+ $message = __('Settings Saved', 'cmp-coming-soon-maintenance');
899
 
900
  echo '<div class="notice notice-'.$status.' is-dismissible"><p>'.$message.'.</p></div>';
901
  }
 
 
902
  }
 
903
  return;
904
  }
905
 
readme.txt CHANGED
@@ -4,42 +4,38 @@ 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.7.4
7
- Stable tag: 1.6.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Create and customize your own landing page for Coming soon Page or Maintenance mode including subscribe form with ease of few mouse clicks.
12
 
13
  == Description ==
14
 
15
- Free plugin to create and customize your own Coming Soon or Maintenance landing page. Setup custom logos, background graphics, texts, subscribe form, your social networks, fonts and colors, and many more.
16
 
17
  <h3>Preview</h3>
18
  <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=construct" target="_blank">Click for preview of Construct Theme >></a><br>
19
-
20
- <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork" target="_blank">Click for preview of Hardwork Theme >></a><br>
21
-
22
- <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=countdown" target="_blank">Click for preview of Countdown Theme >></a><br>
23
-
24
- <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork_premium" target="_blank">Click for preview of Hardwork Premium Theme >></a><br>
25
-
26
- <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=frame" target="_blank">Click for preview of Frame Theme >></a><br>
27
-
28
- <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=fifty" target="_blank">Click for preview of Fifty Theme >></a><br>
29
 
30
  <h3>Features</h3>
31
  <ul>
32
- <li>Works with any WordPress Theme as Landing page to not logged-in visitors of your page</li>
33
- <li>Works on all devices, 100% responsive and Retina ready</li>
34
- <li>Insert Custom Logo and content vith Wordpress Rich Editor</li>
35
- <li>Customize colors and choose from hundreds of Google Fonts</li>
36
- <li>Setup custom Social Icons from all social networks</li>
37
- <li>Display our custom Subscribe form with .csv export or you can insert any 3rd party plugin(Mailchimp, etc) Subscribe form.</li>
38
- <li>Browse and Display random hi-res images from <a href="http://unsplash.com" target="_blank">Unsplash source</a> with built-in search API or you can use custom photos for backgrounds.</li>
39
- <li>Customize SEO meta tags for search engines</li>
40
- <li>Set response code (200, 503) for search engines</li>
 
41
  <li>Insert Google Analytics Code</li>
42
  <li>Insert Custom CSS</li>
 
43
  <li>Extandable by downloadable Themes.</li>
44
  <li>Translation Ready</li>
45
  </ul>
@@ -59,7 +55,7 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
59
  <ul>
60
  <li>Navigate to the 'Add New' in the plugins dashboard</li>
61
  <li>Navigate to the 'Upload' area</li>
62
- <li>Download <code>comingsoon.zip</code> and select <code>comingsoon.zip</code> from your directory</li>
63
  <li>Click 'Install Now'</li>
64
  <li>Activate the plugin in the Plugin dashboard</li>
65
  <li>To Setup click Settings->CMP Settings and change the settings there</li>
@@ -68,10 +64,16 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
68
 
69
  == Screenshots ==
70
  1. CMP - Coming Soon Construct Theme
71
- 2. CMP - Maintenance Hardwork Theme
72
  3. CMP - Settings Page Overview
73
- 4. CMP - Settings Page Detail
74
- 5. CMP - Settings Page Unsplash Detail
 
 
 
 
 
 
75
 
76
  == Frequently Asked Questions ==
77
  <h4>I can't see the landing page I`ve just created!</h4>
@@ -94,6 +96,15 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
94
 
95
 
96
  == Changelog ==
 
 
 
 
 
 
 
 
 
97
  <h4>1.6.0</h4>
98
  <ul>
99
  <li>New free theme: Countdown</li>
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.7.4
7
+ Stable tag: 1.7.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ New and free Wordpress plugin to create customized Coming Soon, Maintenance or Welcome landing pages.
12
 
13
  == Description ==
14
 
15
+ CMP is new and free Wordpress plugin to create customized Coming Soon, Maintenance or Welcome landing page. Insert custom logo, choose from thousands of free hi-res stock Unsplash images, patterns, or just simply use custom media, edit your own texts, insert subscribe form, social network icons, customize colors and fonts types and SEO meta.
16
 
17
  <h3>Preview</h3>
18
  <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=construct" target="_blank">Click for preview of Construct Theme >></a><br>
19
+ <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork" target="_blank">Click for preview of Hardwork Theme >></a>
20
+ <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork_premium" target="_blank">Click for preview of Hardwork Premium Theme >></a>
21
+ <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=frame" target="_blank">Click for preview of Frame Theme >></a>
22
+ <a href="http://cmp.niteo.cz/?cmp_preview=true&theme=fifty" target="_blank">Click for preview of Fifty Theme >></a>
 
 
 
 
 
 
23
 
24
  <h3>Features</h3>
25
  <ul>
26
+ <li>Works with any WordPress Theme</li>
27
+ <li>Responsive and Retina ready</li>
28
+ <li>Works on all devices</li>
29
+ <li>Setup custom Social Icons</li>
30
+ <li>Customize Logo, Fonts and Colors</li>
31
+ <li>Subscribe form works with any 3rd party plugin(Mailchimp, etc)</li>
32
+ <li>Custom Subscribe form to store emails in custom database with export to csv</li>
33
+ <li>Select and Display random beautiful images from <a href="http://unsplash.com" target="_blank">Unsplash source</a> with built-in search API or use custom photos</li>
34
+ <li>Customize SEO meta tags to search engines</li>
35
+ <li>Set response code to search engines</li>
36
  <li>Insert Google Analytics Code</li>
37
  <li>Insert Custom CSS</li>
38
+ <li>Uses HTML5 & CSS3</li>
39
  <li>Extandable by downloadable Themes.</li>
40
  <li>Translation Ready</li>
41
  </ul>
55
  <ul>
56
  <li>Navigate to the 'Add New' in the plugins dashboard</li>
57
  <li>Navigate to the 'Upload' area</li>
58
+ <li>Download <code>cmp-coming-soon-maintenance.zip</code> and select <code>cmp-coming-soon-maintenance.zip</code> from your directory</li>
59
  <li>Click 'Install Now'</li>
60
  <li>Activate the plugin in the Plugin dashboard</li>
61
  <li>To Setup click Settings->CMP Settings and change the settings there</li>
64
 
65
  == Screenshots ==
66
  1. CMP - Coming Soon Construct Theme
67
+ 2. CMP - Render Design
68
  3. CMP - Settings Page Overview
69
+ 4. CMP - Settings Page Unsplash Detail
70
+ 5. CMP - Coming Soon Construct Theme
71
+ 6. CMP - Coming Soon Countdown Theme
72
+ 7. CMP - Coming Soon Premium Fifty Theme
73
+ 8. CMP - Coming Soon Premium Fifty Theme
74
+ 9. CMP - Coming Soon Premium Frame Theme
75
+ 10. CMP - Coming Soon Hardwork Theme
76
+ 11. CMP - Coming Soon Hardwork Premium Theme
77
 
78
  == Frequently Asked Questions ==
79
  <h4>I can't see the landing page I`ve just created!</h4>
96
 
97
 
98
  == Changelog ==
99
+ <h4>1.7.0</h4>
100
+ <ul>
101
+ <li>Completely redesigned Theme Selector. You can now see Theme version, See Preview, display more photos, etc.</li>
102
+ <li>Added Save Button to each section to enhance user experience.</li>
103
+ <li>Changed order of some settings panels to bring more important settings to top of Settings page.</li>
104
+ <li>Updated all Themes to reflect new settings and updated Theme`s style.css with some minor design changes.</li>
105
+ <li>Updated Text Domain for International translations</li>
106
+ </ul>
107
+
108
  <h4>1.6.0</h4>
109
  <ul>
110
  <li>New free theme: Countdown</li>
themes/construct/construct-settings.php CHANGED
@@ -34,19 +34,19 @@ if ( isset($_POST['niteoCS_background_color_construct']) ) {
34
  ?>
35
 
36
  <div class="table-wrapper content">
37
- <h3><?php _e('Customize Colors', 'cmp');?></h3>
38
  <table class="content">
39
  <tr>
40
- <th><h4><?php _e('Active Color', 'cmp');?></h4></th>
41
  <td>
42
  <fieldset>
43
  <input type="text" name="niteoCS_active_color_construct" id="niteoCS_active_color" value="<?php echo esc_attr( $niteoCS_active_color); ?>" data-default-color="#f37004" class="regular-text code"><br>
44
- <span><?php _e('Headings and active elements color (buttons, hover links, etc).', 'cmp');?></span>
45
  </fieldset>
46
  </td>
47
  </tr>
48
  <tr>
49
- <th><h4><?php _e('Font Color', 'cmp');?></h4></th>
50
  <td>
51
  <fieldset>
52
  <input type="text" name="niteoCS_font_color_construct" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#686868" class="regular-text code"><br>
@@ -54,7 +54,7 @@ if ( isset($_POST['niteoCS_background_color_construct']) ) {
54
  </td>
55
  </tr>
56
  <tr>
57
- <th><h4><?php _e('Background Color', 'cmp');?></h4></th>
58
  <td>
59
  <fieldset>
60
  <input type="text" name="niteoCS_background_color_construct" id="niteoCS_background_color" value="<?php echo esc_attr( $niteoCS_background_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
@@ -62,6 +62,10 @@ if ( isset($_POST['niteoCS_background_color_construct']) ) {
62
  </td>
63
  </tr>
64
  </table>
 
 
 
 
65
  </div>
66
 
67
  <script>
34
  ?>
35
 
36
  <div class="table-wrapper content">
37
+ <h3><?php _e('Customize Colors', 'cmp-coming-soon-maintenance');?></h3>
38
  <table class="content">
39
  <tr>
40
+ <th><h4><?php _e('Active Color', 'cmp-coming-soon-maintenance');?></h4></th>
41
  <td>
42
  <fieldset>
43
  <input type="text" name="niteoCS_active_color_construct" id="niteoCS_active_color" value="<?php echo esc_attr( $niteoCS_active_color); ?>" data-default-color="#f37004" class="regular-text code"><br>
44
+ <span><?php _e('Headings and active elements color (buttons, hover links, etc).', 'cmp-coming-soon-maintenance');?></span>
45
  </fieldset>
46
  </td>
47
  </tr>
48
  <tr>
49
+ <th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
50
  <td>
51
  <fieldset>
52
  <input type="text" name="niteoCS_font_color_construct" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#686868" class="regular-text code"><br>
54
  </td>
55
  </tr>
56
  <tr>
57
+ <th><h4><?php _e('Background Color', 'cmp-coming-soon-maintenance');?></h4></th>
58
  <td>
59
  <fieldset>
60
  <input type="text" name="niteoCS_background_color_construct" id="niteoCS_background_color" value="<?php echo esc_attr( $niteoCS_background_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
62
  </td>
63
  </tr>
64
  </table>
65
+ <p class="cmp-submit">
66
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
67
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
68
+ </p>
69
  </div>
70
 
71
  <script>
themes/construct/construct-theme.php CHANGED
@@ -17,7 +17,7 @@
17
 
18
  <?php
19
  // get saved style options
20
- $ver = '1.6';
21
  $active_color = get_option('niteoCS_active_color[construct]', '#f37004');
22
  $font_color = get_option('niteoCS_font_color[construct]', '#686868');
23
  $background_color = get_option('niteoCS_background_color[construct]', '#ffffff');
17
 
18
  <?php
19
  // get saved style options
20
+ $ver = '1.7';
21
  $active_color = get_option('niteoCS_active_color[construct]', '#f37004');
22
  $font_color = get_option('niteoCS_font_color[construct]', '#686868');
23
  $background_color = get_option('niteoCS_background_color[construct]', '#ffffff');
themes/construct/style.css CHANGED
@@ -3,9 +3,9 @@ Theme Name: Construct
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=construct
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
- Version: 1.6
7
- Description: Premium Theme for CMP Coming Soon & Maintenance plugin
8
- Text Domain: niteo
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/
@@ -48,7 +48,7 @@ h1,h2,h3,h4,h5,h6{font-weight: 400;font-size:2em;}
48
  .social-list li{list-style: none;display: inline-block; padding: 0 5px;}
49
  .section-body form{max-width: 400px;margin: 0 auto;margin-top: 70px;margin-bottom: 30px;text-align:left;}
50
  .section-body form br {display: none;}
51
- label {display: block;}
52
  input[type="email"] {width:280px;background-color: #f8f8f8;text-indent: 15px;font-style: italic;border: 1px solid #dcdcdc; border-top-left-radius:5px;border-bottom-left-radius:5px;}
53
  input[type="submit"] {padding: 0;margin-left:-7px;width: 120px;color: white;font-weight:700;border: none;border-top-right-radius:5px;border-bottom-right-radius:5px;letter-spacing: 1px;cursor:pointer;}
54
  input[type="email"],
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=construct
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
+ Version: 1.7
7
+ Details URI: {"1": "http:\/\/niteo.cz\/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/
48
  .social-list li{list-style: none;display: inline-block; padding: 0 5px;}
49
  .section-body form{max-width: 400px;margin: 0 auto;margin-top: 70px;margin-bottom: 30px;text-align:left;}
50
  .section-body form br {display: none;}
51
+ label {display: block;padding-bottom: 5px;}
52
  input[type="email"] {width:280px;background-color: #f8f8f8;text-indent: 15px;font-style: italic;border: 1px solid #dcdcdc; border-top-left-radius:5px;border-bottom-left-radius:5px;}
53
  input[type="submit"] {padding: 0;margin-left:-7px;width: 120px;color: white;font-weight:700;border: none;border-top-right-radius:5px;border-bottom-right-radius:5px;letter-spacing: 1px;cursor:pointer;}
54
  input[type="email"],
themes/countdown/countdown-settings.php CHANGED
@@ -127,6 +127,10 @@ $niteoCS_countdown_redirect = get_option('niteoCS_countdown_redirect');
127
  </td>
128
  </tr>
129
  </table>
 
 
 
 
130
  </div>
131
 
132
  <div class="table-wrapper content">
@@ -165,6 +169,10 @@ $niteoCS_countdown_redirect = get_option('niteoCS_countdown_redirect');
165
  </td>
166
  </tr>
167
  </table>
 
 
 
 
168
  </div>
169
 
170
 
@@ -210,8 +218,13 @@ jQuery(document).ready(function($){
210
  var currentValue = jQuery('#current-opacity');
211
 
212
  jQuery('#niteoCS_overlay_opacity').change(function(){
213
- currentValue.html(this.value);
 
 
 
 
214
  });
 
215
  <?php
216
  if ( $niteoCS_counter_date != '') { ?>
217
  var date = new Date(<?php echo esc_attr($niteoCS_counter_date);?>*1000);
127
  </td>
128
  </tr>
129
  </table>
130
+ <p class="cmp-submit">
131
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
132
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
133
+ </p>
134
  </div>
135
 
136
  <div class="table-wrapper content">
169
  </td>
170
  </tr>
171
  </table>
172
+ <p class="cmp-submit">
173
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
174
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
175
+ </p>
176
  </div>
177
 
178
 
218
  var currentValue = jQuery('#current-opacity');
219
 
220
  jQuery('#niteoCS_overlay_opacity').change(function(){
221
+ if (this.value == 0) {
222
+ currentValue.html(': disabled');
223
+ } else {
224
+ currentValue.html(': '+this.value);
225
+ }
226
  });
227
+
228
  <?php
229
  if ( $niteoCS_counter_date != '') { ?>
230
  var date = new Date(<?php echo esc_attr($niteoCS_counter_date);?>*1000);
themes/countdown/countdown-theme.php CHANGED
@@ -16,10 +16,10 @@
16
 
17
  <?php
18
  // get saved style options
19
- $ver = '1.1';
20
  $niteoCS_active_color = get_option('niteoCS_active_color[countdown]', '#e82e1e');
21
  $niteoCS_font_color = get_option('niteoCS_font_color[countdown]', '#3a3a3a');
22
- $niteoCS_font_color_light = $this->hex2hsl($niteoCS_font_color, '-30');
23
  $niteoCS_overlay_color = get_option('niteoCS_overlay_color[countdown]', '#0a0a0a');
24
  $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity[countdown]', '0.0');
25
  $background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
@@ -118,6 +118,9 @@
118
  .social-list.body a {background:rgba(255, 255, 255, 0.10);}
119
  input[type="submit"] {border:1px solid <?php echo esc_attr($niteoCS_font_color_light);?>;}
120
  <?php
 
 
 
121
  } ?>
122
  </style>
123
 
@@ -267,9 +270,13 @@
267
  } else { ?>
268
  <div id="background-image" class="<?php echo esc_attr($background_class);?>" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
269
  <?php
270
- } ?>
271
 
272
- <div class="background-overlay"></div>
 
 
 
 
273
 
274
  <div class="inner-content">
275
 
16
 
17
  <?php
18
  // get saved style options
19
+ $ver = '1.3';
20
  $niteoCS_active_color = get_option('niteoCS_active_color[countdown]', '#e82e1e');
21
  $niteoCS_font_color = get_option('niteoCS_font_color[countdown]', '#3a3a3a');
22
+ $niteoCS_font_color_light = $this->hex2hsl($niteoCS_font_color, '20');
23
  $niteoCS_overlay_color = get_option('niteoCS_overlay_color[countdown]', '#0a0a0a');
24
  $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity[countdown]', '0.0');
25
  $background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
118
  .social-list.body a {background:rgba(255, 255, 255, 0.10);}
119
  input[type="submit"] {border:1px solid <?php echo esc_attr($niteoCS_font_color_light);?>;}
120
  <?php
121
+ } else { ?>
122
+ .counter-wrap p {color:#494949;}
123
+ <?php
124
  } ?>
125
  </style>
126
 
270
  } else { ?>
271
  <div id="background-image" class="<?php echo esc_attr($background_class);?>" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
272
  <?php
273
+ }
274
 
275
+ if ($niteoCS_overlay_opacity != '0') { ?>
276
+
277
+ <div class="background-overlay"></div>
278
+ <?php
279
+ } ?>
280
 
281
  <div class="inner-content">
282
 
themes/countdown/img/fifty_thumbnail.jpg DELETED
Binary file
themes/countdown/style.css CHANGED
@@ -3,9 +3,10 @@ Theme Name: Countdown
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=countdown
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
- Version: 1.2
7
- Description: Premium Theme for CMP Coming Soon & Maintenance plugin
8
- Text Domain: niteo
 
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/
@@ -353,6 +354,7 @@ footer {
353
 
354
  .logo {
355
  padding: 30px 0;
 
356
  }
357
 
358
  .logo img {
@@ -570,6 +572,7 @@ input[type="submit"] {
570
  .counter-wrap span {font-size: 2em;}
571
  .counter-wrap {width: calc(25% - 17px);}
572
  .counter-wrap:not(:last-of-type) {margin-right: 15px;}
 
573
  }
574
 
575
  @media only screen and (max-width : 520px) {
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=countdown
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
+ Version: 1.3
7
+ Details URI: {"1": "http:\/\/niteo.cz\/cmp-screenshots\/countdown\/screenshot1.jpg","2":"http:\/\/niteo.cz\/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/
354
 
355
  .logo {
356
  padding: 30px 0;
357
+ padding-bottom: 80px;
358
  }
359
 
360
  .logo img {
572
  .counter-wrap span {font-size: 2em;}
573
  .counter-wrap {width: calc(25% - 17px);}
574
  .counter-wrap:not(:last-of-type) {margin-right: 15px;}
575
+ .logo {padding-bottom: 30px;}
576
  }
577
 
578
  @media only screen and (max-width : 520px) {
themes/hardwork/hardwork-settings.php CHANGED
@@ -8,10 +8,7 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
8
  }
9
  }
10
 
11
- // get options
12
- $niteoCS_font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
13
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color[hardwork]', '#0a0a0a');
14
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
15
 
16
 
17
  if (isset($_POST['niteoCS_font_color_hardwork'])) {
@@ -30,15 +27,10 @@ if (isset($_POST['niteoCS_overlay_opacity_hardwork'])) {
30
  $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity[hardwork]');
31
  }
32
 
33
- if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
34
-
35
- if (isset($_POST['niteoCS_overlay_checkbox_hardwork'])) {
36
- update_option('niteoCS_overlay_checkbox[hardwork]', $this->sanitize_checkbox($_POST['niteoCS_overlay_checkbox_hardwork']));
37
- } else {
38
- update_option('niteoCS_overlay_checkbox[hardwork]', false);
39
- }
40
-
41
- }
42
 
43
  ?>
44
 
@@ -49,11 +41,11 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
49
  </style>
50
 
51
  <div class="table-wrapper content">
52
- <h3><?php _e('Customize Colors', 'cmp');?></h3>
53
  <table class="content">
54
 
55
  <tr>
56
- <th><h4><?php _e('Font Color', 'cmp');?></h4></th>
57
  <td>
58
  <fieldset>
59
  <input type="text" name="niteoCS_font_color_hardwork" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
@@ -61,21 +53,21 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
61
  </td>
62
  </tr>
63
  <tr>
64
- <th><h4><?php _e('Overlay Color', 'cmp');?></h4></th>
65
  <td>
66
- <fieldset class="padding-bottom">
67
- <input type="checkbox" name="niteoCS_overlay_checkbox_hardwork" id="niteoCS_overlay_checkbox" value="1" <?php checked( '1', get_option( 'niteoCS_overlay_checkbox[hardwork]', '1' ) ); ?> class="regular-text code"><label for="niteoCS_overlay_checkbox"><?php _e('Enable Overlay Color', 'cmp');?></label><br>
68
- </fieldset>
69
-
70
  <fieldset id="overlay-color">
71
  <input type="text" name="niteoCS_overlay_color_hardwork" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
72
 
73
- <label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
74
- <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_countdown" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
75
  </fieldset>
76
  </td>
77
  </tr>
78
  </table>
 
 
 
 
79
  </div>
80
 
81
 
@@ -85,10 +77,6 @@ jQuery(document).ready(function($){
85
  jQuery('#niteoCS_font_color').wpColorPicker();
86
  jQuery('#niteoCS_overlay_color').wpColorPicker();
87
 
88
- // hide overlay color checkbox
89
- if ( jQuery('#niteoCS_overlay_checkbox').prop('checked') !== true) {
90
- jQuery('#overlay-color').css('display','none')
91
- }
92
  // hiding subscribe from on change
93
  jQuery('#niteoCS_overlay_checkbox').change(function() {
94
 
@@ -102,7 +90,11 @@ jQuery(document).ready(function($){
102
  var currentValue = jQuery('#current-opacity');
103
 
104
  jQuery('#niteoCS_overlay_opacity').change(function(){
105
- currentValue.html(this.value);
 
 
 
 
106
  });
107
 
108
  });
8
  }
9
  }
10
 
11
+
 
 
 
12
 
13
 
14
  if (isset($_POST['niteoCS_font_color_hardwork'])) {
27
  $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity[hardwork]');
28
  }
29
 
30
+ // get options
31
+ $niteoCS_font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
32
+ $niteoCS_overlay_color = get_option('niteoCS_overlay_color[hardwork]', '#0a0a0a');
33
+ $niteoCS_overlay_opacity_hardwork = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
 
 
 
 
 
34
 
35
  ?>
36
 
41
  </style>
42
 
43
  <div class="table-wrapper content">
44
+ <h3><?php _e('Customize Colors', 'cmp-coming-soon-maintenance');?></h3>
45
  <table class="content">
46
 
47
  <tr>
48
+ <th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
49
  <td>
50
  <fieldset>
51
  <input type="text" name="niteoCS_font_color_hardwork" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
53
  </td>
54
  </tr>
55
  <tr>
56
+ <th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
57
  <td>
 
 
 
 
58
  <fieldset id="overlay-color">
59
  <input type="text" name="niteoCS_overlay_color_hardwork" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
60
 
61
+ <label for="niteoCS_overlay_opacity_hardwork"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity_hardwork); ?></span></label><br>
62
+ <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_hardwork" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity_hardwork); ?>" />
63
  </fieldset>
64
  </td>
65
  </tr>
66
  </table>
67
+ <p class="cmp-submit">
68
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
69
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
70
+ </p>
71
  </div>
72
 
73
 
77
  jQuery('#niteoCS_font_color').wpColorPicker();
78
  jQuery('#niteoCS_overlay_color').wpColorPicker();
79
 
 
 
 
 
80
  // hiding subscribe from on change
81
  jQuery('#niteoCS_overlay_checkbox').change(function() {
82
 
90
  var currentValue = jQuery('#current-opacity');
91
 
92
  jQuery('#niteoCS_overlay_opacity').change(function(){
93
+ if (this.value == 0) {
94
+ currentValue.html(': disabled');
95
+ } else {
96
+ currentValue.html(': '+this.value);
97
+ }
98
  });
99
 
100
  });
themes/hardwork/hardwork-theme.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  <?php
13
  // get saved style options
14
- $ver = '1.7';
15
  $font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
16
  $background_color = get_option('niteoCS_overlay_color[hardwork]', '#000000');
17
  $background_opa = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
@@ -96,9 +96,9 @@
96
  body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
97
 
98
  <?php
99
- if ( get_option( 'niteoCS_overlay_checkbox[hardwork]', '1' ) == 1 ) { ?>
100
  #background-color {background-color:<?php echo esc_attr( $background_color ); ?>;opacity:<?php echo esc_attr( $background_opa ); ?>;}
101
- .social-list{background-color: <?php echo esc_attr( $background_social ); ?>;}
102
  <?php
103
  } ?>
104
  a{color:<?php echo esc_attr( $font_color ); ?>;}
11
 
12
  <?php
13
  // get saved style options
14
+ $ver = '1.8';
15
  $font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
16
  $background_color = get_option('niteoCS_overlay_color[hardwork]', '#000000');
17
  $background_opa = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
96
  body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
97
 
98
  <?php
99
+ if ( $background_opa != '0' ) { ?>
100
  #background-color {background-color:<?php echo esc_attr( $background_color ); ?>;opacity:<?php echo esc_attr( $background_opa ); ?>;}
101
+ .social-list{background-color: <?php echo $this->hex2rgba( esc_attr( $background_color ), 0.4);?>;}
102
  <?php
103
  } ?>
104
  a{color:<?php echo esc_attr( $font_color ); ?>;}
themes/hardwork/style.css CHANGED
@@ -3,9 +3,9 @@ Theme Name: Hardwork
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
- Version: 1.7
7
- Description: Premium Theme for CMP Coming Soon & Maintenance plugin
8
- Text Domain: niteo
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/
@@ -101,7 +101,7 @@ h1,h2,h3,h4,h5,h6{
101
  padding:0;
102
  margin-bottom: 0;
103
  border-radius: 10px;
104
- padding-bottom: 5px;
105
  }
106
 
107
  .social-list li{
@@ -126,13 +126,11 @@ h1,h2,h3,h4,h5,h6{
126
  -webkit-transition: all 300ms linear;
127
  -o-transition: all 300ms linear;
128
  transition: all 300ms linear;
129
- vertical-align: middle;
130
  }
131
  .social-list a:hover i {
132
  -webkit-animation: spin 300ms linear;
133
  -moz-animation: spin 300ms linear;
134
  animation: spin 300ms linear;
135
- color:#fff;
136
  }
137
 
138
 
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
+ Version: 1.8
7
+ Details URI: {"1": "http:\/\/niteo.cz\/cmp-screenshots\/hardwork\/screenshot1.jpg","2": "http:\/\/niteo.cz\/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/
101
  padding:0;
102
  margin-bottom: 0;
103
  border-radius: 10px;
104
+ margin-bottom: 5px;
105
  }
106
 
107
  .social-list li{
126
  -webkit-transition: all 300ms linear;
127
  -o-transition: all 300ms linear;
128
  transition: all 300ms linear;
 
129
  }
130
  .social-list a:hover i {
131
  -webkit-animation: spin 300ms linear;
132
  -moz-animation: spin 300ms linear;
133
  animation: spin 300ms linear;
 
134
  }
135
 
136
 
themes/hardwork_premium_thumbnail.jpg CHANGED
Binary file