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

Version Description

Download this release

Release Info

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

Code changes from version 2.3.1 to 2.4

cmp-advanced.php CHANGED
@@ -8,6 +8,8 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
8
  }
9
  }
10
 
 
 
11
  $pages = $this->cmp_get_pages();
12
 
13
 
@@ -15,6 +17,7 @@ if ( isset( $_POST['niteoCS_page_filter'] ) ) {
15
  update_option('niteoCS_page_filter', sanitize_text_field( $_POST['niteoCS_page_filter'] ));
16
  }
17
 
 
18
  if ( isset( $_POST['niteoCS_page-whitelist'] ) ) {
19
 
20
  $whitelist = $_POST['niteoCS_page-whitelist'];
@@ -38,6 +41,7 @@ if ( isset( $_POST['niteoCS_page-whitelist'] ) ) {
38
  update_option('niteoCS_page_whitelist', '[]');
39
  }
40
 
 
41
  if ( isset( $_POST['niteoCS_page-blacklist'] ) ) {
42
 
43
  $blacklist = $_POST['niteoCS_page-blacklist'];
@@ -61,6 +65,7 @@ if ( isset( $_POST['niteoCS_page-blacklist'] ) ) {
61
  update_option('niteoCS_page_blacklist', '[]');
62
  }
63
 
 
64
  if ( isset( $_POST['niteoCS_roles'] ) ) {
65
 
66
  $roles = $_POST['niteoCS_roles'];
@@ -77,20 +82,38 @@ if ( isset( $_POST['niteoCS_roles'] ) ) {
77
  }
78
 
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  $niteoCS_page_filter = get_option('niteoCS_page_filter', '0');
81
 
82
  $niteoCS_page_whitelist = json_decode(get_option('niteoCS_page_whitelist', '[]'), true);
83
 
84
  $niteoCS_page_blacklist = json_decode(get_option('niteoCS_page_blacklist', '[]'), true);
85
 
86
- $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
 
 
87
 
88
 
89
  ?>
90
 
91
  <div class="wrap">
92
 
93
-
94
  <div id="icon-users" class="icon32"></div>
95
 
96
  <form method="post" action="admin.php?page=cmp-advanced&status=settings-saved" id="csoptions">
@@ -168,12 +191,9 @@ $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
168
 
169
  </td>
170
  </tr>
171
- <tr><th>
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
- </th></tr>
177
  </tbody>
178
  </table>
179
 
@@ -185,7 +205,6 @@ $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
185
  <table class="general">
186
  <tbody>
187
  <tr>
188
-
189
  <th>
190
  <fieldset>
191
  <legend class="screen-reader-text">
@@ -193,7 +212,7 @@ $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
193
  </legend>
194
 
195
  <p>
196
- <h4><?php _e('User Roles', 'cmp-coming-soon-maintenance');?></h4>
197
  </p>
198
 
199
  </fieldset>
@@ -225,12 +244,47 @@ $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
225
  </td>
226
  </tr>
227
 
228
- <tr><th>
229
- <p class="cmp-submit">
230
- <?php wp_nonce_field('save_options','save_options_field'); ?>
231
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
232
- </p>
233
- </th></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  </tbody>
235
  </table>
236
 
8
  }
9
  }
10
 
11
+
12
+ // get all wp pages to array(id->name);
13
  $pages = $this->cmp_get_pages();
14
 
15
 
17
  update_option('niteoCS_page_filter', sanitize_text_field( $_POST['niteoCS_page_filter'] ));
18
  }
19
 
20
+ // update page whitelist if set
21
  if ( isset( $_POST['niteoCS_page-whitelist'] ) ) {
22
 
23
  $whitelist = $_POST['niteoCS_page-whitelist'];
41
  update_option('niteoCS_page_whitelist', '[]');
42
  }
43
 
44
+ // update page blacklist if set
45
  if ( isset( $_POST['niteoCS_page-blacklist'] ) ) {
46
 
47
  $blacklist = $_POST['niteoCS_page-blacklist'];
65
  update_option('niteoCS_page_blacklist', '[]');
66
  }
67
 
68
+ // update cmp bypass roles if set
69
  if ( isset( $_POST['niteoCS_roles'] ) ) {
70
 
71
  $roles = $_POST['niteoCS_roles'];
82
  }
83
 
84
 
85
+ // update cmp roles topbar access
86
+ if ( isset( $_POST['niteoCS_roles_topbar'] ) ) {
87
+
88
+ $roles = $_POST['niteoCS_roles_topbar'];
89
+ $sane = false;
90
+
91
+ foreach ( $roles as $id => $role ) {
92
+ $roles[$id] = sanitize_text_field($role);
93
+ }
94
+
95
+ update_option('niteoCS_roles_topbar', json_encode( $roles ));
96
+
97
+ } else if ($_SERVER['REQUEST_METHOD'] == 'POST' ){
98
+ update_option('niteoCS_roles_topbar', '[]');
99
+ }
100
+
101
  $niteoCS_page_filter = get_option('niteoCS_page_filter', '0');
102
 
103
  $niteoCS_page_whitelist = json_decode(get_option('niteoCS_page_whitelist', '[]'), true);
104
 
105
  $niteoCS_page_blacklist = json_decode(get_option('niteoCS_page_blacklist', '[]'), true);
106
 
107
+ $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
108
+
109
+ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), true);
110
 
111
 
112
  ?>
113
 
114
  <div class="wrap">
115
 
116
+ <h1></h1>
117
  <div id="icon-users" class="icon32"></div>
118
 
119
  <form method="post" action="admin.php?page=cmp-advanced&status=settings-saved" id="csoptions">
191
 
192
  </td>
193
  </tr>
194
+
195
+ <?php echo $this->render_settings->submit(); ?>
196
+
 
 
 
197
  </tbody>
198
  </table>
199
 
205
  <table class="general">
206
  <tbody>
207
  <tr>
 
208
  <th>
209
  <fieldset>
210
  <legend class="screen-reader-text">
212
  </legend>
213
 
214
  <p>
215
+ <h4><?php _e('Bypass User Roles', 'cmp-coming-soon-maintenance');?></h4>
216
  </p>
217
 
218
  </fieldset>
244
  </td>
245
  </tr>
246
 
247
+ <tr>
248
+ <th>
249
+ <fieldset>
250
+ <legend class="screen-reader-text">
251
+ <span><?php _e('Top Bar Switch Access', 'cmp-coming-soon-maintenance');?></span>
252
+ </legend>
253
+
254
+ <p>
255
+ <h4><?php _e('Top Bar Switch Access', 'cmp-coming-soon-maintenance');?></h4>
256
+ </p>
257
+
258
+ </fieldset>
259
+ </th>
260
+
261
+ <td>
262
+ <fieldset style="margin-top: 1em;">
263
+ <h4><?php _e('Select User Roles which can access Top Bar CMP switch mode.', 'cmp-coming-soon-maintenance');?></h4>
264
+
265
+ <select name="niteoCS_roles_topbar[]" class="cmp-user_roles" multiple="multiple">
266
+
267
+ <?php
268
+ $roles = get_editable_roles();
269
+
270
+ foreach ( $roles as $role => $details ) {
271
+
272
+ if ( $role != 'administrator') { ?>
273
+ <option value="<?php echo esc_attr($role);?>" <?php echo in_array( $role, $niteoCS_roles_topbar ) ? 'selected' : '';?>><?php echo esc_attr( $details['name'] );?></option>
274
+ <?php
275
+ }
276
+ } ?>
277
+
278
+ </select>
279
+
280
+ <p style="margin-top:0"><?php _e('Administrator role can always access Top Bar Switch.', 'cmp-coming-soon-maintenance');?></p>
281
+
282
+ </fieldset>
283
+
284
+ </td>
285
+ </tr>
286
+ <?php echo $this->render_settings->submit(); ?>
287
+
288
  </tbody>
289
  </table>
290
 
cmp-help.php CHANGED
@@ -2,12 +2,9 @@
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
  ?>
4
 
5
- <style>
6
- h3, p {text-align: center;}
7
- .wrap {margin-top: 5em;}
8
- </style>
9
-
10
  <div class="wrap">
 
 
11
  <div id="icon-users" class="icon32"></div>
12
 
13
  <div class="cmp-inputs-wrapper help-settings">
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
  ?>
4
 
 
 
 
 
 
5
  <div class="wrap">
6
+
7
+ <h1></h1>
8
  <div id="icon-users" class="icon32"></div>
9
 
10
  <div class="cmp-inputs-wrapper help-settings">
cmp-settings.php CHANGED
@@ -13,9 +13,10 @@ if ( isset($_POST['select_theme']) && in_array($_POST['select_theme'], $this->th
13
  }
14
 
15
 
16
- $themeslug = $this->cmp_selectedTheme();
17
- $downloadable_themes = $this->cmp_downloadable_themes();
18
- $font_animation = array('hardwork_premium', 'fifty', 'orbit');
 
19
 
20
  if (isset($_POST['niteoCS_logo_id_'.$themeslug]) && ( is_numeric($_POST['niteoCS_logo_id_'.$themeslug]) || empty($_POST['niteoCS_logo_id_'.$themeslug]))) {
21
  update_option('niteoCS_logo_id['.$themeslug.']', sanitize_text_field($_POST['niteoCS_logo_id_'.$themeslug]));
@@ -265,22 +266,22 @@ if (isset($_POST['niteoCS_redirect_time'])) {
265
  }
266
 
267
 
268
- $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
269
 
270
  // get Settings TAB
271
  $niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
272
  $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
273
 
274
  // get Content Settings
275
- $niteoCS_body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
276
  $niteoCS_body = get_option('niteoCS_body');
277
- $niteoCS_copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
278
- $niteoCS_soc_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
279
 
280
  // get subscribe settings
281
  $niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
282
  $niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
283
- $niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
284
  $niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
285
 
286
  // get SEO
@@ -332,14 +333,6 @@ $niteoCS_vimeo_url = get_option('niteoCS_vimeo_url['.$themeslug.']');
332
  $niteoCS_video_thumb = get_option('niteoCS_video_thumb['.$themeslug.']');
333
  $niteoCS_video_file_url = get_option('niteoCS_video_file_url['.$themeslug.']');
334
 
335
- $niteoCS_font_headings_variant = get_option('niteoCS_font_headings_variant['.$themeslug.']', '700');
336
- $niteoCS_font_headings_size = get_option('niteoCS_font_headings_size['.$themeslug.']', '40');
337
- $niteoCS_font_headings_spacing = get_option('niteoCS_font_headings_spacing['.$themeslug.']', '0');
338
- $niteoCS_font_content_variant = get_option('niteoCS_font_content_variant['.$themeslug.']', 'regular');
339
- $niteoCS_font_content_lineheight = get_option('niteoCS_font_content_lineheight['.$themeslug.']', '1.5');
340
- $niteoCS_font_content_size = get_option('niteoCS_font_content_size['.$themeslug.']', '17');
341
- $niteoCS_font_content_spacing = get_option('niteoCS_font_content_spacing['.$themeslug.']', '0');
342
-
343
 
344
  // create default social media if they do not exists
345
  if ( !get_option('niteoCS_socialmedia') ) {
@@ -365,52 +358,12 @@ if ( !get_option('niteoCS_socialmedia') ) {
365
  $socialmedia = json_decode( $niteoCS_socialmedia, true );
366
  }
367
 
368
- // add soundcloud icon
369
- if ( !$this->niteo_in_array_r( 'soundcloud', $socialmedia, true ) ) {
370
- $soundcloud = array(
371
- 'name' => 'soundcloud',
372
- 'url' => '',
373
- 'active' => '1',
374
- 'hidden' => '1',
375
- 'order' => '17',
376
- );
377
- array_push( $socialmedia, $soundcloud );
378
-
379
- $niteoCS_socialmedia = json_encode( $socialmedia );
380
- }
381
-
382
- // add whatsapp and phone social media in 2.3 update
383
- if ( count($socialmedia) == 18 ) {
384
- $whatsapp = array(
385
- 'name' => 'whatsapp',
386
- 'url' => '',
387
- 'active' => '1',
388
- 'hidden' => '1',
389
- 'order' => '18',
390
- );
391
- array_push( $socialmedia, $whatsapp );
392
-
393
- $phone = array(
394
- 'name' => 'phone',
395
- 'url' => '',
396
- 'active' => '1',
397
- 'hidden' => '1',
398
- 'order' => '19',
399
- );
400
- array_push( $socialmedia, $phone );
401
- $niteoCS_socialmedia = json_encode( $socialmedia );
402
- }
403
 
404
  //include theme defaults
405
  if (file_exists($this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php')) {
406
  include ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php' );
407
  }
408
 
409
- // load old settings for a case when theme is not upgraded yet
410
- if (!isset($niteoCS_banner)) $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']');
411
- if (!isset($niteoCS_font_headings)) $niteoCS_font_headings = get_option('niteoCS_font_headings['.$themeslug.']');
412
- if (!isset($niteoCS_font_content)) $niteoCS_font_content = get_option('niteoCS_font_content['.$themeslug.']');
413
-
414
 
415
  // get logo url from id
416
  if ( $niteoCS_logo_id != '' ) {
@@ -449,7 +402,7 @@ if( isset($_POST['submit_theme']) ) {
449
  $this->cmp_theme_upload($_FILES['fileToUpload']);
450
  }
451
 
452
- // Hande THeme update
453
  if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
454
  $slug = sanitize_text_field($_GET['theme']);
455
  $theme_url = $this->remoteServer.'?action=download&slug='.$slug;
@@ -552,12 +505,9 @@ add_thickbox();
552
  </fieldset>
553
  </td>
554
  </tr>
555
- <tr><th>
556
- <p class="cmp-submit">
557
- <?php wp_nonce_field('save_options','save_options_field'); ?>
558
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
559
- </p>
560
- </th></tr>
561
  </tbody>
562
  </table>
563
 
@@ -583,19 +533,13 @@ add_thickbox();
583
 
584
  // define what attribute we want from style.css header
585
  $headers = array('Version');
586
- $type = 'standard';
587
-
588
  foreach ( $this->theme_array as $theme_slug ) {
589
- $version = $this->version;
 
590
 
591
  // if premium get theme version
592
- if ( in_array($theme_slug, $this->premium_installed) ) {
593
-
594
- if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
595
- $version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
596
- if ( isset($version[0])) { $version = $version[0] ;}
597
- }
598
-
599
  $type = 'premium';
600
  }
601
 
@@ -605,18 +549,23 @@ add_thickbox();
605
  <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
606
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
607
 
608
- <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
609
-
610
- <span class="theme-version">ver. <?php echo esc_html( $version );?></span>
611
-
612
- <div class="theme-inputs">
613
 
614
- <div class="button theme-select <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
615
  <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"'; } ?>>
616
  <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>
617
  </div>
618
 
619
  <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>
 
 
 
 
 
 
 
 
 
620
 
621
  </div> <!-- theme-inputs -->
622
  </div> <!-- theme-wrapper -->
@@ -626,18 +575,17 @@ add_thickbox();
626
  </fieldset>
627
  </td>
628
  </tr>
629
- <tr><th>
630
- <p class="cmp-submit">
631
- <?php wp_nonce_field('save_options','save_options_field'); ?>
632
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
633
- </p>
634
- </th></tr>
635
  </tbody>
636
  </table>
637
  <div class="theme-overlay cmp"></div>
638
  </div>
 
639
  <?php
640
  if ( !empty( $downloadable_themes ) ) { ?>
 
641
  <div class="table-wrapper general">
642
  <h3><?php _e('Download more CMP Themes', 'cmp-coming-soon-maintenance');?></h3>
643
  <table class="general theme-selector">
@@ -662,26 +610,32 @@ add_thickbox();
662
  } ?>
663
 
664
 
665
- <div class="theme-wrapper premium" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium" data-freebie="<?php echo esc_attr( $freebie );?>" data-price="<?php echo esc_html($premium_theme['price']);?>">
666
 
667
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
668
 
669
- <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
670
-
671
- <div class="theme-inputs">
672
-
673
- <?php
674
- // premium theme
675
- if ( $freebie !== 'true' ) { ?>
676
- <button type="button" class="theme-purchase button"><a href="<?php echo esc_url($premium_theme['url']);?>" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>$<?php echo esc_html($premium_theme['price']);?></a></button>
677
- <?php
678
- // if freebie, dislay download icon
679
- } else if ( $freebie == 'true' ) { ?>
680
- <button type="button" class="theme-purchase button"><a href="<?php echo esc_url($premium_theme['url']);?>" target="_blank"><i class="fa fa-download" aria-hidden="true"></i><?php _e('Download', 'cmp-coming-soon-maintenance');?></a></button>
681
  <?php
682
- } ?>
683
- <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>
 
 
 
 
 
 
 
684
 
 
 
 
 
 
 
 
 
 
685
  </div>
686
  </div>
687
 
@@ -691,12 +645,8 @@ add_thickbox();
691
  </td>
692
  </tr>
693
 
694
- <tr><th>
695
- <p class="cmp-submit">
696
- <?php wp_nonce_field('save_options','save_options_field'); ?>
697
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
698
- </p>
699
- </th></tr>
700
  </tbody>
701
  </table>
702
  </div>
@@ -724,12 +674,8 @@ add_thickbox();
724
  </td>
725
  </tr>
726
 
727
- <tr><th>
728
- <p class="cmp-submit">
729
- <?php wp_nonce_field('save_options','save_options_field'); ?>
730
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
731
- </p>
732
- </th></tr>
733
  </tbody>
734
  </table>
735
 
@@ -878,12 +824,8 @@ add_thickbox();
878
  include ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php' );
879
  }
880
  ?>
881
- <tr><th>
882
- <p class="cmp-submit">
883
- <?php wp_nonce_field('save_options','save_options_field'); ?>
884
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
885
- </p>
886
- </th></tr>
887
  </tbody>
888
  </table>
889
  </div>
@@ -946,27 +888,27 @@ add_thickbox();
946
  <th><h4><?php _e('Headings Font', 'cmp-coming-soon-maintenance');?></h4></th>
947
  <td>
948
  <fieldset>
949
- <label for="niteoCS_font_headings_<?php echo esc_attr($themeslug);?>"><?php _e('Font Family from ', 'cmp-coming-soon-maintenance');?><a href="https://fonts.google.com" target="_blank">Google Fonts</a></label></br>
950
- <select class="headings-google-font" name ="niteoCS_font_headings_<?php echo esc_attr($themeslug);?>">
951
- <option value="<?php echo esc_attr( $niteoCS_font_headings); ?>" selected="selected"><?php echo esc_html( $niteoCS_font_headings); ?></option>
952
  </select>
953
  </fieldset>
954
 
955
  <fieldset>
956
- <label for="niteoCS_font_headings_variant_<?php echo esc_attr($themeslug);?>"><?php _e('Variant', 'cmp-coming-soon-maintenance');?></label></br>
957
- <select class="headings-google-font-variant" name ="niteoCS_font_headings_variant_<?php echo esc_attr($themeslug);?>">
958
- <option value="<?php echo esc_attr( $niteoCS_font_headings_variant); ?>" selected="selected"><?php echo esc_html( $this->cmp_google_variant_title($niteoCS_font_headings_variant) ); ?></option>
959
  </select>
960
  </fieldset>
961
 
962
  <fieldset>
963
- <label for="niteoCS_font_headings_size_<?php echo esc_attr($themeslug);?>"><?php _e('Font Size', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $niteoCS_font_headings_size ); ?></span>px</label></br>
964
- <input type="range" name="niteoCS_font_headings_size_<?php echo esc_attr($themeslug);?>" min="10" max="75" step="1" value="<?php echo esc_attr( $niteoCS_font_headings_size ); ?>" data-css="font-size" data-type="heading" />
965
  </fieldset>
966
 
967
  <fieldset>
968
- <label for="niteoCS_font_headings_spacing_<?php echo esc_attr($themeslug);?>"><?php _e('Letter Spacing', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $niteoCS_font_headings_spacing ); ?></span>px</label></br>
969
- <input type="range" name="niteoCS_font_headings_spacing_<?php echo esc_attr($themeslug);?>" min="0" max="10" step="0.5" value="<?php echo esc_attr( $niteoCS_font_headings_spacing ); ?>" data-css="letter-spacing" data-type="heading" />
970
  </fieldset>
971
 
972
  <?php
@@ -974,8 +916,8 @@ add_thickbox();
974
  if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
975
 
976
  <fieldset>
977
- <label for="niteoCS_heading_animation_<?php echo esc_attr($themeslug);?>"><?php _e('Animation', 'cmp-coming-soon-maintenance');?></label></br>
978
- <select name="niteoCS_heading_animation_<?php echo esc_attr($themeslug);?>" class="heading-animation">
979
  <option value="none" <?php if ( $niteoCS_heading_animation == 'none' ) { echo ' selected="selected"'; } ?>><?php _e('No animation', 'cmp-coming-soon-maintenance');?></option>
980
  <option value="fadeInDown" <?php if ( $niteoCS_heading_animation == 'fadeInDown' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Down', 'cmp-coming-soon-maintenance');?></option>
981
  <option value="fadeInUp" <?php if ( $niteoCS_heading_animation == 'fadeInUp' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Up', 'cmp-coming-soon-maintenance');?></option>
@@ -994,41 +936,41 @@ add_thickbox();
994
  <td>
995
 
996
  <fieldset>
997
- <label for="niteoCS_font_content_<?php echo esc_attr($themeslug);?>"><?php _e('Select Font Family from ', 'cmp-coming-soon-maintenance');?><a href="https://fonts.google.com" target="_blank">Google Fonts</a></label></br>
998
 
999
- <select class="content-google-font" name ="niteoCS_font_content_<?php echo esc_attr($themeslug);?>">
1000
- <option value="<?php echo esc_attr( $niteoCS_font_content ); ?>" selected="selected"><?php echo esc_html( $niteoCS_font_content ); ?></option>
1001
  </select>
1002
  </fieldset>
1003
 
1004
  <fieldset>
1005
- <label for="niteoCS_font_content_variant_<?php echo esc_attr($themeslug);?>"><?php _e('Variant', 'cmp-coming-soon-maintenance');?></label></br>
1006
- <select class="content-google-font-variant" name ="niteoCS_font_content_variant_<?php echo esc_attr($themeslug);?>">
1007
- <option value="<?php echo esc_attr( $niteoCS_font_content_variant); ?>" selected="selected"><?php echo esc_html( $this->cmp_google_variant_title($niteoCS_font_content_variant) ); ?></option>
1008
  </select>
1009
  </fieldset>
1010
 
1011
  <fieldset>
1012
- <label for="niteoCS_font_content_size_<?php echo esc_attr($themeslug);?>"><?php _e('Font Size', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $niteoCS_font_content_size ); ?></span>px</label></br>
1013
- <input type="range" name="niteoCS_font_content_size_<?php echo esc_attr($themeslug);?>" min="10" max="50" step="1" value="<?php echo esc_attr( $niteoCS_font_content_size ); ?>" data-css="font-size" data-type="content" />
1014
  </fieldset>
1015
 
1016
  <fieldset>
1017
- <label for="niteoCS_font_content_spacing_<?php echo esc_attr($themeslug);?>"><?php _e('Letter Spacing', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $niteoCS_font_content_spacing ); ?></span>px</label></br>
1018
- <input type="range" name="niteoCS_font_content_spacing_<?php echo esc_attr($themeslug);?>" min="0" max="10" step="0.5" value="<?php echo esc_attr( $niteoCS_font_content_spacing ); ?>" data-css="letter-spacing" data-type="content" />
1019
  </fieldset>
1020
 
1021
  <fieldset>
1022
- <label for="niteoCS_font_content_lineheight_<?php echo esc_attr($themeslug);?>"><?php _e('Line Height', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $niteoCS_font_content_lineheight ); ?></span></label></br>
1023
- <input type="range" name="niteoCS_font_content_lineheight_<?php echo esc_attr($themeslug);?>" min="1.3" max="3" step="0.1" value="<?php echo esc_attr( $niteoCS_font_content_lineheight ); ?>" data-css="line-height" data-type="content" />
1024
  </fieldset>
1025
  <?php
1026
  // include theme animation settings
1027
  if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
1028
 
1029
  <fieldset>
1030
- <label for="niteoCS_content_animation_<?php echo esc_attr($themeslug);?>"><?php _e('Select Animation', 'cmp-coming-soon-maintenance');?></label></br>
1031
- <select name="niteoCS_content_animation_<?php echo esc_attr($themeslug);?>" class="content-animation">
1032
  <option value="none" <?php if ( $niteoCS_content_animation == 'none' ) { echo ' selected="selected"'; } ?>><?php _e('No animation', 'cmp-coming-soon-maintenance');?></option>
1033
  <option value="fadeInDown" <?php if ( $niteoCS_content_animation == 'fadeInDown' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Down', 'cmp-coming-soon-maintenance');?></option>
1034
  <option value="fadeInUp" <?php if ( $niteoCS_content_animation == 'fadeInUp' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Up', 'cmp-coming-soon-maintenance');?></option>
@@ -1041,19 +983,16 @@ add_thickbox();
1041
 
1042
  <p style="margin-bottom:0">Fonts preview</p>
1043
  <div id="font-example-wrapper">
1044
- <h3 id="heading-example" class="animated <?php echo esc_attr($niteoCS_heading_animation);?>" style="font-size:<?php echo esc_attr($niteoCS_font_headings_size);?>px;letter-spacing:<?php echo esc_attr($niteoCS_font_headings_spacing);?>px">Hello, I am your Headings font!</h3>
1045
- <p id="content-example" class="animated <?php echo esc_attr($niteoCS_content_animation);?>" style="font-size:<?php echo esc_attr($niteoCS_font_content_size);?>px;letter-spacing:<?php echo esc_attr($niteoCS_font_content_spacing);?>px;line-height:<?php echo esc_attr($niteoCS_font_content_lineheight);?>">And this is a long paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
1046
  </div>
1047
 
1048
  </td>
1049
 
1050
  </tr>
1051
- <tr><th>
1052
- <p class="cmp-submit">
1053
- <?php wp_nonce_field('save_options','save_options_field'); ?>
1054
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
1055
- </p>
1056
- </th></tr>
1057
  </tbody>
1058
  </table>
1059
 
@@ -1101,12 +1040,8 @@ add_thickbox();
1101
  </td>
1102
  </tr>
1103
 
1104
- <tr><th>
1105
- <p class="cmp-submit">
1106
- <?php wp_nonce_field('save_options','save_options_field'); ?>
1107
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
1108
- </p>
1109
- </th></tr>
1110
  </tbody>
1111
  </table>
1112
  </div>
@@ -1151,13 +1086,13 @@ add_thickbox();
1151
  <p class="analytics-switch google">
1152
  <label for="niteoCS_analytics"><?php _e('Insert Google Analytics Tracking ID', 'cmp-coming-soon-maintenance');?></label><br>
1153
 
1154
- <input type="text" name="niteoCS_analytics" value="<?php echo esc_attr( $niteoCS_analytics); ?>" class="regular-text code" placeholder="UA-xxxxxx-xx"/>
1155
 
1156
  </p>
1157
 
1158
  <p class="analytics-switch other">
1159
  <label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code', 'cmp-coming-soon-maintenance');?></label><br>
1160
- <textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo esc_js($niteoCS_analytics_other); ?></textarea>
1161
  </p>
1162
  </fieldset>
1163
 
@@ -1165,12 +1100,8 @@ add_thickbox();
1165
 
1166
  </tr>
1167
 
1168
- <tr><th>
1169
- <p class="cmp-submit">
1170
- <?php wp_nonce_field('save_options','save_options_field'); ?>
1171
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
1172
- </p>
1173
- </th></tr>
1174
  </tbody>
1175
  </table>
1176
  </div>
@@ -1182,16 +1113,13 @@ add_thickbox();
1182
  <tr>
1183
  <td>
1184
  <fieldset>
1185
- <textarea name="niteoCS_custom_css" rows="20" id="niteoCS_custom_css" class="code"><?php echo esc_attr($niteoCS_custom_css); ?></textarea>
1186
  </fieldset>
1187
  </td>
1188
  </tr>
1189
- <tr><th>
1190
- <p class="cmp-submit">
1191
- <?php wp_nonce_field('save_options','save_options_field'); ?>
1192
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
1193
- </p>
1194
- </th></tr>
1195
  </tbody>
1196
  </table>
1197
 
13
  }
14
 
15
 
16
+ $themeslug = $this->cmp_selectedTheme();
17
+ $downloadable_themes = $this->cmp_downloadable_themes();
18
+ $font_animation = array('hardwork_premium', 'fifty', 'orbit');
19
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
20
 
21
  if (isset($_POST['niteoCS_logo_id_'.$themeslug]) && ( is_numeric($_POST['niteoCS_logo_id_'.$themeslug]) || empty($_POST['niteoCS_logo_id_'.$themeslug]))) {
22
  update_option('niteoCS_logo_id['.$themeslug.']', sanitize_text_field($_POST['niteoCS_logo_id_'.$themeslug]));
266
  }
267
 
268
 
269
+
270
 
271
  // get Settings TAB
272
  $niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
273
  $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
274
 
275
  // get Content Settings
276
+ $niteoCS_body_title = stripslashes(get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!'));
277
  $niteoCS_body = get_option('niteoCS_body');
278
+ $niteoCS_copyright = stripslashes(get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.'));
279
+ $niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL WITH US'));
280
 
281
  // get subscribe settings
282
  $niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
283
  $niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
284
+ $niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Type your email and get notified'));
285
  $niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
286
 
287
  // get SEO
333
  $niteoCS_video_thumb = get_option('niteoCS_video_thumb['.$themeslug.']');
334
  $niteoCS_video_file_url = get_option('niteoCS_video_file_url['.$themeslug.']');
335
 
 
 
 
 
 
 
 
 
336
 
337
  // create default social media if they do not exists
338
  if ( !get_option('niteoCS_socialmedia') ) {
358
  $socialmedia = json_decode( $niteoCS_socialmedia, true );
359
  }
360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
 
362
  //include theme defaults
363
  if (file_exists($this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php')) {
364
  include ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-defaults.php' );
365
  }
366
 
 
 
 
 
 
367
 
368
  // get logo url from id
369
  if ( $niteoCS_logo_id != '' ) {
402
  $this->cmp_theme_upload($_FILES['fileToUpload']);
403
  }
404
 
405
+ // Handle Theme update
406
  if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
407
  $slug = sanitize_text_field($_GET['theme']);
408
  $theme_url = $this->remoteServer.'?action=download&slug='.$slug;
505
  </fieldset>
506
  </td>
507
  </tr>
508
+
509
+ <?php echo $this->render_settings->submit(); ?>
510
+
 
 
 
511
  </tbody>
512
  </table>
513
 
533
 
534
  // define what attribute we want from style.css header
535
  $headers = array('Version');
536
+
 
537
  foreach ( $this->theme_array as $theme_slug ) {
538
+ $version = $this->cmp_theme_version( $theme_slug );
539
+ $type = 'standard';
540
 
541
  // if premium get theme version
542
+ if ( in_array( $theme_slug, $this->premium_installed ) ) {
 
 
 
 
 
 
543
  $type = 'premium';
544
  }
545
 
549
  <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>">
550
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
551
 
552
+ <div class="buttons-wrapper">
 
 
 
 
553
 
554
+ <div class="button theme-select hide<?php echo ( $this->cmp_selectedTheme() == $theme_slug ) ? ' activated' : '';?>">
555
  <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"'; } ?>>
556
  <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>
557
  </div>
558
 
559
  <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>
560
+ </div>
561
+
562
+ <div class="theme-inputs">
563
+
564
+ <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
565
+
566
+ <?php echo ( $this->cmp_selectedTheme() == $theme_slug ) ? ' <span class="italic">'.__('Active', 'cmp-coming-soon-maintenance').'</span>' : '';?>
567
+
568
+ <span class="theme-version">ver. <?php echo esc_html( $version );?></span>
569
 
570
  </div> <!-- theme-inputs -->
571
  </div> <!-- theme-wrapper -->
575
  </fieldset>
576
  </td>
577
  </tr>
578
+
579
+ <?php echo $this->render_settings->submit(); ?>
580
+
 
 
 
581
  </tbody>
582
  </table>
583
  <div class="theme-overlay cmp"></div>
584
  </div>
585
+
586
  <?php
587
  if ( !empty( $downloadable_themes ) ) { ?>
588
+
589
  <div class="table-wrapper general">
590
  <h3><?php _e('Download more CMP Themes', 'cmp-coming-soon-maintenance');?></h3>
591
  <table class="general theme-selector">
610
  } ?>
611
 
612
 
613
+ <div class="theme-wrapper premium" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium" data-freebie="<?php echo esc_attr( $freebie );?>" data-price="<?php echo esc_html( $premium_theme['price'] );?>">
614
 
615
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
616
 
617
+ <div class="buttons-wrapper">
618
+
 
 
 
 
 
 
 
 
 
 
619
  <?php
620
+ // premium theme
621
+ if ( $freebie !== 'true' ) { ?>
622
+ <a href="<?php echo esc_url( $premium_theme['url'] );?>" target="_blank" class="theme-purchase button hide"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>BUY $<?php echo esc_html( $premium_theme['price'] );?></a>
623
+ <?php
624
+ // if freebie, dislay download icon
625
+ } else if ( $freebie == 'true' ) { ?>
626
+ <a href="<?php echo esc_url ($premium_theme['url'] );?>" target="_blank" class="theme-purchase button hide"><i class="fa fa-download" aria-hidden="true"></i><?php _e('Download', 'cmp-coming-soon-maintenance');?></a>
627
+ <?php
628
+ } ?>
629
 
630
+ <a href="<?php echo 'http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='.$theme_slug.'&utm_source=cmp&utm_medium=referral&utm_campaign='.$theme_slug.'';?>" target="_blank" class="theme-preview button hide"><i class="fa fa-external-link" aria-hidden="true"></i><?php _e('PREVIEW', 'cmp-coming-soon-maintenance');?></a>
631
+
632
+ <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>
633
+
634
+ </div>
635
+
636
+ <div class="theme-inputs">
637
+
638
+ <span class="theme-title"><?php echo ucwords( esc_html( str_replace('_', ' ', $theme_slug) ) );?></span>
639
  </div>
640
  </div>
641
 
645
  </td>
646
  </tr>
647
 
648
+ <?php echo $this->render_settings->submit(); ?>
649
+
 
 
 
 
650
  </tbody>
651
  </table>
652
  </div>
674
  </td>
675
  </tr>
676
 
677
+ <?php echo $this->render_settings->submit(); ?>
678
+
 
 
 
 
679
  </tbody>
680
  </table>
681
 
824
  include ( $this->cmp_themePath($this->cmp_selectedTheme()).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-social_settings.php' );
825
  }
826
  ?>
827
+ <?php echo $this->render_settings->submit(); ?>
828
+
 
 
 
 
829
  </tbody>
830
  </table>
831
  </div>
888
  <th><h4><?php _e('Headings Font', 'cmp-coming-soon-maintenance');?></h4></th>
889
  <td>
890
  <fieldset>
891
+ <label for="niteoCS_font_headings_<?php echo esc_attr( $themeslug );?>"><?php _e('Font Family from ', 'cmp-coming-soon-maintenance');?><a href="https://fonts.google.com" target="_blank">Google Fonts</a></label></br>
892
+ <select class="headings-google-font" name ="niteoCS_font_headings_<?php echo esc_attr( $themeslug );?>">
893
+ <option value="<?php echo esc_attr( $heading_font['family'] ); ?>" selected="selected"><?php echo esc_html( $heading_font['family'] ); ?></option>
894
  </select>
895
  </fieldset>
896
 
897
  <fieldset>
898
+ <label for="niteoCS_font_headings_variant_<?php echo esc_attr( $themeslug );?>"><?php _e('Variant', 'cmp-coming-soon-maintenance');?></label></br>
899
+ <select class="headings-google-font-variant" name ="niteoCS_font_headings_variant_<?php echo esc_attr( $themeslug );?>">
900
+ <option value="<?php echo esc_attr( $heading_font['variant'] ); ?>" selected="selected"><?php echo esc_html( $this->cmp_google_variant_title( $heading_font['variant'] ) ); ?></option>
901
  </select>
902
  </fieldset>
903
 
904
  <fieldset>
905
+ <label for="niteoCS_font_headings_size_<?php echo esc_attr( $themeslug );?>"><?php _e('Font Size', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $heading_font['size'] ); ?></span>px</label></br>
906
+ <input type="range" name="niteoCS_font_headings_size_<?php echo esc_attr( $themeslug );?>" min="10" max="75" step="1" value="<?php echo esc_attr( $heading_font['size'] ); ?>" data-css="font-size" data-type="heading" />
907
  </fieldset>
908
 
909
  <fieldset>
910
+ <label for="niteoCS_font_headings_spacing_<?php echo esc_attr( $themeslug );?>"><?php _e('Letter Spacing', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $heading_font['spacing'] ); ?></span>px</label></br>
911
+ <input type="range" name="niteoCS_font_headings_spacing_<?php echo esc_attr( $themeslug );?>" min="0" max="10" step="0.5" value="<?php echo esc_attr( $heading_font['spacing'] ); ?>" data-css="letter-spacing" data-type="heading" />
912
  </fieldset>
913
 
914
  <?php
916
  if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
917
 
918
  <fieldset>
919
+ <label for="niteoCS_heading_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Animation', 'cmp-coming-soon-maintenance');?></label></br>
920
+ <select name="niteoCS_heading_animation_<?php echo esc_attr( $themeslug );?>" class="heading-animation">
921
  <option value="none" <?php if ( $niteoCS_heading_animation == 'none' ) { echo ' selected="selected"'; } ?>><?php _e('No animation', 'cmp-coming-soon-maintenance');?></option>
922
  <option value="fadeInDown" <?php if ( $niteoCS_heading_animation == 'fadeInDown' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Down', 'cmp-coming-soon-maintenance');?></option>
923
  <option value="fadeInUp" <?php if ( $niteoCS_heading_animation == 'fadeInUp' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Up', 'cmp-coming-soon-maintenance');?></option>
936
  <td>
937
 
938
  <fieldset>
939
+ <label for="niteoCS_font_content_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Font Family from ', 'cmp-coming-soon-maintenance');?><a href="https://fonts.google.com" target="_blank">Google Fonts</a></label></br>
940
 
941
+ <select class="content-google-font" name ="niteoCS_font_content_<?php echo esc_attr( $themeslug );?>">
942
+ <option value="<?php echo esc_attr( $content_font['family'] ); ?>" selected="selected"><?php echo esc_html( $content_font['family'] ); ?></option>
943
  </select>
944
  </fieldset>
945
 
946
  <fieldset>
947
+ <label for="niteoCS_font_content_variant_<?php echo esc_attr( $themeslug );?>"><?php _e('Variant', 'cmp-coming-soon-maintenance');?></label></br>
948
+ <select class="content-google-font-variant" name ="niteoCS_font_content_variant_<?php echo esc_attr( $themeslug );?>">
949
+ <option value="<?php echo esc_attr( $content_font['variant'] ); ?>" selected="selected"><?php echo esc_html( $this->cmp_google_variant_title( $content_font['variant'] ) ); ?></option>
950
  </select>
951
  </fieldset>
952
 
953
  <fieldset>
954
+ <label for="niteoCS_font_content_size_<?php echo esc_attr( $themeslug );?>"><?php _e('Font Size', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $content_font['size'] ); ?></span>px</label></br>
955
+ <input type="range" name="niteoCS_font_content_size_<?php echo esc_attr( $themeslug );?>" min="10" max="50" step="1" value="<?php echo esc_attr( $content_font['size'] ); ?>" data-css="font-size" data-type="content" />
956
  </fieldset>
957
 
958
  <fieldset>
959
+ <label for="niteoCS_font_content_spacing_<?php echo esc_attr( $themeslug );?>"><?php _e('Letter Spacing', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $content_font['spacing'] ); ?></span>px</label></br>
960
+ <input type="range" name="niteoCS_font_content_spacing_<?php echo esc_attr( $themeslug );?>" min="0" max="10" step="0.5" value="<?php echo esc_attr( $content_font['spacing'] ); ?>" data-css="letter-spacing" data-type="content" />
961
  </fieldset>
962
 
963
  <fieldset>
964
+ <label for="niteoCS_font_content_lineheight_<?php echo esc_attr( $themeslug );?>"><?php _e('Line Height', 'cmp-coming-soon-maintenance');?>: <span><?php echo esc_attr( $content_font['line-height'] ); ?></span></label></br>
965
+ <input type="range" name="niteoCS_font_content_lineheight_<?php echo esc_attr( $themeslug );?>" min="1.3" max="3" step="0.1" value="<?php echo esc_attr( $content_font['line-height'] ); ?>" data-css="line-height" data-type="content" />
966
  </fieldset>
967
  <?php
968
  // include theme animation settings
969
  if ( in_array($this->cmp_selectedTheme(), $font_animation) ) { ?>
970
 
971
  <fieldset>
972
+ <label for="niteoCS_content_animation_<?php echo esc_attr( $themeslug );?>"><?php _e('Select Animation', 'cmp-coming-soon-maintenance');?></label></br>
973
+ <select name="niteoCS_content_animation_<?php echo esc_attr( $themeslug );?>" class="content-animation">
974
  <option value="none" <?php if ( $niteoCS_content_animation == 'none' ) { echo ' selected="selected"'; } ?>><?php _e('No animation', 'cmp-coming-soon-maintenance');?></option>
975
  <option value="fadeInDown" <?php if ( $niteoCS_content_animation == 'fadeInDown' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Down', 'cmp-coming-soon-maintenance');?></option>
976
  <option value="fadeInUp" <?php if ( $niteoCS_content_animation == 'fadeInUp' ) { echo ' selected="selected"'; } ?>><?php _e('Fade In Up', 'cmp-coming-soon-maintenance');?></option>
983
 
984
  <p style="margin-bottom:0">Fonts preview</p>
985
  <div id="font-example-wrapper">
986
+ <h3 id="heading-example" class="animated <?php echo esc_attr($niteoCS_heading_animation);?>" style="font-size:<?php echo esc_attr( $heading_font['size'] );?>px;letter-spacing:<?php echo esc_attr( $heading_font['spacing'] );?>px">Hello, I am your Headings font!</h3>
987
+ <p id="content-example" class="animated <?php echo esc_attr($niteoCS_content_animation);?>" style="font-size:<?php echo esc_attr( $content_font['size'] );?>px;letter-spacing:<?php echo esc_attr( $content_font['spacing'] );?>px;line-height:<?php echo esc_attr( $content_font['line-height'] );?>">And this is a long paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
988
  </div>
989
 
990
  </td>
991
 
992
  </tr>
993
+
994
+ <?php echo $this->render_settings->submit(); ?>
995
+
 
 
 
996
  </tbody>
997
  </table>
998
 
1040
  </td>
1041
  </tr>
1042
 
1043
+ <?php echo $this->render_settings->submit(); ?>
1044
+
 
 
 
 
1045
  </tbody>
1046
  </table>
1047
  </div>
1086
  <p class="analytics-switch google">
1087
  <label for="niteoCS_analytics"><?php _e('Insert Google Analytics Tracking ID', 'cmp-coming-soon-maintenance');?></label><br>
1088
 
1089
+ <input type="text" name="niteoCS_analytics" value="<?php echo esc_attr( $niteoCS_analytics ); ?>" class="regular-text code" placeholder="UA-xxxxxx-xx"/>
1090
 
1091
  </p>
1092
 
1093
  <p class="analytics-switch other">
1094
  <label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code', 'cmp-coming-soon-maintenance');?></label><br>
1095
+ <textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo esc_js( $niteoCS_analytics_other ); ?></textarea>
1096
  </p>
1097
  </fieldset>
1098
 
1100
 
1101
  </tr>
1102
 
1103
+ <?php echo $this->render_settings->submit(); ?>
1104
+
 
 
 
 
1105
  </tbody>
1106
  </table>
1107
  </div>
1113
  <tr>
1114
  <td>
1115
  <fieldset>
1116
+ <textarea name="niteoCS_custom_css" rows="20" id="niteoCS_custom_css" class="code"><?php echo esc_attr( $niteoCS_custom_css ); ?></textarea>
1117
  </fieldset>
1118
  </td>
1119
  </tr>
1120
+
1121
+ <?php echo $this->render_settings->submit(); ?>
1122
+
 
 
 
1123
  </tbody>
1124
  </table>
1125
 
cmp-sidebar.php CHANGED
@@ -1,4 +1,10 @@
1
  <div class="cmp-sidebar-wrapper">
 
 
 
 
 
 
2
  <div class="cmp-rate-us widget">
3
  <h3 class="cmp-rate-us title"><?php _e('Thank you for rating us with five stars!', 'cmp-coming-soon-maintenance');?></h3>
4
  <p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give 5%s feedback by pressing button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-star" aria-hidden="true"></i>');?></p>
1
  <div class="cmp-sidebar-wrapper">
2
+
3
+ <div class="selected-theme widget">
4
+ <h3 class="title"><?php _e('Active CMP Theme', 'cmp-coming-soon-maintenance');?>: <?php echo ucwords( esc_html( str_replace( '_', ' ', $this->cmp_selectedTheme() ) ) );?></h3>
5
+
6
+ </div>
7
+
8
  <div class="cmp-rate-us widget">
9
  <h3 class="cmp-rate-us title"><?php _e('Thank you for rating us with five stars!', 'cmp-coming-soon-maintenance');?></h3>
10
  <p><?php echo sprintf(__('If you find our CMP plugin useful, please show us some love and give 5%s feedback by pressing button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-star" aria-hidden="true"></i>');?></p>
cmp-upload.php CHANGED
@@ -3,12 +3,8 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
  ?>
5
 
6
- <style>
7
- h3, p {text-align: center;}
8
- .wrap {margin-top: 5em;}
9
- </style>
10
-
11
  <div class="wrap">
 
12
  <div id="icon-users" class="icon32"></div>
13
 
14
  <div class="cmp-inputs-wrapper help-settings">
3
 
4
  ?>
5
 
 
 
 
 
 
6
  <div class="wrap">
7
+ <h1></h1>
8
  <div id="icon-users" class="icon32"></div>
9
 
10
  <div class="cmp-inputs-wrapper help-settings">
css/cmp-admin-head.css CHANGED
@@ -116,4 +116,10 @@
116
  top: 9px;
117
  left: 10px;
118
  }
 
 
 
 
 
 
119
  }
116
  top: 9px;
117
  left: 10px;
118
  }
119
+ }
120
+
121
+ @media screen and (max-width:440px) {
122
+ #wpadminbar ul li#wp-admin-bar-cmp-admin-notice {
123
+ display: none;
124
+ }
125
  }
css/cmp-settings-style.css CHANGED
@@ -134,6 +134,11 @@ textarea {
134
  max-width: 920px
135
  }
136
 
 
 
 
 
 
137
  .cmp-inputs-wrapper {
138
  display: inline-block;
139
  max-width: 920px;
@@ -431,16 +436,17 @@ th label {
431
 
432
  .theme-wrapper {
433
  display: inline-block;
434
- padding: .5em;
435
- margin: 2em 2em 2em 0;
436
- width: calc(25% - 3em - 5px);
437
  text-align: center;
438
  border: 1px solid #efefef;
439
- border-radius: 6px
 
440
  }
441
 
442
- .theme-wrapper.premium {
443
- width: calc(33.33% - 3em - 5px)
444
  }
445
 
446
  .theme-wrapper.active {
@@ -449,7 +455,7 @@ th label {
449
 
450
  .thumbnail-holder {
451
  width: 100%;
452
- margin-bottom: 2em;
453
  border-top-left-radius: 5px;
454
  border-top-right-radius: 5px
455
  }
@@ -457,9 +463,18 @@ th label {
457
  .thumbnail-holder::before {
458
  content: '';
459
  display: block;
460
- padding-top: 56.25%
 
 
 
 
 
 
 
 
461
  }
462
 
 
463
  .toggle,
464
  .toggle-wrapper {
465
  display: inline-block
@@ -476,21 +491,46 @@ th label {
476
 
477
  .theme-wrapper .hide:not(.selected) {
478
  opacity: 0;
479
- -webkit-transition: opacity .3s, background-color .5s;
480
- transition: opacity .3s, background-color .5s
481
  }
482
 
483
- .theme-wrapper .hide.activated,
484
  .theme-wrapper:hover .hide {
485
  opacity: 1;
486
- -webkit-transition: opacity .3s, background-color .5s;
487
- transition: opacity .3s, background-color .5s
488
  }
489
 
 
490
  .theme-inputs {
491
- clear: both;
492
- border-top: 1px solid #efefef;
493
- padding-top: .5em
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
  }
495
 
496
  .cmp-button,
@@ -509,7 +549,8 @@ th label {
509
  border: none!important;
510
  box-shadow: none;
511
  -webkit-box-shadow: none;
512
- text-shadow: none
 
513
  }
514
 
515
  .cmp-button.submit,
@@ -521,6 +562,18 @@ th label {
521
  transition: background-color .5s
522
  }
523
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  .cmp-button.submit:focus,
525
  .cmp-button.submit:hover,
526
  .theme-actions .activate:focus,
@@ -530,68 +583,81 @@ th label {
530
  border: none
531
  }
532
 
533
- .theme-wrapper .button:hover {
534
- border: none;
535
- color: #fff!important
 
 
 
536
  }
537
 
538
- .theme-wrapper .theme-select {
539
- float: left;
540
- background-color: #95a5a6
 
 
 
 
541
  }
542
 
543
- .theme-wrapper .theme-select:focus,
544
- .theme-wrapper .theme-select:hover {
545
- background-color: #b5b5b5
546
  }
547
 
548
- .theme-wrapper .theme-select.activated {
549
- background-color: #27ae60
 
 
 
 
 
 
 
550
  }
551
 
552
- .theme-wrapper .theme-select.activated:focus,
553
- .theme-wrapper .theme-select.activated:hover {
554
- background-color: #2ecc71
555
  }
556
 
557
- .theme-wrapper .theme-details.button {
558
- float: right;
559
- background-color: #2980b9
560
- }
561
 
562
- .theme-wrapper .theme-details.button:focus,
563
- .theme-wrapper .theme-details.button:hover {
564
- background-color: #3498db
 
565
  }
566
 
567
- .theme-wrapper .theme-update {
568
- float: left;
569
- margin: 0 5px;
570
- background-color: #d35400
571
  }
572
 
573
- .theme-wrapper .theme-update:focus,
574
- .theme-wrapper .theme-update:hover {
575
- background-color: #e67e22
576
- }
577
 
 
 
 
578
  .theme-wrapper .theme-purchase {
579
- float: left;
580
- background-color: #2c3e50
581
  }
582
 
583
- .theme-wrapper .theme-purchase.button:focus,
584
- .theme-wrapper .theme-purchase.button:hover {
585
- background-color: #4f7090
586
  }
587
 
 
 
 
 
 
 
 
588
  .cmp-preview {
589
- background-color: #2485bf!important
590
  }
591
 
592
  .cmp-preview:active,
593
  .cmp-preview:hover {
594
- background-color: #32b2ff!important
595
  }
596
 
597
  .theme-info .theme-purchase {
@@ -604,10 +670,8 @@ th label {
604
  }
605
 
606
  .theme-info .theme-purchase:focus,
607
- .theme-info .theme-purchase:hover,
608
- .theme-wrapper .theme-purchase:focus,
609
- .theme-wrapper .theme-purchase:hover {
610
- background-color: #34495e
611
  }
612
 
613
  .button i {
@@ -876,6 +940,11 @@ input[type=checkbox].toggle-checkbox {
876
  .cmp-sidebar-wrapper .widget {
877
  padding: 1em
878
  }
 
 
 
 
 
879
  }
880
 
881
  @media screen and (max-width:1024px) {
@@ -885,6 +954,8 @@ input[type=checkbox].toggle-checkbox {
885
  .table-wrapper th {
886
  width: 140px
887
  }
 
 
888
  }
889
 
890
  @media screen and (max-width:782px) {
@@ -902,10 +973,7 @@ input[type=checkbox].toggle-checkbox {
902
  padding: 2em;
903
  margin-bottom: 1em!important
904
  }
905
- .theme-wrapper .hide:not(.selected),
906
- .theme-wrapper.hide {
907
- opacity: 1
908
- }
909
  .theme-overlay .theme-info,
910
  .theme-overlay .theme-screenshots {
911
  width: 100%;
@@ -938,4 +1006,6 @@ input[type=checkbox].toggle-checkbox {
938
  margin-left: 55px;
939
  width: calc(100% - 55px)
940
  }
941
- }
 
 
134
  max-width: 920px
135
  }
136
 
137
+ .cmp-inputs-wrapper .translation input,
138
+ .cmp-inputs-wrapper .translation textarea {
139
+ width: 100%;
140
+ }
141
+
142
  .cmp-inputs-wrapper {
143
  display: inline-block;
144
  max-width: 920px;
436
 
437
  .theme-wrapper {
438
  display: inline-block;
439
+ /* padding: .5em; */
440
+ margin: 2em 1em 2em 0;
441
+ width: calc(33.33% - 1.5em + 6px);
442
  text-align: center;
443
  border: 1px solid #efefef;
444
+ border-radius: 6px;
445
+ position: relative;
446
  }
447
 
448
+ .theme-wrapper:nth-of-type(3n) {
449
+ margin-right: 0;
450
  }
451
 
452
  .theme-wrapper.active {
455
 
456
  .thumbnail-holder {
457
  width: 100%;
458
+ /* margin-bottom: 2em; */
459
  border-top-left-radius: 5px;
460
  border-top-right-radius: 5px
461
  }
463
  .thumbnail-holder::before {
464
  content: '';
465
  display: block;
466
+ padding-top: 56.25%;
467
+ -webkit-transition: background-color .1s;
468
+ transition: background-color .1s;
469
+ border-top-left-radius: 5px;
470
+ border-top-right-radius: 5px;
471
+ }
472
+
473
+ .theme-wrapper:hover .thumbnail-holder::before {
474
+ background-color: rgba(0, 0, 0, 0.7);
475
  }
476
 
477
+
478
  .toggle,
479
  .toggle-wrapper {
480
  display: inline-block
491
 
492
  .theme-wrapper .hide:not(.selected) {
493
  opacity: 0;
494
+ -webkit-transition: opacity .1s, background-color .1s;
495
+ transition: opacity .1s, background-color .1s;
496
  }
497
 
 
498
  .theme-wrapper:hover .hide {
499
  opacity: 1;
500
+ -webkit-transition: opacity .1s, background-color .1s;
501
+ transition: opacity .1s, background-color .1s;
502
  }
503
 
504
+
505
  .theme-inputs {
506
+ position: absolute;
507
+ bottom: -36px;
508
+ right: 0px;
509
+ left: 0px;
510
+ /* padding-top: .5em; */
511
+ padding: 5px;
512
+ height: 2em;
513
+ background: #656565;
514
+ line-height: 2em;
515
+ padding-right: 10px;
516
+ color: white;
517
+ }
518
+
519
+ .active .theme-inputs {
520
+ background: #27ae60;
521
+ }
522
+
523
+ .theme-inputs .italic {
524
+ font-style: italic;
525
+ }
526
+
527
+ .theme-wrapper .buttons-wrapper {
528
+ position: absolute;
529
+ top: 50%;
530
+ left: 0;
531
+ right: 0;
532
+ -webkit-transform: translateY(-50%);
533
+ transform: translateY(-50%);
534
  }
535
 
536
  .cmp-button,
549
  border: none!important;
550
  box-shadow: none;
551
  -webkit-box-shadow: none;
552
+ text-shadow: none;
553
+ text-transform: uppercase;
554
  }
555
 
556
  .cmp-button.submit,
562
  transition: background-color .5s
563
  }
564
 
565
+ .theme-wrapper a.button:visited,
566
+ .theme-wrapper a.button:focus {
567
+ background: transparent;
568
+ -webkit-box-shadow: none;
569
+ box-shadow: none;
570
+ }
571
+
572
+ .theme-wrapper a.button.theme-purchase {
573
+ background-color: #ff3284;
574
+ }
575
+
576
+
577
  .cmp-button.submit:focus,
578
  .cmp-button.submit:hover,
579
  .theme-actions .activate:focus,
583
  border: none
584
  }
585
 
586
+ .theme-wrapper .button {
587
+ border: 2px solid #ffffff!important;
588
+ background: transparent;
589
+ width: 180px;
590
+ line-height: 2.5em;
591
+ height: 3em;
592
  }
593
 
594
+ .theme-wrapper .button.theme-select input[type=radio] {
595
+ position: relative;
596
+ background: transparent;
597
+ border: none;
598
+ outline: none;
599
+ -webkit-box-shadow: none;
600
+ box-shadow: none;
601
  }
602
 
603
+ .theme-wrapper .button.theme-select input[type=radio]::before {
604
+ content: none;
 
605
  }
606
 
607
+ .theme-wrapper .button.theme-select input[type=radio]::after {
608
+ content: '';
609
+ font-family: fontAwesome;
610
+ content: "\f096";
611
+ position: absolute;
612
+ top: 3px;
613
+ left: 0;
614
+ opacity: 1;
615
+ color: #ffffff;
616
  }
617
 
618
+ .theme-wrapper .selected.button.theme-select input[type=radio]::after {
619
+ content: "\f046";
620
+ color: #23282d;
621
  }
622
 
 
 
 
 
623
 
624
+ .theme-wrapper .button:hover,
625
+ .theme-wrapper a.button:hover {
626
+ background: #fff;
627
+ color: #23282d!important;
628
  }
629
 
630
+ .theme-wrapper .button.theme-select:hover input[type=radio]::after,
631
+ .selected.button {
632
+ color: #23282d!important;
 
633
  }
634
 
 
 
 
 
635
 
636
+
637
+ .theme-wrapper .theme-select,
638
+ .theme-wrapper .theme-preview,
639
  .theme-wrapper .theme-purchase {
640
+ margin-bottom: 5px;
 
641
  }
642
 
643
+ .theme-wrapper .theme-select.selected {
644
+ background-color: #32b2ff;
 
645
  }
646
 
647
+ .theme-wrapper .theme-details.button {
648
+ line-height: 0em;
649
+
650
+ }
651
+
652
+
653
+
654
  .cmp-preview {
655
+ background-color: #2485bf!important;
656
  }
657
 
658
  .cmp-preview:active,
659
  .cmp-preview:hover {
660
+ background-color: #32b2ff!important;
661
  }
662
 
663
  .theme-info .theme-purchase {
670
  }
671
 
672
  .theme-info .theme-purchase:focus,
673
+ .theme-info .theme-purchase:hover {
674
+ background-color: #34495e;
 
 
675
  }
676
 
677
  .button i {
940
  .cmp-sidebar-wrapper .widget {
941
  padding: 1em
942
  }
943
+
944
+ /* .theme-wrapper .hide:not(.selected),
945
+ .theme-wrapper.hide {
946
+ opacity: 1
947
+ } */
948
  }
949
 
950
  @media screen and (max-width:1024px) {
954
  .table-wrapper th {
955
  width: 140px
956
  }
957
+
958
+
959
  }
960
 
961
  @media screen and (max-width:782px) {
973
  padding: 2em;
974
  margin-bottom: 1em!important
975
  }
976
+
 
 
 
977
  .theme-overlay .theme-info,
978
  .theme-overlay .theme-screenshots {
979
  width: 100%;
1006
  margin-left: 55px;
1007
  width: calc(100% - 55px)
1008
  }
1009
+ }
1010
+ }
1011
+
css/cmp-settings-style.min.css CHANGED
@@ -1 +1 @@
1
- #wpwrap{overflow-x:hidden}.no-margin{margin:0}.cmp-settings-wrapper{position:relative;margin-top:1em}.wrapper-disabled{opacity:.4}.comingsoon-error,.comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.comingsoon-success{border-left:4px solid #00d221}.padding-bottom{padding-bottom:10px}.select2-container--default .select2-selection--single,input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.select2-container .select2-selection--single{height:35px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.select2-container{width:100%!important}input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}​input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}input[type=text],textarea{width:100%}#niteoCS_countdown_redirect,#niteoCS_countdown_text,.table-wrapper.content,.table-wrapper.custom_css,.table-wrapper.install,.table-wrapper.seo,.table-wrapper.theme-setup{display:none}.wp-upload-form.cmp{padding:4em;display:block}.cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-status .active{background-color:#ddd}.redirect{margin-bottom:0}.help-settings,.subscribers-settings,.table-wrapper,.translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.table-wrapper.closed table,.translate-settings tfoot{display:none}.help-settings,.subscribers-settings,.translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}#unsplash-media,.background-media td fieldset{padding-top:1em}.table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#niteoCS-text-logo,.theme-title,th label{font-weight:600}.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.table-wrapper h4{margin:0}.table-wrapper table{padding:1em;height:auto;width:90%}.table-wrapper .theme-selector{width:100%}.table-wrapper select{margin-bottom:10px;width:100%}.table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}#unsplash_img,.table-wrapper td.theme-selector{max-width:100%}.table-wrapper th{vertical-align:top;width:180px;text-align:left}#delete-banner,#delete-favicon,#delete-logo,#delete-video-thumb{display:none}.social-media{margin-top:0;margin-bottom:3em}.social-inputs{position:relative}.social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}#niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.social-description{margin-top:0}.social-inputs .label:nth-of-type(2){left:62px}.social-inputs .label:nth-of-type(3){left:148px}.social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.social-media i{font-size:2.45em;cursor:pointer}.social-media i.active{color:#d54e21}.social-inputs li{display:none;width:100%}.social-inputs li.active{display:inline-block}#custom_content_font,#custom_headings_font,#unsplash_img,.unsplash-feed{display:none}.social-inputs p{position:relative;padding-left:50px;height:50px}.social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.theme-details,.toggle{cursor:pointer}.social-inputs label{padding-left:100px}.social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}.color-preview,.gradient-preview,.pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.theme-overlay .screenshot,.thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.video-wrapper{position:relative;width:100%;margin-top:1em}.video-wrapper video{margin-top:-35px}#add-pattern{margin-bottom:1em}.info{font-size:12px}.nav-tab i{padding-right:3px}.banner-wrapper,.favicon-wrapper,.logo-wrapper{margin:1em 0}.favicon-wrapper img,.logo-wrapper img{background-color:#efefef;padding:1em}.favicon-wrapper img{max-width:32px}.background-media img,.logo-wrapper img{max-width:100%;width:100%}.logo-wrapper img{max-height:150px;width:auto}#font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}#heading-example{border-bottom:none;line-height:1.5;padding:0}.font-selector td:first-of-type{padding-bottom:2em}.font-selector fieldset{padding:.5em 0}.theme-wrapper{display:inline-block;padding:.5em;margin:2em 2em 2em 0;width:calc(25% - 3em - 5px);text-align:center;border:1px solid #efefef;border-radius:6px}.theme-wrapper.premium{width:calc(33.33% - 3em - 5px)}.theme-wrapper.active{background-color:#ddd}.thumbnail-holder{width:100%;margin-bottom:2em;border-top-left-radius:5px;border-top-right-radius:5px}.thumbnail-holder::before{content:'';display:block;padding-top:56.25%}.toggle,.toggle-wrapper{display:inline-block}.theme-title{float:left;text-transform:uppercase}.theme-version{float:right}.theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .3s,background-color .5s;transition:opacity .3s,background-color .5s}.theme-wrapper .hide.activated,.theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .3s,background-color .5s;transition:opacity .3s,background-color .5s}.theme-inputs{clear:both;border-top:1px solid #efefef;padding-top:.5em}.cmp-button,.cmp-preview,.theme-wrapper .button{height:28px;line-height:28px;padding:0 10px;min-width:80px;border-radius:3px;color:#fff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;box-shadow:none;-webkit-box-shadow:none;text-shadow:none}.cmp-button.submit,.theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.cmp-button.submit:focus,.cmp-button.submit:hover,.theme-actions .activate:focus,.theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.theme-wrapper .button:hover{border:none;color:#fff!important}.theme-wrapper .theme-select{float:left;background-color:#95a5a6}.theme-wrapper .theme-select:focus,.theme-wrapper .theme-select:hover{background-color:#b5b5b5}.theme-wrapper .theme-select.activated{background-color:#27ae60}.theme-wrapper .theme-select.activated:focus,.theme-wrapper .theme-select.activated:hover{background-color:#2ecc71}.theme-wrapper .theme-details.button{float:right;background-color:#2980b9}.theme-wrapper .theme-details.button:focus,.theme-wrapper .theme-details.button:hover{background-color:#3498db}.theme-wrapper .theme-update{float:left;margin:0 5px;background-color:#d35400}.theme-wrapper .theme-update:focus,.theme-wrapper .theme-update:hover{background-color:#e67e22}.theme-wrapper .theme-purchase{float:left;background-color:#2c3e50}.theme-wrapper .theme-purchase.button:focus,.theme-wrapper .theme-purchase.button:hover{background-color:#4f7090}.cmp-preview{background-color:#2485bf!important}.cmp-preview:active,.cmp-preview:hover{background-color:#32b2ff!important}.theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.theme-info .theme-purchase:focus,.theme-info .theme-purchase:hover,.theme-wrapper .theme-purchase:focus,.theme-wrapper .theme-purchase:hover{background-color:#34495e}.button i{margin-right:5px}.theme-purchase a,.theme-purchase a:hover,.theme-purchase a:visited{color:#fff;text-decoration:none}p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.toggle,.toggle:after,.toggle:before{-webkit-transition:all .2s ease-in-out}.fifty-layout input:checked+img,.theme-overlay .screenshots-nav div:hover{opacity:1}.theme-overlay .screenshots-nav .left{float:left}.theme-overlay .screenshots-nav .right{float:right}.theme-description ul{list-style:none;padding-left:2em}.theme-description h4,.theme-description li{font-size:13px}.theme-description .supported i{color:green}.theme-description .not-supported i{color:red}.wp-list-table .column-id{width:5%}.cmp-status{margin-bottom:3em}.toggle{position:relative;width:200px;height:30px;font-weight:600;background:0 0;border:2px solid #f1f1f1;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-radius:15px}.toggle:after,.toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}input[type=checkbox].toggle-checkbox{display:none}.toggle_handler{display:inline-block;position:relative;z-index:1;background:#c0392b;width:90px;height:24px;top:3px;left:5px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-radius:10px 0 0 10px}.toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.toggle-wrapper:hover .toggle_handler{background:#e74c3c}.toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.toggle:before{content:"Disabled";left:22px;color:#fff}.toggle-checkbox:checked+.toggle:before,.toggle:after{color:#23282d}.toggle:after{content:"Enabled";right:26px}.toggle-checkbox:checked+.toggle:after{color:#fff}.fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.fifty-layout input{visibility:hidden;position:absolute;margin:0}.fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px;background:#3ab53a}.cmp-sidebar-wrapper{display:inline-block;width:calc(100% - 6em - 920px);max-width:350px;min-width:300px;margin-left:1em;padding-top:0;vertical-align:top;text-align:center}.cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.widget.donate img{max-width:50px}.widget.donate img.niteo-logo{max-width:120px}.cmp-rate-us .button,.cmp-rate-us a{display:block;text-align:center}.cmp-rate-us a{padding:1em 0}.cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-rate-us form{text-align:center}.subscribers .column-id{width:5%}@media screen and (max-width:1450px){.cmp-inputs-wrapper{min-width:70%}.cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.theme-wrapper,.theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.theme-wrapper,.theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.table-wrapper th{display:block}.cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.table-wrapper table{width:100%}.table-wrapper th{width:140px}}@media screen and (max-width:782px){.social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-inputs-wrapper,.cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.theme-wrapper .hide:not(.selected),.theme-wrapper.hide{opacity:1}.theme-overlay .theme-info,.theme-overlay .theme-screenshots{width:100%;float:none}input[type=text],textarea{font-size:13px}}@media screen and (max-width:560px){.social-inputs .label:nth-of-type(2){left:50px}.social-inputs .label:nth-of-type(3){left:105px}.social-inputs p i{top:22px}.social-inputs input[type=checkbox]{top:28px;left:53px}.social-inputs label{padding-left:55px}.social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}
1
+ #wpwrap{overflow-x:hidden}.no-margin{margin:0}.cmp-settings-wrapper{position:relative;margin-top:1em}.wrapper-disabled{opacity:.4}.comingsoon-error,.comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.comingsoon-success{border-left:4px solid #00d221}.padding-bottom{padding-bottom:10px}.select2-container--default .select2-selection--single,input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.select2-container .select2-selection--single{height:35px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.select2-container{width:100%!important}input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}​input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}input[type=text],textarea{width:100%}#niteoCS_countdown_redirect,#niteoCS_countdown_text,.table-wrapper.content,.table-wrapper.custom_css,.table-wrapper.install,.table-wrapper.seo,.table-wrapper.theme-setup{display:none}.wp-upload-form.cmp{padding:4em;display:block}.cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-status .active{background-color:#ddd}.redirect{margin-bottom:0}.help-settings,.subscribers-settings,.table-wrapper,.translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-inputs-wrapper .translation input,.cmp-inputs-wrapper .translation textarea{width:100%}.cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.table-wrapper.closed table,.translate-settings tfoot{display:none}.help-settings,.subscribers-settings,.translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}#unsplash-media,.background-media td fieldset{padding-top:1em}.table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#niteoCS-text-logo,.theme-title,th label{font-weight:600}.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.table-wrapper h4{margin:0}.table-wrapper table{padding:1em;height:auto;width:90%}.table-wrapper .theme-selector{width:100%}.table-wrapper select{margin-bottom:10px;width:100%}.table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}#unsplash_img,.table-wrapper td.theme-selector{max-width:100%}.table-wrapper th{vertical-align:top;width:180px;text-align:left}#delete-banner,#delete-favicon,#delete-logo,#delete-video-thumb{display:none}.social-media{margin-top:0;margin-bottom:3em}.social-inputs{position:relative}.social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}#niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.social-description{margin-top:0}.social-inputs .label:nth-of-type(2){left:62px}.social-inputs .label:nth-of-type(3){left:148px}.social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.social-media i{font-size:2.45em;cursor:pointer}.social-media i.active{color:#d54e21}.social-inputs li{display:none;width:100%}.social-inputs li.active{display:inline-block}#custom_content_font,#custom_headings_font,#unsplash_img,.unsplash-feed{display:none}.social-inputs p{position:relative;padding-left:50px;height:50px}.social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.theme-details,.toggle{cursor:pointer}.social-inputs label{padding-left:100px}.social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}.color-preview,.gradient-preview,.pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.theme-overlay .screenshot,.thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.video-wrapper{position:relative;width:100%;margin-top:1em}.video-wrapper video{margin-top:-35px}#add-pattern{margin-bottom:1em}.info{font-size:12px}.nav-tab i{padding-right:3px}.banner-wrapper,.favicon-wrapper,.logo-wrapper{margin:1em 0}.favicon-wrapper img,.logo-wrapper img{background-color:#efefef;padding:1em}.favicon-wrapper img{max-width:32px}.background-media img,.logo-wrapper img{max-width:100%;width:100%}.logo-wrapper img{max-height:150px;width:auto}#font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}#heading-example{border-bottom:none;line-height:1.5;padding:0}.font-selector td:first-of-type{padding-bottom:2em}.font-selector fieldset{padding:.5em 0}.theme-wrapper{display:inline-block;margin:2em 1em 2em 0;width:calc(33.33% - 1.5em + 6px);text-align:center;border:1px solid #efefef;border-radius:6px;position:relative}.thumbnail-holder,.thumbnail-holder::before{border-top-left-radius:5px;border-top-right-radius:5px}.theme-wrapper:nth-of-type(3n){margin-right:0}.theme-wrapper.active{background-color:#ddd}.thumbnail-holder{width:100%}.thumbnail-holder::before{content:'';display:block;padding-top:56.25%;-webkit-transition:background-color .1s;transition:background-color .1s}.theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.7)}.toggle,.toggle-wrapper{display:inline-block}.theme-title{float:left;text-transform:uppercase}.theme-version{float:right}.theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px 10px 5px 5px;height:2em;background:#656565;line-height:2em;color:#fff}.active .theme-inputs{background:#27ae60}.theme-inputs .italic{font-style:italic}.theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-button,.cmp-preview,.theme-wrapper .button{height:28px;line-height:28px;padding:0 10px;min-width:80px;border-radius:3px;color:#fff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;box-shadow:none;-webkit-box-shadow:none;text-shadow:none;text-transform:uppercase}.cmp-button.submit,.theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.theme-wrapper a.button:focus,.theme-wrapper a.button:visited{background:0 0;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-button.submit:focus,.cmp-button.submit:hover,.theme-actions .activate:focus,.theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.theme-wrapper .button{border:2px solid #fff!important;background:0 0;width:180px;line-height:2.5em;height:3em}.theme-wrapper .button.theme-select input[type=radio]{position:relative;background:0 0;border:none;outline:0;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper .button.theme-select input[type=radio]::before{content:none}.theme-wrapper .button.theme-select input[type=radio]::after{font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.theme-wrapper .button:hover,.theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.selected.button,.theme-wrapper .button.theme-select:hover input[type=radio]::after{color:#23282d!important}.theme-wrapper .theme-preview,.theme-wrapper .theme-purchase,.theme-wrapper .theme-select{margin-bottom:5px}.theme-wrapper .theme-select.selected{background-color:#32b2ff}.theme-wrapper .theme-details.button{line-height:0}.cmp-preview{background-color:#2485bf!important}.cmp-preview:active,.cmp-preview:hover{background-color:#32b2ff!important}.theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.theme-info .theme-purchase:focus,.theme-info .theme-purchase:hover{background-color:#34495e}.button i{margin-right:5px}.theme-purchase a,.theme-purchase a:hover,.theme-purchase a:visited{color:#fff;text-decoration:none}p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.toggle,.toggle:after,.toggle:before{-webkit-transition:all .2s ease-in-out}.fifty-layout input:checked+img,.theme-overlay .screenshots-nav div:hover{opacity:1}.theme-overlay .screenshots-nav .left{float:left}.theme-overlay .screenshots-nav .right{float:right}.theme-description ul{list-style:none;padding-left:2em}.theme-description h4,.theme-description li{font-size:13px}.theme-description .supported i{color:green}.theme-description .not-supported i{color:red}.wp-list-table .column-id{width:5%}.cmp-status{margin-bottom:3em}.toggle{position:relative;width:200px;height:30px;font-weight:600;background:0 0;border:2px solid #f1f1f1;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-radius:15px}.toggle:after,.toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}input[type=checkbox].toggle-checkbox{display:none}.toggle_handler{display:inline-block;position:relative;z-index:1;background:#c0392b;width:90px;height:24px;top:3px;left:5px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-radius:10px 0 0 10px}.toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.toggle-wrapper:hover .toggle_handler{background:#e74c3c}.toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.toggle:before{content:"Disabled";left:22px;color:#fff}.toggle-checkbox:checked+.toggle:before,.toggle:after{color:#23282d}.toggle:after{content:"Enabled";right:26px}.toggle-checkbox:checked+.toggle:after{color:#fff}.fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.fifty-layout input{visibility:hidden;position:absolute;margin:0}.fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px;background:#3ab53a}.cmp-sidebar-wrapper{display:inline-block;width:calc(100% - 6em - 920px);max-width:350px;min-width:300px;margin-left:1em;padding-top:0;vertical-align:top;text-align:center}.cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.widget.donate img{max-width:50px}.widget.donate img.niteo-logo{max-width:120px}.cmp-rate-us .button,.cmp-rate-us a{display:block;text-align:center}.cmp-rate-us a{padding:1em 0}.cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-rate-us form{text-align:center}.subscribers .column-id{width:5%}@media screen and (max-width:1450px){.cmp-inputs-wrapper{min-width:70%}.cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.theme-wrapper,.theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.theme-wrapper,.theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.table-wrapper th{display:block}.cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.table-wrapper table{width:100%}.table-wrapper th{width:140px}}@media screen and (max-width:782px){.social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-inputs-wrapper,.cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.theme-overlay .theme-info,.theme-overlay .theme-screenshots{width:100%;float:none}input[type=text],textarea{font-size:13px}}@media screen and (max-width:560px){.social-inputs .label:nth-of-type(2){left:50px}.social-inputs .label:nth-of-type(3){left:105px}.social-inputs p i{top:22px}.social-inputs input[type=checkbox]{top:28px;left:53px}.social-inputs label{padding-left:55px}.social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}
img/thumbnails/frame/screenshot1.jpg CHANGED
Binary file
img/thumbnails/frame_thumbnail.jpg CHANGED
Binary file
inc/class-cmp-render_html.php CHANGED
@@ -7,7 +7,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
7
  class cmp_render_html extends niteo_cmp {
8
 
9
  // Render Background
10
- public function cmp_background( $niteoCS_banner, $themeslug ) {
11
  $size = $this->isMobile() ? 'large' : 'full';
12
 
13
  // change background if preview background is set
@@ -19,6 +19,7 @@ class cmp_render_html extends niteo_cmp {
19
  // custom media
20
  case '0':
21
  $banner_id = get_option('niteoCS_banner_id['.$themeslug.']');
 
22
  if ( $banner_id != '' ) {
23
  $banner_ids = explode(',', $banner_id);
24
  $banner_url = wp_get_attachment_image_src( $banner_ids[mt_rand(0, count( $banner_ids ) - 1)], $size);
@@ -32,14 +33,12 @@ class cmp_render_html extends niteo_cmp {
32
  }
33
 
34
  $html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
35
-
36
- return $html;
37
  break;
38
 
39
  case '1':
40
  // unsplash
41
  $background_class = 'image';
42
- $unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
43
  switch ( $unplash_feed ) {
44
  // specific photo from id
45
  case '0':
@@ -79,7 +78,9 @@ class cmp_render_html extends niteo_cmp {
79
  }
80
  } else {
81
  $unsplash_url = $body['urls']['raw'];
82
- } ?>
 
 
83
 
84
  <script>
85
  var unsplash_img = '<?php echo esc_url( $unsplash_url );?>';
@@ -102,6 +103,8 @@ class cmp_render_html extends niteo_cmp {
102
  container.innerHTML = banner;
103
  </script>
104
  <?php
 
 
105
  }
106
 
107
  break;
@@ -110,8 +113,6 @@ class cmp_render_html extends niteo_cmp {
110
  // default image
111
  $banner_url = $this->cmp_themeURL($themeslug).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
112
  $html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
113
-
114
- return $html;
115
  break;
116
 
117
  case '3':
@@ -129,22 +130,16 @@ class cmp_render_html extends niteo_cmp {
129
  }
130
  }
131
  $html = '<div id="background-image" class="pattern" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
132
-
133
- return $html;
134
  break;
135
 
136
  case '4':
137
  // Color
138
  $color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
139
  $html ='<div id="background-image" class="color loaded" style="background-color:'.esc_url( $color ).'"></div>';
140
-
141
- return $html;
142
  break;
143
 
144
  case '5':
145
  $html = '<div id="player" class="video-banner"></div>';
146
-
147
- return $html;
148
  break;
149
 
150
  case '6':
@@ -162,17 +157,20 @@ class cmp_render_html extends niteo_cmp {
162
 
163
 
164
  $html = '<div id="background-image" class="gradient loaded" style="background:-moz-linear-gradient(-45deg, '.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%);background:-webkit-linear-gradient(-45deg, '.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%);background:linear-gradient(135deg,'.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%)"></div>';
165
-
166
- return $html;
167
  break;
168
-
169
  default:
170
  break;
171
  }
 
 
 
 
 
 
172
  }
173
 
174
  // render slider
175
- public function cmp_slider( $themeslug ) {
176
 
177
  // change to background if preview background is set
178
  if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
@@ -182,19 +180,18 @@ class cmp_render_html extends niteo_cmp {
182
  }
183
  }
184
 
185
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '2');
186
  $slider_count = get_option('niteoCS_slider_count['.$themeslug.']', '3');
187
- $slider_fade = get_option('niteoCS_slider_effect['.$themeslug.']', 'false');
188
  $slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
189
  ?>
190
 
191
  <div id="slider-wrapper">
192
  <div id="slider">
193
  <?php
194
-
195
  switch ( $niteoCS_banner ) {
196
 
197
- // custom media
198
  case '0':
199
  $banner_id = get_option('niteoCS_banner_id['.$themeslug.']');
200
  $size = $this->isMobile() ? 'large' : 'full';
@@ -301,6 +298,11 @@ class cmp_render_html extends niteo_cmp {
301
  } ?>
302
  </div>
303
  </div>
 
 
 
 
 
304
 
305
  <div class="prev"></div>
306
  <div class="next"></div>
@@ -326,14 +328,22 @@ class cmp_render_html extends niteo_cmp {
326
  $('#slider').slick('slickNext');
327
  });
328
  </script>
329
- <?php
330
 
 
331
  return;
332
  }
333
 
334
  // render Social Icons
335
- public function cmp_social_icons( $mode = 'icon' ) {
336
- // migrade social media to new option after update 1.4.0
 
 
 
 
 
 
 
 
337
  if ( get_option('niteoCS_socialmedia') ) {
338
 
339
  $socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
@@ -341,7 +351,7 @@ class cmp_render_html extends niteo_cmp {
341
  //sort social icons array by hidden, then order key
342
  uasort( $socialmedia , array($this,'sort_social') );
343
 
344
- $html = '<ul class="social-list">';
345
 
346
  ob_start();
347
 
@@ -521,13 +531,10 @@ class cmp_render_html extends niteo_cmp {
521
 
522
  }
523
  </script>
524
- <?php
525
 
526
- return;
527
- }
528
 
529
- // return script for redirect
530
- public function niteo_redirect() {
531
  if ( $this->cmp_status() == 3 ) {
532
  $url = get_option('niteoCS_URL_redirect');
533
  $time = get_option('niteoCS_redirect_time'); ?>
@@ -557,7 +564,7 @@ class cmp_render_html extends niteo_cmp {
557
 
558
  // if subsctbiers is niteo, render our html form
559
  } else if ( $subscribe == '2' ) {
560
- $niteoCS_subscribe_label = get_option('niteoCS_subscribe_label', 'Type your email and get notified');
561
 
562
  if ( get_option('niteoCS_translation') ) {
563
  $translation = json_decode( get_option('niteoCS_translation'), true );
@@ -580,7 +587,7 @@ class cmp_render_html extends niteo_cmp {
580
  <?php wp_nonce_field('save_options','save_options_field'); ?>
581
  <?php
582
  if ( $niteoCS_subscribe_label != '' ) { ?>
583
- <label for="EMAIL"><?php echo esc_html($niteoCS_subscribe_label);?></label>
584
  <?php
585
  } ?>
586
  <input type="email" id="email-subscribe" name="EMAIL" placeholder="<?php echo esc_attr($placeholder);?>" required>
@@ -691,4 +698,165 @@ class cmp_render_html extends niteo_cmp {
691
  return;
692
  }
693
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
694
  }
7
  class cmp_render_html extends niteo_cmp {
8
 
9
  // Render Background
10
+ public function cmp_background( $niteoCS_banner, $themeslug, $overlay = false ) {
11
  $size = $this->isMobile() ? 'large' : 'full';
12
 
13
  // change background if preview background is set
19
  // custom media
20
  case '0':
21
  $banner_id = get_option('niteoCS_banner_id['.$themeslug.']');
22
+
23
  if ( $banner_id != '' ) {
24
  $banner_ids = explode(',', $banner_id);
25
  $banner_url = wp_get_attachment_image_src( $banner_ids[mt_rand(0, count( $banner_ids ) - 1)], $size);
33
  }
34
 
35
  $html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
 
 
36
  break;
37
 
38
  case '1':
39
  // unsplash
40
  $background_class = 'image';
41
+ $unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '3');
42
  switch ( $unplash_feed ) {
43
  // specific photo from id
44
  case '0':
78
  }
79
  } else {
80
  $unsplash_url = $body['urls']['raw'];
81
+ }
82
+
83
+ ob_start(); ?>
84
 
85
  <script>
86
  var unsplash_img = '<?php echo esc_url( $unsplash_url );?>';
103
  container.innerHTML = banner;
104
  </script>
105
  <?php
106
+
107
+ $html = ob_get_clean();
108
  }
109
 
110
  break;
113
  // default image
114
  $banner_url = $this->cmp_themeURL($themeslug).$themeslug.'/img/'.$themeslug.'_banner_'.$size.'.jpg';
115
  $html = '<div id="background-image" class="image" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
 
 
116
  break;
117
 
118
  case '3':
130
  }
131
  }
132
  $html = '<div id="background-image" class="pattern" style="background-image:url(\''.esc_url( $banner_url ).'\')"></div>';
 
 
133
  break;
134
 
135
  case '4':
136
  // Color
137
  $color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
138
  $html ='<div id="background-image" class="color loaded" style="background-color:'.esc_url( $color ).'"></div>';
 
 
139
  break;
140
 
141
  case '5':
142
  $html = '<div id="player" class="video-banner"></div>';
 
 
143
  break;
144
 
145
  case '6':
157
 
158
 
159
  $html = '<div id="background-image" class="gradient loaded" style="background:-moz-linear-gradient(-45deg, '.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%);background:-webkit-linear-gradient(-45deg, '.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%);background:linear-gradient(135deg,'.esc_attr( $niteoCS_gradient_one ).' 0%, '.esc_attr( $niteoCS_gradient_two ).' 100%)"></div>';
 
 
160
  break;
 
161
  default:
162
  break;
163
  }
164
+
165
+ if ( $overlay === true ) {
166
+ $html .= '<div class="background-overlay"></div>';
167
+ }
168
+
169
+ return $html;
170
  }
171
 
172
  // render slider
173
+ public function cmp_slider( $themeslug, $overlay = false ) {
174
 
175
  // change to background if preview background is set
176
  if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
180
  }
181
  }
182
 
183
+ $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
184
  $slider_count = get_option('niteoCS_slider_count['.$themeslug.']', '3');
185
+ $slider_fade = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
186
  $slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
187
  ?>
188
 
189
  <div id="slider-wrapper">
190
  <div id="slider">
191
  <?php
 
192
  switch ( $niteoCS_banner ) {
193
 
194
+ // custom media
195
  case '0':
196
  $banner_id = get_option('niteoCS_banner_id['.$themeslug.']');
197
  $size = $this->isMobile() ? 'large' : 'full';
298
  } ?>
299
  </div>
300
  </div>
301
+
302
+ <?php
303
+ if ( $overlay === true ) {
304
+ echo '<div class="background-overlay"></div>';
305
+ } ?>
306
 
307
  <div class="prev"></div>
308
  <div class="next"></div>
328
  $('#slider').slick('slickNext');
329
  });
330
  </script>
 
331
 
332
+ <?php
333
  return;
334
  }
335
 
336
  // render Social Icons
337
+ public function cmp_social_icons( $mode = 'icon', $title = false ) {
338
+
339
+ $html = '';
340
+
341
+ if ( $title == true ) {
342
+ $soc_title = stripslashes( get_option('niteoCS_soc_title', 'GET SOCIAL WITH US') );
343
+ $html = ( $soc_title == '' ) ? '' : '<h2 class="soc-title">' . esc_html( $soc_title ) . '</h2>';
344
+ }
345
+
346
+ // migrate social media to new option after update 1.4.0
347
  if ( get_option('niteoCS_socialmedia') ) {
348
 
349
  $socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
351
  //sort social icons array by hidden, then order key
352
  uasort( $socialmedia , array($this,'sort_social') );
353
 
354
+ $html = $html.'<ul class="social-list">';
355
 
356
  ob_start();
357
 
531
 
532
  }
533
  </script>
 
534
 
535
+ <?php
 
536
 
537
+ // render redirect script if CMP is in redirect mode
 
538
  if ( $this->cmp_status() == 3 ) {
539
  $url = get_option('niteoCS_URL_redirect');
540
  $time = get_option('niteoCS_redirect_time'); ?>
564
 
565
  // if subsctbiers is niteo, render our html form
566
  } else if ( $subscribe == '2' ) {
567
+ $niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Type your email and get notified'));
568
 
569
  if ( get_option('niteoCS_translation') ) {
570
  $translation = json_decode( get_option('niteoCS_translation'), true );
587
  <?php wp_nonce_field('save_options','save_options_field'); ?>
588
  <?php
589
  if ( $niteoCS_subscribe_label != '' ) { ?>
590
+ <label for="EMAIL"><?php echo esc_html( $niteoCS_subscribe_label );?></label>
591
  <?php
592
  } ?>
593
  <input type="email" id="email-subscribe" name="EMAIL" placeholder="<?php echo esc_attr($placeholder);?>" required>
698
  return;
699
  }
700
 
701
+ /**
702
+ * returns body content.
703
+ *
704
+ * @since 2.4
705
+ * @return HTML
706
+ **/
707
+ public function cmp_get_body() {
708
+
709
+ if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
710
+ $theme_preview = esc_attr( $_GET['theme'] );
711
+
712
+ switch ( $theme_preview ) {
713
+ case 'hardwork':
714
+ case 'hardwork_premium':
715
+ return '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas. Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
716
+ break;
717
+
718
+ case 'countdown':
719
+ return '<h2>We are currently improving our site</h2>';
720
+ break;
721
+
722
+ case 'frame':
723
+ return '<p>Stay tuned for new features!</p>';
724
+ break;
725
+
726
+ case 'orbit':
727
+ return '<p>Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur..</p>';
728
+ break;
729
+ default:
730
+
731
+ break;
732
+ }
733
+
734
+ } else {
735
+ return wpautop( stripslashes( get_option('niteoCS_body', '') ) );
736
+ }
737
+ }
738
+
739
+ /**
740
+ * render body title.
741
+ *
742
+ * @since 2.4
743
+ * @return HTML
744
+ **/
745
+ public function cmp_get_title( $class = '' ) {
746
+
747
+ if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
748
+ $theme_preview = esc_attr( $_GET['theme'] );
749
+
750
+ switch ( $theme_preview ) {
751
+ case 'hardwork':
752
+ case 'hardwork_premium':
753
+ return '<h2>We will be back soon!</h2>';
754
+ break;
755
+
756
+ case 'eclipse':
757
+ return '<h2>Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a></h2>';
758
+ break;
759
+
760
+ case 'orbit':
761
+ return '<h2>WE ARE IN ORBIT ! STAY TUNED ...</h2>';
762
+ break;
763
+
764
+ default:
765
+ break;
766
+ }
767
+
768
+ } else {
769
+ global $allowedposttags;
770
+ return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
771
+ }
772
+ }
773
+
774
+ /**
775
+ * render Google fonts link.
776
+ *
777
+ * @since 2.4
778
+ * @param array[font_family],[font_variant]
779
+ * @return HTML
780
+ **/
781
+ public function cmp_get_fonts( $heading_font = array(), $content_font = array() ) {
782
+
783
+ return '<link href="https://fonts.googleapis.com/css?family='. esc_attr( str_replace(' ', '+', $heading_font['family']) ) .':'. esc_attr(str_replace('italic', 'i', $heading_font['variant'] )) .'|'. esc_attr( str_replace(' ', '+', $content_font['family']) ) .':'. esc_attr(str_replace('italic', '', $content_font['variant'] )) .','. esc_attr(str_replace('italic', '', $content_font['variant'] )) .'i" rel="stylesheet">';
784
+ }
785
+
786
+ /**
787
+ * render theme head SEO.
788
+ *
789
+ * @since 2.4
790
+ * @return HTML
791
+ **/
792
+ public function cmp_get_seo() {
793
+ ob_start();
794
+ ?>
795
+ <!-- SEO -->
796
+ <meta name="description" content="<?php echo esc_html( stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page')) ); ?>">
797
+ <title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
798
+ <?php
799
+ // display favicon
800
+ $favicon_id = get_option('niteoCS_favicon_id');
801
+
802
+ if ( $favicon_id && $favicon_id != '' ) {
803
+ $favicon_url = wp_get_attachment_image_src( $favicon_id, 'thumbnail' );
804
+ if ( isset($favicon_url[0]) ){ ?>
805
+ <link id="favicon" rel="shortcut icon" href="<?php echo $favicon_url[0];?>" type="image/x-icon"/>
806
+ <?php
807
+ }
808
+ } else {
809
+ wp_site_icon();
810
+ }
811
+
812
+ if ( get_option( 'blog_public' ) == 0 ) { ?>
813
+ <meta name='robots' content='noindex,nofollow' />
814
+ <?php
815
+ }
816
+
817
+ $html = ob_get_clean();
818
+
819
+ return $html;
820
+ }
821
+
822
+ /**
823
+ * render custom CSS.
824
+ *
825
+ * @since 2.4
826
+ * @return HTML
827
+ **/
828
+ public function cmp_get_custom_css() {
829
+ if ( get_option('niteoCS_custom_css', '') !== '' ) {
830
+ return '<style>'.stripslashes( wp_filter_nohtml_kses( get_option('niteoCS_custom_css') ) ) . '</style>';
831
+ }
832
+
833
+ return false;
834
+ }
835
+
836
+ /**
837
+ * render copyright.
838
+ *
839
+ * @since 2.4
840
+ * @return HTML
841
+ **/
842
+ public function cmp_get_copyright() {
843
+ if ( get_option('niteoCS_copyright', 'Copyright 2017 by NiteoThemes. All rights reserved.' ) !== '' ) {
844
+ $copyright = stripslashes(get_option('niteoCS_copyright', 'Copyright 2017 by NiteoThemes. All rights reserved.'));
845
+ $allowed_html = array(
846
+ 'a' => array(
847
+ 'href' => array(),
848
+ 'title' => array()
849
+ ),
850
+ 'br' => array(),
851
+ 'em' => array(),
852
+ 'strong' => array(),
853
+ );
854
+
855
+ return '<p class="copyright">'.wp_kses( $copyright, $allowed_html ).'</p>';
856
+
857
+ }
858
+
859
+ return false;
860
+ }
861
+
862
  }
inc/class-cmp-render_settings.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+
4
+
5
+
6
+ /**
7
+ * Create custom Class for CMP render settings to avoid repeating fields
8
+ *
9
+ * @since 2.4
10
+ */
11
+ if ( ! class_exists( 'cmp_render_settings' ) ) {
12
+ class cmp_render_settings {
13
+
14
+ /**
15
+ * Settings Constructor.
16
+ *
17
+ * @since 2.4
18
+ */
19
+ function __construct() {
20
+
21
+ }
22
+
23
+
24
+ /**
25
+ * Submit Settings Button.
26
+ *
27
+ * @since 2.4
28
+ */
29
+ public function submit() {
30
+
31
+ ob_start(); ?>
32
+
33
+ <tr><th>
34
+ <p class="cmp-submit">
35
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
36
+ <input type="submit" name="submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
37
+ </p>
38
+ </th></tr>
39
+
40
+ <?php
41
+
42
+ return ob_get_clean();
43
+ }
44
+
45
+ }
46
+ }
inc/render-partials/partial-test.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
-
4
-
5
- var_dump($this->isMobile());
 
 
 
 
 
inc/settings/settings-background.php CHANGED
@@ -14,39 +14,39 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
14
 
15
  <p>
16
  <label title="Default Banner">
17
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="2"<?php if ( $niteoCS_banner == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
18
  </label>
19
  </p>
20
 
21
  <p>
22
  <label title="Custom banner">
23
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_banner == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Custom Images', 'cmp-coming-soon-maintenance');?>
24
  </label>
25
  </p>
26
 
27
  <p>
28
  <label title="Unsplash banner">
29
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $niteoCS_banner == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Unsplash library', 'cmp-coming-soon-maintenance');?>
30
  </label>
31
  </p>
32
  <p>
33
  <label title="Video Banner">
34
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="5"<?php if ( $niteoCS_banner == 5) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Video', 'cmp-coming-soon-maintenance');?>
35
  </label>
36
  </p>
37
  <p>
38
  <label title="Pattern Banner">
39
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="3"<?php if ( $niteoCS_banner == 3) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Graphic Pattern', 'cmp-coming-soon-maintenance');?>
40
  </label>
41
  </p>
42
  <p>
43
  <label title="Solid Color Banner">
44
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="4"<?php if ( $niteoCS_banner == 4) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Solid Color', 'cmp-coming-soon-maintenance');?>
45
  </label>
46
  </p>
47
  <p>
48
  <label title="Gradient Banner">
49
- <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="6"<?php if ( $niteoCS_banner == 6) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Gradient Color', 'cmp-coming-soon-maintenance');?>
50
  </label>
51
  </p>
52
 
@@ -56,10 +56,10 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
56
  <td class="theme_background">
57
 
58
  <fieldset id="custom_banner">
59
- <input type="hidden" class="widefat" id="niteoCS-banner-id" name="niteoCS_banner_id_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_custom_id ); ?>" />
60
- <input id="add-banner" type="button" class="button" value="Media Library" />
61
  <p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp-coming-soon-maintenance')?></p>
62
- <div class="banner-wrapper">
63
  <?php
64
  if ( isset( $niteoCS_banner_custom_id ) && $niteoCS_banner_custom_id != '' ) {
65
  $ids = explode( ',', $niteoCS_banner_custom_id );
@@ -72,7 +72,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
72
  }
73
  ?>
74
  </div>
75
- <input id="delete-banner" type="button" class="button" value="Delete Media" />
76
  </fieldset>
77
 
78
  <fieldset id="unsplash_banner">
@@ -244,12 +244,9 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
244
 
245
  </td>
246
  </tr>
247
- <tr><th>
248
- <p class="cmp-submit">
249
- <?php wp_nonce_field('save_options','save_options_field'); ?>
250
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
251
- </p>
252
- </th></tr>
253
  </tbody>
254
  </table>
255
 
14
 
15
  <p>
16
  <label title="Default Banner">
17
+ <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="2"<?php if ( $banner_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Default Media', 'cmp-coming-soon-maintenance');?>
18
  </label>
19
  </p>
20
 
21
  <p>
22
  <label title="Custom banner">
23
+ <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $banner_type == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Custom Images', 'cmp-coming-soon-maintenance');?>
24
  </label>
25
  </p>
26
 
27
  <p>
28
  <label title="Unsplash banner">
29
+ <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $banner_type == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Unsplash library', 'cmp-coming-soon-maintenance');?>
30
  </label>
31
  </p>
32
  <p>
33
  <label title="Video Banner">
34
+ <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="5"<?php if ( $banner_type == 5) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Video', 'cmp-coming-soon-maintenance');?>
35
  </label>
36
  </p>
37
  <p>
38
  <label title="Pattern Banner">
39
+ <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="3"<?php if ( $banner_type == 3) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Graphic Pattern', 'cmp-coming-soon-maintenance');?>
40
  </label>
41
  </p>
42
  <p>
43
  <label title="Solid Color Banner">
44
+ <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="4"<?php if ( $banner_type == 4) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Solid Color', 'cmp-coming-soon-maintenance');?>
45
  </label>
46
  </p>
47
  <p>
48
  <label title="Gradient Banner">
49
+ <input type="radio" class="niteoCS_banner" name="niteoCS_banner_<?php echo esc_attr($themeslug);?>" value="6"<?php if ( $banner_type == 6) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Gradient Color', 'cmp-coming-soon-maintenance');?>
50
  </label>
51
  </p>
52
 
56
  <td class="theme_background">
57
 
58
  <fieldset id="custom_banner">
59
+ <input type="hidden" class="widefat" id="niteoCS-images-id" name="niteoCS_banner_id_<?php echo esc_attr($themeslug);?>" type="text" value="<?php echo esc_attr( $niteoCS_banner_custom_id ); ?>" />
60
+ <input id="add-images" type="button" class="button" value="Media Library" />
61
  <p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp-coming-soon-maintenance')?></p>
62
+ <div class="images-wrapper">
63
  <?php
64
  if ( isset( $niteoCS_banner_custom_id ) && $niteoCS_banner_custom_id != '' ) {
65
  $ids = explode( ',', $niteoCS_banner_custom_id );
72
  }
73
  ?>
74
  </div>
75
+ <input id="delete-images" type="button" class="button" value="Delete Media" />
76
  </fieldset>
77
 
78
  <fieldset id="unsplash_banner">
244
 
245
  </td>
246
  </tr>
247
+
248
+ <?php echo $this->render_settings->submit(); ?>
249
+
 
 
 
250
  </tbody>
251
  </table>
252
 
inc/settings/settings-counter.php CHANGED
@@ -113,12 +113,9 @@ $niteoCS_counter_heading = get_option('niteoCS_counter_heading', 'STAY TUNED, W
113
  </fieldset>
114
  </td>
115
  </tr>
116
- <tr><th>
117
- <p class="cmp-submit">
118
- <?php wp_nonce_field('save_options','save_options_field'); ?>
119
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
120
- </p>
121
- </th></tr>
122
  </table>
123
 
124
  </div>
113
  </fieldset>
114
  </td>
115
  </tr>
116
+
117
+ <?php echo $this->render_settings->submit(); ?>
118
+
 
 
 
119
  </table>
120
 
121
  </div>
inc/settings/settings-footer.php CHANGED
@@ -10,12 +10,8 @@
10
  </fieldset>
11
  </td>
12
  </tr>
13
- <tr><th>
14
- <p class="cmp-submit">
15
- <?php wp_nonce_field('save_options','save_options_field'); ?>
16
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
17
- </p>
18
- </th></tr>
19
 
20
  </tbody>
21
  </table>
@@ -88,12 +84,8 @@
88
  </td>
89
  </tr>
90
 
91
- <tr><th>
92
- <p class="cmp-submit">
93
- <?php wp_nonce_field('save_options','save_options_field'); ?>
94
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
95
- </p>
96
- </th></tr>
97
  </table>
98
  </div>
99
  <?php endif;?>
10
  </fieldset>
11
  </td>
12
  </tr>
13
+
14
+ <?php echo $this->render_settings->submit(); ?>
 
 
 
 
15
 
16
  </tbody>
17
  </table>
84
  </td>
85
  </tr>
86
 
87
+ <?php echo $this->render_settings->submit(); ?>
88
+
 
 
 
 
89
  </table>
90
  </div>
91
  <?php endif;?>
inc/settings/settings-logo.php CHANGED
@@ -59,12 +59,9 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
59
  <p class="disabled-logo" <?php echo ( $niteoCS_logo_type != 'disabled') ? 'style="display:none"' : '';?>><?php _e('Logo is disabled', 'cmp-coming-soon-maintenance');?></p>
60
  </td>
61
  </tr>
62
- <tr><th>
63
- <p class="cmp-submit">
64
- <?php wp_nonce_field('save_options','save_options_field'); ?>
65
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
66
- </p>
67
- </th></tr>
68
  </tbody>
69
  </table>
70
  </div>
59
  <p class="disabled-logo" <?php echo ( $niteoCS_logo_type != 'disabled') ? 'style="display:none"' : '';?>><?php _e('Logo is disabled', 'cmp-coming-soon-maintenance');?></p>
60
  </td>
61
  </tr>
62
+
63
+ <?php echo $this->render_settings->submit(); ?>
64
+
 
 
 
65
  </tbody>
66
  </table>
67
  </div>
inc/settings/settings-slider.php CHANGED
@@ -100,12 +100,9 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
100
  </fieldset>
101
  </td>
102
  </tr>
103
- <tr><th>
104
- <p class="cmp-submit">
105
- <?php wp_nonce_field('save_options','save_options_field'); ?>
106
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
107
- </p>
108
- </th></tr>
109
  </table>
110
  </div>
111
 
100
  </fieldset>
101
  </td>
102
  </tr>
103
+
104
+ <?php echo $this->render_settings->submit(); ?>
105
+
 
 
 
106
  </table>
107
  </div>
108
 
inc/settings/settings-subscribe.php CHANGED
@@ -71,12 +71,9 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
71
  </td>
72
 
73
  </tr>
74
- <tr><th>
75
- <p class="cmp-submit">
76
- <?php wp_nonce_field('save_options','save_options_field'); ?>
77
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
78
- </p>
79
- </th></tr>
80
  </tbody>
81
  </table>
82
  </div>
71
  </td>
72
 
73
  </tr>
74
+
75
+ <?php echo $this->render_settings->submit(); ?>
76
+
 
 
 
77
  </tbody>
78
  </table>
79
  </div>
js/settings.js CHANGED
@@ -857,7 +857,7 @@ jQuery(document).ready(function($){
857
 
858
  media_upload_button('logo', false, 'image');
859
  media_upload_button('favicon', false, 'image');
860
- media_upload_button('banner', true, 'image');
861
  media_upload_button('pattern', false, 'image');
862
  media_upload_button('video-thumb', false, 'image');
863
  media_upload_button('video', false, 'video');
857
 
858
  media_upload_button('logo', false, 'image');
859
  media_upload_button('favicon', false, 'image');
860
+ media_upload_button('images', true, 'image');
861
  media_upload_button('pattern', false, 'image');
862
  media_upload_button('video-thumb', false, 'image');
863
  media_upload_button('video', false, 'video');
js/settings.min.js CHANGED
@@ -25,7 +25,7 @@ if(purchased!='1'&&type=='premium'){var buttonDisabled='disabled ';var buyURL=$w
25
  var screenshots=response.screenshots;var arrows='';if(Object.keys(screenshots).length>1){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>'}
26
  var html=$(['<div class="theme-backdrop">',' <div class="theme-wrap">',' <div class="theme-header">',' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',' </div>',' <div class="theme-about">',' <div class="theme-screenshots">',' <div class="screenshot" style="background-image:url(\''+screenshots['0']+'\')">'+arrows+'</div>',' </div>',' <div class="theme-info">',' <h2 class="theme-name">'+response.name+versionInfo+'</h2>',' <p class="theme-author">By <a href="'+response.author_homepage+'" target="_blank">'+response.author+'</a></p>',noticeHtml,buyButton,' <div class="theme-description">'+response.description+'</div>',' </div>',' </div>',' <div class="theme-actions">',' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response.name+'">Activate</button>',' <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+slug+'&utm_source=cmp&utm_medium=referral&utm_campaign='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response.name+'">Live Preview</a>',' </div>',' </div>','</div>',].join("\n"));jQuery('.theme-overlay.cmp').append(html);jQuery('.theme-overlay.cmp .view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</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('.theme-overlay.cmp .close').click(function(e){e.preventDefault();jQuery('body').removeClass('modal-open');jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast')});jQuery('.theme-overlay.cmp .activate').click(function(e){e.preventDefault();jQuery('input[name="select_theme"]').each(function(){if(jQuery(this).val()==slug){jQuery(this).prop('checked',!0);jQuery('.theme-select').removeClass('selected');jQuery(this).parent().addClass('selected')}});jQuery('#csoptions').submit()});jQuery('.screenshots-nav .right').click(function(){i++;if(i==Object.keys(screenshots).length){i=0}
27
  if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}});jQuery('.screenshots-nav .left').click(function(){i--;if(i<0){i=Object.keys(screenshots).length-1}
28
- if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}})}})});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('banner',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');$('#niteoCS_overlay_opacity').on('input',function(){$(this).trigger('change')});jQuery('#niteoCS_overlay_opacity').change(function(){if(this.value==0){jQuery('#current-opacity').html(': transparent')}else{jQuery('#current-opacity').html(': '+this.value)}});function ucwords(str){return(str+'').replace(/^([a-z])|\s+([a-z])/g,function($1){return $1.toUpperCase()})}
29
  function strtolower(str){return(str+'').toLowerCase()}
30
  function media_upload_button(name,multiple,type){var $container=jQuery('.'+name+'-wrapper');var $add_button=jQuery('#add-'+name);var $delete_button=jQuery('#delete-'+name);var image;var imgID='';var title=name.replace('-',' ');title=title[0].toUpperCase()+title.slice(1);if(jQuery('#niteoCS-'+name+'-id').val()!=''){$delete_button.css('display','block')}
31
  $add_button.click(function(e){e.preventDefault();if(media_uploader){media_uploader.open();return}
25
  var screenshots=response.screenshots;var arrows='';if(Object.keys(screenshots).length>1){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>'}
26
  var html=$(['<div class="theme-backdrop">',' <div class="theme-wrap">',' <div class="theme-header">',' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',' </div>',' <div class="theme-about">',' <div class="theme-screenshots">',' <div class="screenshot" style="background-image:url(\''+screenshots['0']+'\')">'+arrows+'</div>',' </div>',' <div class="theme-info">',' <h2 class="theme-name">'+response.name+versionInfo+'</h2>',' <p class="theme-author">By <a href="'+response.author_homepage+'" target="_blank">'+response.author+'</a></p>',noticeHtml,buyButton,' <div class="theme-description">'+response.description+'</div>',' </div>',' </div>',' <div class="theme-actions">',' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response.name+'">Activate</button>',' <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+slug+'&utm_source=cmp&utm_medium=referral&utm_campaign='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response.name+'">Live Preview</a>',' </div>',' </div>','</div>',].join("\n"));jQuery('.theme-overlay.cmp').append(html);jQuery('.theme-overlay.cmp .view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</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('.theme-overlay.cmp .close').click(function(e){e.preventDefault();jQuery('body').removeClass('modal-open');jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast')});jQuery('.theme-overlay.cmp .activate').click(function(e){e.preventDefault();jQuery('input[name="select_theme"]').each(function(){if(jQuery(this).val()==slug){jQuery(this).prop('checked',!0);jQuery('.theme-select').removeClass('selected');jQuery(this).parent().addClass('selected')}});jQuery('#csoptions').submit()});jQuery('.screenshots-nav .right').click(function(){i++;if(i==Object.keys(screenshots).length){i=0}
27
  if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}});jQuery('.screenshots-nav .left').click(function(){i--;if(i<0){i=Object.keys(screenshots).length-1}
28
+ if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}})}})});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');$('#niteoCS_overlay_opacity').on('input',function(){$(this).trigger('change')});jQuery('#niteoCS_overlay_opacity').change(function(){if(this.value==0){jQuery('#current-opacity').html(': transparent')}else{jQuery('#current-opacity').html(': '+this.value)}});function ucwords(str){return(str+'').replace(/^([a-z])|\s+([a-z])/g,function($1){return $1.toUpperCase()})}
29
  function strtolower(str){return(str+'').toLowerCase()}
30
  function media_upload_button(name,multiple,type){var $container=jQuery('.'+name+'-wrapper');var $add_button=jQuery('#add-'+name);var $delete_button=jQuery('#delete-'+name);var image;var imgID='';var title=name.replace('-',' ');title=title[0].toUpperCase()+title.slice(1);if(jQuery('#niteoCS-'+name+'-id').val()!=''){$delete_button.css('display','block')}
31
  $add_button.click(function(e){e.preventDefault();if(media_uploader){media_uploader.open();return}
niteo-cmp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: CMP - Coming Soon & Maintenance Plugin
4
  Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
5
  Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
6
- Version: 2.3.1
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -18,7 +18,7 @@ class niteo_cmp {
18
  public function __construct() {
19
  $this->author = 'NiteoThemes';
20
  $this->author_homepage = 'https://niteothemes.com';
21
- $this->version = '2.3.1';
22
  $this->dev = false;
23
  $this->plugins_dir_path = plugin_dir_path( __DIR__ );
24
  if ( $this->plugins_dir_path == './') {
@@ -46,11 +46,8 @@ class niteo_cmp {
46
 
47
  }
48
 
49
-
50
  public function cmp() {
51
  $this->__construct();
52
-
53
-
54
  }
55
 
56
  public function init() {
@@ -83,30 +80,49 @@ class niteo_cmp {
83
  }
84
 
85
  public function cmp_adminInit() {
86
- wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version);
87
- wp_enqueue_style('cmp-style');
88
- wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
89
- wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
90
- wp_register_style( 'animate-css', plugins_url('/css/animate'.$this->minified.'.css', __FILE__) );
91
- wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
92
-
93
- wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
94
- wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
95
- wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
96
- wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont'), $this->version);
97
- wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
 
 
 
 
 
 
 
 
98
 
99
  }
100
 
101
  // enqueue admin css and scripts only if admin is logged in
102
  public function cmp_add_admin_style() {
 
 
 
 
 
 
103
  $current_user = wp_get_current_user();
104
- if ( user_can( $current_user, 'administrator' ) ) {
105
- wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', $this->version);
106
- wp_enqueue_style( 'cmp_admin_style' );
107
- wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), $this->version);
108
- wp_enqueue_script( 'cmp_admin_script' );
109
- }
 
 
 
 
 
110
 
111
  }
112
 
@@ -125,7 +141,6 @@ class niteo_cmp {
125
  if (in_array( $this->cmp_selectedTheme(), $this->premium_installed ) ) {
126
  wp_enqueue_style('animate-css');
127
  }
128
-
129
  }
130
 
131
  // remove default wp version from handles
@@ -192,8 +207,8 @@ class niteo_cmp {
192
  }
193
 
194
 
195
- public function cmp_asset_url($filepath) {
196
- return plugins_url( $filepath,__FILE__ );
197
  }
198
 
199
  // function to display CMP landing page
@@ -201,10 +216,12 @@ class niteo_cmp {
201
 
202
  // check if preview is set
203
  if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
 
204
  // register html class for rendering of HTML elements in Themes
205
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
206
  $html = new cmp_render_html();
207
- // iframe preview with sidebar controls
 
208
  if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
209
  if ( file_exists(dirname(__FILE__) . '/inc/preview-iframe.php') ) {
210
  require_once (dirname(__FILE__) . '/inc/preview-iframe.php');
@@ -212,18 +229,18 @@ class niteo_cmp {
212
  }
213
  }
214
 
215
- // for themes preview demos
216
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
217
- $slug = $_GET['theme'];
218
 
219
- if ( file_exists($this->cmp_themePath($slug).$slug.'/'.$slug.'-theme.php') ) {
220
- require_once ($this->cmp_themePath($slug).$slug.'/'.$slug.'-theme.php');
221
  die();
222
  }
223
 
224
  }
225
 
226
- // for admin: render CMP Theme when preview is set
227
  if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
228
  require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
229
  die();
@@ -384,17 +401,28 @@ class niteo_cmp {
384
  }
385
  }
386
 
387
- // display admin notice
388
  public function cmp_admin_bar(){
 
389
  require_once(ABSPATH . 'wp-admin/includes/screen.php');
390
 
 
 
 
 
 
391
  $current_user = wp_get_current_user();
392
 
393
- if (!user_can( $current_user, 'administrator' )) {
394
- return;
395
- }
 
 
 
 
396
 
397
  global $wp_admin_bar;
 
398
  $class = '';
399
  $msg= '';
400
 
@@ -412,6 +440,7 @@ class niteo_cmp {
412
  if ( isset($_POST['cmp_status']) ) {
413
  update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
414
  } else {
 
415
  update_option('niteoCS_status', false);
416
  }
417
 
@@ -451,12 +480,17 @@ class niteo_cmp {
451
  'title' => $msg,
452
  'meta' => array( 'class' => 'cmp-notice'.$class ),
453
  ) );
454
- $wp_admin_bar->add_node( array(
455
- 'id' => 'cmp-settings',
456
- 'title' => __('CMP Settings', 'cmp-coming-soon-maintenancee'),
457
- 'href' => admin_url('admin.php?page=cmp-settings'),
458
- 'parent' => 'cmp-admin-notice'
459
- ));
 
 
 
 
 
460
  $wp_admin_bar->add_node( array(
461
  'id' => 'cmp-preview',
462
  'title' => __('CMP Preview', 'cmp-coming-soon-maintenancee'),
@@ -514,12 +548,12 @@ class niteo_cmp {
514
  // returns list of premium themes => manually defined
515
  public function cmp_premium_themes() {
516
  $premium_themes = array();
517
- array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://niteothemes.com/projects/cmp-hardwork-premium-theme/?utm_source=cmp&utm_medium=referral&utm_campaign=hardwork_premium', 'price' => '10') );
518
- array_push( $premium_themes, array('name' => 'fifty', 'url' => 'https://niteothemes.com/projects/cmp-fifty-premium-theme/?utm_source=cmp&utm_medium=referral&utm_campaign=fifty', 'price' => '10') );
519
- array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://niteothemes.com/projects/cmp-frame-theme/?utm_source=cmp&utm_medium=referral&utm_campaign=frame', 'price' => '0') );
520
- array_push( $premium_themes, array('name' => 'eclipse', 'url' => 'https://niteothemes.com/projects/cmp-eclipse-theme/?utm_source=cmp&utm_medium=referral&utm_campaign=eclipse', 'price' => '0') );
521
- array_push( $premium_themes, array('name' => 'postery', 'url' => 'https://niteothemes.com/projects/cmp-postery-theme/?utm_source=cmp&utm_medium=referral&utm_campaign=postery', 'price' => '0') );
522
- // array_push( $premium_themes, array('name' => 'orbit', 'url' => 'https://niteothemes.com/projects/cmp-orbit-theme/?utm_source=cmp&utm_medium=referral&utm_campaign=orbit', 'price' => '0') );
523
 
524
  return $premium_themes;
525
  }
@@ -553,12 +587,11 @@ class niteo_cmp {
553
  // check for current theme version
554
  $remote_version = '';
555
  $current_version = '';
556
- $type = 'premium';
557
- $headers = array('Version');
558
 
559
  if ( $this->dev == true ) {
560
  delete_transient( $theme_slug.'_updatecheck' );
561
  }
 
562
  // check if update check transient is set
563
  if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
564
 
@@ -568,25 +601,31 @@ class niteo_cmp {
568
 
569
  // if no error, retrivee body
570
  if ( !is_wp_error( $request ) ) {
 
571
  // decode to json
572
  $remote_version = json_decode( $request['body'], true );
573
 
574
  // get remove version key
575
  if ( isset($remote_version['version']) ) {
 
576
  $remote_version = $remote_version['version'];
577
 
578
  // if remote version is bigger than current, display info about new version
579
  if ( (float)$remote_version > (float)$current_version ) {
 
580
  $title = ucwords(str_replace('_', ' ', $theme_slug));
 
581
  // create nonce
582
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
 
583
  // if admin screen is not in updating theme
584
  if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
585
 
586
- $transient = '<div class="update-nag notice notice-warning"><p class="message">'.sprintf(__('There is a <b>recommended</b> update of <b>CMP Theme %s</b> available:', 'cmp-coming-soon-maintenance'), $title).' <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-name="'.esc_attr($title).'" data-remote_url="'.esc_url($this->remoteServer).'" data-new_ver="'.esc_attr($remote_version).'">'.__(' update now','cmp-coming-soon-maintenance').'</a> or <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('view update %s notes.','cmp-coming-soon-maintenance'), $remote_version).'</a></p><div class="release-note"></div></div>';
587
 
588
  // set transient with 12 hour expire
589
  set_transient( $theme_slug.'_updatecheck', $transient, 60*60*12 );
 
590
  echo $transient;
591
  }
592
 
@@ -598,7 +637,7 @@ class niteo_cmp {
598
  }
599
  }
600
 
601
- } else {
602
  echo $updatecheck_transient;
603
  }
604
 
@@ -1147,7 +1186,12 @@ class niteo_cmp {
1147
 
1148
  // check if mobile
1149
  public function isMobile() {
1150
- 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"]);
 
 
 
 
 
1151
  }
1152
 
1153
  // sanitize function
@@ -1200,7 +1244,7 @@ class niteo_cmp {
1200
  $page_ids = get_all_page_ids();
1201
 
1202
  foreach ($page_ids as $page_id ) {
1203
- array_push($page_titles, get_the_title($page_id));
1204
  }
1205
 
1206
  foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
@@ -1429,7 +1473,57 @@ class niteo_cmp {
1429
  if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
1430
  update_option('niteoCS_analytics_status', 'google');
1431
  }
1432
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1433
  }// endif; $this_plugin_updated
1434
  }// endif update plugin and plugins not empty.
1435
  }// endif; $hook_extra
@@ -1437,10 +1531,10 @@ class niteo_cmp {
1437
 
1438
 
1439
  public function add_action_links ( $links ) {
1440
- $mylinks = array(
1441
- '<a href="' . admin_url( 'admin.php?page=cmp-settings' ) . '">CMP Settings</a>',
1442
  );
1443
- return array_merge( $links, $mylinks );
1444
  }
1445
 
1446
 
@@ -1469,7 +1563,7 @@ class niteo_cmp {
1469
 
1470
  $cmpPlugin = new niteo_cmp();
1471
 
1472
- register_uninstall_hook( __FILE__, 'cmp_plugin_delete');
1473
 
1474
 
1475
 
3
  Plugin Name: CMP - Coming Soon & Maintenance Plugin
4
  Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
5
  Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
6
+ Version: 2.4
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
18
  public function __construct() {
19
  $this->author = 'NiteoThemes';
20
  $this->author_homepage = 'https://niteothemes.com';
21
+ $this->version = '2.4';
22
  $this->dev = false;
23
  $this->plugins_dir_path = plugin_dir_path( __DIR__ );
24
  if ( $this->plugins_dir_path == './') {
46
 
47
  }
48
 
 
49
  public function cmp() {
50
  $this->__construct();
 
 
51
  }
52
 
53
  public function init() {
80
  }
81
 
82
  public function cmp_adminInit() {
83
+
84
+ $current_user = wp_get_current_user();
85
+ if ( user_can( $current_user, 'administrator' ) ) {
86
+ // ini render-settings class
87
+ require_once('inc/class-cmp-render_settings.php');
88
+ $this->render_settings = new cmp_render_settings();
89
+
90
+ wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version);
91
+ wp_enqueue_style('cmp-style');
92
+ wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
93
+ wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
94
+ wp_register_style( 'animate-css', plugins_url('/css/animate'.$this->minified.'.css', __FILE__) );
95
+ wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
96
+
97
+ wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
98
+ wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
99
+ wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
100
+ wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont'), $this->version);
101
+ wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
102
+ }
103
 
104
  }
105
 
106
  // enqueue admin css and scripts only if admin is logged in
107
  public function cmp_add_admin_style() {
108
+
109
+ $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
110
+
111
+ // push WP administrator to roles array, since it is default
112
+ array_push( $roles_topbar, 'administrator' );
113
+
114
  $current_user = wp_get_current_user();
115
+
116
+ // if current user cannot access topbar, return
117
+ foreach ( $current_user->roles as $role ) {
118
+ if ( in_array( $role, $roles_topbar ) ) {
119
+ wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', $this->version);
120
+ wp_enqueue_style( 'cmp_admin_style' );
121
+ wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), $this->version);
122
+ wp_enqueue_script( 'cmp_admin_script' );
123
+ break;
124
+ }
125
+ };
126
 
127
  }
128
 
141
  if (in_array( $this->cmp_selectedTheme(), $this->premium_installed ) ) {
142
  wp_enqueue_style('animate-css');
143
  }
 
144
  }
145
 
146
  // remove default wp version from handles
207
  }
208
 
209
 
210
+ public function cmp_asset_url( $filepath ) {
211
+ return plugins_url( $filepath, __FILE__ );
212
  }
213
 
214
  // function to display CMP landing page
216
 
217
  // check if preview is set
218
  if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
219
+
220
  // register html class for rendering of HTML elements in Themes
221
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
222
  $html = new cmp_render_html();
223
+
224
+ // iframe preview with sidebar controls cmp_preview=true&selector=true
225
  if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
226
  if ( file_exists(dirname(__FILE__) . '/inc/preview-iframe.php') ) {
227
  require_once (dirname(__FILE__) . '/inc/preview-iframe.php');
229
  }
230
  }
231
 
232
+ // preview for specific theme cmp_preview=true&theme=slug
233
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
234
+ $theme_preview = esc_attr( $_GET['theme'] );
235
 
236
+ if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
237
+ require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
238
  die();
239
  }
240
 
241
  }
242
 
243
+ // render theme preview cmp_preview=true
244
  if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
245
  require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
246
  die();
401
  }
402
  }
403
 
404
+ // display admin topbar notice
405
  public function cmp_admin_bar(){
406
+
407
  require_once(ABSPATH . 'wp-admin/includes/screen.php');
408
 
409
+ $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
410
+
411
+ // push WP administrator to roles array, since it is default
412
+ array_push( $roles_topbar, 'administrator' );
413
+
414
  $current_user = wp_get_current_user();
415
 
416
+ // if current user cannot access topbar, return
417
+ foreach ( $current_user->roles as $role ) {
418
+ if ( !in_array( $role, $roles_topbar ) ) {
419
+ return false;
420
+ }
421
+ };
422
+
423
 
424
  global $wp_admin_bar;
425
+
426
  $class = '';
427
  $msg= '';
428
 
440
  if ( isset($_POST['cmp_status']) ) {
441
  update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
442
  } else {
443
+
444
  update_option('niteoCS_status', false);
445
  }
446
 
480
  'title' => $msg,
481
  'meta' => array( 'class' => 'cmp-notice'.$class ),
482
  ) );
483
+
484
+ // Display CMP Settings in topbar only for administrator
485
+ if ( user_can( $current_user, 'administrator' ) ) {
486
+ $wp_admin_bar->add_node( array(
487
+ 'id' => 'cmp-settings',
488
+ 'title' => __('CMP Settings', 'cmp-coming-soon-maintenancee'),
489
+ 'href' => admin_url('admin.php?page=cmp-settings'),
490
+ 'parent' => 'cmp-admin-notice'
491
+ ));
492
+ }
493
+
494
  $wp_admin_bar->add_node( array(
495
  'id' => 'cmp-preview',
496
  'title' => __('CMP Preview', 'cmp-coming-soon-maintenancee'),
548
  // returns list of premium themes => manually defined
549
  public function cmp_premium_themes() {
550
  $premium_themes = array();
551
+ array_push( $premium_themes, array('name' => 'fifty', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes', 'price' => '10') );
552
+ array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes', 'price' => '5') );
553
+ array_push( $premium_themes, array('name' => 'postery', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes', 'price' => '5') );
554
+ array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes', 'price' => '5') );
555
+ array_push( $premium_themes, array('name' => 'eclipse', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes', 'price' =>'0') );
556
+ array_push( $premium_themes, array('name' => 'orbit', 'url' => 'https://niteothemes.com/?filter=cmp-plugin-themes', 'price' => '0') );
557
 
558
  return $premium_themes;
559
  }
587
  // check for current theme version
588
  $remote_version = '';
589
  $current_version = '';
 
 
590
 
591
  if ( $this->dev == true ) {
592
  delete_transient( $theme_slug.'_updatecheck' );
593
  }
594
+
595
  // check if update check transient is set
596
  if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
597
 
601
 
602
  // if no error, retrivee body
603
  if ( !is_wp_error( $request ) ) {
604
+
605
  // decode to json
606
  $remote_version = json_decode( $request['body'], true );
607
 
608
  // get remove version key
609
  if ( isset($remote_version['version']) ) {
610
+
611
  $remote_version = $remote_version['version'];
612
 
613
  // if remote version is bigger than current, display info about new version
614
  if ( (float)$remote_version > (float)$current_version ) {
615
+
616
  $title = ucwords(str_replace('_', ' ', $theme_slug));
617
+
618
  // create nonce
619
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
620
+
621
  // if admin screen is not in updating theme
622
  if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
623
 
624
+ $transient = '<div class="update-nag notice notice-warning"><p class="message">'.sprintf(__('There is a <b>recommended</b> update of <b>CMP Theme %s</b> available:', 'cmp-coming-soon-maintenance'), $title).' <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type=premium" class="update-theme" data-type="premium" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-name="'.esc_attr($title).'" data-remote_url="'.esc_url($this->remoteServer).'" data-new_ver="'.esc_attr($remote_version).'">'.__(' update now','cmp-coming-soon-maintenance').'</a> or <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('view update %s notes.','cmp-coming-soon-maintenance'), $remote_version).'</a></p><div class="release-note"></div></div>';
625
 
626
  // set transient with 12 hour expire
627
  set_transient( $theme_slug.'_updatecheck', $transient, 60*60*12 );
628
+
629
  echo $transient;
630
  }
631
 
637
  }
638
  }
639
 
640
+ } else if ( $updatecheck_transient != '' ) {
641
  echo $updatecheck_transient;
642
  }
643
 
1186
 
1187
  // check if mobile
1188
  public function isMobile() {
1189
+ if ( isset($_SERVER["HTTP_USER_AGENT"]) ) {
1190
+ 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"]);
1191
+
1192
+ } else {
1193
+ return false;
1194
+ }
1195
  }
1196
 
1197
  // sanitize function
1244
  $page_ids = get_all_page_ids();
1245
 
1246
  foreach ($page_ids as $page_id ) {
1247
+ array_push( $page_titles, get_the_title($page_id) );
1248
  }
1249
 
1250
  foreach (array_combine( $page_ids, $page_titles ) as $id => $name) {
1473
  if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
1474
  update_option('niteoCS_analytics_status', 'google');
1475
  }
1476
+
1477
+ // add social icons to social settings
1478
+ if ( get_option('niteoCS_socialmedia') ) {
1479
+ $niteoCS_socialmedia = stripslashes( get_option('niteoCS_socialmedia') );
1480
+ $socialmedia = json_decode( $niteoCS_socialmedia, true );
1481
+ $update = false;
1482
+
1483
+ // add soundcloud and phone social media in 2.2 update
1484
+ if ( !$this->niteo_in_array_r( 'soundcloud', $socialmedia, true ) ) {
1485
+ $soundcloud = array(
1486
+ 'name' => 'soundcloud',
1487
+ 'url' => '',
1488
+ 'active' => '1',
1489
+ 'hidden' => '1',
1490
+ 'order' => '17',
1491
+ );
1492
+ array_push( $socialmedia, $soundcloud );
1493
+ $update = true;
1494
+ }
1495
+
1496
+ // add whatsapp and phone social media in 2.3 update
1497
+ if ( !$this->niteo_in_array_r( 'whatsapp', $socialmedia, true ) ) {
1498
+ $whatsapp = array(
1499
+ 'name' => 'whatsapp',
1500
+ 'url' => '',
1501
+ 'active' => '1',
1502
+ 'hidden' => '1',
1503
+ 'order' => '18',
1504
+ );
1505
+ array_push( $socialmedia, $whatsapp );
1506
+
1507
+ $phone = array(
1508
+ 'name' => 'phone',
1509
+ 'url' => '',
1510
+ 'active' => '1',
1511
+ 'hidden' => '1',
1512
+ 'order' => '19',
1513
+ );
1514
+ array_push( $socialmedia, $phone );
1515
+ $update = true;
1516
+ }
1517
+
1518
+ if ( $update == true ) {
1519
+ update_option('niteoCS_socialmedia', json_encode( $socialmedia) );
1520
+ }
1521
+ }
1522
+
1523
+ // delete transients for theme updates, to ensure the updates for latest cmp versions runs again
1524
+ foreach ( $this->premium_installed as $theme_slug ) {
1525
+ delete_transient( $theme_slug.'_updatecheck' );
1526
+ }
1527
  }// endif; $this_plugin_updated
1528
  }// endif update plugin and plugins not empty.
1529
  }// endif; $hook_extra
1531
 
1532
 
1533
  public function add_action_links ( $links ) {
1534
+ $settings = array(
1535
+ '<a href="' . admin_url( 'admin.php?page=cmp-settings' ) . '">CMP Settings</a>',
1536
  );
1537
+ return array_merge( $settings, $links );
1538
  }
1539
 
1540
 
1563
 
1564
  $cmpPlugin = new niteo_cmp();
1565
 
1566
+ register_uninstall_hook( __FILE__, array('niteo_cmp', 'cmp_plugin_delete') );
1567
 
1568
 
1569
 
readme.txt CHANGED
@@ -4,30 +4,30 @@ 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.9
7
- Stable tag: 2.3.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- The only coming soon plugin with premium features for free. No PRO versions. Select design from predefined themes, fullscreen background, insert any custom content (including logo, social icons, subscribe forms, and many more).
12
 
13
 
14
  == Description ==
15
 
16
- CMP plugin offers premium features for free, no PRO or paid versions! Settings is user friendly as it can be, you can activate your Maintenance or Coming soon landing page with a single click. You can however customize it in many ways, you can choose from many predefined themes, setup custom logo, background graphics (including videos), custom content, subscribe forms, popular social networks icons, setup typography, colors, SEO, and many more.
17
 
18
  <h3>Live Preview</h3>
19
- <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&utm_source=wp&utm_medium=referral" target="_blank">Click for CMP preview>></a>
20
 
21
- <p>TIP! You can change to different theme or change the theme`s background in expanding right sidebar by clicking "settings icon".</p>
22
 
23
  <h3>Features</h3>
24
  <ul>
25
- <li>Many predefined Themes with different design</li>
26
  <li>Works with any WordPress Theme and on all desktop and mobile devices</li>
27
- <li>Fully responsive and Retina ready</li>
28
  <li>Customize Logo, Typography and Colors</li>
29
  <li>Setup custom Social Icons</li>
30
- <li>Selection of 100 most popular Google fonts with font customization like font-weight,Letter Spacing and Line Height</li>
31
  <li>Predefined subscribe form to store emails in custom database with export to CSV or you can use any 3rd party plugin(Mailchimp, CF7 and etc)</li>
32
  <li>Select and display random beautiful images from most popular <a href="http://unsplash.com" target="_blank">Unsplash source</a> with built-in search API (random images, search by keyword, category, etc) or can use custom photos</li>
33
  <li>Fullscreen background media includes videos (YouTube, custom file video), images (Unsplash library, custom images), Patterns, color Gradients or solid Colors</li>
@@ -111,10 +111,22 @@ CMP plugin offers premium features for free, no PRO or paid versions! Settings i
111
 
112
 
113
  == Changelog ==
114
- <h4>CMP 2.3.1 - fixes countdown responsivness</h4>
 
115
  <ul>
116
- <li>Fixed Countdown theme reponsivness. Thanks @tom80550</li>
 
 
 
 
 
 
 
 
117
 
 
 
 
118
  </ul>
119
 
120
  <h4>CMP 2.3 - minor update</h4>
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
+ Stable tag: 2.4
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ The only complete coming soon plugin with premium features for free. No PRO versions. Select design from predefined themes, set custom graphics including YouTube videos or Unsplash Images, insert and customize any custom content (including logo, social icons, subscribe forms, fonts, and many more).
12
 
13
 
14
  == Description ==
15
 
16
+ CMP plugin offers premium features for free, no PRO versions! With blazing speed and super user friendly settings, you can activate your Maintenance or Coming soon landing page with a single click. Customizable in many ways - predefined themes, custom logo, background graphics (including YouTube videos or Unsplash images), custom content, subscribe forms, popular social networks icons, setup typography, colors, SEO, and many more.
17
 
18
  <h3>Live Preview</h3>
19
+ <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&utm_source=wordpress.org&utm_medium=referral" target="_blank">Click for CMP preview>></a>
20
 
21
+ <p>TIP! You can change to different theme or change the theme`s background grpahic in expanding right sidebar by clicking "settings icon".</p>
22
 
23
  <h3>Features</h3>
24
  <ul>
25
+ <li>Many predefined Themes with completely different design</li>
26
  <li>Works with any WordPress Theme and on all desktop and mobile devices</li>
27
+ <li>Fully responsive</li>
28
  <li>Customize Logo, Typography and Colors</li>
29
  <li>Setup custom Social Icons</li>
30
+ <li>Selection of 100 most popular Google fonts with font customization like Font Weight, Letter Spacing and Line Height</li>
31
  <li>Predefined subscribe form to store emails in custom database with export to CSV or you can use any 3rd party plugin(Mailchimp, CF7 and etc)</li>
32
  <li>Select and display random beautiful images from most popular <a href="http://unsplash.com" target="_blank">Unsplash source</a> with built-in search API (random images, search by keyword, category, etc) or can use custom photos</li>
33
  <li>Fullscreen background media includes videos (YouTube, custom file video), images (Unsplash library, custom images), Patterns, color Gradients or solid Colors</li>
111
 
112
 
113
  == Changelog ==
114
+ <h4>CMP 2.4 - Sweet update</h4>
115
+ <p>*** Please make sure you update all downloaded CMP themes to enable features from this update ***</p>
116
  <ul>
117
+ <li>New theme: Orbit! Go ahead and try it out, it is fun!</li>
118
+ <li>New feature: Possibility to add custom HTML <a href> tags to Copyright. Thanks @lumayaundyo!</li>
119
+ <li>New settings: Background color for Social icons for Construct Theme. Thanks @shi-la!</li>
120
+ <li>New settings: "Top Bar Switch Access" in Advanced page to enable/disable access to Top Bar switcher for specific User roles. Requested by @ebrockway, thanks!</li>
121
+ <li>Fixed single quote escaping for Title, Copyright Title, Social Media Title and Copyright. Thanks @normsash!</li>
122
+ <li>Fixed uninstall hook issue when in some cases the CMP options were not deleted from Database - thanks to @travellingwithtania for pointing out that!</li>
123
+ <li>Fixed "PHP Notice: Undefined index: HTTP_USER_AGENT" message appearing on some specific PHP server installations - thanks to @travellingwithtania for pointing out that!</li>
124
+ <li>Fixed mobile version of Eclipse theme when it kept scrolling up immediately after user scrolled down if there is none or very little content - thanks to @lumayaundyo!</li>
125
+ </ul>
126
 
127
+ <h4>CMP 2.3.1 - fixes countdown responsivness</h4>
128
+ <ul>
129
+ <li>Fixed Countdown theme reponsivness. Thanks @tom80550</li>
130
  </ul>
131
 
132
  <h4>CMP 2.3 - minor update</h4>
themes/construct/construct-defaults.php CHANGED
@@ -10,11 +10,48 @@ $theme_supports = array(
10
  'footer' => true,
11
  );
12
 
13
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '2');
 
 
14
 
15
- $niteoCS_font_headings = get_option('niteoCS_font_headings['.$themeslug.']', 'Fjalla One');
16
- $niteoCS_font_content = get_option('niteoCS_font_content['.$themeslug.']', 'Average Sans');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
- $niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#f37004');
19
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#686868');
20
- $niteoCS_background_color = get_option('niteoCS_background_color['.$themeslug.']', '#ffffff');
10
  'footer' => true,
11
  );
12
 
13
+ if ( isset($_POST['niteoCS_active_color_'.$themeslug]) ) {
14
+ update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color( $_POST['niteoCS_active_color_'.$themeslug]));
15
+ }
16
 
17
+ if ( isset($_POST['niteoCS_font_color_'.$themeslug]) ) {
18
+ update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
19
+ }
20
+
21
+ if ( isset($_POST['niteoCS_background_color_'.$themeslug]) ) {
22
+ update_option('niteoCS_background_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_background_color_'.$themeslug]));
23
+ }
24
+
25
+ if ( isset($_POST['niteoCS_social_background_color_'.$themeslug]) ) {
26
+ update_option('niteoCS_social_background_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_social_background_color_'.$themeslug]));
27
+ }
28
+
29
+ // set theme defaults
30
+ $banner_type = get_option('niteoCS_banner['.$themeslug.']', '2');
31
+ $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#f37004');
32
+ $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#686868');
33
+ $background_color = get_option('niteoCS_background_color['.$themeslug.']', '#ffffff');
34
+ $social_background_color = get_option('niteoCS_social_background_color['.$themeslug.']', '#f8f8f8');
35
+
36
+ $heading_font = array(
37
+ 'family' => get_option('niteoCS_font_headings['.$themeslug.']', 'Fjalla One'),
38
+ 'variant' => get_option('niteoCS_font_headings_variant['.$themeslug.']', '700'),
39
+ 'size' => get_option('niteoCS_font_headings_size['.$themeslug.']', '40'),
40
+ 'spacing' => get_option('niteoCS_font_headings_spacing['.$themeslug.']', '0'),
41
+ );
42
+
43
+ $content_font = array(
44
+ 'family' => get_option('niteoCS_font_content['.$themeslug.']', 'Average Sans'),
45
+ 'variant' => get_option('niteoCS_font_content_variant['.$themeslug.']', 'regular'),
46
+ 'size' => get_option('niteoCS_font_content_size['.$themeslug.']', '17'),
47
+ 'spacing' => get_option('niteoCS_font_content_spacing['.$themeslug.']', '0'),
48
+ 'line-height' => get_option('niteoCS_font_content_lineheight['.$themeslug.']', '1.5'),
49
+ );
50
+
51
+ $heading_font['variant'] = ($heading_font['variant'] =='regular') ? '400' : $heading_font['variant'];
52
+ $heading_font['variant'] = ($heading_font['variant'] =='italic') ? '400' : $heading_font['variant'];
53
+ $content_font['variant'] = ($content_font['variant'] =='regular') ? '400' : $content_font['variant'];
54
+ $content_font['variant'] = ($content_font['variant'] =='italic') ? '400' : $content_font['variant'];
55
+ $heading_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i', $heading_font['variant']);
56
+ $content_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i', $content_font['variant']);
57
 
 
 
 
themes/construct/construct-settings.php CHANGED
@@ -1,28 +1,5 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
- // check onces and wordpress rights, else DIE
4
- if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
5
- if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
6
- die('Sorry, but this request is invalid');
7
- }
8
- }
9
-
10
-
11
- if ( isset($_POST['niteoCS_active_color_'.$themeslug]) ) {
12
- update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color( $_POST['niteoCS_active_color_'.$themeslug]));
13
- }
14
-
15
- if ( isset($_POST['niteoCS_font_color_'.$themeslug]) ) {
16
- update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
17
- }
18
-
19
- if ( isset($_POST['niteoCS_background_color_'.$themeslug]) ) {
20
- update_option('niteoCS_background_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_background_color_'.$themeslug]));
21
- }
22
-
23
- $niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#f37004');
24
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#686868');
25
- $niteoCS_background_color = get_option('niteoCS_background_color['.$themeslug.']', '#ffffff');
26
  ?>
27
 
28
  <div class="table-wrapper theme-setup">
@@ -32,43 +9,51 @@ $niteoCS_background_color = get_option('niteoCS_background_color['.$themeslug.
32
  <th><h4><?php _e('Active Color', 'cmp-coming-soon-maintenance');?></h4></th>
33
  <td>
34
  <fieldset>
35
- <input type="text" name="niteoCS_active_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_active_color" value="<?php echo esc_attr( $niteoCS_active_color); ?>" data-default-color="#f37004" class="regular-text code"><br>
36
  <span><?php _e('Headings and active elements color (buttons, hover links, etc).', 'cmp-coming-soon-maintenance');?></span>
37
  </fieldset>
38
  </td>
39
  </tr>
 
40
  <tr>
41
  <th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
42
  <td>
43
  <fieldset>
44
- <input type="text" name="niteoCS_font_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#686868" class="regular-text code"><br>
45
  </fieldset>
46
  </td>
47
  </tr>
 
48
  <tr>
49
  <th><h4><?php _e('Background Color', 'cmp-coming-soon-maintenance');?></h4></th>
50
  <td>
51
  <fieldset>
52
- <input type="text" name="niteoCS_background_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_background_color" value="<?php echo esc_attr( $niteoCS_background_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
 
 
 
 
 
 
 
 
 
53
  </fieldset>
54
  </td>
55
  </tr>
56
- <tr><th>
57
- <p class="cmp-submit">
58
- <?php wp_nonce_field('save_options','save_options_field'); ?>
59
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
60
- </p>
61
- </th></tr>
62
  </table>
63
 
64
  </div>
65
 
66
  <script>
67
  jQuery(document).ready(function($){
68
-
69
- // ini color picker
70
- jQuery('#niteoCS_font_color').wpColorPicker();
71
- jQuery('#niteoCS_active_color').wpColorPicker();
72
- jQuery('#niteoCS_background_color').wpColorPicker();
73
  });
74
  </script>
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ?>
4
 
5
  <div class="table-wrapper theme-setup">
9
  <th><h4><?php _e('Active Color', 'cmp-coming-soon-maintenance');?></h4></th>
10
  <td>
11
  <fieldset>
12
+ <input type="text" name="niteoCS_active_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_active_color" value="<?php echo esc_attr( $active_color); ?>" data-default-color="#f37004" class="regular-text code"><br>
13
  <span><?php _e('Headings and active elements color (buttons, hover links, etc).', 'cmp-coming-soon-maintenance');?></span>
14
  </fieldset>
15
  </td>
16
  </tr>
17
+
18
  <tr>
19
  <th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
20
  <td>
21
  <fieldset>
22
+ <input type="text" name="niteoCS_font_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_font_color" value="<?php echo esc_attr( $font_color); ?>" data-default-color="#686868" class="regular-text code"><br>
23
  </fieldset>
24
  </td>
25
  </tr>
26
+
27
  <tr>
28
  <th><h4><?php _e('Background Color', 'cmp-coming-soon-maintenance');?></h4></th>
29
  <td>
30
  <fieldset>
31
+ <input type="text" name="niteoCS_background_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_background_color" value="<?php echo esc_attr( $background_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
32
+ </fieldset>
33
+ </td>
34
+ </tr>
35
+
36
+ <tr>
37
+ <th><h4><?php _e('Social Background Color', 'cmp-coming-soon-maintenance');?></h4></th>
38
+ <td>
39
+ <fieldset>
40
+ <input type="text" name="niteoCS_social_background_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_social_background_color" value="<?php echo esc_attr( $social_background_color ); ?>" data-default-color="#f8f8f8" class="regular-text code"><br>
41
  </fieldset>
42
  </td>
43
  </tr>
44
+
45
+ <?php echo $this->render_settings->submit(); ?>
46
+
 
 
 
47
  </table>
48
 
49
  </div>
50
 
51
  <script>
52
  jQuery(document).ready(function($){
53
+ // ini color picker
54
+ jQuery('#niteoCS_font_color').wpColorPicker();
55
+ jQuery('#niteoCS_active_color').wpColorPicker();
56
+ jQuery('#niteoCS_background_color').wpColorPicker();
57
+ jQuery('#niteoCS_social_background_color').wpColorPicker();
58
  });
59
  </script>
themes/construct/construct-theme.php CHANGED
@@ -4,99 +4,53 @@
4
  <head>
5
  <meta charset="<?php bloginfo( 'charset' ); ?>">
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
-
8
- <!-- SEO -->
9
- <meta name="description" content="<?php echo esc_html( stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page')) ); ?>">
10
- <title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
11
 
12
  <?php
13
  $themeslug = 'construct';
14
 
15
- // get theme related settings
16
- $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#f37004');
17
- $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#686868');
18
- $background_color = get_option('niteoCS_background_color['.$themeslug.']', '#ffffff');
19
- $heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Fjalla One');
20
- $content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Average Sans');
21
-
22
- $headings_size = get_option('niteoCS_font_headings_size['.$themeslug.']', '40');
23
- $heading_variant = get_option('niteoCS_font_headings_variant['.$themeslug.']', '700');
24
- $headings_spacing = get_option('niteoCS_font_headings_spacing['.$themeslug.']', '0');
25
- $content_size = get_option('niteoCS_font_content_size['.$themeslug.']', '17');
26
- $content_variant = get_option('niteoCS_font_content_variant['.$themeslug.']', 'regular');
27
- $content_lineheight = get_option('niteoCS_font_content_lineheight['.$themeslug.']', '1.5');
28
- $content_spacing = get_option('niteoCS_font_content_spacing['.$themeslug.']', '0');
29
- $content_variant = ($content_variant =='regular') ? '400' : $content_variant;
30
- $heading_variant = ($heading_variant =='regular') ? '400' : $heading_variant;
31
- $content_variant = ($content_variant =='italic') ? '400' : $content_variant;
32
- $heading_variant = ($heading_variant =='italic') ? '400' : $heading_variant;
33
- $content_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i',$content_variant);
34
- $heading_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i',$heading_variant);
35
-
36
- $logo_type = get_option('niteoCS_logo_type['.$themeslug.']', 'text');
37
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '2');
38
-
39
- if ( $heading_font == 'custom' ) {
40
- $heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
41
- }
42
 
43
- if ( $content_font == 'custom' ) {
44
- $content_font = get_option('niteoCS_font_content_custom['.$themeslug.']');
 
45
  }
46
 
47
- // get global settings
48
- $body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
49
- $body = get_option('niteoCS_body');
50
- $copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
51
- $social_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
52
- $favicon_id = get_option('niteoCS_favicon_id');
53
-
54
- // display favicon
55
- if ( $favicon_id && $favicon_id != '' ) {
56
- $favicon_url = wp_get_attachment_image_src( $favicon_id, 'thumbnail' );
57
- if ( isset($favicon_url[0]) ){
58
- echo '<link id="favicon" rel="shortcut icon" href="'.$favicon_url[0].'" type="image/x-icon"/>';
59
- }
60
- } else {
61
- wp_site_icon();
62
  }
63
 
64
- if ( get_option( 'blog_public' ) == 0 ) {
65
- echo "<meta name='robots' content='noindex,nofollow' />";
66
- } ?>
67
 
68
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
69
 
70
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version;?>" type="text/css" media="all">
71
 
72
- <link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>:<?php echo esc_attr(str_replace('italic', 'i', $heading_variant ));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:<?php echo esc_attr(str_replace('italic', '', $content_variant ));?>,<?php echo esc_attr(str_replace('italic', '', $content_variant ));?>i" rel="stylesheet">
73
 
74
  <style>
75
- body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
76
- body{background-color:<?php echo esc_attr( $background_color ); ?>}
77
- a{color:<?php echo esc_attr( $font_color ); ?>;}
78
- h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
79
- h1,h2,h3,h4,h5,h6,a:hover{color:<?php echo esc_attr( $active_color ); ?>;}
80
  input[type="email"]:focus {border:1px solid <?php echo esc_attr( $active_color ); ?>;}
81
  input[type="submit"]{background-color: <?php echo esc_attr( $active_color ); ?>;}
82
  .social-list a:hover{background:<?php echo esc_attr( $active_color ); ?>;}
83
 
84
- body {font-size:<?php echo esc_attr($content_size);?>px;}
85
- .section-body p {line-height: <?php echo esc_attr($content_lineheight);?>; letter-spacing: <?php echo esc_attr($content_spacing);?>px;font-weight:<?php echo esc_attr($content_font_style['0']);?>;<?php echo isset($content_font_style['1']) ? 'font-style: italic;' : '';?>; }
86
- h1:not(.text-logo),h2, h3,h4,h5,h6,.text-logo-wrapper {font-size:<?php echo esc_attr($headings_size / $content_size);?>em;letter-spacing: <?php echo esc_attr($headings_spacing);?>px; font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : '';?>; }
 
87
  h1 {font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : '';?>;}
88
  </style>
89
 
90
  <?php
91
- // custom CSS
92
- if ( get_option('niteoCS_custom_css', '') !== '' ) { ?>
93
- <!-- custom CSS -->
94
- <style>
95
- <?php
96
-
97
- echo stripslashes(wp_filter_nohtml_kses(get_option('niteoCS_custom_css'))); ?>
98
- </style>
99
- <?php
100
  }
101
 
102
  // render header javascripts
@@ -105,10 +59,9 @@
105
  }
106
 
107
  // echo pattern copyright
108
- if ( $niteoCS_banner == 3 ) {
109
  echo '<!-- Background pattern from Subtle Patterns --!>';
110
  }
111
-
112
  ?>
113
 
114
  </head>
@@ -125,73 +78,63 @@
125
  <section class="section section-banner" id="banner-wrapper">
126
  <?php
127
  if ( method_exists ( $html, 'cmp_background' ) ) {
128
- echo $html->cmp_background( $niteoCS_banner, $themeslug );
129
 
130
  } ?>
131
  </section>
132
 
133
 
134
  <section class="section section-body">
135
-
136
  <?php
137
  // display body title
138
- if ( $body_title != '' ) { ?>
139
- <h2><?php echo esc_html( $body_title );?></h2>
140
- <?php
141
- } ?>
142
-
 
 
 
143
 
144
- <?php echo wpautop( stripslashes( $body ) ); ?>
145
-
146
- <?php
147
  if ( method_exists ( $html, 'cmp_subscribe_form' ) ) {
148
  echo $html->cmp_subscribe_form( );
149
 
150
  } ?>
151
 
152
- <div class="subscribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
153
-
154
  </section>
155
 
156
 
157
  <section class="section section-social">
158
  <?php
159
- if ( $social_title != '') { ?>
160
- <h2><?php echo esc_html( $social_title );?></h2>
161
- <?php
162
- }
163
-
164
  // display social icons
165
  if ( method_exists ( $html, 'cmp_social_icons' ) ) {
166
- echo $html->cmp_social_icons();
167
  } ?>
168
  </section>
169
 
170
  <?php
171
- if ( $copyright != '' ) { ?>
172
- <footer class="section section-footer">
173
- <p><?php echo esc_html( $copyright );?></p>
174
- </footer>
175
- <?php
 
 
 
 
176
  }
177
 
178
- if ( $niteoCS_banner != 5 && $niteoCS_banner != 4 ) { ?>
 
179
  <script type='text/javascript' src='<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug .'/paraxify.min.js';?>'></script>
180
  <?php
181
  }
182
 
183
- // render javascripts
184
  if ( method_exists ( $html, 'cmp_javascripts' ) ) {
185
- $html->cmp_javascripts( $niteoCS_banner, $themeslug );
186
- }
187
-
188
- // render script for redirect
189
- if ( method_exists ( $html, 'niteo_redirect' ) ) {
190
- $html->niteo_redirect();
191
  } ?>
192
 
193
-
194
-
195
  </body>
196
 
197
  </html>
4
  <head>
5
  <meta charset="<?php bloginfo( 'charset' ); ?>">
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
 
 
 
 
7
 
8
  <?php
9
  $themeslug = 'construct';
10
 
11
+ //include theme defaults
12
+ if ( file_exists(dirname(__FILE__).'/'.$themeslug.'-defaults.php') ) {
13
+ require ( dirname(__FILE__).'/'.$themeslug.'-defaults.php' );
14
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ // render SEO
17
+ if ( method_exists ( $html, 'cmp_get_seo' ) ) {
18
+ echo $html->cmp_get_seo();
19
  }
20
 
21
+ // render google fonts link
22
+ if ( method_exists ( $html, 'cmp_get_fonts' ) ) {
23
+ echo $html->cmp_get_fonts( $heading_font, $content_font );
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
 
26
+ ?>
 
 
27
 
28
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
29
 
30
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version;?>" type="text/css" media="all">
31
 
 
32
 
33
  <style>
34
+ body,input {font-family:'<?php echo esc_attr( $content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
35
+ body {background-color:<?php echo esc_attr( $background_color ); ?>}
36
+ a {color:<?php echo esc_attr( $font_color ); ?>;}
37
+ h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr( $heading_font['family'] );?>', 'sans-serif';}
38
+ h1,h2,h3,h4,h5,h6,a:hover {color:<?php echo esc_attr( $active_color ); ?>;}
39
  input[type="email"]:focus {border:1px solid <?php echo esc_attr( $active_color ); ?>;}
40
  input[type="submit"]{background-color: <?php echo esc_attr( $active_color ); ?>;}
41
  .social-list a:hover{background:<?php echo esc_attr( $active_color ); ?>;}
42
 
43
+ body {font-size:<?php echo esc_attr( $content_font['size'] );?>px;}
44
+ .section-body p {line-height: <?php echo esc_attr( $content_font['line-height'] );?>; letter-spacing: <?php echo esc_attr( $content_font['spacing'] );?>px;font-weight:<?php echo esc_attr($content_font_style['0']);?>;<?php echo isset($content_font_style['1']) ? 'font-style: italic;' : '';?>; }
45
+ .section-social {background-color: <?php echo esc_attr( $social_background_color );?>}
46
+ h1:not(.text-logo),h2, h3,h4,h5,h6,.text-logo-wrapper {font-size:<?php echo esc_attr( $heading_font['size'] / $content_font['size'] );?>em;letter-spacing: <?php echo esc_attr( $heading_font['spacing'] );?>px; font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : '';?>; }
47
  h1 {font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : '';?>;}
48
  </style>
49
 
50
  <?php
51
+ // render custom CSS
52
+ if ( method_exists ( $html, 'cmp_get_custom_css' ) ) {
53
+ echo $html->cmp_get_custom_css();
 
 
 
 
 
 
54
  }
55
 
56
  // render header javascripts
59
  }
60
 
61
  // echo pattern copyright
62
+ if ( $banner_type == 3 ) {
63
  echo '<!-- Background pattern from Subtle Patterns --!>';
64
  }
 
65
  ?>
66
 
67
  </head>
78
  <section class="section section-banner" id="banner-wrapper">
79
  <?php
80
  if ( method_exists ( $html, 'cmp_background' ) ) {
81
+ echo $html->cmp_background( $banner_type, $themeslug );
82
 
83
  } ?>
84
  </section>
85
 
86
 
87
  <section class="section section-body">
 
88
  <?php
89
  // display body title
90
+ if ( method_exists ( $html, 'cmp_get_title' ) ) {
91
+ echo $html->cmp_get_title( );
92
+ }
93
+
94
+ // display body title
95
+ if ( method_exists ( $html, 'cmp_get_body' ) ) {
96
+ echo $html->cmp_get_body();
97
+ }
98
 
 
 
 
99
  if ( method_exists ( $html, 'cmp_subscribe_form' ) ) {
100
  echo $html->cmp_subscribe_form( );
101
 
102
  } ?>
103
 
 
 
104
  </section>
105
 
106
 
107
  <section class="section section-social">
108
  <?php
 
 
 
 
 
109
  // display social icons
110
  if ( method_exists ( $html, 'cmp_social_icons' ) ) {
111
+ echo $html->cmp_social_icons( $mode = 'icon', $title = true );
112
  } ?>
113
  </section>
114
 
115
  <?php
116
+ // Display footer if we have copyright set
117
+ if ( get_option('niteoCS_copyright') !== '' ) { ?>
118
+ <footer class="section section-footer">
119
+ <?php
120
+ if ( method_exists ( $html, 'cmp_get_copyright' ) ) {
121
+ echo $html->cmp_get_copyright();
122
+ } ?>
123
+ </footer>
124
+ <?php
125
  }
126
 
127
+ // include paraxify script if banner is image
128
+ if ( $banner_type != 5 && $banner_type != 4 ) { ?>
129
  <script type='text/javascript' src='<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug .'/paraxify.min.js';?>'></script>
130
  <?php
131
  }
132
 
133
+ // render footer javascripts
134
  if ( method_exists ( $html, 'cmp_javascripts' ) ) {
135
+ $html->cmp_javascripts( $banner_type, $themeslug );
 
 
 
 
 
136
  } ?>
137
 
 
 
138
  </body>
139
 
140
  </html>
themes/countdown/countdown-defaults.php CHANGED
@@ -10,12 +10,58 @@ $theme_supports = array(
10
  'footer' => true,
11
  );
12
 
13
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
14
- $niteoCS_font_headings = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
15
- $niteoCS_font_content = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
16
-
17
- // get options
18
- $niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
19
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
20
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
21
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  'footer' => true,
11
  );
12
 
13
+
14
+ if (isset($_POST['niteoCS_active_color_'.$themeslug])) {
15
+ update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_active_color_'.$themeslug]));
16
+ }
17
+
18
+ if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
19
+ update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
20
+ }
21
+
22
+ if (isset($_POST['niteoCS_overlay_color_'.$themeslug])) {
23
+ update_option('niteoCS_overlay_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_overlay_color_'.$themeslug]));
24
+ }
25
+
26
+ if (isset($_POST['niteoCS_overlay_opacity_'.$themeslug])) {
27
+ update_option('niteoCS_overlay_opacity['.$themeslug.']', sanitize_text_field($_POST['niteoCS_overlay_opacity_'.$themeslug]));
28
+ }
29
+
30
+ if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location']) {
31
+ update_option('niteoCS_social_location', sanitize_text_field($_POST['niteoCS_social_location']));
32
+ }
33
+
34
+
35
+
36
+ // get theme defaults
37
+ $banner_type = get_option('niteoCS_banner['.$themeslug.']', '1');
38
+
39
+ $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
40
+ $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
41
+ $overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
42
+ $overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
43
+
44
+ $social_location = get_option('niteoCS_social_location', 'footer');
45
+
46
+ $heading_font = array(
47
+ 'family' => get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway'),
48
+ 'variant' => get_option('niteoCS_font_headings_variant['.$themeslug.']', '700'),
49
+ 'size' => get_option('niteoCS_font_headings_size['.$themeslug.']', '40'),
50
+ 'spacing' => get_option('niteoCS_font_headings_spacing['.$themeslug.']', '0'),
51
+ );
52
+
53
+ $content_font = array(
54
+ 'family' => get_option('niteoCS_font_content['.$themeslug.']', 'Raleway'),
55
+ 'variant' => get_option('niteoCS_font_content_variant['.$themeslug.']', 'regular'),
56
+ 'size' => get_option('niteoCS_font_content_size['.$themeslug.']', '17'),
57
+ 'spacing' => get_option('niteoCS_font_content_spacing['.$themeslug.']', '0'),
58
+ 'line-height' => get_option('niteoCS_font_content_lineheight['.$themeslug.']', '1.5'),
59
+ );
60
+
61
+
62
+ $heading_font['variant'] = ($heading_font['variant'] =='regular') ? '400' : $heading_font['variant'];
63
+ $heading_font['variant'] = ($heading_font['variant'] =='italic') ? '400' : $heading_font['variant'];
64
+ $content_font['variant'] = ($content_font['variant'] =='regular') ? '400' : $content_font['variant'];
65
+ $content_font['variant'] = ($content_font['variant'] =='italic') ? '400' : $content_font['variant'];
66
+ $heading_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i', $heading_font['variant']);
67
+ $content_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i', $content_font['variant']);
themes/countdown/countdown-settings.php CHANGED
@@ -1,37 +1,6 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
- // check onces and wordpress rights, else DIE
5
- if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
6
- if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
7
- die('Sorry, but this request is invalid');
8
- }
9
- }
10
-
11
-
12
- if (isset($_POST['niteoCS_active_color_'.$themeslug])) {
13
- update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_active_color_'.$themeslug]));
14
- }
15
-
16
- if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
17
- update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
18
- }
19
-
20
- if (isset($_POST['niteoCS_overlay_color_'.$themeslug])) {
21
- update_option('niteoCS_overlay_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_overlay_color_'.$themeslug]));
22
- }
23
-
24
- if (isset($_POST['niteoCS_overlay_opacity_'.$themeslug])) {
25
- update_option('niteoCS_overlay_opacity['.$themeslug.']', sanitize_text_field($_POST['niteoCS_overlay_opacity_'.$themeslug]));
26
- }
27
-
28
-
29
- // get options
30
- $niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
31
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
32
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
33
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
34
-
35
  ?>
36
 
37
  <style>
@@ -48,7 +17,7 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
48
  <td>
49
 
50
  <fieldset>
51
- <input type="text" name="niteoCS_active_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_active_color" value="<?php echo esc_attr( $niteoCS_active_color); ?>" data-default-color="#e82e1e" class="regular-text code"><br>
52
  </fieldset>
53
 
54
  </td>
@@ -58,7 +27,7 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
58
  <td>
59
 
60
  <fieldset>
61
- <input type="text" name="niteoCS_font_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
62
  </fieldset>
63
  </td>
64
  </tr>
@@ -67,10 +36,10 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']'
67
  <td>
68
 
69
  <fieldset id="overlay-color">
70
- <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
71
 
72
- <label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
73
- <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
74
 
75
  </fieldset>
76
  </td>
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ?>
5
 
6
  <style>
17
  <td>
18
 
19
  <fieldset>
20
+ <input type="text" name="niteoCS_active_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_active_color" value="<?php echo esc_attr( $active_color); ?>" data-default-color="#e82e1e" class="regular-text code"><br>
21
  </fieldset>
22
 
23
  </td>
27
  <td>
28
 
29
  <fieldset>
30
+ <input type="text" name="niteoCS_font_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_font_color" value="<?php echo esc_attr( $font_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
31
  </fieldset>
32
  </td>
33
  </tr>
36
  <td>
37
 
38
  <fieldset id="overlay-color">
39
+ <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
40
 
41
+ <label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $overlay_opacity); ?></span></label><br>
42
+ <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opacity); ?>" />
43
 
44
  </fieldset>
45
  </td>
themes/countdown/countdown-social_settings.php CHANGED
@@ -1,26 +1,12 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
- // check onces and wordpress rights, else DIE
5
- if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
6
- if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
7
- die('Sorry, but this request is invalid');
8
- }
9
- }
10
-
11
-
12
- if (isset($_POST['social_location']) && $_POST['social_location']) {
13
- update_option('social_location', sanitize_text_field($_POST['social_location']));
14
- }
15
-
16
- $social_location = get_option('social_location', 'footer');
17
-
18
  ?>
19
  <tr>
20
  <th><h4><?php _e('Social Icons Location', 'cmp-coming-soon-maintenance');?></h4></th>
21
  <td>
22
  <fieldset>
23
- <select name="social_location">
24
  <option value="body" <?php if ( $social_location == 'body' ) { echo ' selected="selected"'; } ?>><?php _e('Below Content (big icons)', 'cmp-coming-soon-maintenance');?></option>
25
  <option value="footer" <?php if ( $social_location == 'footer' ) { echo ' selected="selected"'; } ?>><?php _e('Footer (small icons)', 'cmp-coming-soon-maintenance');?></option>
26
  </select>
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ?>
5
  <tr>
6
  <th><h4><?php _e('Social Icons Location', 'cmp-coming-soon-maintenance');?></h4></th>
7
  <td>
8
  <fieldset>
9
+ <select name="niteoCS_social_location">
10
  <option value="body" <?php if ( $social_location == 'body' ) { echo ' selected="selected"'; } ?>><?php _e('Below Content (big icons)', 'cmp-coming-soon-maintenance');?></option>
11
  <option value="footer" <?php if ( $social_location == 'footer' ) { echo ' selected="selected"'; } ?>><?php _e('Footer (small icons)', 'cmp-coming-soon-maintenance');?></option>
12
  </select>
themes/countdown/countdown-theme.php CHANGED
@@ -5,109 +5,70 @@
5
  <meta charset="<?php bloginfo( 'charset' ); ?>">
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
 
8
- <!-- SEO -->
9
- <meta name="description" content="<?php echo esc_attr( stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page')) ); ?>">
10
- <title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!')) ); ?></title>
11
-
12
- <?php
13
  $themeslug = 'countdown';
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  // get theme related settings
16
- $niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
17
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
18
- $niteoCS_font_color_light = $this->hex2hsl($niteoCS_font_color, '20');
19
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
20
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
21
- $background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
22
- $content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
23
- $heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
24
-
25
- $headings_size = get_option('niteoCS_font_headings_size['.$themeslug.']', '40');
26
- $heading_variant = get_option('niteoCS_font_headings_variant['.$themeslug.']', '700');
27
- $headings_spacing = get_option('niteoCS_font_headings_spacing['.$themeslug.']', '0');
28
- $content_size = get_option('niteoCS_font_content_size['.$themeslug.']', '17');
29
- $content_variant = get_option('niteoCS_font_content_variant['.$themeslug.']', 'regular');
30
- $content_lineheight = get_option('niteoCS_font_content_lineheight['.$themeslug.']', '1.5');
31
- $content_spacing = get_option('niteoCS_font_content_spacing['.$themeslug.']', '0');
32
- $content_variant = ($content_variant =='regular') ? '400' : $content_variant;
33
- $heading_variant = ($heading_variant =='regular') ? '400' : $heading_variant;
34
- $content_variant = ($content_variant =='italic') ? '400' : $content_variant;
35
- $heading_variant = ($heading_variant =='italic') ? '400' : $heading_variant;
36
- $content_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i',$content_variant);
37
- $heading_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i',$heading_variant);
38
-
39
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
40
 
41
  // get global settings
42
  $niteoCS_counter = get_option('niteoCS_counter', '1');
43
  $niteoCS_counter_date = get_option('niteoCS_counter_date', time()+86400);
44
  $countdown_action = get_option('niteoCS_countdown_action', 'no-action');
45
- $body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
46
- $body = get_option('niteoCS_body');
47
- $copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
48
- $favicon_id = get_option('niteoCS_favicon_id');
49
- $social_location = get_option('social_location', 'footer');
50
-
51
- // override options if theme preview isset
52
- if ( isset( $theme_preview ) && $theme_preview == 'countdown' ) {
53
- $niteoCS_subscribe_label = 'Type your email and get notified.';
54
- $body = '<h2>We are currently improving our site</h2>';
55
- }
56
-
57
- // display favicon
58
- if ( $favicon_id && $favicon_id != '' ) {
59
- $favicon_url = wp_get_attachment_image_src($favicon_id, 'thumbnail');
60
- if ( isset($favicon_url[0]) ){
61
- echo '<link id="favicon" rel="shortcut icon" href="'.$favicon_url[0].'" type="image/x-icon"/>';
62
- }
63
- } else {
64
- wp_site_icon();
65
- }
66
 
67
- if ( get_option( 'blog_public' ) == 0 ) {
68
- echo "<meta name='robots' content='noindex,nofollow' />";
69
- } ?>
70
 
71
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
72
 
73
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
74
-
75
- <link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>:<?php echo esc_attr(str_replace('italic', 'i', $heading_variant ));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:<?php echo esc_attr(str_replace('italic', '', $content_variant ));?>,<?php echo esc_attr(str_replace('italic', '', $content_variant ));?>i" rel="stylesheet">
76
-
77
  <style>
78
- body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $niteoCS_font_color ); ?>;}
79
- body {font-size:<?php echo esc_attr($content_size);?>px;}
80
- h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
81
- a {color:<?php echo esc_attr( $niteoCS_font_color ); ?>;}
82
- input[type="submit"] {background-color: <?php echo esc_attr($niteoCS_active_color);?>;}
83
- ::-webkit-input-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
84
- ::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
85
- :-ms-input-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
86
- ::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
87
- .input-icon:before,input[type="email"],input[type="text"]{color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
88
- /* input[type="email"],input[type="text"] {border:1px solid <?php echo esc_attr($niteoCS_font_color_light);?>;} */
89
- .background-overlay{background-color:<?php echo esc_attr($background_overlay);?>;}
90
- footer, footer a {color: <?php echo esc_attr($niteoCS_font_color_light);?>;}
91
- .social-list.body a {background-color: <?php echo esc_attr( $niteoCS_font_color ); ?>;}
92
- .social-list.body a:hover {background-color: <?php echo esc_attr( $niteoCS_active_color ); ?>;}
93
- .social-list.footer a:hover {color: <?php echo esc_attr( $niteoCS_active_color ); ?>;}
94
- .social-list.footer li:not(:last-of-type)::after {background-color: <?php echo esc_attr( $niteoCS_font_color_light ); ?>;}
95
 
96
- .inner-content p {line-height: <?php echo esc_attr($content_lineheight);?>; letter-spacing: <?php echo esc_attr($content_spacing);?>px;font-weight:<?php echo esc_attr($content_font_style['0']);?>;<?php echo isset($content_font_style['1']) ? 'font-style: italic;' : '';?>; }
97
- h1:not(.text-logo),h2, h3,h4,h5,h6,.text-logo-wrapper {font-size:<?php echo esc_attr($headings_size / $content_size);?>em;letter-spacing: <?php echo esc_attr($headings_spacing);?>px; font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : '';?>; }
98
- h1 {font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : '';?>;}
99
  </style>
100
 
101
  <?php
102
- // custom CSS
103
- if ( get_option('niteoCS_custom_css', '') !== '' ) { ?>
104
- <!-- custom CSS -->
105
- <style>
106
- <?php
107
-
108
- echo stripslashes(wp_filter_nohtml_kses(get_option('niteoCS_custom_css'))); ?>
109
- </style>
110
- <?php
111
  }
112
 
113
  // render header javascripts
@@ -115,27 +76,24 @@
115
  $html->cmp_head_scripts();
116
  }
117
 
118
-
119
  // echo pattern copyright
120
- if ( $niteoCS_banner == 3 ) {
121
  echo '<!-- Background pattern from Subtle Patterns --!>';
122
- } ?>
 
 
123
 
124
  </head>
125
 
126
  <body id="body">
127
 
128
  <div id="background-wrapper">
129
- <?php
130
- if ( method_exists ( $html, 'cmp_background' ) ) {
131
- echo $html->cmp_background( $niteoCS_banner, $themeslug );
132
-
133
- }
134
 
135
- if ( $niteoCS_overlay_opacity != '0' ) { ?>
 
136
 
137
- <div class="background-overlay"></div>
138
- <?php
139
  } ?>
140
 
141
  <div class="inner-content">
@@ -145,11 +103,10 @@
145
  echo $html->cmp_logo( $themeslug );
146
  }
147
 
148
- // display body content
149
- if ($body_title != '') { ?>
150
- <h2 class="title"><?php echo esc_html($body_title);?></h2>
151
- <?php
152
- }
153
 
154
  // display counter
155
  if ( $niteoCS_counter == '1') {
@@ -198,9 +155,14 @@
198
  }
199
 
200
  // display body content
201
- if ( $body != '' ) { ?>
202
  <div class="content">
203
- <?php echo wpautop( stripslashes( $body ) ); ?>
 
 
 
 
 
204
  </div>
205
  <?php
206
  }
@@ -209,11 +171,11 @@
209
  if ( $social_location == 'body') { ?>
210
 
211
  <div class="social-wrapper <?php echo esc_attr($social_location );?>">
212
- <?php
213
- // display social icons
214
- if ( method_exists ( $html, 'cmp_social_icons' ) ) {
215
- echo $html->cmp_social_icons();
216
- } ?>
217
  </div>
218
  <?php
219
  }
@@ -223,44 +185,38 @@
223
  echo $html->cmp_subscribe_form( );
224
  } ?>
225
 
226
- <div class="subscribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
227
-
228
  </div>
229
 
230
  <?php
231
- if ( $social_location == 'footer' || $copyright != '') {
232
 
233
  echo '<footer>';
234
 
235
- if ( $social_location == 'footer') { ?>
236
-
237
- <div class="social-wrapper">
 
 
 
 
 
 
238
  <?php
239
- // display social icons
240
- if ( method_exists ( $html, 'cmp_social_icons' ) ) {
241
- echo $html->cmp_social_icons();
242
- } ?>
243
- </div>
244
- <?php
245
- }
246
- if ($copyright != '') { ?>
247
- <p class="copyright"><?php echo esc_html( $copyright );?></p>
248
- <?php
249
 
250
- }
251
  echo '</footer>';
252
  } ?>
253
  </div>
254
 
255
  <?php
256
- // render javascripts
257
  if ( method_exists ( $html, 'cmp_javascripts' ) ) {
258
- $html->cmp_javascripts( $niteoCS_banner, $themeslug );
259
- }
260
-
261
- // render script for redirect
262
- if ( method_exists ( $html, 'niteo_redirect' ) ) {
263
- $html->niteo_redirect();
264
  }
265
 
266
  if ( $niteoCS_counter == '1') { ?>
5
  <meta charset="<?php bloginfo( 'charset' ); ?>">
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
 
8
+ <?php
 
 
 
 
9
  $themeslug = 'countdown';
10
 
11
+ //include theme defaults
12
+ if ( file_exists(dirname(__FILE__).'/'.$themeslug.'-defaults.php') ) {
13
+ require ( dirname(__FILE__).'/'.$themeslug.'-defaults.php' );
14
+ }
15
+
16
+ // render SEO
17
+ if ( method_exists ( $html, 'cmp_get_seo' ) ) {
18
+ echo $html->cmp_get_seo();
19
+ }
20
+
21
+ // render google fonts link
22
+ if ( method_exists ( $html, 'cmp_get_fonts' ) ) {
23
+ echo $html->cmp_get_fonts( $heading_font, $content_font );
24
+ }
25
+
26
+ $themeslug = 'countdown';
27
+
28
  // get theme related settings
29
+
30
+ $font_color_light = $this->hex2hsl($font_color, '20');
31
+ $background_overlay = $this->hex2rgba($overlay_color, $overlay_opacity);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  // get global settings
34
  $niteoCS_counter = get_option('niteoCS_counter', '1');
35
  $niteoCS_counter_date = get_option('niteoCS_counter_date', time()+86400);
36
  $countdown_action = get_option('niteoCS_countdown_action', 'no-action');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
+ ?>
 
 
39
 
40
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
41
 
42
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
43
+
 
 
44
  <style>
45
+ body,input {font-family:'<?php echo esc_attr ($content_font['family'] );?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
46
+ body {font-size:<?php echo esc_attr( $content_font['size'] );?>px;}
47
+ h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr( $heading_font['family'] );?>', 'sans-serif';}
48
+ a {color:<?php echo esc_attr( $font_color ); ?>;}
49
+ input[type="submit"] {background-color: <?php echo esc_attr( $active_color );?>;}
50
+ ::-webkit-input-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
51
+ ::-moz-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
52
+ :-ms-input-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
53
+ ::-moz-placeholder {color: <?php echo esc_attr( $font_color_light );?>;}
54
+ .input-icon:before,input[type="email"],input[type="text"]{color: <?php echo esc_attr( $font_color_light );?>;}
55
+ /* input[type="email"],input[type="text"] {border:1px solid <?php echo esc_attr( $font_color_light );?>;} */
56
+ .background-overlay{background-color:<?php echo esc_attr( $background_overlay );?>;}
57
+ footer, footer a {color: <?php echo esc_attr( $font_color_light );?>;}
58
+ .social-list.body a {background-color: <?php echo esc_attr( $font_color ); ?>;}
59
+ .social-list.body a:hover {background-color: <?php echo esc_attr( $active_color ); ?>;}
60
+ .social-list.footer a:hover {color: <?php echo esc_attr( $active_color ); ?>;}
61
+ .social-list.footer li:not(:last-of-type)::after {background-color: <?php echo esc_attr( $font_color_light ); ?>;}
62
 
63
+ .inner-content p {line-height: <?php echo esc_attr( $content_font['line-height'] );?>; letter-spacing: <?php echo esc_attr( $content_font['spacing'] );?>px;font-weight:<?php echo esc_attr($content_font_style['0']);?>;<?php echo isset( $content_font_style['1']) ? 'font-style: italic;' : '';?>; }
64
+ h1:not(.text-logo),h2, h3,h4,h5,h6,.text-logo-wrapper {font-size:<?php echo esc_attr( $heading_font['size'] / $content_font['size'] );?>em;letter-spacing: <?php echo esc_attr( $heading_font['spacing'] );?>px; font-weight:<?php echo esc_attr( $heading_font_style['0']);?>;<?php echo isset($heading_font_style['1'] ) ? 'font-style: italic;' : '';?>; }
65
+ h1 { font-weight:<?php echo esc_attr( $heading_font_style['0'] );?>;<?php echo isset( $heading_font_style['1'] ) ? 'font-style: italic;' : '';?>;}
66
  </style>
67
 
68
  <?php
69
+ // render custom CSS
70
+ if ( method_exists ( $html, 'cmp_get_custom_css' ) ) {
71
+ echo $html->cmp_get_custom_css();
 
 
 
 
 
 
72
  }
73
 
74
  // render header javascripts
76
  $html->cmp_head_scripts();
77
  }
78
 
 
79
  // echo pattern copyright
80
+ if ( $banner_type == 3 ) {
81
  echo '<!-- Background pattern from Subtle Patterns --!>';
82
+ }
83
+
84
+ ?>
85
 
86
  </head>
87
 
88
  <body id="body">
89
 
90
  <div id="background-wrapper">
91
+ <?php
92
+ $overlay = ( $overlay_opacity == '0' ) ? false : true;
 
 
 
93
 
94
+ if ( method_exists ( $html, 'cmp_background' ) ) {
95
+ echo $html->cmp_background( $banner_type, $themeslug, $overlay );
96
 
 
 
97
  } ?>
98
 
99
  <div class="inner-content">
103
  echo $html->cmp_logo( $themeslug );
104
  }
105
 
106
+ // display body title
107
+ if ( method_exists ( $html, 'cmp_get_title' ) ) {
108
+ echo $html->cmp_get_title( );
109
+ }
 
110
 
111
  // display counter
112
  if ( $niteoCS_counter == '1') {
155
  }
156
 
157
  // display body content
158
+ if ( get_option('niteoCS_body') != '' ) { ?>
159
  <div class="content">
160
+ <?php
161
+ // display body title
162
+ if ( method_exists ( $html, 'cmp_get_body' ) ) {
163
+ echo $html->cmp_get_body();
164
+ }
165
+ ?>
166
  </div>
167
  <?php
168
  }
171
  if ( $social_location == 'body') { ?>
172
 
173
  <div class="social-wrapper <?php echo esc_attr($social_location );?>">
174
+ <?php
175
+ // display social icons
176
+ if ( method_exists ( $html, 'cmp_social_icons' ) ) {
177
+ echo $html->cmp_social_icons( $mode = 'icon', $title = false );
178
+ } ?>
179
  </div>
180
  <?php
181
  }
185
  echo $html->cmp_subscribe_form( );
186
  } ?>
187
 
 
 
188
  </div>
189
 
190
  <?php
191
+ if ( $social_location == 'footer' || get_option('niteoCS_copyright') !== '') {
192
 
193
  echo '<footer>';
194
 
195
+ if ( $social_location == 'footer') { ?>
196
+
197
+ <div class="social-wrapper">
198
+ <?php
199
+ // display social icons
200
+ if ( method_exists ( $html, 'cmp_social_icons' ) ) {
201
+ echo $html->cmp_social_icons( $mode = 'icon', $title = false );
202
+ } ?>
203
+ </div>
204
  <?php
205
+ }
206
+
207
+ if ( method_exists ( $html, 'cmp_get_copyright' ) ) {
208
+ echo $html->cmp_get_copyright();
209
+ }
210
+
 
 
 
 
211
 
 
212
  echo '</footer>';
213
  } ?>
214
  </div>
215
 
216
  <?php
217
+ // render footer javascripts
218
  if ( method_exists ( $html, 'cmp_javascripts' ) ) {
219
+ $html->cmp_javascripts( $banner_type, $themeslug );
 
 
 
 
 
220
  }
221
 
222
  if ( $niteoCS_counter == '1') { ?>
themes/hardwork/hardwork-defaults.php CHANGED
@@ -1,6 +1,21 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  $theme_supports = array(
5
  'logo' => true,
6
  'slider' => false,
@@ -10,12 +25,32 @@ $theme_supports = array(
10
  'footer' => false,
11
  );
12
 
 
13
 
14
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '4');
15
- $niteoCS_font_headings = get_option('niteoCS_font_headings['.$themeslug.']', 'Playfair Display');
16
- $niteoCS_font_content = get_option('niteoCS_font_content['.$themeslug.']', 'Roboto Slab');
17
- $niteoCS_banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
20
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
21
- $niteoCS_overlay_opacity_hardwork = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.0');
 
 
 
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
+ if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
5
+ update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
6
+ }
7
+
8
+
9
+ if (isset($_POST['niteoCS_overlay_color_'.$themeslug])) {
10
+ update_option('niteoCS_overlay_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_overlay_color_'.$themeslug]));
11
+ }
12
+
13
+ if (isset($_POST['niteoCS_overlay_opacity_'.$themeslug])) {
14
+ update_option('niteoCS_overlay_opacity['.$themeslug.']', sanitize_text_field($_POST['niteoCS_overlay_opacity_'.$themeslug]));
15
+ }
16
+
17
+
18
+
19
  $theme_supports = array(
20
  'logo' => true,
21
  'slider' => false,
25
  'footer' => false,
26
  );
27
 
28
+ $banner_type = get_option('niteoCS_banner['.$themeslug.']', '4');
29
 
30
+ $banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
31
+ $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
32
+ $overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
33
+ $overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0');
34
+
35
+
36
+ $heading_font = array(
37
+ 'family' => get_option('niteoCS_font_headings['.$themeslug.']', 'Playfair Display'),
38
+ 'variant' => get_option('niteoCS_font_headings_variant['.$themeslug.']', '700'),
39
+ 'size' => get_option('niteoCS_font_headings_size['.$themeslug.']', '40'),
40
+ 'spacing' => get_option('niteoCS_font_headings_spacing['.$themeslug.']', '0'),
41
+ );
42
+
43
+ $content_font = array(
44
+ 'family' => get_option('niteoCS_font_content['.$themeslug.']', 'Montserrat'),
45
+ 'variant' => get_option('niteoCS_font_content_variant['.$themeslug.']', 'regular'),
46
+ 'size' => get_option('niteoCS_font_content_size['.$themeslug.']', '17'),
47
+ 'spacing' => get_option('niteoCS_font_content_spacing['.$themeslug.']', '0'),
48
+ 'line-height' => get_option('niteoCS_font_content_lineheight['.$themeslug.']', '1.5'),
49
+ );
50
 
51
+ $heading_font['variant'] = ($heading_font['variant'] =='regular') ? '400' : $heading_font['variant'];
52
+ $heading_font['variant'] = ($heading_font['variant'] =='italic') ? '400' : $heading_font['variant'];
53
+ $content_font['variant'] = ($content_font['variant'] =='regular') ? '400' : $content_font['variant'];
54
+ $content_font['variant'] = ($content_font['variant'] =='italic') ? '400' : $content_font['variant'];
55
+ $heading_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i', $heading_font['variant']);
56
+ $content_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i', $content_font['variant']);
themes/hardwork/hardwork-settings.php CHANGED
@@ -1,34 +1,6 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
4
- // check onces and wordpress rights, else DIE
5
- if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
6
- if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
7
- die('Sorry, but this request is invalid');
8
- }
9
- }
10
-
11
-
12
- if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
13
- update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
14
- $niteoCS_font_color = get_option('niteoCS_font_color[<?php echo esc_attr($themeslug);?>]');
15
- }
16
-
17
-
18
- if (isset($_POST['niteoCS_overlay_color_'.$themeslug])) {
19
- update_option('niteoCS_overlay_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_overlay_color_'.$themeslug]));
20
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']');
21
- }
22
-
23
- if (isset($_POST['niteoCS_overlay_opacity_'.$themeslug])) {
24
- update_option('niteoCS_overlay_opacity['.$themeslug.']', sanitize_text_field($_POST['niteoCS_overlay_opacity_'.$themeslug]));
25
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']');
26
- }
27
-
28
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
29
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
30
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.0');
31
-
32
  ?>
33
 
34
  <style>
@@ -43,7 +15,7 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']',
43
  <th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
44
  <td>
45
  <fieldset>
46
- <input type="text" name="niteoCS_font_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
47
  </fieldset>
48
  </td>
49
  </tr>
@@ -51,10 +23,10 @@ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']',
51
  <th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
52
  <td>
53
  <fieldset id="overlay-color">
54
- <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
55
 
56
- <label for="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
57
- <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
58
  </fieldset>
59
  </td>
60
  </tr>
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ?>
5
 
6
  <style>
15
  <th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
16
  <td>
17
  <fieldset>
18
+ <input type="text" name="niteoCS_font_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_font_color" value="<?php echo esc_attr( $font_color); ?>" data-default-color="#494949" class="regular-text code"><br>
19
  </fieldset>
20
  </td>
21
  </tr>
23
  <th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
24
  <td>
25
  <fieldset id="overlay-color">
26
+ <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
27
 
28
+ <label for="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $overlay_opacity); ?></span></label><br>
29
+ <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $overlay_opacity); ?>" />
30
  </fieldset>
31
  </td>
32
  </tr>
themes/hardwork/hardwork-theme.php CHANGED
@@ -5,113 +5,63 @@
5
  <meta charset="<?php bloginfo( 'charset' ); ?>">
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
 
8
- <!-- SEO -->
9
- <meta name="description" content="<?php echo esc_attr( stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page')) ); ?>">
10
- <title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
11
-
12
- <?php
13
  $themeslug = 'hardwork';
14
- // get theme related settings
15
- $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#494949');
16
- $overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
17
- $overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0');
18
- $heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Playfair Display');
19
- $content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Montserrat');
20
-
21
- $headings_size = get_option('niteoCS_font_headings_size['.$themeslug.']', '40');
22
- $heading_variant = get_option('niteoCS_font_headings_variant['.$themeslug.']', '700');
23
- $headings_spacing = get_option('niteoCS_font_headings_spacing['.$themeslug.']', '0');
24
- $content_size = get_option('niteoCS_font_content_size['.$themeslug.']', '17');
25
- $content_variant = get_option('niteoCS_font_content_variant['.$themeslug.']', 'regular');
26
- $content_lineheight = get_option('niteoCS_font_content_lineheight['.$themeslug.']', '1.5');
27
- $content_spacing = get_option('niteoCS_font_content_spacing['.$themeslug.']', '0');
28
- $content_variant = ($content_variant =='regular') ? '400' : $content_variant;
29
- $heading_variant = ($heading_variant =='regular') ? '400' : $heading_variant;
30
- $content_variant = ($content_variant =='italic') ? '400' : $content_variant;
31
- $heading_variant = ($heading_variant =='italic') ? '400' : $heading_variant;
32
- $content_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i',$content_variant);
33
- $heading_font_style = preg_split('/(?<=[0-9])(?=[a-z]+)/i',$heading_variant);
34
-
35
- $niteoCS_background = get_option('niteoCS_banner['.$themeslug.']', '4');
36
- $unplash_feed = get_option('niteoCS_unsplash_feed['.$themeslug.']', '0');
37
-
38
-
39
- // get global settings
40
- $body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
41
- $body = get_option('niteoCS_body');
42
- $favicon_id = get_option('niteoCS_favicon_id');
43
- // override options if theme preview isset
44
-
45
- if ( isset( $theme_preview ) && $theme_preview == 'hardwork' ) {
46
- $body_title = 'We will be back soon!';
47
- $body = '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas. Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
48
 
49
- }
 
 
 
50
 
51
- if ( isset($_GET['video']) && !empty($_GET['video']) && $_GET['video'] == 'true') {
52
- $niteoCS_background = '5';
53
- $font_color = '#ffffff';
54
- $background_color = '#000000';
55
- $background_opa = '0.5';
56
  }
57
 
58
-
59
- // display favicon
60
- if ( $favicon_id && $favicon_id != '' ) {
61
- $favicon_url = wp_get_attachment_image_src($favicon_id, 'thumbnail');
62
- if ( isset($favicon_url[0]) ){
63
- echo '<link id="favicon" rel="shortcut icon" href="'.$favicon_url[0].'" type="image/x-icon"/>';
64
- }
65
- } else {
66
- wp_site_icon();
67
  }
68
-
69
- if ( get_option( 'blog_public' ) == 0 ) {
70
- echo "<meta name='robots' content='noindex,nofollow' />";
71
- } ?>
72
 
73
 
74
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version ;?>" type="text/css" media="all">
75
 
76
- <link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>:<?php echo esc_attr(str_replace('italic', 'i', $heading_variant ));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:<?php echo esc_attr(str_replace('italic', '', $content_variant ));?>,<?php echo esc_attr(str_replace('italic', '', $content_variant ));?>i" rel="stylesheet">
77
-
78
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
79
 
80
  <style>
81
- body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
82
  <?php
83
  if ( $overlay_opacity != '0' ) { ?>
84
  .background-overlay {background-color:<?php echo esc_attr( $overlay_color ); ?>;opacity:<?php echo esc_attr( $overlay_opacity ); ?>;}
85
  .social-list{background-color: <?php echo $this->hex2rgba( esc_attr( $overlay_color ), 0.4);?>;}
86
  <?php
87
  } ?>
88
- a{color:<?php echo esc_attr( $font_color ); ?>;}
89
- h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
90
- body {font-size:<?php echo esc_attr($content_size);?>px; letter-spacing: <?php echo esc_attr($content_spacing);?>px; font-weight:<?php echo esc_attr($content_font_style['0']);?>;<?php echo isset($content_font_style['1']) ? 'font-style: italic;' : '';?>; }
91
- h1:not(.text-logo),h2, h3,h4,h5,h6,.text-logo-wrapper {font-size:<?php echo esc_attr($headings_size / $content_size);?>em;letter-spacing: <?php echo esc_attr($headings_spacing);?>px; font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : 'font-style: normal;';?>; }
92
  h1 {font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : 'font-style: normal;';?>;}
93
  </style>
94
- <?php
95
- // custom CSS
96
- if ( get_option('niteoCS_custom_css', '') !== '' ) { ?>
97
- <!-- custom CSS -->
98
- <style>
99
- <?php
100
 
101
- echo stripslashes(wp_filter_nohtml_kses(get_option('niteoCS_custom_css'))); ?>
102
- </style>
103
- <?php
 
104
  }
105
 
106
  // render header javascripts
107
  if ( method_exists ( $html, 'cmp_head_scripts' ) ) {
108
  $html->cmp_head_scripts();
109
  }
110
-
111
  // echo pattern copyright
112
- if ( $niteoCS_background == 3 ) {
113
  echo '<!-- Background pattern from Subtle Patterns --!>';
114
- } ?>
 
 
115
 
116
  </head>
117
 
@@ -120,15 +70,13 @@
120
  <div id="background-wrapper">
121
 
122
  <?php
123
- if ( method_exists ( $html, 'cmp_background' ) ) {
124
- echo $html->cmp_background( $niteoCS_background, $themeslug );
125
- }
126
 
127
- if ( $overlay_opacity != '0' ) { ?>
 
128
 
129
- <div class="background-overlay"></div>
130
- <?php
131
  } ?>
 
132
  </div>
133
 
134
  <section class="section section-body">
@@ -139,31 +87,28 @@
139
  echo $html->cmp_logo( $themeslug );
140
  }
141
 
142
- // display Title
143
- if ( $body_title != '' ) { ?>
144
- <h2><?php echo esc_html( $body_title );?></h2>
145
- <?php
146
  }
147
 
148
- // display body
149
- echo wpautop( stripslashes( $body ) ); ?>
 
 
150
 
151
  </section>
152
  <?php
153
  // display social icons
154
  if ( method_exists ( $html, 'cmp_social_icons' ) ) {
155
- echo $html->cmp_social_icons();
156
- }
157
 
158
- // render javascripts
159
  if ( method_exists ( $html, 'cmp_javascripts' ) ) {
160
- $html->cmp_javascripts( $niteoCS_background, $themeslug );
161
- }
162
 
163
- // render script for redirect
164
- if ( method_exists ( $html, 'niteo_redirect' ) ) {
165
- $html->niteo_redirect();
166
- } ?>
167
  </body>
168
 
169
  </html>
5
  <meta charset="<?php bloginfo( 'charset' ); ?>">
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
 
8
+ <?php
 
 
 
 
9
  $themeslug = 'hardwork';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
+ //include theme defaults
12
+ if ( file_exists(dirname(__FILE__).'/'.$themeslug.'-defaults.php') ) {
13
+ require ( dirname(__FILE__).'/'.$themeslug.'-defaults.php' );
14
+ }
15
 
16
+ // render SEO
17
+ if ( method_exists ( $html, 'cmp_get_seo' ) ) {
18
+ echo $html->cmp_get_seo();
 
 
19
  }
20
 
21
+ // render google fonts link
22
+ if ( method_exists ( $html, 'cmp_get_fonts' ) ) {
23
+ echo $html->cmp_get_fonts( $heading_font, $content_font );
 
 
 
 
 
 
24
  }
25
+
26
+ ?>
 
 
27
 
28
 
29
  <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?ver='.$this->version ;?>" type="text/css" media="all">
30
 
 
 
31
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
32
 
33
  <style>
34
+ body,input {font-family:'<?php echo esc_attr($content_font['family']);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
35
  <?php
36
  if ( $overlay_opacity != '0' ) { ?>
37
  .background-overlay {background-color:<?php echo esc_attr( $overlay_color ); ?>;opacity:<?php echo esc_attr( $overlay_opacity ); ?>;}
38
  .social-list{background-color: <?php echo $this->hex2rgba( esc_attr( $overlay_color ), 0.4);?>;}
39
  <?php
40
  } ?>
41
+ a {color:<?php echo esc_attr( $font_color ); ?>;}
42
+ h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr($heading_font['family']);?>', 'sans-serif';}
43
+ body {font-size:<?php echo esc_attr( $content_font['size'] );?>px; letter-spacing: <?php echo esc_attr( $content_font['spacing'] );?>px; font-weight:<?php echo esc_attr( $content_font_style['0'] );?>;<?php echo isset($content_font_style['1']) ? 'font-style: italic;' : '';?>; }
44
+ h1:not(.text-logo),h2, h3,h4,h5,h6,.text-logo-wrapper {font-size:<?php echo esc_attr( $heading_font['size'] / $content_font['size'] );?>em;letter-spacing: <?php echo esc_attr( $heading_font['spacing'] );?>px; font-weight:<?php echo esc_attr( $heading_font_style['0'] );?>;<?php echo isset($heading_font_style['1'] ) ? 'font-style: italic;' : 'font-style: normal;';?>; }
45
  h1 {font-weight:<?php echo esc_attr($heading_font_style['0']);?>;<?php echo isset($heading_font_style['1']) ? 'font-style: italic;' : 'font-style: normal;';?>;}
46
  </style>
 
 
 
 
 
 
47
 
48
+ <?php
49
+ // render custom CSS
50
+ if ( method_exists ( $html, 'cmp_get_custom_css' ) ) {
51
+ echo $html->cmp_get_custom_css();
52
  }
53
 
54
  // render header javascripts
55
  if ( method_exists ( $html, 'cmp_head_scripts' ) ) {
56
  $html->cmp_head_scripts();
57
  }
58
+
59
  // echo pattern copyright
60
+ if ( $banner_type == 3 ) {
61
  echo '<!-- Background pattern from Subtle Patterns --!>';
62
+ }
63
+
64
+ ?>
65
 
66
  </head>
67
 
70
  <div id="background-wrapper">
71
 
72
  <?php
73
+ $overlay = ( $overlay_opacity == '0' ) ? false : true;
 
 
74
 
75
+ if ( method_exists ( $html, 'cmp_background' ) ) {
76
+ echo $html->cmp_background( $banner_type, $themeslug, $overlay );
77
 
 
 
78
  } ?>
79
+
80
  </div>
81
 
82
  <section class="section section-body">
87
  echo $html->cmp_logo( $themeslug );
88
  }
89
 
90
+ // display body title
91
+ if ( method_exists ( $html, 'cmp_get_title' ) ) {
92
+ echo $html->cmp_get_title( );
 
93
  }
94
 
95
+ // display body title
96
+ if ( method_exists ( $html, 'cmp_get_body' ) ) {
97
+ echo $html->cmp_get_body();
98
+ } ?>
99
 
100
  </section>
101
  <?php
102
  // display social icons
103
  if ( method_exists ( $html, 'cmp_social_icons' ) ) {
104
+ echo $html->cmp_social_icons( $mode = 'icon', $title = false );
105
+ }
106
 
107
+ // render footer javascripts
108
  if ( method_exists ( $html, 'cmp_javascripts' ) ) {
109
+ $html->cmp_javascripts( $banner_type, $themeslug );
110
+ } ?>
111
 
 
 
 
 
112
  </body>
113
 
114
  </html>