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

Version Description

Download this release

Release Info

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

Code changes from version 2.1 to 2.2

cmp-advanced.php CHANGED
@@ -1,68 +1,287 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
 
 
 
 
 
 
 
 
4
  $pages = $this->cmp_get_pages();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ?>
6
 
7
  <div class="wrap">
8
 
9
- <div id="icon-options-general" class="icon32">
10
- <br />
11
- </div>
12
  <form method="post" action="admin.php?page=cmp-advanced&status=settings-saved" id="csoptions">
13
 
14
- <div class="cmp-settings-wrapper">
15
-
16
- <div class="cmp-inputs-wrapper">
17
-
18
- <div class="table-wrapper general">
19
- <h3><?php _e('Individual Pages Settings', 'cmp-coming-soon-maintenance');?></h3>
20
- <table class="general">
21
- <tbody>
22
- <tr>
23
- <td>
24
- <fieldset class="cmp-status">
25
- <h4><?php _e('Select the pages on which to enable CMP Page.', 'cmp-coming-soon-maintenance');?></h4>
26
- <select name="cmp-select-pages" class="cmp-select-pages" multiple>
27
- <?php
28
- foreach ($pages as $page) { ?>
29
- <option value="<?php echo esc_attr($page['id']);?>"><?php echo esc_attr($page['name']);?></option>
30
- <?php
31
- } ?>
32
- </select>
33
-
34
- </fieldset>
35
- </td>
36
- </tr>
37
- <tr><th>
38
- <p class="cmp-submit">
39
- <?php wp_nonce_field('save_options','save_options_field'); ?>
40
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
41
- </p>
42
- </th></tr>
43
- </tbody>
44
- </table>
45
-
46
- </div>
47
-
48
- </div> <!-- <div class="cmp-settings-wrapper"> -->
49
-
50
- <?php
51
- // get sidebar with "widgets"
52
- if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
53
- require (dirname(__FILE__) . '/cmp-sidebar.php');
54
- }
55
 
56
- ?>
 
 
 
 
57
 
58
- </div> <!-- <div class="cmp-inputs-wrapper"> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
  </div> <!-- <div id="wrap"> -->
61
 
62
  <script>
63
- jQuery(document).ready(function($){
64
- $('.cmp-select-pages').fastselect({
65
- placeholder: 'Select pages..',
66
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  });
 
68
  </script>
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
  $pages = $this->cmp_get_pages();
12
+
13
+
14
+ 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'];
21
+ $sane = false;
22
+
23
+ foreach ( $whitelist as $id ) {
24
+ if ( !is_numeric( $id ) ) {
25
+ break;
26
+ } else {
27
+ $sane = true;
28
+ }
29
+ }
30
+
31
+ if ( $sane ) {
32
+ $whitelist_json = json_encode( $whitelist );
33
+ }
34
+
35
+ update_option('niteoCS_page_whitelist', sanitize_text_field( $whitelist_json ));
36
+
37
+ } else if ( $_SERVER['REQUEST_METHOD'] == 'POST' ){
38
+ update_option('niteoCS_page_whitelist', '[]');
39
+ }
40
+
41
+ if ( isset( $_POST['niteoCS_page-blacklist'] ) ) {
42
+
43
+ $blacklist = $_POST['niteoCS_page-blacklist'];
44
+ $sane = false;
45
+
46
+ foreach ( $blacklist as $id ) {
47
+ if ( !is_numeric( $id ) ) {
48
+ break;
49
+ } else {
50
+ $sane = true;
51
+ }
52
+ }
53
+
54
+ if ( $sane ) {
55
+ $blacklist_json = json_encode( $blacklist );
56
+ }
57
+
58
+ update_option('niteoCS_page_blacklist', sanitize_text_field( $blacklist_json ));
59
+
60
+ } else if ($_SERVER['REQUEST_METHOD'] == 'POST' ){
61
+ update_option('niteoCS_page_blacklist', '[]');
62
+ }
63
+
64
+ if ( isset( $_POST['niteoCS_roles'] ) ) {
65
+
66
+ $roles = $_POST['niteoCS_roles'];
67
+ $sane = false;
68
+
69
+ foreach ( $roles as $id => $role ) {
70
+ $roles[$id] = sanitize_text_field($role);
71
+ }
72
+
73
+ update_option('niteoCS_roles', json_encode( $roles ));
74
+
75
+ } else if ($_SERVER['REQUEST_METHOD'] == 'POST' ){
76
+ update_option('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
+ <div id="icon-users" class="icon32"></div>
94
+
 
95
  <form method="post" action="admin.php?page=cmp-advanced&status=settings-saved" id="csoptions">
96
 
97
+ <div class="cmp-advanced">
98
+
99
+ <div class="cmp-inputs-wrapper">
100
+
101
+ <div class="table-wrapper general">
102
+
103
+ <h3 class="no-icon"><?php _e('CMP Page Whitelist and Blacklist Settings', 'cmp-coming-soon-maintenance');?></h3>
104
+ <table class="general">
105
+ <tbody>
106
+ <tr>
107
+
108
+ <th>
109
+ <fieldset>
110
+ <legend class="screen-reader-text">
111
+ <span><?php _e('Whitelist Settings', 'cmp-coming-soon-maintenance');?></span>
112
+ </legend>
113
+
114
+ <p>
115
+ <label title="Disabled">
116
+ <input type="radio" class="page-whitelist" name="niteoCS_page_filter" value="0" <?php checked('0', $niteoCS_page_filter);?>><?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
117
+ </label>
118
+ </p>
119
+
120
+ <p>
121
+ <label title="Page Whitelist">
122
+ <input type="radio" class="page-whitelist" name="niteoCS_page_filter" value="1" <?php checked('1', $niteoCS_page_filter);?>><?php _e('Page Whitelist', 'cmp-coming-soon-maintenance');?>
123
+ </label>
124
+ </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
+ <p>
127
+ <label title="Page Blacklist">
128
+ <input type="radio" class="page-whitelist" name="niteoCS_page_filter" value="2" <?php checked('2', $niteoCS_page_filter);?>><?php _e('Page Blacklist', 'cmp-coming-soon-maintenance');?>
129
+ </label>
130
+ </p>
131
 
132
+ </fieldset>
133
+ </th>
134
+
135
+ <td>
136
+ <fieldset id="page-whitelist" style="margin-top: 1em;">
137
+ <h4><?php _e('CMP Whitelist - Select the specific page(s) to display CMP Landing Page.', 'cmp-coming-soon-maintenance');?></h4>
138
+ <select name="niteoCS_page-whitelist[]" class="cmp-whitelist" multiple="multiple">
139
+ <option value="-1" <?php echo in_array('-1', $niteoCS_page_whitelist) ? 'selected' : '';?>><?php _e('Homepage', 'cmp-coming-soon-maintenance');?></option>
140
+ <?php
141
+ foreach ( $pages as $page ) { ?>
142
+ <option value="<?php echo esc_attr( $page['id'] );?>" <?php echo in_array($page['id'], $niteoCS_page_whitelist) ? 'selected' : ''; ?>><?php echo esc_attr( $page['name'] );?></option>
143
+ <?php
144
+ } ?>
145
+ </select>
146
+
147
+ <p style="margin-top:0"><?php _e('By default CMP is enabled on all pages. Leave this field empty to use default settings.', 'cmp-coming-soon-maintenance');?></p>
148
+
149
+ </fieldset>
150
+
151
+ <fieldset id="page-blacklist" style="margin-top: 1em;">
152
+ <h4><?php _e('CMP Blacklist - Select the pages to NOT display CMP landing page.', 'cmp-coming-soon-maintenance');?></h4>
153
+ <select name="niteoCS_page-blacklist[]" class="cmp-blacklist" multiple="multiple">
154
+ <option value="-1" <?php echo in_array('-1', $niteoCS_page_blacklist) ? 'selected' : '';?>><?php _e('Homepage', 'cmp-coming-soon-maintenance');?></option>
155
+ <?php
156
+ foreach ( $pages as $page ) { ?>
157
+ <option value="<?php echo esc_attr( $page['id'] );?>" <?php echo in_array($page['id'], $niteoCS_page_blacklist) ? 'selected' : '';?>><?php echo esc_attr( $page['name'] );?></option>
158
+ <?php
159
+ } ?>
160
+ </select>
161
+
162
+ <p style="margin-top:0"><?php _e('If you want to exclude some pages from CMP you can select them here.', 'cmp-coming-soon-maintenance');?></p>
163
+
164
+ </fieldset>
165
+
166
+ <p id="page-disabled"><?php _e('CMP landing page is displayed on all pages by default. You can enable Page Whitelist to display CMP only on specific page(s) or Page Blacklist to exclude CMP landing page on specific page(s) by enabling Page Whitelist or Page Blacklist here.', 'cmp-coming-soon-maintenance');?></p>
167
+
168
+ </td>
169
+ </tr>
170
+ <tr><th>
171
+ <p class="cmp-submit">
172
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
173
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
174
+ </p>
175
+ </th></tr>
176
+ </tbody>
177
+ </table>
178
+
179
+ </div>
180
+
181
+ <div class="table-wrapper general">
182
+
183
+ <h3 class="no-icon"><?php _e('CMP User Roles Settings', 'cmp-coming-soon-maintenance');?></h3>
184
+ <table class="general">
185
+ <tbody>
186
+ <tr>
187
+
188
+ <th>
189
+ <fieldset>
190
+ <legend class="screen-reader-text">
191
+ <span><?php _e('User Roles Settings', 'cmp-coming-soon-maintenance');?></span>
192
+ </legend>
193
+
194
+ <p>
195
+ <h4><?php _e('User Roles', 'cmp-coming-soon-maintenance');?></h4>
196
+ </p>
197
+
198
+ </fieldset>
199
+ </th>
200
+
201
+ <td>
202
+ <fieldset style="margin-top: 1em;">
203
+ <h4><?php _e('Select User Roles to bypass CMP landing page.', 'cmp-coming-soon-maintenance');?></h4>
204
+
205
+ <select name="niteoCS_roles[]" class="cmp-user_roles" multiple="multiple">
206
+ <option value="editor" <?php echo in_array('editor', $niteoCS_roles) ? 'selected' : '';?>><?php _e('Editor', 'cmp-coming-soon-maintenance');?></option>
207
+ <option value="author" <?php echo in_array('author', $niteoCS_roles) ? 'selected' : '';?>><?php _e('Author', 'cmp-coming-soon-maintenance');?></option>
208
+ <option value="contributor" <?php echo in_array('contributor', $niteoCS_roles) ? 'selected' : '';?>><?php _e('Contributor', 'cmp-coming-soon-maintenance');?></option>
209
+ <option value="subscriber" <?php echo in_array('subscriber', $niteoCS_roles) ? 'selected' : '';?>><?php _e('Subscriber', 'cmp-coming-soon-maintenance');?></option>
210
+
211
+ </select>
212
+
213
+ <p style="margin-top:0"><?php _e('Administrator role always bypass CMP by default.', 'cmp-coming-soon-maintenance');?></p>
214
+
215
+ </fieldset>
216
+
217
+ </td>
218
+ </tr>
219
+
220
+ <tr><th>
221
+ <p class="cmp-submit">
222
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
223
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
224
+ </p>
225
+ </th></tr>
226
+ </tbody>
227
+ </table>
228
+
229
+ </div>
230
+
231
+ </div> <!-- <div class="cmp-inputs-wrapper"> -->
232
+
233
+ <?php
234
+ // get sidebar with "widgets"
235
+ if ( file_exists(dirname(__FILE__) . '/cmp-sidebar.php') ) {
236
+ require (dirname(__FILE__) . '/cmp-sidebar.php');
237
+ }
238
+
239
+ ?>
240
+
241
+ </div> <!-- <div class="cmp-settings-wrapper"> -->
242
+
243
+ </form>
244
 
245
  </div> <!-- <div id="wrap"> -->
246
 
247
  <script>
248
+ jQuery(document).ready(function($){
249
+
250
+ // page whitelist/blacklist
251
+ jQuery('.page-whitelist').change(function() {
252
+ switch( jQuery('.page-whitelist:checked' ).val() ) {
253
+ // disabled
254
+ case '0':
255
+ jQuery('#page-disabled').css('display','block');
256
+ jQuery('#page-whitelist').css('display','none');
257
+ jQuery('#page-blacklist').css('display','none');
258
+ break
259
+
260
+ // whitelist
261
+ case '1':
262
+ jQuery('#page-disabled').css('display','none');
263
+ jQuery('#page-whitelist').css('display','block');
264
+ jQuery('#page-blacklist').css('display','none');
265
+ break;
266
+
267
+ // blacklist
268
+ case '2':
269
+ jQuery('#page-disabled').css('display','none');
270
+ jQuery('#page-whitelist').css('display','none');
271
+ jQuery('#page-blacklist').css('display','block');
272
+ break;
273
+
274
+ default:
275
+ break;
276
+ }
277
+ });
278
+
279
+ jQuery('.page-whitelist').trigger('change');
280
+
281
+ jQuery('.cmp-whitelist, .cmp-blacklist, .cmp-user_roles').select2({
282
+ width: 'calc(100% - 1em)',
283
+ placeholder: 'Click to select..',
284
+
285
  });
286
+ });
287
  </script>
cmp-settings.php CHANGED
@@ -15,6 +15,7 @@ if ( isset($_POST['select_theme']) && in_array($_POST['select_theme'], $this->th
15
 
16
 
17
  $themeslug = $this->cmp_selectedTheme();
 
18
 
19
  if (isset($_POST['niteoCS_logo_id_'.$themeslug]) && ( is_numeric($_POST['niteoCS_logo_id_'.$themeslug]) || empty($_POST['niteoCS_logo_id_'.$themeslug]))) {
20
  update_option('niteoCS_logo_id['.$themeslug.']', sanitize_text_field($_POST['niteoCS_logo_id_'.$themeslug]));
@@ -203,6 +204,18 @@ if (isset($_POST['niteoCS_analytics'])) {
203
  update_option('niteoCS_analytics', sanitize_text_field($_POST['niteoCS_analytics']));
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  if (isset($_POST['niteoCS_custom_css'])) {
207
  update_option('niteoCS_custom_css', $_POST['niteoCS_custom_css']);
208
  }
@@ -255,11 +268,9 @@ if (isset($_POST['niteoCS_redirect_time'])) {
255
  }
256
 
257
 
258
-
259
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
260
 
261
  // get Settings TAB
262
- $premium_themes = $this->cmp_plugin_premium();
263
  $niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
264
  $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
265
 
@@ -279,7 +290,11 @@ $niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
279
  $niteoCS_favicon_id = get_option('niteoCS_favicon_id');
280
  $niteoCS_title = stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!'));
281
  $niteoCS_descr = stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page'));
 
282
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
 
 
 
283
  // get Custom CSS
284
  $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
285
 
@@ -419,14 +434,12 @@ if( isset($_POST['submit_theme']) ) {
419
  // Hande THeme update
420
  if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
421
  $slug = sanitize_text_field($_GET['theme']);
422
- $type = sanitize_text_field($_GET['type']);
423
  $theme_url = $this->remoteServer.'?action=download&slug='.$slug;
424
  $update = array(
425
  'name' => $slug,
426
  'tmp_name' => '',
427
  'type' => 'application/x-zip-compressed',
428
  'url' => $theme_url,
429
- 'type' => $type,
430
  );
431
 
432
  $this->cmp_theme_update_install($update);
@@ -533,7 +546,7 @@ add_thickbox();
533
  </div>
534
 
535
  <div class="table-wrapper general">
536
- <h3><?php _e('Free Themes', 'cmp-coming-soon-maintenance');?></h3>
537
  <table class="general theme-selector">
538
  <tr>
539
  <td class="theme-selector">
@@ -543,26 +556,44 @@ add_thickbox();
543
  </legend>
544
  <?php
545
  // move active theme to beginning
546
- $key = array_search ($this->cmp_selectedTheme(), $this->themes_standard);
547
  if ( $key ) {
548
- $active = $this->themes_standard[$key];
549
- unset($this->themes_standard[$key]);
550
- array_unshift($this->themes_standard, $active);
551
  }
552
 
553
- foreach ( $this->themes_standard as $theme_slug ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
554
 
555
  // get thumbnail
556
  $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
557
 
558
- <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="standard" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>">
559
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
560
 
561
  <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
562
 
 
 
563
  <div class="theme-inputs">
564
 
565
- <div class="button theme-select hide <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
566
  <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"'; } ?>>
567
  <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>
568
  </div>
@@ -588,11 +619,9 @@ add_thickbox();
588
 
589
  </div>
590
  <?php
591
- if ( !empty( $premium_themes ) ) {
592
- // define what attribute we want from style.css header
593
- $headers = array('Version');?>
594
  <div class="table-wrapper general">
595
- <h3><?php _e('Premium Themes', 'cmp-coming-soon-maintenance');?></h3>
596
  <table class="general theme-selector">
597
  <tbody>
598
  <tr>
@@ -602,68 +631,35 @@ add_thickbox();
602
  <span><?php _e('Premium Themes', 'cmp-coming-soon-maintenance');?> </span>
603
  </legend>
604
  <?php
605
- // move active theme to beginning if active is not already set in standard themes
606
- if ( $key === false ) {
607
- $premium_themes = $this->customShift($premium_themes, $this->cmp_selectedTheme());
608
- }
609
 
610
  // build previews for premium themes
611
- foreach ( $premium_themes as $premium_theme ) {
612
  $theme_slug = $premium_theme['name'];
613
  $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__);
614
  $freebie = 'false';
615
- $purchased = 'false';
616
- $version = '';
617
-
618
- // if premium theme is not in installed themes array
619
- if ( !in_array( $theme_slug, $this->theme_array) ) {
620
- // check if theme is freebie [price-0] and display download button
621
- if ( $premium_theme['price'] == 0 ) {
622
- $freebie = 'true';
623
- // get theme version
624
- if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
625
- $version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
626
- if ( isset($version[0])) { $version = $version[0] ;}
627
- }
628
- }
629
- }
630
 
631
- // if premium theme has been installed
632
- if ( in_array( $theme_slug, $this->theme_array) ) {
633
- $purchased = 'true';
634
- $version = '';
635
- // get theme version
636
- if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
637
- $version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
638
- if ( isset($version[0])) { $version = $version[0] ;}
639
- }
640
- }?>
641
 
642
- <div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?> premium" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium" data-purchased="<?php echo esc_attr($purchased);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url($this->remoteServer);?>" data-freebie="<?php echo esc_attr( $freebie );?>">
643
 
644
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
645
 
646
  <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
647
 
648
- <?php echo ( $purchased == 'true' ) ? '<span class="theme-version">ver.'.esc_html($version).'</span>' : ''; ?>
649
-
650
  <div class="theme-inputs">
651
 
652
  <?php
653
- if ( $purchased == 'true' ) { ?>
654
- <div class="button theme-select hide <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
655
- <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"'; } ?>>
656
- <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>
657
- </div>
658
  <?php
659
- // if not purchased and is not freebie, display buy button
660
- } else if ( $freebie !== 'true' ) { ?>
661
-
662
- <button type="button" class="theme-purchase button hide"><a href="<?php echo esc_url($premium_theme['url']);?>" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i><?php _e('Buy', 'cmp-coming-soon-maintenance');?></a></button>
663
- <?php
664
- // if freebie, dislay download
665
  } else if ( $freebie == 'true' ) { ?>
666
- <button type="button" class="theme-purchase button hide"><a href="<?php echo esc_url($premium_theme['url']);?>" target="_blank"><i class="fa fa-download" aria-hidden="true"></i><?php _e('FREE Download', 'cmp-coming-soon-maintenance');?></a></button>
667
  <?php
668
  } ?>
669
  <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>
@@ -676,8 +672,6 @@ add_thickbox();
676
  </fieldset>
677
  </td>
678
  </tr>
679
- <?php
680
- } // if !empty($premium_themes ?>
681
 
682
  <tr><th>
683
  <p class="cmp-submit">
@@ -690,6 +684,9 @@ add_thickbox();
690
  <div class="theme-overlay cmp"></div>
691
  </div>
692
 
 
 
 
693
  <div class="table-wrapper content">
694
  <h3><?php _e('Content', 'cmp-coming-soon-maintenance');?></h3>
695
  <table class="content">
@@ -698,7 +695,7 @@ add_thickbox();
698
  <th><h4><?php _e('Title', 'cmp-coming-soon-maintenance');?></h4></th>
699
  <td>
700
  <fieldset>
701
- <input type="text" name="niteoCS_body_title" id="niteoCS_body_title" value="<?php echo stripslashes(esc_attr( $niteoCS_body_title)); ?>" class="regular-text code">
702
  </fieldset>
703
  </td>
704
  </tr>
@@ -797,12 +794,26 @@ add_thickbox();
797
  ($social['hidden'] == '0') ? $active = 'active ' : $active = '';
798
 
799
  ($social['active'] == '0') ? $disabled = 'disabled ' : $disabled = '';
800
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
801
  <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
802
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
803
  <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp-coming-soon-maintenance');?></label>
804
 
805
- <input type="text" <?php echo $disabled;?>name="niteoCS_<?php echo esc_attr($social['name']);?>" id="niteoCS_<?php echo esc_attr($social['name']);?>" value="<?php echo esc_attr( $social['url'] ); ?>" class="regular-text code <?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>">
806
 
807
  <input type="checkbox" name="niteoCS_<?php echo esc_attr($social['name']);?>_checkbox" id="niteoCS_<?php echo esc_attr($social['name']);?>_checkbox" class="<?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>" <?php checked( '1', $social['active'] ); ?>>
808
  </p>
@@ -1045,14 +1056,71 @@ add_thickbox();
1045
  </fieldset>
1046
  </td>
1047
  </tr>
1048
- <tr>
1049
- <th><h4><?php _e('Google Analytics Tracking ID', 'cmp-coming-soon-maintenance');?></h4></th>
1050
- <td>
1051
- <fieldset>
1052
- <input type="text" name="niteoCS_analytics" id="niteoCS_analytics" value="<?php echo esc_attr( $niteoCS_analytics); ?>" class="regular-text code" placeholder="UA-xxxxxx-xx">
1053
- </fieldset>
1054
- </td>
1055
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1056
  <tr><th>
1057
  <p class="cmp-submit">
1058
  <?php wp_nonce_field('save_options','save_options_field'); ?>
15
 
16
 
17
  $themeslug = $this->cmp_selectedTheme();
18
+ $downloadable_themes = $this->cmp_downloadable_themes();
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]));
204
  update_option('niteoCS_analytics', sanitize_text_field($_POST['niteoCS_analytics']));
205
  }
206
 
207
+ if (isset($_POST['niteoCS_analytics_status'])) {
208
+ update_option('niteoCS_analytics_status', sanitize_text_field($_POST['niteoCS_analytics_status']));
209
+ }
210
+
211
+
212
+ if (isset($_POST['niteoCS_analytics_other'])) {
213
+ $replace = array('<script>', '</script>');
214
+ $js_code = str_replace($replace, '', $_POST['niteoCS_analytics_other']);
215
+ update_option('niteoCS_analytics_other', sanitize_text_field($js_code));
216
+ }
217
+
218
+
219
  if (isset($_POST['niteoCS_custom_css'])) {
220
  update_option('niteoCS_custom_css', $_POST['niteoCS_custom_css']);
221
  }
268
  }
269
 
270
 
 
271
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
272
 
273
  // get Settings TAB
 
274
  $niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
275
  $niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
276
 
290
  $niteoCS_favicon_id = get_option('niteoCS_favicon_id');
291
  $niteoCS_title = stripslashes(get_option('niteoCS_title', get_bloginfo('name').' is coming soon!'));
292
  $niteoCS_descr = stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page'));
293
+ $niteoCS_analytics_status = get_option('niteoCS_analytics_status', 'disabled');
294
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
295
+ $niteoCS_analytics_other = stripslashes(get_option('niteoCS_analytics_other', ''));
296
+
297
+
298
  // get Custom CSS
299
  $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
300
 
434
  // Hande THeme update
435
  if( isset($_GET['action']) && $_GET['action'] == 'update-cmp-theme' && isset($_GET['theme'])) {
436
  $slug = sanitize_text_field($_GET['theme']);
 
437
  $theme_url = $this->remoteServer.'?action=download&slug='.$slug;
438
  $update = array(
439
  'name' => $slug,
440
  'tmp_name' => '',
441
  'type' => 'application/x-zip-compressed',
442
  'url' => $theme_url,
 
443
  );
444
 
445
  $this->cmp_theme_update_install($update);
546
  </div>
547
 
548
  <div class="table-wrapper general">
549
+ <h3><?php _e('Available Themes', 'cmp-coming-soon-maintenance');?></h3>
550
  <table class="general theme-selector">
551
  <tr>
552
  <td class="theme-selector">
556
  </legend>
557
  <?php
558
  // move active theme to beginning
559
+ $key = array_search ($this->cmp_selectedTheme(), $this->theme_array);
560
  if ( $key ) {
561
+ $active = $this->theme_array[$key];
562
+ unset($this->theme_array[$key]);
563
+ array_unshift($this->theme_array, $active);
564
  }
565
 
566
+ // define what attribute we want from style.css header
567
+ $headers = array('Version');
568
+ $type = 'standard';
569
+
570
+ foreach ( $this->theme_array as $theme_slug ) {
571
+ $version = $this->version;
572
+
573
+ // if premium get theme version
574
+ if ( in_array($theme_slug, $this->premium_installed) ) {
575
+
576
+ if ( file_exists($this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css') ) {
577
+ $version = get_file_data( $this->plugins_dir_path . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
578
+ if ( isset($version[0])) { $version = $version[0] ;}
579
+ }
580
+
581
+ $type = 'premium';
582
+ }
583
 
584
  // get thumbnail
585
  $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
586
 
587
+ <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);?>">
588
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
589
 
590
  <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
591
 
592
+ <span class="theme-version">ver. <?php echo esc_html( $version );?></span>
593
+
594
  <div class="theme-inputs">
595
 
596
+ <div class="button theme-select <?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo 'activated'; } ?>">
597
  <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"'; } ?>>
598
  <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>
599
  </div>
619
 
620
  </div>
621
  <?php
622
+ if ( !empty( $downloadable_themes ) ) { ?>
 
 
623
  <div class="table-wrapper general">
624
+ <h3><?php _e('Download more CMP Themes', 'cmp-coming-soon-maintenance');?></h3>
625
  <table class="general theme-selector">
626
  <tbody>
627
  <tr>
631
  <span><?php _e('Premium Themes', 'cmp-coming-soon-maintenance');?> </span>
632
  </legend>
633
  <?php
 
 
 
 
634
 
635
  // build previews for premium themes
636
+ foreach ( $downloadable_themes as $premium_theme ) {
637
  $theme_slug = $premium_theme['name'];
638
  $thumbnail = plugins_url('/img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__);
639
  $freebie = 'false';
640
+
641
+ // check if theme is freebie [price-0] and display download button
642
+ if ( $premium_theme['price'] == 0 ) {
643
+ $freebie = 'true';
644
+ } ?>
 
 
 
 
 
 
 
 
 
 
645
 
 
 
 
 
 
 
 
 
 
 
646
 
647
+ <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']);?>">
648
 
649
  <div class="thumbnail-holder theme-details" style="background-image:url('<?php echo esc_url( $thumbnail ); ?>')"></div>
650
 
651
  <span class="theme-title"><?php echo ucwords(esc_html(str_replace('_', ' ', $theme_slug)));?></span>
652
 
 
 
653
  <div class="theme-inputs">
654
 
655
  <?php
656
+ // premium theme
657
+ if ( $freebie !== 'true' ) { ?>
658
+ <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>
 
 
659
  <?php
660
+ // if freebie, dislay download icon
 
 
 
 
 
661
  } else if ( $freebie == 'true' ) { ?>
662
+ <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('$0', 'cmp-coming-soon-maintenance');?></a></button>
663
  <?php
664
  } ?>
665
  <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>
672
  </fieldset>
673
  </td>
674
  </tr>
 
 
675
 
676
  <tr><th>
677
  <p class="cmp-submit">
684
  <div class="theme-overlay cmp"></div>
685
  </div>
686
 
687
+ <?php
688
+ } // if !empty($premium_themes ?>
689
+
690
  <div class="table-wrapper content">
691
  <h3><?php _e('Content', 'cmp-coming-soon-maintenance');?></h3>
692
  <table class="content">
695
  <th><h4><?php _e('Title', 'cmp-coming-soon-maintenance');?></h4></th>
696
  <td>
697
  <fieldset>
698
+ <input type="text" name="niteoCS_body_title" id="niteoCS_body_title" value="<?php echo stripslashes(esc_attr( $niteoCS_body_title)); ?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
699
  </fieldset>
700
  </td>
701
  </tr>
794
  ($social['hidden'] == '0') ? $active = 'active ' : $active = '';
795
 
796
  ($social['active'] == '0') ? $disabled = 'disabled ' : $disabled = '';
797
+
798
+ switch ( $social['name'] ) {
799
+ case 'envelope-o':
800
+ $url = 'email@example.com';
801
+ break;
802
+ case 'google-plus':
803
+ $url = 'https://plus.google.com/profile';
804
+ break;
805
+ case 'behance':
806
+ $url = 'https://behance.net/profile';
807
+ break;
808
+ default:
809
+ $url = 'https://'.$social['name'].'.com/profile';
810
+ break;
811
+ } ?>
812
  <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
813
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
814
  <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp-coming-soon-maintenance');?></label>
815
 
816
+ <input type="text" <?php echo $disabled;?>name="niteoCS_<?php echo esc_attr($social['name']);?>" id="niteoCS_<?php echo esc_attr($social['name']);?>" value="<?php echo esc_attr( $social['url'] ); ?>" class="regular-text code <?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>" placeholder="<?php echo $url;?>">
817
 
818
  <input type="checkbox" name="niteoCS_<?php echo esc_attr($social['name']);?>_checkbox" id="niteoCS_<?php echo esc_attr($social['name']);?>_checkbox" class="<?php echo esc_attr($social['name']);?>" data-name="<?php echo esc_attr($social['name']);?>" <?php checked( '1', $social['active'] ); ?>>
819
  </p>
1056
  </fieldset>
1057
  </td>
1058
  </tr>
1059
+
1060
+ <tr><th>
1061
+ <p class="cmp-submit">
1062
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
1063
+ <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
1064
+ </p>
1065
+ </th></tr>
1066
+ </tbody>
1067
+ </table>
1068
+ </div>
1069
+
1070
+ <div class="table-wrapper seo">
1071
+ <h3><?php _e('Website Analytics', 'cmp-coming-soon-maintenance');?></h3>
1072
+ <table class="seo">
1073
+ <tbody>
1074
+
1075
+ <tr>
1076
+ <th>
1077
+ <fieldset>
1078
+ <legend class="screen-reader-text">
1079
+ <span><?php _e('Analytics', 'cmp-coming-soon-maintenance');?></span>
1080
+ </legend>
1081
+
1082
+ <p>
1083
+ <label title="<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>">
1084
+ <input type="radio" class="analytics" name="niteoCS_analytics_status" value="disabled"<?php if ( $niteoCS_analytics_status == 'disabled') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
1085
+ </label>
1086
+ </p>
1087
+
1088
+ <p>
1089
+ <label title="<?php _e('Google Analytics', 'cmp-coming-soon-maintenance');?>">
1090
+ <input type="radio" class="analytics" name="niteoCS_analytics_status" value="google"<?php if ( $niteoCS_analytics_status == 'google') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Google Analytics', 'cmp-coming-soon-maintenance');?>
1091
+ </label>
1092
+ </p>
1093
+
1094
+ <p>
1095
+ <label title="<?php _e('Other', 'cmp-coming-soon-maintenance');?>">
1096
+ <input type="radio" class="analytics" name="niteoCS_analytics_status" value="other"<?php if ( $niteoCS_analytics_status == 'other') { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Other', 'cmp-coming-soon-maintenance');?>
1097
+ </label>
1098
+ </p>
1099
+
1100
+ </fieldset>
1101
+ </th>
1102
+
1103
+ <td>
1104
+ <fieldset>
1105
+ <p class="analytics-switch disabled"><?php _e('Analytics is disabled', 'cmp-coming-soon-maintenance');?></p>
1106
+
1107
+ <p class="analytics-switch google">
1108
+ <label for="niteoCS_analytics"><?php _e('Insert Google Analytics Tracking ID', 'cmp-coming-soon-maintenance');?></label><br>
1109
+
1110
+ <input type="text" name="niteoCS_analytics" value="<?php echo esc_attr( $niteoCS_analytics); ?>" class="regular-text code" placeholder="UA-xxxxxx-xx"/>
1111
+
1112
+ </p>
1113
+
1114
+ <p class="analytics-switch other">
1115
+ <label for="niteoCS_analytics_other"><?php _e('Insert your Analytics Javascript code', 'cmp-coming-soon-maintenance');?></label><br>
1116
+ <textarea name="niteoCS_analytics_other" rows="5" class="code"><?php echo esc_js($niteoCS_analytics_other); ?></textarea>
1117
+ </p>
1118
+ </fieldset>
1119
+
1120
+ </td>
1121
+
1122
+ </tr>
1123
+
1124
  <tr><th>
1125
  <p class="cmp-submit">
1126
  <?php wp_nonce_field('save_options','save_options_field'); ?>
cmp-subscribers.php CHANGED
@@ -36,6 +36,7 @@ $cmp_subs_list_table->prepare_items();
36
 
37
 
38
  <div class="wrap">
 
39
  <div id="icon-users" class="icon32"></div>
40
  <div class="cmp-inputs-wrapper subscribers-settings">
41
  <?php wp_nonce_field('cmp_process_bulk_action', '_nonce'); ?>
36
 
37
 
38
  <div class="wrap">
39
+ <h1></h1>
40
  <div id="icon-users" class="icon32"></div>
41
  <div class="cmp-inputs-wrapper subscribers-settings">
42
  <?php wp_nonce_field('cmp_process_bulk_action', '_nonce'); ?>
cmp-upload.php CHANGED
@@ -13,7 +13,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
13
 
14
  <div class="cmp-inputs-wrapper help-settings">
15
 
16
- <form action="admin.php?page=cmp-settings" class="wp-upload-form" method="post" enctype="multipart/form-data">
17
  <table class="install">
18
  <tbody>
19
  <tr>
13
 
14
  <div class="cmp-inputs-wrapper help-settings">
15
 
16
+ <form action="admin.php?page=cmp-settings" class="wp-upload-form upload-theme" method="post" enctype="multipart/form-data">
17
  <table class="install">
18
  <tbody>
19
  <tr>
css/cmp-settings-style.css CHANGED
@@ -85,7 +85,8 @@ input[type="range"]::-webkit-slider-thumb:active {
85
  transform: scale(1.2);
86
  }
87
 
88
- input[type="text"], textarea{width:100%;}
 
89
  .table-wrapper.content,
90
  .table-wrapper.theme-setup,
91
  .table-wrapper.install,
@@ -95,8 +96,10 @@ input[type="text"], textarea{width:100%;}
95
  #niteoCS_countdown_redirect {
96
  display: none;
97
  }
98
- .upload-plugin.comingsoon .wp-upload-form {
99
- max-width: 600px;
 
 
100
  }
101
 
102
  .cmp-status legend {
@@ -148,19 +151,19 @@ input[type="text"], textarea{width:100%;}
148
  margin: 0;
149
  padding-left:1em;
150
  border-bottom:1px solid #dedede;
151
- cursor: pointer;
152
  text-align: left;
153
  }
154
 
155
  .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after {
156
- font-family: fontAwesome;
157
- content: "\f147";
158
- position: absolute;
159
- right: 10px;
160
- font-weight: 400;
161
- opacity: .6;
162
- -webkit-font-smoothing: antialiased;
163
- -moz-osx-font-smoothing: grayscale;
 
164
  }
165
 
166
  .table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after {
@@ -385,6 +388,7 @@ th label {font-weight: 600;}
385
  height: 28px;
386
  line-height: 28px;
387
  padding: 0 10px;
 
388
  border-radius: 3px;
389
  color: #ffffff!important;
390
  -moz-appearance: none;
@@ -421,14 +425,23 @@ th label {font-weight: 600;}
421
  color: #ffffff!important;
422
  }
423
 
424
- .theme-wrapper .theme-select,
425
  .theme-wrapper .theme-select {
426
  float: left;
427
- background-color: #27ae60;
428
  }
429
 
430
  .theme-wrapper .theme-select:hover,
431
  .theme-wrapper .theme-select:focus {
 
 
 
 
 
 
 
 
 
 
432
  background-color: #2ecc71;
433
  }
434
 
@@ -479,7 +492,6 @@ th label {font-weight: 600;}
479
  min-width: 40%;
480
  height: 55px;
481
  font-size: 2em;
482
- margin: 1em 0;
483
  background-color: #2c3e50;
484
  border: none;
485
  }
@@ -752,7 +764,10 @@ input[type=checkbox].toggle-checkbox {
752
  .cmp-sidebar-wrapper {width: calc(30% - 2em + 7px);}
753
  .theme-wrapper,
754
  .theme-wrapper.premium { width: calc(50% - 3em - 5px);}
 
755
 
 
 
756
  }
757
 
758
 
@@ -761,25 +776,31 @@ input[type=checkbox].toggle-checkbox {
761
  .theme-wrapper.premium { margin-right:0;width: calc(100% - 5px);}
762
  .table-wrapper th {display: block;}
763
  .cmp-sidebar-wrapper .widget {padding: 1em;}
764
-
765
  }
766
 
767
  @media screen and (max-width: 1024px) {
768
-
769
  .table-wrapper table {width:100%;}
770
  .table-wrapper th {width: 140px;}
771
  }
772
 
773
  @media screen and (max-width: 782px) {
774
-
775
  .social-inputs input[type=checkbox]:checked:before {margin: -1px 0px 0 -4px;}
776
  .cmp-sidebar-wrapper,
777
  .cmp-inputs-wrapper {display: block;max-width:100%;width: 100%; margin:0;}
778
- .cmp-sidebar-wrapper .widget {padding: 2em;}
779
  .theme-wrapper.hide,.theme-wrapper .hide:not(.selected) { opacity: 1;}
780
  .theme-overlay .theme-screenshots,
781
  .theme-overlay .theme-info {width:100%;float:none;}
782
-
783
  }
 
 
 
 
 
 
 
 
 
784
  }
785
 
85
  transform: scale(1.2);
86
  }
87
 
88
+ input[type="text"], textarea {width:100%;}
89
+
90
  .table-wrapper.content,
91
  .table-wrapper.theme-setup,
92
  .table-wrapper.install,
96
  #niteoCS_countdown_redirect {
97
  display: none;
98
  }
99
+ .wp-upload-form.upload-theme {
100
+ padding: 4em;
101
+ display: block;
102
+
103
  }
104
 
105
  .cmp-status legend {
151
  margin: 0;
152
  padding-left:1em;
153
  border-bottom:1px solid #dedede;
 
154
  text-align: left;
155
  }
156
 
157
  .table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after {
158
+ font-family: fontAwesome;
159
+ content: "\f147";
160
+ position: absolute;
161
+ right: 10px;
162
+ font-weight: 400;
163
+ opacity: .6;
164
+ cursor: pointer;
165
+ -webkit-font-smoothing: antialiased;
166
+ -moz-osx-font-smoothing: grayscale;
167
  }
168
 
169
  .table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after {
388
  height: 28px;
389
  line-height: 28px;
390
  padding: 0 10px;
391
+ min-width: 80px;
392
  border-radius: 3px;
393
  color: #ffffff!important;
394
  -moz-appearance: none;
425
  color: #ffffff!important;
426
  }
427
 
 
428
  .theme-wrapper .theme-select {
429
  float: left;
430
+ background-color: #95a5a6;
431
  }
432
 
433
  .theme-wrapper .theme-select:hover,
434
  .theme-wrapper .theme-select:focus {
435
+ background-color: #b5b5b5;
436
+ }
437
+
438
+
439
+ .theme-wrapper .theme-select.activated {
440
+ background-color: #27ae60;
441
+ }
442
+
443
+ .theme-wrapper .theme-select.activated:hover,
444
+ .theme-wrapper .theme-select.activated:focus {
445
  background-color: #2ecc71;
446
  }
447
 
492
  min-width: 40%;
493
  height: 55px;
494
  font-size: 2em;
 
495
  background-color: #2c3e50;
496
  border: none;
497
  }
764
  .cmp-sidebar-wrapper {width: calc(30% - 2em + 7px);}
765
  .theme-wrapper,
766
  .theme-wrapper.premium { width: calc(50% - 3em - 5px);}
767
+ }
768
 
769
+ @media screen and (max-width: 1270px) {
770
+ .cmp-inputs-wrapper {min-width: 100%;}
771
  }
772
 
773
 
776
  .theme-wrapper.premium { margin-right:0;width: calc(100% - 5px);}
777
  .table-wrapper th {display: block;}
778
  .cmp-sidebar-wrapper .widget {padding: 1em;}
 
779
  }
780
 
781
  @media screen and (max-width: 1024px) {
 
782
  .table-wrapper table {width:100%;}
783
  .table-wrapper th {width: 140px;}
784
  }
785
 
786
  @media screen and (max-width: 782px) {
 
787
  .social-inputs input[type=checkbox]:checked:before {margin: -1px 0px 0 -4px;}
788
  .cmp-sidebar-wrapper,
789
  .cmp-inputs-wrapper {display: block;max-width:100%;width: 100%; margin:0;}
790
+ .cmp-sidebar-wrapper .widget {padding: 2em;margin-bottom: 1em!important;}
791
  .theme-wrapper.hide,.theme-wrapper .hide:not(.selected) { opacity: 1;}
792
  .theme-overlay .theme-screenshots,
793
  .theme-overlay .theme-info {width:100%;float:none;}
794
+ input[type="text"], textarea {font-size: 13px;}
795
  }
796
+
797
+ @media screen and (max-width: 560px) {
798
+ .social-inputs .label:nth-of-type(2) {left:50px;}
799
+ .social-inputs .label:nth-of-type(3) {left: 105px;}
800
+ .social-inputs p i {top: 22px;}
801
+ .social-inputs input[type="checkbox"] {top: 28px; left: 53px;}
802
+ .social-inputs label, .social-inputs label {padding-left: 55px;}
803
+ .social-inputs input[type="text"] {margin-left: 55px;width: calc(100% - 55px);}
804
+
805
  }
806
 
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:white}.comingsoon-success{border-left:4px solid #00d221}.padding-bottom{padding-bottom:10px}input[type="text"],.select2-container--default .select2-selection--single{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}input[type="range"]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:0 auto;outline:0;margin-top:10px}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:0.3s ease-in-out;transition:0.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%}.table-wrapper.content,.table-wrapper.theme-setup,.table-wrapper.install,.table-wrapper.seo,.table-wrapper.custom_css,#niteoCS_countdown_text,#niteoCS_countdown_redirect{display:none}.upload-plugin.comingsoon .wp-upload-form{max-width:600px}.cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-status .active{background-color:#ddd}.redirect{margin-bottom:0}.table-wrapper,.help-settings,.subscribers-settings,.translate-settings{background-color:#fff;border:1px solid #dedede;margin:1em 0;margin-top:0;max-width:920px}.cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.help-settings,.subscribers-settings,.translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.translate-settings tfoot{display:none}.table-wrapper h3{position:relative;padding:.5em 0;margin:0;padding-left:1em;border-bottom:1px solid #dedede;cursor:pointer;text-align:left}.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;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.table-wrapper.closed table{display:none}.table-wrapper h4{margin:0}.table-wrapper table{padding:1em;height:100%}.table-wrapper table{width:90%}.table-wrapper .theme-selector{width:100%}.table-wrapper select{margin-bottom:10px;width:100%}.table-wrapper td{display:block;width:100%;max-width:600px;margin-bottom:1em}.table-wrapper td.theme-selector{max-width:100%}.table-wrapper td{display:block}.table-wrapper th{vertical-align:top;width:180px;text-align:left}#delete-logo,#delete-banner,#delete-favicon,#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;font-weight:600}.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:.8em;padding-bottom:1em}.social-media i{font-size:1.65em;cursor:pointer}.social-media i.active{color:#d54e21}.social-inputs li{display:none;width:100%}.social-inputs li.active{display:inline-block}.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}.social-inputs label,.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}th label{font-weight:600}#unsplash_img{display:none;max-width:100%}#unsplash-media{padding-top:1em}.unsplash-feed{display:none}.pattern-wrapper,.color-preview,.gradient-preview{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.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}.logo-wrapper,.banner-wrapper,.favicon-wrapper{margin:1em 0}.logo-wrapper img,.favicon-wrapper img{background-color:#efefef;padding:1em}.favicon-wrapper img{max-width:32px}.logo-wrapper img,.background-media img{max-width:100%;width:100%}.logo-wrapper img{max-height:150px;width:auto}.background-media td fieldset{padding-top:1em}#font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}#heading-example{padding-left:0;border-bottom:none;line-height:1.5;padding:0}#custom_headings_font,#custom_content_font{display:none}.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{position:relative;width:100%;margin-bottom:2em;background-repeat:no-repeat;background-size:cover;background-position:center;border-top-left-radius:5px;border-top-right-radius:5px}.thumbnail-holder::before{content:'';display:block;padding-top:56.25%}.theme-title{float:left;text-transform:uppercase;font-weight:600}.theme-version{float:right}.theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity 300ms,background-color 500ms;transition:opacity 300ms,background-color 500ms}.theme-wrapper .hide.activated,.theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity 300ms,background-color 500ms;transition:opacity 300ms,background-color 500ms}.theme-inputs{clear:both;border-top:1px solid #efefef;padding-top:.5em}.theme-wrapper .button,.cmp-button,.cmp-preview{height:28px;line-height:28px;padding:0 10px;border-radius:3px;color:#ffffff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;-webkit-box-shadow:none;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:hover,.cmp-button.submit:focus,.theme-actions .activate:hover,.theme-actions .activate:focus{background-color:#e74c3c;color:#fff;border:none}.theme-wrapper .button:hover{border:none;color:#ffffff!important}.theme-wrapper .theme-select,.theme-wrapper .theme-select{float:left;background-color:#27ae60}.theme-wrapper .theme-select:hover,.theme-wrapper .theme-select:focus{background-color:#2ecc71}.theme-wrapper .theme-details.button{float:right;background-color:#2980b9}.theme-wrapper .theme-details.button:hover,.theme-wrapper .theme-details.button:focus{background-color:#3498db}.theme-wrapper .theme-update{float:left;margin:0 5px;background-color:#d35400}.theme-wrapper .theme-update:hover,.theme-wrapper .theme-update:focus{background-color:#e67e22}.theme-wrapper .theme-purchase{float:left;background-color:#2c3e50}.theme-wrapper .theme-purchase.button:hover,.theme-wrapper .theme-purchase.button:focus{background-color:#4f7090}.cmp-preview{background-color:#2485bf!important}.theme-details{cursor:pointer}.cmp-preview:hover,.cmp-preview:active{background-color:#32b2ff!important}.theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;margin:1em 0;background-color:#2c3e50;border:none}.theme-wrapper .theme-purchase:hover,.theme-wrapper .theme-purchase:focus,.theme-info .theme-purchase:hover,.theme-info .theme-purchase:focus{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{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center;-webkit-transition:background-image 0.2s ease-in-out;transition:background-image 0.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:black;line-height:40px;opacity:.7;-webkit-transition:opacity 500ms;transition:opacity 500ms}.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-wrapper{display:inline-block}.toggle{cursor:pointer;display:inline-block;position:relative;width:200px;height:30px;font-weight:600;background:transparent;border:2px solid #f1f1f1;-webkit-transition:all 200ms ease-in-out;transition:all 200ms ease-in-out;border-radius:15px}.toggle:before,.toggle:after{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all 200ms ease-in-out;transition:all 200ms 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 200ms ease-in-out;transition:all 200ms ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:10px;border-bottom-left-radius:10px}.toggle-checkbox:checked + .toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-top-right-radius:10px;border-bottom-right-radius:10px;border-top-left-radius:0;border-bottom-left-radius: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:after{content:"Enabled";right:26px;color:#23282d}.toggle-checkbox:checked + .toggle:before{color:#23282d}.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 input:checked + img{opacity:1}.fifty-layout img{display:block;opacity:.3;outline:1px solid;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:white}.widget.donate img{max-width:50px}.widget.donate img.niteo-logo{max-width:120px}.cmp-rate-us a,.cmp-rate-us .button{display:block;text-align:center}.cmp-rate-us a{padding:1em 0}.cmp-rate-us .button{max-width:150px;margin:0 auto;margin-bottom: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: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-sidebar-wrapper,.cmp-inputs-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-sidebar-wrapper .widget{padding:2em}.theme-wrapper.hide,.theme-wrapper .hide:not(.selected){opacity:1}.theme-overlay .theme-screenshots,.theme-overlay .theme-info{width:100%;float:none}}}
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}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.upload-theme{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:100%;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:.8em;padding-bottom:1em}.social-media i{font-size:1.65em;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-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}#unsplash_img{display:none}.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}.fifty-layout input:checked+img,.theme-overlay .screenshots-nav div:hover{opacity:1}.toggle,.toggle:after,.toggle:before{-webkit-transition:all .2s ease-in-out}.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;transition:all .2s ease-in-out;border-radius:15px}.toggle:after,.toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;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)}}
css/select2.min.css CHANGED
@@ -1 +1,8 @@
1
  .select2-container{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:block;height:35px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:block;min-height:32px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #dedede;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #dedede;border-radius: 4px;}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(50%, #fff), to(#eee));background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(#ccc));background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(50%, #eee));background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(#fff));background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;-webkit-box-shadow:none;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
 
 
 
 
 
 
 
1
  .select2-container{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:block;height:35px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:block;min-height:32px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #dedede;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #dedede;border-radius: 4px;}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(50%, #fff), to(#eee));background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(#ccc));background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(50%, #eee));background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(#fff));background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;-webkit-box-shadow:none;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
2
+ .cmp-advanced .select2-container--default .select2-selection--multiple .select2-selection__choice {background-color: #2980b9;color: white;border:none;padding:3px 5px;}
3
+ .cmp-advanced .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {color:white;}
4
+ .cmp-advanced .select2-container--default .select2-search--inline .select2-search__field {line-height: 2.5em;margin-top:0;}
5
+ .cmp-advanced .select2-container--default .select2-selection--multiple .select2-selection__rendered li {margin-bottom:0;}
6
+ .cmp-advanced .select2-container .select2-selection--multiple .select2-selection__rendered {display:block;}
7
+ .cmp-advanced .select2-container--default.select2-container--focus .select2-selection--multiple {border-color: #5b9dd9; -webkit-box-shadow: 0 0 2px rgba(30,140,190,.8); box-shadow: 0 0 2px rgba(30,140,190,.8);}
8
+ .select2-container--default .select2-results__option--highlighted[aria-selected] {background-color: #2980b9;}
inc/class-cmp-render_html.php CHANGED
@@ -314,6 +314,7 @@ class cmp_render_html extends niteo_cmp {
314
  slidesToShow: 1,
315
  arrows: false,
316
  fade: <?php echo esc_attr($slider_fade);?>,
 
317
  autoplay: <?php echo esc_attr($slider_auto);?>,
318
  autoplaySpeed: 10000,
319
  });
@@ -609,4 +610,48 @@ class cmp_render_html extends niteo_cmp {
609
  return $html;
610
 
611
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
612
  }
314
  slidesToShow: 1,
315
  arrows: false,
316
  fade: <?php echo esc_attr($slider_fade);?>,
317
+ speed: 1000,
318
  autoplay: <?php echo esc_attr($slider_auto);?>,
319
  autoplaySpeed: 10000,
320
  });
610
  return $html;
611
 
612
  }
613
+
614
+ public function cmp_head_scripts() {
615
+ switch ( get_option('niteoCS_analytics_status', 'disabled') ) {
616
+ //disabled analytics
617
+ case 'disabled':
618
+ break;
619
+ // google analytics
620
+ case 'google':
621
+
622
+ if ( get_option('niteoCS_analytics', '') !== '' ) { ?>
623
+ <!-- Google analytics code -->
624
+ <script>
625
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
626
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
627
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
628
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
629
+
630
+ ga('create', '<?php echo esc_attr(get_option('niteoCS_analytics'));?>', 'auto');
631
+ ga('send', 'pageview');
632
+
633
+ </script>
634
+ <?php
635
+ }
636
+
637
+ break;
638
+ // other js code
639
+ case 'other':
640
+ if ( get_option('niteoCS_analytics_other', '') !== '' ) {
641
+ $niteoCS_analytics_other = stripslashes(get_option('niteoCS_analytics_other', '')); ?>
642
+ <script>
643
+ <?php echo esc_js($niteoCS_analytics_other);?>
644
+
645
+ </script>
646
+ <?php
647
+ }
648
+
649
+ break;
650
+ default:
651
+ break;
652
+ }
653
+
654
+ return;
655
+ }
656
+
657
  }
inc/settings-subscribe.php CHANGED
@@ -62,7 +62,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
62
  <p><?php _e('Default subscribe form will be displayed to visitors. Only export of email addresses to .csv file is supported. Mailing List will be deleted after deletion of CMP plugin.', 'cmp-coming-soon-maintenance');?></p>
63
 
64
  <label class="subscribe" for="niteoCS_subscribe_label">Subscribe form Label
65
- <input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr($niteoCS_subscribe_label );?>" class="regular-text code">
66
  </label>
67
 
68
  <p><?php _e('Total Subscribers: ', 'cmp-coming-soon-maintenance');?><a href="<?php echo admin_url(); ?>admin.php?page=cmp-subscribers""><?php echo $niteoCS_subscribers_list ? count( $niteoCS_subscribers_list ) : '0';?></a> </p>
62
  <p><?php _e('Default subscribe form will be displayed to visitors. Only export of email addresses to .csv file is supported. Mailing List will be deleted after deletion of CMP plugin.', 'cmp-coming-soon-maintenance');?></p>
63
 
64
  <label class="subscribe" for="niteoCS_subscribe_label">Subscribe form Label
65
+ <input type="text" name="niteoCS_subscribe_label" id="niteoCS_subscribe_label" value="<?php echo esc_attr($niteoCS_subscribe_label );?>" class="regular-text code" placeholder="<?php _e('Leave empty to disable', 'cmp-coming-soon-maintenance');?>">
66
  </label>
67
 
68
  <p><?php _e('Total Subscribers: ', 'cmp-coming-soon-maintenance');?><a href="<?php echo admin_url(); ?>admin.php?page=cmp-subscribers""><?php echo $niteoCS_subscribers_list ? count( $niteoCS_subscribers_list ) : '0';?></a> </p>
js/settings.js CHANGED
@@ -79,6 +79,7 @@ jQuery(document).ready(function($){
79
 
80
  // Logo type inputs
81
  jQuery('.niteoCS-logo-type').change(function() {
 
82
  if ( jQuery('.niteoCS-logo-type:checked' ).val() == 'text' ) {
83
  jQuery('.text-logo').css('display','block');
84
  jQuery('.graphic-logo').css('display','none');
@@ -598,13 +599,11 @@ jQuery(document).ready(function($){
598
  $parent = $this.parents('.notice'),
599
  security = $this.data('security'),
600
  slug = $this.data('slug'),
601
- type = $this.data('type'),
602
- themeName = $parent.find('.theme-name').text(),
603
  remoteUrl = jQuery(this).data('remote_url');
604
- update = {
605
  'name': slug,
606
  'tmp_name': '',
607
- 'type': type,
608
  'url': remoteUrl+'?action=download&slug='+slug,
609
  }
610
 
@@ -615,16 +614,18 @@ jQuery(document).ready(function($){
615
  };
616
 
617
  $parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');
618
-
619
  $.post(ajaxurl, data, function(response) {
 
620
  if (response == 'success') {
621
  setTimeout(function(){
622
 
623
  $parent.removeClass('notice-warning').addClass('notice-success');
624
- $parent.find('.message').html('<span> '+themeName+' Theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
625
  }, 1500);
626
 
627
  } else {
 
628
  response = response.slice(0,-1);
629
  var error = $('p', $(response)).text();
630
  $parent.removeClass('notice-warning').addClass('notice-error');
@@ -649,13 +650,11 @@ jQuery(document).ready(function($){
649
  $wrapper = $this.closest('.theme-wrapper'),
650
  security = $wrapper.data('security'),
651
  slug = $wrapper.data('slug'),
652
- type = $wrapper.data('type'),
653
  remoteUrl = $wrapper.data('remote_url');
654
 
655
  var update = {
656
  'name': slug,
657
  'tmp_name': '',
658
- 'type': type,
659
  'url': remoteUrl+'?action=download&slug='+slug,
660
  }
661
 
@@ -696,6 +695,7 @@ jQuery(document).ready(function($){
696
  freebie = $wrapper.data('freebie'),
697
  noticeHtml = '',
698
  security = jQuery('.update-theme').data('security'),
 
699
  i = 0;
700
 
701
 
@@ -717,13 +717,15 @@ jQuery(document).ready(function($){
717
  // overflow body hidden
718
  jQuery('body').addClass('modal-open');
719
 
720
- // if premium and installed display version info
721
- if ( purchased == '1' && type == 'premium' ) {
722
 
723
  versionInfo = '<span class="theme-version">Version: '+version+'</span>';
 
724
  if ( jQuery('.update-theme').length ) {
725
  var newVer = jQuery('.update-theme').data('new_ver');
726
- noticeHtml = '<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response['name']+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'&type='+type+'" class="update-theme" data-type="'+type+'" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>';
 
727
  } else {
728
  noticeHtml = '<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';
729
  }
@@ -735,11 +737,11 @@ jQuery(document).ready(function($){
735
  var buttonDisabled = 'disabled ';
736
  var buyURL = $wrapper.find('a').attr('href');
737
  // check for freebie
738
- if ( !freebie ) {
739
- var buyButton = '<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Buy</a></button>';
740
 
741
- } else if ( freebie ) {
742
- var buyButton = '<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-download" aria-hidden="true"></i>FREE Download</a></button>';
 
 
743
  }
744
 
745
  }
@@ -767,8 +769,8 @@ jQuery(document).ready(function($){
767
  ' <h2 class="theme-name">'+response['name'] + versionInfo + '</h2>',
768
  ' <p class="theme-author">By <a href="'+response['author_homepage']+'" target="_blank">'+response['author']+'</a></p>',
769
  noticeHtml,
770
- ' <div class="theme-description">'+response['description']+'</div>',
771
  buyButton,
 
772
  ' </div>',
773
  ' </div>',
774
  ' <div class="theme-actions">',
@@ -968,6 +970,24 @@ jQuery(document).ready(function($){
968
  });
969
  }
970
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
971
  });
972
 
973
 
79
 
80
  // Logo type inputs
81
  jQuery('.niteoCS-logo-type').change(function() {
82
+
83
  if ( jQuery('.niteoCS-logo-type:checked' ).val() == 'text' ) {
84
  jQuery('.text-logo').css('display','block');
85
  jQuery('.graphic-logo').css('display','none');
599
  $parent = $this.parents('.notice'),
600
  security = $this.data('security'),
601
  slug = $this.data('slug'),
602
+ themeName = $this.data('name'),
 
603
  remoteUrl = jQuery(this).data('remote_url');
604
+ var update = {
605
  'name': slug,
606
  'tmp_name': '',
 
607
  'url': remoteUrl+'?action=download&slug='+slug,
608
  }
609
 
614
  };
615
 
616
  $parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');
617
+ console.log(data);
618
  $.post(ajaxurl, data, function(response) {
619
+ response = response.trim();
620
  if (response == 'success') {
621
  setTimeout(function(){
622
 
623
  $parent.removeClass('notice-warning').addClass('notice-success');
624
+ $parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>');
625
  }, 1500);
626
 
627
  } else {
628
+
629
  response = response.slice(0,-1);
630
  var error = $('p', $(response)).text();
631
  $parent.removeClass('notice-warning').addClass('notice-error');
650
  $wrapper = $this.closest('.theme-wrapper'),
651
  security = $wrapper.data('security'),
652
  slug = $wrapper.data('slug'),
 
653
  remoteUrl = $wrapper.data('remote_url');
654
 
655
  var update = {
656
  'name': slug,
657
  'tmp_name': '',
 
658
  'url': remoteUrl+'?action=download&slug='+slug,
659
  }
660
 
695
  freebie = $wrapper.data('freebie'),
696
  noticeHtml = '',
697
  security = jQuery('.update-theme').data('security'),
698
+ price = $wrapper.data('price'),
699
  i = 0;
700
 
701
 
717
  // overflow body hidden
718
  jQuery('body').addClass('modal-open');
719
 
720
+ // if installed display version info
721
+ if ( purchased == '1') {
722
 
723
  versionInfo = '<span class="theme-version">Version: '+version+'</span>';
724
+
725
  if ( jQuery('.update-theme').length ) {
726
  var newVer = jQuery('.update-theme').data('new_ver');
727
+ noticeHtml = '<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response['name']+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'" class="update-theme" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>';
728
+
729
  } else {
730
  noticeHtml = '<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';
731
  }
737
  var buttonDisabled = 'disabled ';
738
  var buyURL = $wrapper.find('a').attr('href');
739
  // check for freebie
 
 
740
 
741
+ var buyButton = '<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>$'+price+'</a></button>';
742
+
743
+ if ( freebie ) {
744
+ var buyButton = '<p style="font-weight: bold;font-size: 1.2em;margin-bottom: 8px;">Pay what you want</p>'+buyButton;
745
  }
746
 
747
  }
769
  ' <h2 class="theme-name">'+response['name'] + versionInfo + '</h2>',
770
  ' <p class="theme-author">By <a href="'+response['author_homepage']+'" target="_blank">'+response['author']+'</a></p>',
771
  noticeHtml,
 
772
  buyButton,
773
+ ' <div class="theme-description">'+response['description']+'</div>',
774
  ' </div>',
775
  ' </div>',
776
  ' <div class="theme-actions">',
970
  });
971
  }
972
 
973
+ toggle_settings( 'analytics' );
974
+
975
+ function toggle_settings ( classname ) {
976
+
977
+ // Logo type inputs
978
+ jQuery('.'+classname).change(function() {
979
+
980
+ var value = jQuery('.'+classname+':checked' ).val();
981
+
982
+ jQuery('.'+classname+'-switch.'+value).css('display','block');
983
+ jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none');
984
+
985
+ });
986
+
987
+ jQuery('.'+classname).first().trigger('change');
988
+
989
+ }
990
+
991
  });
992
 
993
 
js/settings.min.js CHANGED
@@ -18,12 +18,12 @@ jQuery('select.background-gradient').on('change',function(){var gradient=jQuery(
18
  jQuery('#niteoCS_subscribe').change(function(){if(jQuery(this)[0].checked){jQuery('.subscribe').css('display','block')}else{jQuery('.subscribe').css('display','none')}});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){if(jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()==0){jQuery('#subscribe-disabled').css('display','block');jQuery('#subscribe-3rdparty').css('display','none');jQuery('#subscribe-niteo').css('display','none')}else if(jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()==1){jQuery('#subscribe-disabled').css('display','none');jQuery('#subscribe-3rdparty').css('display','block');jQuery('#subscribe-niteo').css('display','none')}else{jQuery('#subscribe-disabled').css('display','none');jQuery('#subscribe-3rdparty').css('display','none');jQuery('#subscribe-niteo').css('display','block')}});jQuery('.heading-animation').on('change',function(){heading_anim=jQuery('.heading-animation option:selected').val();jQuery('#heading-example').removeClass().addClass('animated '+heading_anim)});jQuery('.content-animation').on('change',function(){heading_anim=jQuery('.content-animation option:selected').val();jQuery('#content-example').removeClass().addClass('animated '+heading_anim)});var update_social=function(name,key,val){var socialmedia=$('#niteoCS_socialmedia').attr('value');socialmedia=$.parseJSON(socialmedia);$.each(socialmedia,function(i,ele){if(ele.name==name){ele[key]=val}});$('#niteoCS_socialmedia').attr('value',JSON.stringify(socialmedia))};var $sortableList=$('.social-inputs');var sortEventHandler=function(event,ui){var inputs=$sortableList.find('input[type="text"]');var order=ui.item.index();inputs.each(function(i,ele){var name=$(ele).data('name');update_social(name,'order',i)})};$sortableList.sortable({stop:sortEventHandler});$sortableList.on('sortchange',sortEventHandler);(function($){$.fn.toggleDisabled=function(){return this.each(function(){var $this=$(this);var active;var name=$this.data('name');if($this.attr('disabled')){$this.prop('disabled',!1);active='1'}else{$this.prop('disabled',!0);active='0'}
19
  update_social(name,'active',active)})}})(jQuery);jQuery('.social-inputs input[type="text"]').focusout(function(){var name=jQuery(this).data('name');var socialurl=jQuery(this).attr('value');update_social(name,'url',socialurl)});jQuery('.social-inputs input[type="checkbox"]').click(function(e){var $this=$(this).siblings('input[type="text"]');$this.toggleDisabled()});jQuery('.social-media i').click(function(){var name=jQuery(this).data('name');jQuery(this).toggleClass('active');jQuery('.social-inputs li.'+name).toggleClass('active');jQuery('.social-inputs li.'+name+' input').trigger('change');if(jQuery(this).hasClass('active')){update_social(name,'hidden','0')}else{update_social(name,'hidden','1')}
20
  if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}else{jQuery('.social-inputs .label').css('display','none')}});if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}
21
- jQuery('.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('.update-theme').click(function(e){e.preventDefault();var $this=$(this),$parent=$this.parents('.notice'),security=$this.data('security'),slug=$this.data('slug'),type=$this.data('type'),themeName=$parent.find('.theme-name').text(),remoteUrl=jQuery(this).data('remote_url');update={'name':slug,'tmp_name':'','type':type,'url':remoteUrl+'?action=download&slug='+slug,}
22
- var data={action:'cmp_theme_update_install',security:security,file:update};$parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');$.post(ajaxurl,data,function(response){if(response=='success'){setTimeout(function(){$parent.removeClass('notice-warning').addClass('notice-success');$parent.find('.message').html('<span> '+themeName+' Theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500)}else{response=response.slice(0,-1);var error=$('p',$(response)).text();$parent.removeClass('notice-warning').addClass('notice-error');$parent.find('.message').html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+error+'</span>')}})});jQuery('.theme-select').click(function(){jQuery(this).parent().find('input[name="select_theme"]').prop("checked",!0).trigger('change');jQuery('.theme-select').removeClass('selected');jQuery(this).parent().find('.theme-select').addClass('selected')});jQuery('.theme-update.button').one('click',function(e){e.preventDefault();var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),security=$wrapper.data('security'),slug=$wrapper.data('slug'),type=$wrapper.data('type'),remoteUrl=$wrapper.data('remote_url');var update={'name':slug,'tmp_name':'','type':type,'url':remoteUrl+'?action=download&slug='+slug,}
23
- var data={action:'cmp_theme_update_install',security:security,file:update};$this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');$.post(ajaxurl,data,function(response){if(response=='success'){setTimeout(function(){$this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');setTimeout(function(){$this.fadeOut()},1500)},1500)}else{response=response.slice(0,-1);$this.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')}})});jQuery('.theme-details').click(function(){var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),slug=$wrapper.data('slug'),version=$wrapper.data('version'),remoteUrl=$wrapper.data('remote_url'),type=$wrapper.data('type'),purchased=$wrapper.data('purchased'),freebie=$wrapper.data('freebie'),noticeHtml='',security=jQuery('.update-theme').data('security'),i=0;var data={action:'niteo_themeinfo',security:jQuery('.theme-wrapper').data('security'),theme_slug:jQuery(this).parents('.theme-wrapper').data('slug'),};$.post(ajaxurl,data,function(response){var buttonDisabled='';var buyButton='';var versionInfo='';var noticeHtml='';response=jQuery.parseJSON(response);if(response.result=='true'){jQuery('body').addClass('modal-open');if(purchased=='1'&&type=='premium'){versionInfo='<span class="theme-version">Version: '+version+'</span>';if(jQuery('.update-theme').length){var newVer=jQuery('.update-theme').data('new_ver');noticeHtml='<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response.name+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'&type='+type+'" class="update-theme" data-type="'+type+'" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>'}else{noticeHtml='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>'}}
24
- if(purchased!='1'&&type=='premium'){var buttonDisabled='disabled ';var buyURL=$wrapper.find('a').attr('href');if(!freebie){var buyButton='<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Buy</a></button>'}else if(freebie){var buyButton='<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-download" aria-hidden="true"></i>FREE Download</a></button>'}}
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,' <div class="theme-description">'+response.description+'</div>',buyButton,' </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()}
@@ -31,4 +31,5 @@ function media_upload_button(name,multiple,type){var $container=jQuery('.'+name+
31
  $add_button.click(function(e){e.preventDefault();if(media_uploader){media_uploader.open();return}
32
  var media_uploader=wp.media({title:'Select '+title,button:{text:'Insert '+title},multiple:multiple,library:{type:[type]},}).on('select',function(){var attachment=media_uploader.state().get('selection').toJSON();if(attachment.length>0){$container.empty();jQuery(attachment).each(function(i){if(attachment[i].sizes&&attachment[i].sizes.large){image=attachment[i].sizes.large.url}else{image=attachment[i].url}
33
  var comma=i===0?'':',';imgID+=(comma+attachment[i].id);if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}else if(name=='video'){$container.append('<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>')}else{$container.append('<img src="'+image+'" alt="" style="max-width:588px"/>')}});$delete_button.css('display','block')}
34
- jQuery('#niteoCS-'+name+'-id').val(imgID).trigger('change')}).open();if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}});$delete_button.click(function(e){jQuery(this).css('display','none');$container.empty();jQuery('#niteoCS-'+name+'-id').val('');jQuery('#niteoCS-'+name+'-id').trigger('change')})}})
 
18
  jQuery('#niteoCS_subscribe').change(function(){if(jQuery(this)[0].checked){jQuery('.subscribe').css('display','block')}else{jQuery('.subscribe').css('display','none')}});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){if(jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()==0){jQuery('#subscribe-disabled').css('display','block');jQuery('#subscribe-3rdparty').css('display','none');jQuery('#subscribe-niteo').css('display','none')}else if(jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()==1){jQuery('#subscribe-disabled').css('display','none');jQuery('#subscribe-3rdparty').css('display','block');jQuery('#subscribe-niteo').css('display','none')}else{jQuery('#subscribe-disabled').css('display','none');jQuery('#subscribe-3rdparty').css('display','none');jQuery('#subscribe-niteo').css('display','block')}});jQuery('.heading-animation').on('change',function(){heading_anim=jQuery('.heading-animation option:selected').val();jQuery('#heading-example').removeClass().addClass('animated '+heading_anim)});jQuery('.content-animation').on('change',function(){heading_anim=jQuery('.content-animation option:selected').val();jQuery('#content-example').removeClass().addClass('animated '+heading_anim)});var update_social=function(name,key,val){var socialmedia=$('#niteoCS_socialmedia').attr('value');socialmedia=$.parseJSON(socialmedia);$.each(socialmedia,function(i,ele){if(ele.name==name){ele[key]=val}});$('#niteoCS_socialmedia').attr('value',JSON.stringify(socialmedia))};var $sortableList=$('.social-inputs');var sortEventHandler=function(event,ui){var inputs=$sortableList.find('input[type="text"]');var order=ui.item.index();inputs.each(function(i,ele){var name=$(ele).data('name');update_social(name,'order',i)})};$sortableList.sortable({stop:sortEventHandler});$sortableList.on('sortchange',sortEventHandler);(function($){$.fn.toggleDisabled=function(){return this.each(function(){var $this=$(this);var active;var name=$this.data('name');if($this.attr('disabled')){$this.prop('disabled',!1);active='1'}else{$this.prop('disabled',!0);active='0'}
19
  update_social(name,'active',active)})}})(jQuery);jQuery('.social-inputs input[type="text"]').focusout(function(){var name=jQuery(this).data('name');var socialurl=jQuery(this).attr('value');update_social(name,'url',socialurl)});jQuery('.social-inputs input[type="checkbox"]').click(function(e){var $this=$(this).siblings('input[type="text"]');$this.toggleDisabled()});jQuery('.social-media i').click(function(){var name=jQuery(this).data('name');jQuery(this).toggleClass('active');jQuery('.social-inputs li.'+name).toggleClass('active');jQuery('.social-inputs li.'+name+' input').trigger('change');if(jQuery(this).hasClass('active')){update_social(name,'hidden','0')}else{update_social(name,'hidden','1')}
20
  if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}else{jQuery('.social-inputs .label').css('display','none')}});if(jQuery('.social-media i.active').length){jQuery('.social-inputs .label').css('display','block')}
21
+ jQuery('.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('.update-theme').click(function(e){e.preventDefault();var $this=$(this),$parent=$this.parents('.notice'),security=$this.data('security'),slug=$this.data('slug'),themeName=$this.data('name'),remoteUrl=jQuery(this).data('remote_url');var update={'name':slug,'tmp_name':'','url':remoteUrl+'?action=download&slug='+slug,}
22
+ var data={action:'cmp_theme_update_install',security:security,file:update};$parent.find('.message').html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>');console.log(data);$.post(ajaxurl,data,function(response){response=response.trim();if(response=='success'){setTimeout(function(){$parent.removeClass('notice-warning').addClass('notice-success');$parent.find('.message').html('<span> '+themeName+' CMP theme was updated sucessfully! </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500)}else{response=response.slice(0,-1);var error=$('p',$(response)).text();$parent.removeClass('notice-warning').addClass('notice-error');$parent.find('.message').html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+error+'</span>')}})});jQuery('.theme-select').click(function(){jQuery(this).parent().find('input[name="select_theme"]').prop("checked",!0).trigger('change');jQuery('.theme-select').removeClass('selected');jQuery(this).parent().find('.theme-select').addClass('selected')});jQuery('.theme-update.button').one('click',function(e){e.preventDefault();var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),security=$wrapper.data('security'),slug=$wrapper.data('slug'),remoteUrl=$wrapper.data('remote_url');var update={'name':slug,'tmp_name':'','url':remoteUrl+'?action=download&slug='+slug,}
23
+ var data={action:'cmp_theme_update_install',security:security,file:update};$this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');$.post(ajaxurl,data,function(response){if(response=='success'){setTimeout(function(){$this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');setTimeout(function(){$this.fadeOut()},1500)},1500)}else{response=response.slice(0,-1);$this.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')}})});jQuery('.theme-details').click(function(){var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),slug=$wrapper.data('slug'),version=$wrapper.data('version'),remoteUrl=$wrapper.data('remote_url'),type=$wrapper.data('type'),purchased=$wrapper.data('purchased'),freebie=$wrapper.data('freebie'),noticeHtml='',security=jQuery('.update-theme').data('security'),price=$wrapper.data('price'),i=0;var data={action:'niteo_themeinfo',security:jQuery('.theme-wrapper').data('security'),theme_slug:jQuery(this).parents('.theme-wrapper').data('slug'),};$.post(ajaxurl,data,function(response){var buttonDisabled='';var buyButton='';var versionInfo='';var noticeHtml='';response=jQuery.parseJSON(response);if(response.result=='true'){jQuery('body').addClass('modal-open');if(purchased=='1'){versionInfo='<span class="theme-version">Version: '+version+'</span>';if(jQuery('.update-theme').length){var newVer=jQuery('.update-theme').data('new_ver');noticeHtml='<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response.name+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'" class="update-theme" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>'}else{noticeHtml='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>'}}
24
+ if(purchased!='1'&&type=='premium'){var buttonDisabled='disabled ';var buyURL=$wrapper.find('a').attr('href');var buyButton='<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>$'+price+'</a></button>';if(freebie){var buyButton='<p style="font-weight: bold;font-size: 1.2em;margin-bottom: 8px;">Pay what you want</p>'+buyButton}}
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()}
31
  $add_button.click(function(e){e.preventDefault();if(media_uploader){media_uploader.open();return}
32
  var media_uploader=wp.media({title:'Select '+title,button:{text:'Insert '+title},multiple:multiple,library:{type:[type]},}).on('select',function(){var attachment=media_uploader.state().get('selection').toJSON();if(attachment.length>0){$container.empty();jQuery(attachment).each(function(i){if(attachment[i].sizes&&attachment[i].sizes.large){image=attachment[i].sizes.large.url}else{image=attachment[i].url}
33
  var comma=i===0?'':',';imgID+=(comma+attachment[i].id);if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}else if(name=='video'){$container.append('<video width="600" height="400" controls><source src="'+image+'" type="video/mp4">Your browser does not support the video tag.</video>')}else{$container.append('<img src="'+image+'" alt="" style="max-width:588px"/>')}});$delete_button.css('display','block')}
34
+ jQuery('#niteoCS-'+name+'-id').val(imgID).trigger('change')}).open();if(name=='pattern'){$container.css('background-image','url(\''+image+'\')')}});$delete_button.click(function(e){jQuery(this).css('display','none');$container.empty();jQuery('#niteoCS-'+name+'-id').val('');jQuery('#niteoCS-'+name+'-id').trigger('change')})}
35
+ toggle_settings('analytics');function toggle_settings(classname){jQuery('.'+classname).change(function(){var value=jQuery('.'+classname+':checked').val();jQuery('.'+classname+'-switch.'+value).css('display','block');jQuery('.'+classname+'-switch:not(.'+value+')').css('display','none')});jQuery('.'+classname).first().trigger('change')}})
js/typography.js CHANGED
@@ -1,293 +1,296 @@
1
- headingVariant = jQuery('.headings-google-font-variant').val();
2
- contentVariant = jQuery('.content-google-font-variant').val();
3
-
4
- fontVariant = function( variant ) {
5
- switch(variant) {
6
- case '100':
7
- return 'Thin 100';
8
- break;
9
- case '100italic':
10
- return 'Thin 100 Italic';
11
- break;
12
- case '200':
13
- return 'Extra-light 200';
14
- break;
15
- case '200italic':
16
- return 'Extra-light 200 Italic';
17
- break;
18
- case '300':
19
- return 'Light 300';
20
- break;
21
- case '300italic':
22
- return 'Light 300 Italic';
23
- break;
24
- case '400':
25
- return 'Regular 400';
26
- break;
27
- case '400italic':
28
- return 'Regular 400 Italic';
29
- break;
30
- case '500':
31
- return 'Medium 500';
32
- break;
33
- case '500italic':
34
- return 'Meidum 500 Italic';
35
- break;
36
- case '600':
37
- return 'Semi-Bold 600';
38
- break;
39
- case '600italic':
40
- return 'Semi-Bold 600 Italic';
41
- break;
42
- case '700':
43
- return 'Bold 700';
44
- break;
45
- case '700italic':
46
- return 'Bold 700 Italic';
47
- break;
48
- case '800':
49
- return 'Extra-Bold 800';
50
- break;
51
- case '800italic':
52
- return 'Extra-Bold Italic';
53
- break;
54
- case '900':
55
- return 'Black 900';
56
- break;
57
- case '900italic':
58
- return 'Black 900 Italic';
59
- break;
60
- case 'regular':
61
- return 'Regular 400';
62
- break;
63
- case 'italic':
64
- return 'Regular 400 Italic';
65
- break;
66
- default:
67
- break;
 
 
 
68
  }
69
- }
70
 
71
- var heading_font = fonts.google.filter(function (element) {
72
- return element.id === jQuery('.headings-google-font option:selected').val();
73
- });
74
 
75
 
 
 
 
76
 
77
- var content_font = fonts.google.filter(function (element) {
78
- return element.id === jQuery('.content-google-font option:selected').val();
79
- });
80
 
81
- var heading_font_variant = jQuery.map( heading_font[0].variants, function(obj) {
82
- return { id: obj, text: fontVariant(obj) };
83
- });
84
 
85
- var content_font_variant = jQuery.map( content_font[0].variants, function(obj) {
86
- return { id: obj, text: fontVariant(obj) };
87
- })
88
 
89
 
 
 
 
 
 
90
 
91
- // ini select2
92
- $HeadingFont = jQuery( '.headings-google-font' ).select2({
93
- data: fonts.google,
94
- width: '100%',
95
- });
96
 
97
- // ini select2
98
- $contentFont = jQuery( '.content-google-font' ).select2({
99
- data: fonts.google,
100
- width: '100%',
101
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
- // ini select2
104
- $HeadingFontVariant = jQuery('.headings-google-font-variant').select2({
105
- data: heading_font_variant,
106
- })
 
 
 
 
 
 
107
 
108
- // ini select2
109
- $contentFontVariant = jQuery('.content-google-font-variant').select2({
110
- data: content_font_variant,
111
- })
112
 
 
113
 
114
- // change preview fonts on select2 selection
115
- $HeadingFont.on('select2:select', function(e){
116
- // get current variant value
117
- var selected = $HeadingFontVariant.select2('data');
118
 
119
- var heading_font_variant = jQuery.map( e.params.data.variants, function(obj) {
120
- return { id: obj, text: fontVariant(obj) };
121
- });
122
 
123
- // empty select variant
124
- $HeadingFontVariant.empty();
125
- // populate select with new variants
126
- $HeadingFontVariant.select2({
127
- data: heading_font_variant
128
- });
129
 
130
- // set same variant as before selection if variant is in array, else set regular
131
- if ( selected[0].id ) {
132
 
133
- if ( jQuery.inArray(selected[0].id, e.params.data.variants ) == '-1' ) {
134
- jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', '400' ).css('font-style', 'normal' );
135
  } else {
136
- $HeadingFontVariant.val(selected[0].id).trigger('change.select2');
 
137
  }
138
- }
139
-
140
- // load fonts and set css
141
- WebFont.load({
142
- google: {
143
- families: [ e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic' ]
144
- },
145
- active: function() {
146
- jQuery('#heading-example, #niteoCS-text-logo').css('font-family', e.params.data.text );
147
- },
148
  });
149
- });
150
 
151
 
152
- $HeadingFontVariant.on('select2:select', function(e){
 
 
 
153
 
154
- headingVariant = e.params.data.id;
 
 
155
 
156
- if ( jQuery.isNumeric(headingVariant) ) {
157
- jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', headingVariant ).css('font-style', 'normal' );
 
 
 
 
158
 
159
- } else if ( headingVariant == 'regular' ) {
160
- jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', '400' ).css('font-style', 'normal' );
161
 
162
- } else if ( headingVariant == 'italic' ) {
163
- jQuery('#heading-example, #niteoCS-text-logo').css('font-style', 'italic' ).css('font-weight', '400' );
 
 
 
 
164
 
165
- } else {
166
- fontweight = parseInt(headingVariant, 10);
167
- jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', fontweight ).css('font-style', 'italic' );
168
- }
169
-
170
- });
 
 
 
 
171
 
 
172
 
173
- // change content preview fonts on font select
174
- $contentFont.on('select2:select', function(e){
175
- // get current variant value
176
- var selected = $contentFontVariant.select2('data');
177
 
178
- var content_font_variant = jQuery.map( e.params.data.variants, function(obj) {
179
- return { id: obj, text: fontVariant(obj) };
180
- });
181
 
182
- // empty select variant
183
- $contentFontVariant.empty();
184
- // populate select with new variants
185
- $contentFontVariant.select2({
186
- data: content_font_variant
187
- });
188
 
189
- // set same variant as before selection if variant is in array, else set regular
190
- if ( selected[0].id ) {
191
 
192
- if ( jQuery.inArray(selected[0].id, e.params.data.variants ) == '-1' ) {
193
- jQuery('#content-example').css('font-weight', '400' ).css('font-style', 'normal' );
194
  } else {
195
- $contentFontVariant.val(selected[0].id).trigger('change.select2');
 
196
  }
197
- }
198
-
199
- // load fonts and set css
200
- WebFont.load({
201
- google: {
202
- families: [ e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic' ]
203
- },
204
- active: function() {
205
- jQuery('#content-example').css('font-family', e.params.data.text );
206
- },
207
  });
208
- });
209
 
210
- $contentFontVariant.on('select2:select', function(e){
 
 
 
211
 
212
- contentVariant = e.params.data.id;
 
213
 
214
- if ( jQuery.isNumeric(contentVariant) ) {
215
- jQuery('#content-example').css('font-weight', contentVariant ).css('font-style', 'normal' );
216
 
217
- } else if ( contentVariant == 'regular' ) {
218
- jQuery('#content-example').css('font-weight', '400' ).css('font-style', 'normal' );
 
219
 
220
- } else if ( contentVariant == 'italic' ) {
221
- jQuery('#content-example').css('font-style', 'italic' ).css('font-weight', '400' );
222
-
223
- } else {
224
- fontweight = parseInt(contentVariant, 10);
225
- jQuery('#content-example').css('font-weight', fontweight ).css('font-style', 'italic' );
226
- }
227
-
228
- });
229
-
230
- jQuery('.font-selector input[type=range]').change(function(){
231
- var type = jQuery(this).data('type');
232
- var css = jQuery(this).data('css');
233
- var value = jQuery(this).val();
234
-
235
- // change label value
236
- jQuery(this).parent().find('span').html(value);
237
-
238
- // add px if css requires it
239
- value = (css == 'line-height') ? value : value+'px';
240
-
241
- // change example css
242
- if ( type == 'heading' ) {
243
- jQuery('#heading-example').css(css, value);
244
 
245
- } else {
246
- jQuery('#content-example').css(css, value);
247
- }
248
- });
249
 
250
- jQuery('.font-selector input[type=range]').on('input', function () {
251
- jQuery(this).trigger('change');
252
- });
 
 
 
253
 
254
- // change fonts families upon a load
255
- WebFont.load({
256
- google: {
257
- families: [ heading_font[0]['id']+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic', content_font[0]['id']+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic' ]
258
- },
259
- active: function() {
260
 
261
- if ( jQuery.isNumeric(headingVariant) ) {
262
- jQuery('#heading-example').css('font-weight', headingVariant ).css('font-style', 'normal' );
263
 
264
- } else if ( headingVariant == 'regular' ) {
265
- jQuery('#heading-example').css('font-weight', '400' ).css('font-style', 'normal' );
266
 
267
- } else if ( headingVariant == 'italic' ) {
268
- jQuery('#heading-example').css('font-style', 'italic' ).css('font-weight', '400' );
 
 
269
 
270
- } else {
271
- fontweight = parseInt(headingVariant, 10);
272
- jQuery('#heading-example').css('font-weight', fontweight ).css('font-style', 'italic' );
273
- }
274
 
275
- if ( jQuery.isNumeric(contentVariant) ) {
276
- jQuery('#content-example').css('font-weight', contentVariant ).css('font-style', 'normal' );
277
 
278
- } else if ( contentVariant == 'regular' ) {
279
- jQuery('#content-example').css('font-weight', '400' ).css('font-style', 'normal' );
280
 
281
- } else if ( contentVariant == 'italic' ) {
282
- jQuery('#content-example').css('font-style', 'italic' ).css('font-weight', '400' );
 
 
283
 
284
- } else {
285
- fontweight = parseInt(contentVariant, 10);
286
- jQuery('#content-example').css('font-weight', fontweight ).css('font-style', 'italic' );
287
- }
288
 
289
- jQuery('#heading-example, #niteoCS-text-logo').css('font-family', heading_font[0]['id'] );
290
- jQuery('#content-example').css('font-family', content_font[0]['id'] );
291
- },
292
  });
293
 
1
+ jQuery(document).ready(function($){
2
+
3
+ headingVariant = jQuery('.headings-google-font-variant').val();
4
+ contentVariant = jQuery('.content-google-font-variant').val();
5
+
6
+ fontVariant = function( variant ) {
7
+ switch(variant) {
8
+ case '100':
9
+ return 'Thin 100';
10
+ break;
11
+ case '100italic':
12
+ return 'Thin 100 Italic';
13
+ break;
14
+ case '200':
15
+ return 'Extra-light 200';
16
+ break;
17
+ case '200italic':
18
+ return 'Extra-light 200 Italic';
19
+ break;
20
+ case '300':
21
+ return 'Light 300';
22
+ break;
23
+ case '300italic':
24
+ return 'Light 300 Italic';
25
+ break;
26
+ case '400':
27
+ return 'Regular 400';
28
+ break;
29
+ case '400italic':
30
+ return 'Regular 400 Italic';
31
+ break;
32
+ case '500':
33
+ return 'Medium 500';
34
+ break;
35
+ case '500italic':
36
+ return 'Meidum 500 Italic';
37
+ break;
38
+ case '600':
39
+ return 'Semi-Bold 600';
40
+ break;
41
+ case '600italic':
42
+ return 'Semi-Bold 600 Italic';
43
+ break;
44
+ case '700':
45
+ return 'Bold 700';
46
+ break;
47
+ case '700italic':
48
+ return 'Bold 700 Italic';
49
+ break;
50
+ case '800':
51
+ return 'Extra-Bold 800';
52
+ break;
53
+ case '800italic':
54
+ return 'Extra-Bold Italic';
55
+ break;
56
+ case '900':
57
+ return 'Black 900';
58
+ break;
59
+ case '900italic':
60
+ return 'Black 900 Italic';
61
+ break;
62
+ case 'regular':
63
+ return 'Regular 400';
64
+ break;
65
+ case 'italic':
66
+ return 'Regular 400 Italic';
67
+ break;
68
+ default:
69
+ break;
70
+ }
71
  }
 
72
 
73
+ var heading_font = fonts.google.filter(function (element) {
74
+ return element.id === jQuery('.headings-google-font option:selected').val();
75
+ });
76
 
77
 
78
+ var content_font = fonts.google.filter(function (element) {
79
+ return element.id === jQuery('.content-google-font option:selected').val();
80
+ });
81
 
82
+ var heading_font_variant = jQuery.map( heading_font[0].variants, function(obj) {
83
+ return { id: obj, text: fontVariant(obj) };
84
+ });
85
 
86
+ var content_font_variant = jQuery.map( content_font[0].variants, function(obj) {
87
+ return { id: obj, text: fontVariant(obj) };
88
+ })
89
 
 
 
 
90
 
91
 
92
+ // ini select2
93
+ $HeadingFont = jQuery( '.headings-google-font' ).select2({
94
+ data: fonts.google,
95
+ width: '100%',
96
+ });
97
 
98
+ // ini select2
99
+ $contentFont = jQuery( '.content-google-font' ).select2({
100
+ data: fonts.google,
101
+ width: '100%',
102
+ });
103
 
104
+ // ini select2
105
+ $HeadingFontVariant = jQuery('.headings-google-font-variant').select2({
106
+ data: heading_font_variant,
107
+ })
108
+
109
+ // ini select2
110
+ $contentFontVariant = jQuery('.content-google-font-variant').select2({
111
+ data: content_font_variant,
112
+ })
113
+
114
+
115
+ // change preview fonts on select2 selection
116
+ $HeadingFont.on('select2:select', function(e){
117
+ // get current variant value
118
+ var selected = $HeadingFontVariant.select2('data');
119
+
120
+ var heading_font_variant = jQuery.map( e.params.data.variants, function(obj) {
121
+ return { id: obj, text: fontVariant(obj) };
122
+ });
123
+
124
+ // empty select variant
125
+ $HeadingFontVariant.empty();
126
+ // populate select with new variants
127
+ $HeadingFontVariant.select2({
128
+ data: heading_font_variant
129
+ });
130
+
131
+ // set same variant as before selection if variant is in array, else set regular
132
+ if ( selected[0].id ) {
133
+
134
+ if ( jQuery.inArray(selected[0].id, e.params.data.variants ) == '-1' ) {
135
+ jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', '400' ).css('font-style', 'normal' );
136
+ } else {
137
+ $HeadingFontVariant.val(selected[0].id).trigger('change.select2');
138
+ }
139
+ }
140
 
141
+ // load fonts and set css
142
+ WebFont.load({
143
+ google: {
144
+ families: [ e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic' ]
145
+ },
146
+ active: function() {
147
+ jQuery('#heading-example, #niteoCS-text-logo').css('font-family', e.params.data.text );
148
+ },
149
+ });
150
+ });
151
 
 
 
 
 
152
 
153
+ $HeadingFontVariant.on('select2:select', function(e){
154
 
155
+ headingVariant = e.params.data.id;
 
 
 
156
 
157
+ if ( jQuery.isNumeric(headingVariant) ) {
158
+ jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', headingVariant ).css('font-style', 'normal' );
 
159
 
160
+ } else if ( headingVariant == 'regular' ) {
161
+ jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', '400' ).css('font-style', 'normal' );
 
 
 
 
162
 
163
+ } else if ( headingVariant == 'italic' ) {
164
+ jQuery('#heading-example, #niteoCS-text-logo').css('font-style', 'italic' ).css('font-weight', '400' );
165
 
 
 
166
  } else {
167
+ fontweight = parseInt(headingVariant, 10);
168
+ jQuery('#heading-example, #niteoCS-text-logo').css('font-weight', fontweight ).css('font-style', 'italic' );
169
  }
170
+
 
 
 
 
 
 
 
 
 
171
  });
 
172
 
173
 
174
+ // change content preview fonts on font select
175
+ $contentFont.on('select2:select', function(e){
176
+ // get current variant value
177
+ var selected = $contentFontVariant.select2('data');
178
 
179
+ var content_font_variant = jQuery.map( e.params.data.variants, function(obj) {
180
+ return { id: obj, text: fontVariant(obj) };
181
+ });
182
 
183
+ // empty select variant
184
+ $contentFontVariant.empty();
185
+ // populate select with new variants
186
+ $contentFontVariant.select2({
187
+ data: content_font_variant
188
+ });
189
 
190
+ // set same variant as before selection if variant is in array, else set regular
191
+ if ( selected[0].id ) {
192
 
193
+ if ( jQuery.inArray(selected[0].id, e.params.data.variants ) == '-1' ) {
194
+ jQuery('#content-example').css('font-weight', '400' ).css('font-style', 'normal' );
195
+ } else {
196
+ $contentFontVariant.val(selected[0].id).trigger('change.select2');
197
+ }
198
+ }
199
 
200
+ // load fonts and set css
201
+ WebFont.load({
202
+ google: {
203
+ families: [ e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic' ]
204
+ },
205
+ active: function() {
206
+ jQuery('#content-example').css('font-family', e.params.data.text );
207
+ },
208
+ });
209
+ });
210
 
211
+ $contentFontVariant.on('select2:select', function(e){
212
 
213
+ contentVariant = e.params.data.id;
 
 
 
214
 
215
+ if ( jQuery.isNumeric(contentVariant) ) {
216
+ jQuery('#content-example').css('font-weight', contentVariant ).css('font-style', 'normal' );
 
217
 
218
+ } else if ( contentVariant == 'regular' ) {
219
+ jQuery('#content-example').css('font-weight', '400' ).css('font-style', 'normal' );
 
 
 
 
220
 
221
+ } else if ( contentVariant == 'italic' ) {
222
+ jQuery('#content-example').css('font-style', 'italic' ).css('font-weight', '400' );
223
 
 
 
224
  } else {
225
+ fontweight = parseInt(contentVariant, 10);
226
+ jQuery('#content-example').css('font-weight', fontweight ).css('font-style', 'italic' );
227
  }
228
+
 
 
 
 
 
 
 
 
 
229
  });
 
230
 
231
+ jQuery('.font-selector input[type=range]').change(function(){
232
+ var type = jQuery(this).data('type');
233
+ var css = jQuery(this).data('css');
234
+ var value = jQuery(this).val();
235
 
236
+ // change label value
237
+ jQuery(this).parent().find('span').html(value);
238
 
239
+ // add px if css requires it
240
+ value = (css == 'line-height') ? value : value+'px';
241
 
242
+ // change example css
243
+ if ( type == 'heading' ) {
244
+ jQuery('#heading-example').css(css, value);
245
 
246
+ } else {
247
+ jQuery('#content-example').css(css, value);
248
+ }
249
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
+ jQuery('.font-selector input[type=range]').on('input', function () {
252
+ jQuery(this).trigger('change');
253
+ });
 
254
 
255
+ // change fonts families upon a load
256
+ WebFont.load({
257
+ google: {
258
+ families: [ heading_font[0]['id']+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic', content_font[0]['id']+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic' ]
259
+ },
260
+ active: function() {
261
 
262
+ if ( jQuery.isNumeric(headingVariant) ) {
263
+ jQuery('#heading-example').css('font-weight', headingVariant ).css('font-style', 'normal' );
 
 
 
 
264
 
265
+ } else if ( headingVariant == 'regular' ) {
266
+ jQuery('#heading-example').css('font-weight', '400' ).css('font-style', 'normal' );
267
 
268
+ } else if ( headingVariant == 'italic' ) {
269
+ jQuery('#heading-example').css('font-style', 'italic' ).css('font-weight', '400' );
270
 
271
+ } else {
272
+ fontweight = parseInt(headingVariant, 10);
273
+ jQuery('#heading-example').css('font-weight', fontweight ).css('font-style', 'italic' );
274
+ }
275
 
276
+ if ( jQuery.isNumeric(contentVariant) ) {
277
+ jQuery('#content-example').css('font-weight', contentVariant ).css('font-style', 'normal' );
 
 
278
 
279
+ } else if ( contentVariant == 'regular' ) {
280
+ jQuery('#content-example').css('font-weight', '400' ).css('font-style', 'normal' );
281
 
282
+ } else if ( contentVariant == 'italic' ) {
283
+ jQuery('#content-example').css('font-style', 'italic' ).css('font-weight', '400' );
284
 
285
+ } else {
286
+ fontweight = parseInt(contentVariant, 10);
287
+ jQuery('#content-example').css('font-weight', fontweight ).css('font-style', 'italic' );
288
+ }
289
 
290
+ jQuery('#heading-example, #niteoCS-text-logo').css('font-family', heading_font[0]['id'] );
291
+ jQuery('#content-example').css('font-family', content_font[0]['id'] );
292
+ },
293
+ });
294
 
 
 
 
295
  });
296
 
js/typography.min.js CHANGED
@@ -1,9 +1 @@
1
- headingVariant=jQuery('.headings-google-font-variant').val();contentVariant=jQuery('.content-google-font-variant').val();fontVariant=function(variant){switch(variant){case'100':return'Thin 100';break;case'100italic':return'Thin 100 Italic';break;case'200':return'Extra-light 200';break;case'200italic':return'Extra-light 200 Italic';break;case'300':return'Light 300';break;case'300italic':return'Light 300 Italic';break;case'400':return'Regular 400';break;case'400italic':return'Regular 400 Italic';break;case'500':return'Medium 500';break;case'500italic':return'Meidum 500 Italic';break;case'600':return'Semi-Bold 600';break;case'600italic':return'Semi-Bold 600 Italic';break;case'700':return'Bold 700';break;case'700italic':return'Bold 700 Italic';break;case'800':return'Extra-Bold 800';break;case'800italic':return'Extra-Bold Italic';break;case'900':return'Black 900';break;case'900italic':return'Black 900 Italic';break;case'regular':return'Regular 400';break;case'italic':return'Regular 400 Italic';break;default:break;}}
2
- var heading_font=fonts.google.filter(function(element){return element.id===jQuery('.headings-google-font option:selected').val();});var content_font=fonts.google.filter(function(element){return element.id===jQuery('.content-google-font option:selected').val();});var heading_font_variant=jQuery.map(heading_font[0].variants,function(obj){return{id:obj,text:fontVariant(obj)};});var content_font_variant=jQuery.map(content_font[0].variants,function(obj){return{id:obj,text:fontVariant(obj)};})
3
- $HeadingFont=jQuery('.headings-google-font').select2({data:fonts.google,width:'100%',});$contentFont=jQuery('.content-google-font').select2({data:fonts.google,width:'100%',});$HeadingFontVariant=jQuery('.headings-google-font-variant').select2({data:heading_font_variant,})
4
- $contentFontVariant=jQuery('.content-google-font-variant').select2({data:content_font_variant,})
5
- $HeadingFont.on('select2:select',function(e){var selected=$HeadingFontVariant.select2('data');var heading_font_variant=jQuery.map(e.params.data.variants,function(obj){return{id:obj,text:fontVariant(obj)};});$HeadingFontVariant.empty();$HeadingFontVariant.select2({data:heading_font_variant});if(selected[0].id){if(jQuery.inArray(selected[0].id,e.params.data.variants)=='-1'){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight','400').css('font-style','normal');}else{$HeadingFontVariant.val(selected[0].id).trigger('change.select2');}}
6
- WebFont.load({google:{families:[e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){jQuery('#heading-example, #niteoCS-text-logo').css('font-family',e.params.data.text);},});});$HeadingFontVariant.on('select2:select',function(e){headingVariant=e.params.data.id;if(jQuery.isNumeric(headingVariant)){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight',headingVariant).css('font-style','normal');}else if(headingVariant=='regular'){jQuery('#heading-example, #niteoCS-text-logo').css('font-weight','400').css('font-style','normal');}else if(headingVariant=='italic'){jQuery('#heading-example, #niteoCS-text-logo').css('font-style','italic').css('font-weight','400');}else{fontweight=parseInt(headingVariant,10);jQuery('#heading-example, #niteoCS-text-logo').css('font-weight',fontweight).css('font-style','italic');}});$contentFont.on('select2:select',function(e){var selected=$contentFontVariant.select2('data');var content_font_variant=jQuery.map(e.params.data.variants,function(obj){return{id:obj,text:fontVariant(obj)};});$contentFontVariant.empty();$contentFontVariant.select2({data:content_font_variant});if(selected[0].id){if(jQuery.inArray(selected[0].id,e.params.data.variants)=='-1'){jQuery('#content-example').css('font-weight','400').css('font-style','normal');}else{$contentFontVariant.val(selected[0].id).trigger('change.select2');}}
7
- WebFont.load({google:{families:[e.params.data.text+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){jQuery('#content-example').css('font-family',e.params.data.text);},});});$contentFontVariant.on('select2:select',function(e){contentVariant=e.params.data.id;if(jQuery.isNumeric(contentVariant)){jQuery('#content-example').css('font-weight',contentVariant).css('font-style','normal');}else if(contentVariant=='regular'){jQuery('#content-example').css('font-weight','400').css('font-style','normal');}else if(contentVariant=='italic'){jQuery('#content-example').css('font-style','italic').css('font-weight','400');}else{fontweight=parseInt(contentVariant,10);jQuery('#content-example').css('font-weight',fontweight).css('font-style','italic');}});jQuery('.font-selector input[type=range]').change(function(){var type=jQuery(this).data('type');var css=jQuery(this).data('css');var value=jQuery(this).val();jQuery(this).parent().find('span').html(value);value=(css=='line-height')?value:value+'px';if(type=='heading'){jQuery('#heading-example').css(css,value);}else{jQuery('#content-example').css(css,value);}});jQuery('.font-selector input[type=range]').on('input',function(){jQuery(this).trigger('change');});WebFont.load({google:{families:[heading_font[0]['id']+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic',content_font[0]['id']+':100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic']},active:function(){if(jQuery.isNumeric(headingVariant)){jQuery('#heading-example').css('font-weight',headingVariant).css('font-style','normal');}else if(headingVariant=='regular'){jQuery('#heading-example').css('font-weight','400').css('font-style','normal');}else if(headingVariant=='italic'){jQuery('#heading-example').css('font-style','italic').css('font-weight','400');}else{fontweight=parseInt(headingVariant,10);jQuery('#heading-example').css('font-weight',fontweight).css('font-style','italic');}
8
- if(jQuery.isNumeric(contentVariant)){jQuery('#content-example').css('font-weight',contentVariant).css('font-style','normal');}else if(contentVariant=='regular'){jQuery('#content-example').css('font-weight','400').css('font-style','normal');}else if(contentVariant=='italic'){jQuery('#content-example').css('font-style','italic').css('font-weight','400');}else{fontweight=parseInt(contentVariant,10);jQuery('#content-example').css('font-weight',fontweight).css('font-style','italic');}
9
- jQuery('#heading-example, #niteoCS-text-logo').css('font-family',heading_font[0]['id']);jQuery('#content-example').css('font-family',content_font[0]['id']);},});
1
+ jQuery(document).ready(function(t){headingVariant=jQuery(".headings-google-font-variant").val(),contentVariant=jQuery(".content-google-font-variant").val(),fontVariant=function(t){switch(t){case"100":return"Thin 100";case"100italic":return"Thin 100 Italic";case"200":return"Extra-light 200";case"200italic":return"Extra-light 200 Italic";case"300":return"Light 300";case"300italic":return"Light 300 Italic";case"400":return"Regular 400";case"400italic":return"Regular 400 Italic";case"500":return"Medium 500";case"500italic":return"Meidum 500 Italic";case"600":return"Semi-Bold 600";case"600italic":return"Semi-Bold 600 Italic";case"700":return"Bold 700";case"700italic":return"Bold 700 Italic";case"800":return"Extra-Bold 800";case"800italic":return"Extra-Bold Italic";case"900":return"Black 900";case"900italic":return"Black 900 Italic";case"regular":return"Regular 400";case"italic":return"Regular 400 Italic"}};var e=fonts.google.filter(function(t){return t.id===jQuery(".headings-google-font option:selected").val()}),a=fonts.google.filter(function(t){return t.id===jQuery(".content-google-font option:selected").val()}),n=jQuery.map(e[0].variants,function(t){return{id:t,text:fontVariant(t)}}),i=jQuery.map(a[0].variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFont=jQuery(".headings-google-font").select2({data:fonts.google,width:"100%"}),$contentFont=jQuery(".content-google-font").select2({data:fonts.google,width:"100%"}),$HeadingFontVariant=jQuery(".headings-google-font-variant").select2({data:n}),$contentFontVariant=jQuery(".content-google-font-variant").select2({data:i}),$HeadingFont.on("select2:select",function(t){var e=$HeadingFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$HeadingFontVariant.empty(),$HeadingFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):$HeadingFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#heading-example, #niteoCS-text-logo").css("font-family",t.params.data.text)}})}),$HeadingFontVariant.on("select2:select",function(t){headingVariant=t.params.data.id,jQuery.isNumeric(headingVariant)?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example, #niteoCS-text-logo").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example, #niteoCS-text-logo").css("font-weight",fontweight).css("font-style","italic"))}),$contentFont.on("select2:select",function(t){var e=$contentFontVariant.select2("data"),a=jQuery.map(t.params.data.variants,function(t){return{id:t,text:fontVariant(t)}});$contentFontVariant.empty(),$contentFontVariant.select2({data:a}),e[0].id&&("-1"==jQuery.inArray(e[0].id,t.params.data.variants)?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):$contentFontVariant.val(e[0].id).trigger("change.select2")),WebFont.load({google:{families:[t.params.data.text+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery("#content-example").css("font-family",t.params.data.text)}})}),$contentFontVariant.on("select2:select",function(t){contentVariant=t.params.data.id,jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic"))}),jQuery(".font-selector input[type=range]").change(function(){var t=jQuery(this).data("type"),e=jQuery(this).data("css"),a=jQuery(this).val();jQuery(this).parent().find("span").html(a),a="line-height"==e?a:a+"px","heading"==t?jQuery("#heading-example").css(e,a):jQuery("#content-example").css(e,a)}),jQuery(".font-selector input[type=range]").on("input",function(){jQuery(this).trigger("change")}),WebFont.load({google:{families:[e[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic",a[0].id+":100,200,300,400,500,600,700,900,100italic,300italic,400italic,500italic,600italic,700italic,900italic"]},active:function(){jQuery.isNumeric(headingVariant)?jQuery("#heading-example").css("font-weight",headingVariant).css("font-style","normal"):"regular"==headingVariant?jQuery("#heading-example").css("font-weight","400").css("font-style","normal"):"italic"==headingVariant?jQuery("#heading-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(headingVariant,10),jQuery("#heading-example").css("font-weight",fontweight).css("font-style","italic")),jQuery.isNumeric(contentVariant)?jQuery("#content-example").css("font-weight",contentVariant).css("font-style","normal"):"regular"==contentVariant?jQuery("#content-example").css("font-weight","400").css("font-style","normal"):"italic"==contentVariant?jQuery("#content-example").css("font-style","italic").css("font-weight","400"):(fontweight=parseInt(contentVariant,10),jQuery("#content-example").css("font-weight",fontweight).css("font-style","italic")),jQuery("#heading-example, #niteoCS-text-logo").css("font-family",e[0].id),jQuery("#content-example").css("font-family",a[0].id)}})});
 
 
 
 
 
 
 
 
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.1
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -17,7 +17,7 @@ class niteo_cmp {
17
  public function __construct() {
18
  $this->author = 'NiteoThemes';
19
  $this->author_homepage = 'https://niteothemes.com';
20
- $this->version = '2.1';
21
  $this->dev = false;
22
  $this->plugins_dir_path = plugin_dir_path( __DIR__ );
23
  if ( $this->plugins_dir_path == './') {
@@ -41,15 +41,17 @@ class niteo_cmp {
41
  // set remote server URL for updates
42
  $this->remoteServer = ($this->dev == true) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
43
  $this->minified = ($this->dev == true) ? '' : '.min';
 
44
  }
45
 
46
 
47
  public function cmp() {
48
  $this->__construct();
 
49
  }
50
 
51
  public function cmp_adminInit() {
52
- wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'',$this->version);
53
  wp_enqueue_style('cmp-style');
54
  wp_register_style( 'font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
55
  wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
@@ -57,8 +59,8 @@ class niteo_cmp {
57
  wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
58
 
59
  wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
60
- wp_register_script( 'select2', plugins_url('/js/select2.min.js', __FILE__) );
61
- wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2' ), false, $this->version );
62
  wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont'), $this->version);
63
  wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
64
 
@@ -82,9 +84,9 @@ class niteo_cmp {
82
  wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
83
  wp_enqueue_script('cmp_settings_js');
84
  wp_enqueue_script('cmp-typography');
85
- wp_enqueue_script('select2-js');
86
  wp_enqueue_script( 'wp-color-picker');
87
  wp_enqueue_script( 'webfont' );
 
88
  wp_enqueue_media();
89
  wp_enqueue_style( 'wp-color-picker');
90
  wp_enqueue_style( 'select2');
@@ -112,7 +114,7 @@ class niteo_cmp {
112
 
113
  add_submenu_page('cmp-settings', 'Content Settings', __('Content Settings','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-settings' );
114
 
115
- // add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
116
 
117
  add_submenu_page('cmp-settings', 'Subscribers', __('Subscribers','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
118
 
@@ -136,6 +138,12 @@ class niteo_cmp {
136
  require_once ('cmp-settings.php');
137
  }
138
 
 
 
 
 
 
 
139
  public function cmp_subs_page() {
140
  require_once ('cmp-subscribers.php');
141
  }
@@ -157,8 +165,10 @@ class niteo_cmp {
157
  return plugins_url( $filepath,__FILE__ );
158
  }
159
 
 
160
  public function cmp_displayPage() {
161
 
 
162
  if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
163
  // register html class for rendering of HTML elements in Themes
164
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
@@ -193,7 +203,6 @@ class niteo_cmp {
193
 
194
  }
195
 
196
-
197
  // for admin: render CMP Theme when preview is set
198
  if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
199
  require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
@@ -201,16 +210,18 @@ class niteo_cmp {
201
  }
202
  }
203
 
204
- // Render CMP Theme mode if is activated
205
  if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
206
-
207
- // check if user logged in
208
- if ( !is_user_logged_in() ) {
209
 
210
  // if ( isset($_GET['bypass']) && $_GET['bypass'] == 'true' || !is_home() ) {
211
  // return;
212
  // }
213
 
 
 
214
  // register html class for rendering of HTML elements in Themes
215
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
216
  $html = new cmp_render_html();
@@ -254,7 +265,7 @@ class niteo_cmp {
254
  }
255
  }
256
 
257
- // if CMP in redirect mode with 0 timeouthtel
258
  if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() ) {
259
  $redirect_url = get_option('niteoCS_URL_redirect');
260
 
@@ -266,6 +277,8 @@ class niteo_cmp {
266
  }
267
  }
268
 
 
 
269
  public function cmp_admin_override(){
270
 
271
  if( $this->cmp_status() == 0 ){
@@ -273,8 +286,9 @@ class niteo_cmp {
273
  }
274
 
275
  if( is_user_logged_in() ){
276
-
277
- if( !current_user_can('administrator') ){
 
278
  wp_logout();
279
  wp_redirect( get_bloginfo('url') );
280
  exit();
@@ -320,13 +334,11 @@ class niteo_cmp {
320
 
321
  // check selected theme
322
  public function cmp_selectedTheme() {
323
- if ( !get_option('niteoCS_theme') ) { //if it's not set yet
324
- update_option('niteoCS_theme', 'hardwork'); //set it
325
- }
326
-
327
- return get_option('niteoCS_theme');
328
  }
329
 
 
 
330
  // return installed theme path
331
  public function cmp_themePath( $slug ) {
332
  if ( $this->niteo_in_array_r( $slug, $this->cmp_plugin_premium(), true ) ) {
@@ -442,6 +454,10 @@ class niteo_cmp {
442
  }
443
 
444
  public function cmp_activate() {
 
 
 
 
445
  if ( get_option('niteoCS_archive') ) {
446
  //get all the options back from the archive
447
  $options = get_option('niteoCS_archive');
@@ -472,12 +488,11 @@ class niteo_cmp {
472
  update_option('niteoCS_archive', $options);
473
 
474
  //delete the separate ones
475
- foreach ($options as $option) {
476
  delete_option($option['name']);
477
 
478
  }
479
 
480
- delete_option('niteoCS_archive', $options);
481
  }
482
 
483
  // clean plugin stuff when plugin is deleted
@@ -488,19 +503,34 @@ class niteo_cmp {
488
  // returns list of premium themes => manually defined
489
  public function cmp_plugin_premium() {
490
  $premium_themes = array();
491
- array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://creativemarket.com/NiteoThemes/1373921-CMP-Frame-Coming-Soon-WP-Theme?u=NiteoThemes', 'price' => '10') );
492
- array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://creativemarket.com/NiteoThemes/1385251-CMP-Hardwork-Premium-Maintenance?u=NiteoThemes', 'price' => '10') );
493
- array_push( $premium_themes, array('name' => 'fifty', 'url' => 'https://creativemarket.com/NiteoThemes/1395745-CMP-Fifty-Maintenance-Landing-Page?u=NiteoThemes', 'price' => '10') );
494
  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') );
 
 
495
  return $premium_themes;
496
  }
497
 
 
 
 
 
 
 
 
 
 
 
 
 
498
  // theme updates function
499
  public function cmp_check_update( $theme_slug ) {
500
 
501
  if ( !in_array( $theme_slug, $this->premium_installed ) ) {
502
  return;
503
  }
 
504
  // check for current theme version
505
  $remote_version = '';
506
  $current_version = '';
@@ -541,7 +571,7 @@ class niteo_cmp {
541
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
542
  // if admin screen is not in updating theme
543
  if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
544
- $transient = '<div class="notice notice-warning is-dismissible"><p class="message">'.sprintf(__('There is a new version of %s theme available.', 'cmp-coming-soon-maintenance'), $title).' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('View update %s notes','cmp-coming-soon-maintenance'), $remote_version).'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-remote_url="'.esc_url($this->remoteServer).'" data-new_ver="'.esc_attr($remote_version).'">'.__('Update now.','cmp-coming-soon-maintenance').'</a></p><div class="release-note"></div></div>';
545
  // set transient with 24 hour expire
546
  set_transient( $theme_slug.'_updatecheck', $transient, 60*60*24 );
547
  echo $transient;
@@ -661,7 +691,7 @@ class niteo_cmp {
661
  // load PHP WP FILE
662
  if ( ! empty( $file ) ) {
663
  // Download file to temp location.
664
- $file ['tmp_name'] = download_url( $file['url'] );
665
 
666
  // If error storing temporarily, return the error.
667
  if ( !is_wp_error( $file['tmp_name'] ) ) {
@@ -670,13 +700,7 @@ class niteo_cmp {
670
  $source_path = $file['tmp_name'];
671
  $theme_name = $file['name'];
672
 
673
- if ( $file['type'] == 'premium' ) {
674
- $destination_path = $this->plugins_dir_path . 'cmp-premium-themes/';
675
- }
676
-
677
- if ( $file['type'] == 'standard' ) {
678
- $destination_path = plugin_dir_path( __FILE__ ) . 'themes/';
679
- }
680
 
681
  // create new theme DIR
682
  if ( wp_mkdir_p( $destination_path ) ) {
@@ -691,21 +715,23 @@ class niteo_cmp {
691
  $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
692
  // add it to all installed themes array
693
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
694
- // reply response
695
- echo $ajax ? 'success' : '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp-coming-soon-maintenance').'</p></div>';
696
  // set transient no update available with 24 hours expire
697
  set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
698
  // die
699
- if ($ajax === true) {
700
- wp_die();
 
701
  } else {
 
702
  return;
703
  }
704
 
705
  } else {
706
  echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
707
- if ($ajax === true) {
708
  wp_die();
 
709
  } else {
710
  return;
711
  }
@@ -713,8 +739,9 @@ class niteo_cmp {
713
 
714
  } else {
715
  echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
716
- if ($ajax === true) {
717
  wp_die();
 
718
  } else {
719
  return;
720
  }
@@ -722,7 +749,7 @@ class niteo_cmp {
722
 
723
  } else {
724
  echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp-coming-soon-maintenance').' '.$file['tmp_name']->get_error_message().'</p></div>';
725
- if ($ajax === true) {
726
  wp_die();
727
  } else {
728
  return;
@@ -731,7 +758,7 @@ class niteo_cmp {
731
  } else {
732
 
733
  echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
734
- if ($ajax === true) {
735
  wp_die();
736
  } else {
737
  return;
@@ -1024,7 +1051,7 @@ class niteo_cmp {
1024
 
1025
 
1026
  public function cmp_admin_notice() {
1027
- if ( isset($_GET['page']) && ($_GET['page'] == 'cmp-settings' || $_GET['page'] == 'cmp-translate') ) {
1028
  if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
1029
  $status = 'success';
1030
  $message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
@@ -1226,8 +1253,6 @@ class niteo_cmp {
1226
  return $google_fonts;
1227
  }
1228
 
1229
-
1230
-
1231
  public function cmp_google_variant_title( $variant ) {
1232
 
1233
  switch( $variant ) {
@@ -1296,6 +1321,65 @@ class niteo_cmp {
1296
  }
1297
  }
1298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1299
  public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
1300
  if (is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra)) {
1301
  if ($hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins'])) {
@@ -1308,7 +1392,7 @@ class niteo_cmp {
1308
  }// endforeach;
1309
  unset($key, $plugin, $this_plugin);
1310
  if (isset($this_plugin_updated) && $this_plugin_updated === true) {
1311
- // migrate postery
1312
  if ( get_option('niteoCS_theme') == 'postery' && !in_array('postery', $this->premium_installed) ) {
1313
 
1314
  WP_Filesystem();
@@ -1320,8 +1404,13 @@ class niteo_cmp {
1320
  if ( wp_mkdir_p( $destination_path ) ) {
1321
  // Unzip FILE into that DIR
1322
  $unzipfile = unzip_file( $source_path, $destination_path);
 
1323
 
 
 
 
1324
  }
 
1325
  }
1326
  }// endif; $this_plugin_updated
1327
  }// endif update plugin and plugins not empty.
@@ -1356,9 +1445,11 @@ add_action('admin_init', array($cmpPlugin, 'cmp_admin_override'));
1356
  add_action( 'admin_enqueue_scripts', array($cmpPlugin,'cmp_add_admin_style') );
1357
  add_action( 'wp_enqueue_scripts', array($cmpPlugin,'cmp_add_admin_style') );
1358
 
1359
- register_activation_hook(__FILE__, array($cmpPlugin, 'cmp_activate'));
1360
- register_deactivation_hook(__FILE__, array($cmpPlugin, 'cmp_deactivate'));
1361
- register_uninstall_hook(__FILE__, 'cmp_plugin_delete');
 
 
1362
 
1363
  add_action('upgrader_process_complete', array($cmpPlugin, 'cmp_plugin_update'), 10, 2);
1364
 
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.2
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
17
  public function __construct() {
18
  $this->author = 'NiteoThemes';
19
  $this->author_homepage = 'https://niteothemes.com';
20
+ $this->version = '2.2';
21
  $this->dev = false;
22
  $this->plugins_dir_path = plugin_dir_path( __DIR__ );
23
  if ( $this->plugins_dir_path == './') {
41
  // set remote server URL for updates
42
  $this->remoteServer = ($this->dev == true) ? 'https://niteothemes.com/updates-test/' : 'https://niteothemes.com/updates/';
43
  $this->minified = ($this->dev == true) ? '' : '.min';
44
+
45
  }
46
 
47
 
48
  public function cmp() {
49
  $this->__construct();
50
+
51
  }
52
 
53
  public function cmp_adminInit() {
54
+ wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.$this->minified.'.css', __FILE__),'', $this->version);
55
  wp_enqueue_style('cmp-style');
56
  wp_register_style( 'font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
57
  wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
59
  wp_register_style( 'select2', plugins_url('/css/select2.min.css', __FILE__) );
60
 
61
  wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
62
+ wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
63
+ wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
64
  wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont'), $this->version);
65
  wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
66
 
84
  wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
85
  wp_enqueue_script('cmp_settings_js');
86
  wp_enqueue_script('cmp-typography');
 
87
  wp_enqueue_script( 'wp-color-picker');
88
  wp_enqueue_script( 'webfont' );
89
+ wp_enqueue_script( 'select2-js');
90
  wp_enqueue_media();
91
  wp_enqueue_style( 'wp-color-picker');
92
  wp_enqueue_style( 'select2');
114
 
115
  add_submenu_page('cmp-settings', 'Content Settings', __('Content Settings','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-settings' );
116
 
117
+ add_submenu_page('cmp-settings', 'Advanced Settings', 'Advanced Settings', 'manage_options', 'cmp-advanced', array($this, 'cmp_advanced_page') );
118
 
119
  add_submenu_page('cmp-settings', 'Subscribers', __('Subscribers','cmp-coming-soon-maintenance'), 'manage_options', 'cmp-subscribers', array($this, 'cmp_subs_page') );
120
 
138
  require_once ('cmp-settings.php');
139
  }
140
 
141
+ public function cmp_advanced_page() {
142
+ wp_enqueue_script('select2-js');
143
+ wp_enqueue_style('select2');
144
+ require_once ('cmp-advanced.php');
145
+ }
146
+
147
  public function cmp_subs_page() {
148
  require_once ('cmp-subscribers.php');
149
  }
165
  return plugins_url( $filepath,__FILE__ );
166
  }
167
 
168
+ // function to display CMP landing page
169
  public function cmp_displayPage() {
170
 
171
+ // check if preview is set
172
  if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
173
  // register html class for rendering of HTML elements in Themes
174
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
203
 
204
  }
205
 
 
206
  // for admin: render CMP Theme when preview is set
207
  if ( file_exists( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
208
  require_once ( $this->cmp_themePath( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php' );
210
  }
211
  }
212
 
213
+ // Render CMP Theme mode if is activated and not in immediate redirect mode
214
  if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 || ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') != 0 ) ) {
215
+
216
+ // check if user logged in, page filters and access role
217
+ if ( !is_user_logged_in() && $this->cmp_page_filter() ) {
218
 
219
  // if ( isset($_GET['bypass']) && $_GET['bypass'] == 'true' || !is_home() ) {
220
  // return;
221
  // }
222
 
223
+ // check if page filter is enabled
224
+
225
  // register html class for rendering of HTML elements in Themes
226
  require ( dirname( __FILE__) . '/inc/class-cmp-render_html.php' );
227
  $html = new cmp_render_html();
265
  }
266
  }
267
 
268
+ // if CMP in redirect mode with 0 timeout
269
  if ( $this->cmp_status() == 3 && get_option('niteoCS_redirect_time') == 0 && !is_user_logged_in() ) {
270
  $redirect_url = get_option('niteoCS_URL_redirect');
271
 
277
  }
278
  }
279
 
280
+
281
+ // override wp login page if cmp is enabled
282
  public function cmp_admin_override(){
283
 
284
  if( $this->cmp_status() == 0 ){
286
  }
287
 
288
  if( is_user_logged_in() ){
289
+
290
+ // check for desired wordpress user access rights
291
+ if( !$this->cmp_roles_filter() ){
292
  wp_logout();
293
  wp_redirect( get_bloginfo('url') );
294
  exit();
334
 
335
  // check selected theme
336
  public function cmp_selectedTheme() {
337
+ return get_option('niteoCS_theme', 'hardwork');
 
 
 
 
338
  }
339
 
340
+
341
+
342
  // return installed theme path
343
  public function cmp_themePath( $slug ) {
344
  if ( $this->niteo_in_array_r( $slug, $this->cmp_plugin_premium(), true ) ) {
454
  }
455
 
456
  public function cmp_activate() {
457
+
458
+ // var_dump(get_option('niteoCS_theme')) ;
459
+
460
+
461
  if ( get_option('niteoCS_archive') ) {
462
  //get all the options back from the archive
463
  $options = get_option('niteoCS_archive');
488
  update_option('niteoCS_archive', $options);
489
 
490
  //delete the separate ones
491
+ foreach ( $options as $option ) {
492
  delete_option($option['name']);
493
 
494
  }
495
 
 
496
  }
497
 
498
  // clean plugin stuff when plugin is deleted
503
  // returns list of premium themes => manually defined
504
  public function cmp_plugin_premium() {
505
  $premium_themes = array();
506
+ 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') );
507
+ 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') );
508
+ 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') );
509
  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') );
510
+ 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') );
511
+
512
  return $premium_themes;
513
  }
514
 
515
+ public function cmp_downloadable_themes() {
516
+ $downloadable_themes = array();
517
+
518
+ foreach ( $this->cmp_plugin_premium() as $premium ) {
519
+ if ( !in_array($premium['name'], $this->premium_installed) ) {
520
+ array_push( $downloadable_themes, $premium );
521
+ }
522
+ }
523
+
524
+ return $downloadable_themes;
525
+ }
526
+
527
  // theme updates function
528
  public function cmp_check_update( $theme_slug ) {
529
 
530
  if ( !in_array( $theme_slug, $this->premium_installed ) ) {
531
  return;
532
  }
533
+
534
  // check for current theme version
535
  $remote_version = '';
536
  $current_version = '';
571
  $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
572
  // if admin screen is not in updating theme
573
  if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
574
+ $transient = '<div class="notice notice-warning is-dismissible"><p class="message">'.sprintf(__('There is a new version of %s theme available.', 'cmp-coming-soon-maintenance'), $title).' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.php" class="view-release">'.sprintf(__('View update %s notes','cmp-coming-soon-maintenance'), $remote_version).'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-security="'.esc_attr($ajax_nonce).'" data-slug="'.esc_attr($theme_slug).'" data-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></p><div class="release-note"></div></div>';
575
  // set transient with 24 hour expire
576
  set_transient( $theme_slug.'_updatecheck', $transient, 60*60*24 );
577
  echo $transient;
691
  // load PHP WP FILE
692
  if ( ! empty( $file ) ) {
693
  // Download file to temp location.
694
+ $file['tmp_name'] = download_url( $file['url'] );
695
 
696
  // If error storing temporarily, return the error.
697
  if ( !is_wp_error( $file['tmp_name'] ) ) {
700
  $source_path = $file['tmp_name'];
701
  $theme_name = $file['name'];
702
 
703
+ $destination_path = $this->plugins_dir_path . 'cmp-premium-themes/';
 
 
 
 
 
 
704
 
705
  // create new theme DIR
706
  if ( wp_mkdir_p( $destination_path ) ) {
715
  $this->premium_installed = array_map('basename', glob( $destination_path . '*', GLOB_ONLYDIR));
716
  // add it to all installed themes array
717
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
718
+ // reply response
 
719
  // set transient no update available with 24 hours expire
720
  set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
721
  // die
722
+ if ( $ajax ) {
723
+ wp_die('success');
724
+ return;
725
  } else {
726
+ echo '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp-coming-soon-maintenance').'</p></div>';
727
  return;
728
  }
729
 
730
  } else {
731
  echo '<div class="notice notice-error is-dismissible"><p>'.__('There was an error unzipping the file!', 'cmp-coming-soon-maintenance').'</p></div>';
732
+ if ( $ajax ) {
733
  wp_die();
734
+ return;
735
  } else {
736
  return;
737
  }
739
 
740
  } else {
741
  echo '<div class="notice notice-error is-dismissible"><p>'.__('Error creating Theme subdirectory!', 'cmp-coming-soon-maintenance').'</p></div>';
742
+ if ( $ajax ) {
743
  wp_die();
744
+ return;
745
  } else {
746
  return;
747
  }
749
 
750
  } else {
751
  echo '<div class="notice notice-error is-dismissible"><p>'.__('Error during updating Theme files:', 'cmp-coming-soon-maintenance').' '.$file['tmp_name']->get_error_message().'</p></div>';
752
+ if ( $ajax === true ) {
753
  wp_die();
754
  } else {
755
  return;
758
  } else {
759
 
760
  echo '<div class="notice notice-error is-dismissible"><p>'.__('General Error during updating Theme files.', 'cmp-coming-soon-maintenance').'</p></div>';
761
+ if ( $ajax === true ) {
762
  wp_die();
763
  } else {
764
  return;
1051
 
1052
 
1053
  public function cmp_admin_notice() {
1054
+ if ( isset($_GET['page']) && ($_GET['page'] == 'cmp-settings' || $_GET['page'] == 'cmp-translate' || $_GET['page'] == 'cmp-advanced') ) {
1055
  if (isset($_GET['status']) && $_GET['status'] == 'settings-saved') {
1056
  $status = 'success';
1057
  $message = __('CMP Settings Saved', 'cmp-coming-soon-maintenance');
1253
  return $google_fonts;
1254
  }
1255
 
 
 
1256
  public function cmp_google_variant_title( $variant ) {
1257
 
1258
  switch( $variant ) {
1321
  }
1322
  }
1323
 
1324
+ // returns true if current page is in page array (blacklist or whitelist)
1325
+ // since 2.2
1326
+ public function cmp_page_filter() {
1327
+ $page_id = get_the_ID();
1328
+
1329
+ // change manually page_id to -1 if homepage is displayed
1330
+ if ( is_home() || is_front_page() ) {
1331
+ $page_id = '-1';
1332
+ }
1333
+
1334
+
1335
+ switch ( get_option('niteoCS_page_filter', '0') ) {
1336
+ // disabled return true
1337
+ case '0':
1338
+ return true;
1339
+ break;
1340
+
1341
+ // whitelist
1342
+ case '1':
1343
+ $page_list = json_decode( get_option('niteoCS_page_whitelist', '[]'), true );
1344
+ if ( empty( $page_list ) || in_array( $page_id, $page_list ) ){
1345
+ return true;
1346
+ }
1347
+ break;
1348
+
1349
+ // blacklist
1350
+ case '2':
1351
+ $page_list = json_decode( get_option('niteoCS_page_blacklist', '[]'), true );
1352
+ if ( empty( $page_list ) || !in_array( $page_id, $page_list ) ){
1353
+ return true;
1354
+ }
1355
+ break;
1356
+
1357
+ default:
1358
+ return true;
1359
+ break;
1360
+ }
1361
+
1362
+ return true;
1363
+ }
1364
+
1365
+ // returns true if logged in user meet CMP roles filter
1366
+ // since 2.2
1367
+ public function cmp_roles_filter() {
1368
+ $roles = json_decode( get_option('niteoCS_roles', '[]'), true );
1369
+ // push WP administrator to roles array, since it is default
1370
+ array_push( $roles, 'administrator' );
1371
+ $current_user = wp_get_current_user();
1372
+
1373
+ foreach ($current_user->roles as $role ) {
1374
+ if ( in_array($role, $roles) ) {
1375
+ return true;
1376
+ }
1377
+ };
1378
+
1379
+ return false;
1380
+ }
1381
+
1382
+
1383
  public function cmp_plugin_update(\WP_Upgrader $upgrader, array $hook_extra) {
1384
  if (is_array($hook_extra) && array_key_exists('action', $hook_extra) && array_key_exists('type', $hook_extra) && array_key_exists('plugins', $hook_extra)) {
1385
  if ($hook_extra['action'] == 'update' && $hook_extra['type'] == 'plugin' && is_array($hook_extra['plugins']) && !empty($hook_extra['plugins'])) {
1392
  }// endforeach;
1393
  unset($key, $plugin, $this_plugin);
1394
  if (isset($this_plugin_updated) && $this_plugin_updated === true) {
1395
+ // migrate postery to cmp-premium-themes if was set as active theme prior the update
1396
  if ( get_option('niteoCS_theme') == 'postery' && !in_array('postery', $this->premium_installed) ) {
1397
 
1398
  WP_Filesystem();
1404
  if ( wp_mkdir_p( $destination_path ) ) {
1405
  // Unzip FILE into that DIR
1406
  $unzipfile = unzip_file( $source_path, $destination_path);
1407
+ }
1408
 
1409
+ // migrate google analytics options
1410
+ if ( get_option('niteoCS_analytics') && get_option('niteoCS_analytics') != '' ) {
1411
+ update_option('niteoCS_analytics_status', 'google');
1412
  }
1413
+
1414
  }
1415
  }// endif; $this_plugin_updated
1416
  }// endif update plugin and plugins not empty.
1445
  add_action( 'admin_enqueue_scripts', array($cmpPlugin,'cmp_add_admin_style') );
1446
  add_action( 'wp_enqueue_scripts', array($cmpPlugin,'cmp_add_admin_style') );
1447
 
1448
+ register_activation_hook( __FILE__, array($cmpPlugin, 'cmp_activate') );
1449
+
1450
+ register_deactivation_hook( __FILE__, array($cmpPlugin, 'cmp_deactivate') );
1451
+
1452
+ register_uninstall_hook( __FILE__, 'cmp_plugin_delete');
1453
 
1454
  add_action('upgrader_process_complete', array($cmpPlugin, 'cmp_plugin_update'), 10, 2);
1455
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
- Stable tag: 2.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -22,6 +22,7 @@ CMP brings premium features for free, no PRO versions! It is very user friendly
22
 
23
  <h3>Features</h3>
24
  <ul>
 
25
  <li>Works with any WordPress Theme and on all devices</li>
26
  <li>Fully responsive and Retina ready</li>
27
  <li>Customize Logo, Fonts and Colors</li>
@@ -31,10 +32,12 @@ CMP brings premium features for free, no PRO versions! It is very user friendly
31
  <li>Select and display random beautiful images from <a href="http://unsplash.com" target="_blank">Unsplash source</a> with built-in search API or use custom photos</li>
32
  <li>Fullscreen background options includes videos (YouTube, custom file video), images (Unsplash library, custom images), Patterns, color Gradients or solid Colors</li>
33
  <li>Setup Font animations on selected Themes</li>
34
- <li>Configurable Countdown Action - disable plugin or redirect to another webpage.</li>
 
 
35
  <li>Customize SEO meta tags to search engines and editable favicon</li>
36
  <li>Set response code to search engines (200, 503)</li>
37
- <li>Redirect Mode to redirect your website to another with predefined timer</li>
38
  <li>Insert Google Analytics Code</li>
39
  <li>Insert Custom CSS</li>
40
  <li>Uses HTML5 & CSS3</li>
@@ -43,18 +46,20 @@ CMP brings premium features for free, no PRO versions! It is very user friendly
43
  </ul>
44
 
45
  == Screenshots ==
46
- 1. CMP - Postery Theme
47
- 2. CMP - Hardwork Theme
48
- 3. CMP - Countdown Theme
49
- 4. CMP - Fifty Theme
50
- 5. CMP - Fifty Theme
51
- 6. CMP - Construct Theme
52
- 7. CMP - Frame Theme
53
- 8. CMP - Hardwork Theme
54
- 9. CMP - Theme Details
55
- 10. CMP - Admin screen
56
- 11. CMP - Admin screen
57
- 12. CMP - Admin screen
 
 
58
 
59
 
60
 
@@ -109,6 +114,22 @@ CMP brings premium features for free, no PRO versions! It is very user friendly
109
 
110
 
111
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  <h4>2.1</h4>
113
  <ul>
114
  <li>Completely rewritten Unsplash API to avoid duplicated cached images when using Image sliders.</li>
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
+ Stable tag: 2.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
22
 
23
  <h3>Features</h3>
24
  <ul>
25
+ <li>Many predefined Themes with different design to choose from</li>
26
  <li>Works with any WordPress Theme and on all devices</li>
27
  <li>Fully responsive and Retina ready</li>
28
  <li>Customize Logo, Fonts and Colors</li>
32
  <li>Select and display random beautiful images from <a href="http://unsplash.com" target="_blank">Unsplash source</a> with built-in search API or use custom photos</li>
33
  <li>Fullscreen background options includes videos (YouTube, custom file video), images (Unsplash library, custom images), Patterns, color Gradients or solid Colors</li>
34
  <li>Setup Font animations on selected Themes</li>
35
+ <li>CMP can be applied only to specific pages (blacklist and whitelist)</li>
36
+ <li>Customizable WordPress roles to bypass CMP</li>
37
+ <li>Configurable Countdown Action - disable plugin or redirect to another website</li>
38
  <li>Customize SEO meta tags to search engines and editable favicon</li>
39
  <li>Set response code to search engines (200, 503)</li>
40
+ <li>Redirect Mode to redirect your website to another website with predefined timer</li>
41
  <li>Insert Google Analytics Code</li>
42
  <li>Insert Custom CSS</li>
43
  <li>Uses HTML5 & CSS3</li>
46
  </ul>
47
 
48
  == Screenshots ==
49
+ 1. CMP - Coming Soon Plugin
50
+ 2. CMP - Theme Selector
51
+ 3. CMP - Subscriber List
52
+ 4. CMP - Theme Selector detail
53
+ 5. CMP - Global Settings
54
+ 6. CMP - Theme Content Settings
55
+ 7. CMP - SEO Settings
56
+ 8. CMP - Construct Theme
57
+ 9. CMP - Countdown Theme
58
+ 10. CMP - Fifty Theme
59
+ 11. CMP - Fifty Theme
60
+ 12. CMP - Frame Theme
61
+ 13. CMP - Hardwork Theme
62
+ 14. CMP - Hardwork Premium Theme
63
 
64
 
65
 
114
 
115
 
116
  == Changelog ==
117
+ <h4>CMP 2.2 - very sweet update :) </h4>
118
+ <p>This update brings you a heavily requsted features such a whitelist/blacklist, user roles setup and also few other nice changes including:</p>
119
+ <h3>Premium Frame Theme changed to freebies which you can download for free now!</h3>
120
+ <h3>New Advanced Settings page:</h3>
121
+ <ul>
122
+ <li>You can setup <b>CMP Page Whitelist</b> to display CMP Theme only on the particular WordPress Pages.</li>
123
+ <li>You can setup <b>CMP Page Blacklist</b> to disable CMP Theme on the particular WordPress Pages.</li>
124
+ <li>You can setup <b>User Roles</b> to bypass CMP Theme, the roles are following: Editor, Author, Contributor and Subscriber.</li>
125
+ </ul>
126
+ <ul>
127
+ <li>Added custom Analytics code, so you can choose to insert Google Analytics ID or custom Javascript code if you are using different or custom Website analytics solution.</li>
128
+ <li>Moved Postery and Eclipse Themes from bundled to downloadable freebies.</li>
129
+ <li>UI Changes: Premium themes changed to "Downloadable themes" including freebies now. If you install downloaded CMP Theme, it will be moved to available themes for and removed from downloadables section for better readability.</li>
130
+
131
+ </ul>
132
+
133
  <h4>2.1</h4>
134
  <ul>
135
  <li>Completely rewritten Unsplash API to avoid duplicated cached images when using Image sliders.</li>
themes/construct/construct-theme.php CHANGED
@@ -94,21 +94,11 @@
94
  <?php
95
  }
96
 
97
- // GOOGLE ANALYTICS
98
- if ( get_option('niteoCS_analytics', '') !== '' ) { ?>
99
- <!-- Google analytics code -->
100
- <script>
101
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
102
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
103
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
104
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
105
-
106
- ga('create', '<?php echo esc_attr(get_option('niteoCS_analytics'));?>', 'auto');
107
- ga('send', 'pageview');
108
-
109
- </script>
110
- <?php
111
- }
112
  // echo pattern copyright
113
  if ( $niteoCS_banner == 3 ) {
114
  echo '<!-- Background pattern from Subtle Patterns --!>';
94
  <?php
95
  }
96
 
97
+ // render javascripts
98
+ if ( method_exists ( $html, 'cmp_javascripts' ) ) {
99
+ $html->cmp_javascripts( $niteoCS_banner, $themeslug );
100
+ }
101
+
 
 
 
 
 
 
 
 
 
 
102
  // echo pattern copyright
103
  if ( $niteoCS_banner == 3 ) {
104
  echo '<!-- Background pattern from Subtle Patterns --!>';
themes/countdown/countdown-theme.php CHANGED
@@ -106,20 +106,9 @@
106
  <?php
107
  }
108
 
109
- // GOOGLE ANALYTICS
110
- if ( get_option('niteoCS_analytics', '') !== '' ) { ?>
111
- <!-- Google analytics code -->
112
- <script>
113
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
114
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
115
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
116
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
117
-
118
- ga('create', '<?php echo esc_attr(get_option('niteoCS_analytics'));?>', 'auto');
119
- ga('send', 'pageview');
120
-
121
- </script>
122
- <?php
123
  }
124
 
125
  // echo pattern copyright
106
  <?php
107
  }
108
 
109
+ // render javascripts
110
+ if ( method_exists ( $html, 'cmp_javascripts' ) ) {
111
+ $html->cmp_javascripts( $niteoCS_banner, $themeslug );
 
 
 
 
 
 
 
 
 
 
 
112
  }
113
 
114
  // echo pattern copyright
themes/hardwork/hardwork-theme.php CHANGED
@@ -100,20 +100,9 @@
100
  <?php
101
  }
102
 
103
- // GOOGLE ANALYTICS
104
- if ( get_option('niteoCS_analytics', '') !== '' ) { ?>
105
- <!-- Google analytics code -->
106
- <script>
107
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
108
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
109
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
110
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
111
-
112
- ga('create', '<?php echo esc_attr(get_option('niteoCS_analytics'));?>', 'auto');
113
- ga('send', 'pageview');
114
-
115
- </script>
116
- <?php
117
  }
118
 
119
  // echo pattern copyright
100
  <?php
101
  }
102
 
103
+ // render javascripts
104
+ if ( method_exists ( $html, 'cmp_javascripts' ) ) {
105
+ $html->cmp_javascripts( $niteoCS_banner, $themeslug );
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
 
108
  // echo pattern copyright
themes/postery/img/postery_banner_full.jpg DELETED
Binary file
themes/postery/img/postery_banner_large.jpg DELETED
Binary file
themes/postery/js/jquery.slabtext.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! jQuery slabtext plugin v2.4.0 MIT/GPL2 @freqdec */
2
- !function(a){a.fn.slabText=function(b){return a("body").addClass("slabtexted"),this.each(function(){b&&a.extend(e,b);var c=a(this),d=this,e=a.extend({},a.fn.slabText.defaults,b),f=a("span.slabtext",c).length,g=f?[]:String(a.trim(c.text())).replace(/\s{2,}/g," ").split(" "),h=null,i=null,j=null,k=a(window).width(),l=c.find("a:first").attr("href")||c.attr("href"),m=l?c.find("a:first").attr("title"):"";if(!(!f&&e.minCharsPerLine&&g.join(" ").length<e.minCharsPerLine)){var n=function(){var a=jQuery('<div style="display:none;font-size:1em;margin:0;padding:0;height:auto;line-height:1;border:0;">&nbsp;</div>').appendTo(c),b=a.height();return a.remove(),b},o=function(){var j,b=c.width();if(0!=b){if(c.removeClass("slabtextdone slabtextinactive"),e.viewportBreakpoint&&e.viewportBreakpoint>k||e.headerBreakpoint&&e.headerBreakpoint>b)return void c.addClass("slabtextinactive");if(j=n(),f||!e.forceNewCharCount&&j==h)h=j;else{h=j;var v,w,x,y,o=Math.min(60,Math.floor(b/(h*e.fontRatio))),p=0,q=[],s="",t="",u="";if(0!=o&&o!=i){for(i=o;p<g.length;){for(t="";t.length<i&&(s=t,t+=g[p]+" ",!(++p>=g.length)););e.minCharsPerLine&&(w=g.slice(p).join(" "),w.length<e.minCharsPerLine&&(t+=w,s=t,p=g.length+2)),x=i-s.length,y=t.length-i,y>x&&s.length>=(e.minCharsPerLine||2)?(u=s,p--):u=t,v=a.trim(u).length,u=a("<div/>").text(u).html(),e.wrapAmpersand&&(u=u.replace(/&amp;/g,'<span class="amp">&amp;</span>')),u=a.trim(u),q.push('<span class="slabtext slabtext-linesize-'+Math.floor(v/10)+" slabtext-linelength-"+v+'">'+u+"</span>")}c.html(q.join(" ")),l&&c.wrapInner('<a href="'+l+'" '+(m?'title="'+m+'" ':"")+"/>")}}a("span.slabtext",c).each(function(){var g,i,j,c=a(this),d=c.text(),f=d.split(" ").length>1;e.postTweak&&c.css({"word-spacing":0,"letter-spacing":0}),i=b/c.width(),j=parseFloat(this.style.fontSize)||h,c.css("font-size",Math.min((j*i).toFixed(e.precision),e.maxFontSize)+"px"),g=e.postTweak?b-c.width():!1,g&&c.css((f?"word":"letter")+"-spacing",(g/(f?d.split(" ").length-1:d.length)).toFixed(e.precision)+"px")}),c.addClass("slabtextdone"),"function"==typeof e.onRender&&e.onRender.call(d)}};o(),e.noResizeEvent||a(window).resize(function(){a(window).width()!=k&&(k=a(window).width(),clearTimeout(j),j=setTimeout(o,e.resizeThrottleTime))})}})},a.fn.slabText.defaults={fontRatio:.78,forceNewCharCount:!0,wrapAmpersand:!0,headerBreakpoint:null,viewportBreakpoint:null,noResizeEvent:!1,resizeThrottleTime:300,maxFontSize:999,postTweak:!0,precision:3,minCharsPerLine:0,onRender:null}}(jQuery);
 
 
themes/postery/postery-defaults.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
- defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
-
4
- $theme_supports = array(
5
- 'logo' => true,
6
- 'slider' => false,
7
- 'counter' => true,
8
- 'subscribe' => true,
9
- 'social' => true,
10
- 'footer' => false,
11
- );
12
-
13
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
14
- $niteoCS_font_headings = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
15
- $niteoCS_font_content = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
16
-
17
- // get options
18
- $niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
19
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
20
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
21
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
22
-
23
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
themes/postery/postery-settings.php DELETED
@@ -1,98 +0,0 @@
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>
38
- #social-section tr:first-of-type {display: none!important;}
39
- .flatpickr-input {width: 50%;margin-bottom: 1em;}
40
- </style>
41
-
42
-
43
- <div class="table-wrapper theme-setup">
44
- <h3><?php _e('Customize Colors', 'cmp-coming-soon-maintenance');?></h3>
45
- <table class="theme-setup">
46
- <tr>
47
- <th><h4><?php _e('Active Color', 'cmp-coming-soon-maintenance');?></h4></th>
48
- <td>
49
-
50
- <fieldset>
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>
55
- </tr>
56
- <tr>
57
- <th><h4><?php _e('Font Color', 'cmp-coming-soon-maintenance');?></h4></th>
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>
65
- <tr>
66
- <th><h4><?php _e('Overlay Color', 'cmp-coming-soon-maintenance');?></h4></th>
67
- <td>
68
-
69
- <fieldset id="overlay-color">
70
- <input type="text" name="niteoCS_overlay_color_<?php echo esc_attr($themeslug);?>" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
71
-
72
- <label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'cmp-coming-soon-maintenance');?> <span id="current-opacity">: <?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></label><br>
73
- <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_<?php echo esc_attr($themeslug);?>" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
74
-
75
- </fieldset>
76
- </td>
77
- </tr>
78
- <tr><th>
79
- <p class="cmp-submit">
80
- <?php wp_nonce_field('save_options','save_options_field'); ?>
81
- <input type="submit" name="Submit" class="button cmp-button submit" value="<?php _e('Save All Changes', 'cmp-coming-soon-maintenance'); ?>" id="submitChanges" />
82
- </p>
83
- </th></tr>
84
- </table>
85
-
86
- </div>
87
-
88
-
89
- <script>
90
- jQuery(document).ready(function($){
91
- // ini color picker
92
- jQuery('#niteoCS_font_color').wpColorPicker();
93
- jQuery('#niteoCS_background_color').wpColorPicker();
94
- jQuery('#niteoCS_active_color').wpColorPicker();
95
- jQuery('#niteoCS_overlay_color').wpColorPicker();
96
-
97
- });
98
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
themes/postery/postery-theme.php DELETED
@@ -1,387 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html <?php language_attributes(); ?>>
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_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 = 'postery';
14
- // get theme related settings
15
- $niteoCS_active_color = get_option('niteoCS_active_color['.$themeslug.']', '#E85C4F');
16
- $niteoCS_font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
17
- $niteoCS_overlay_color = get_option('niteoCS_overlay_color['.$themeslug.']', '#0a0a0a');
18
- $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity['.$themeslug.']', '0.4');
19
- $background_overlay = $this->hex2rgba($niteoCS_overlay_color, $niteoCS_overlay_opacity);
20
- $content_font = get_option('niteoCS_font_content['.$themeslug.']', 'Raleway');
21
- $heading_font = get_option('niteoCS_font_headings['.$themeslug.']', 'Raleway');
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
- $niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
32
-
33
- if ( $heading_font == 'custom' ) {
34
- $heading_font = get_option('niteoCS_font_headings_custom['.$themeslug.']');
35
- }
36
-
37
- if ( $content_font == 'custom' ) {
38
- $content_font = get_option('niteoCS_font_content_custom['.$themeslug.']');
39
- }
40
- // get global settings
41
- $niteoCS_counter = get_option('niteoCS_counter', '1');
42
- $niteoCS_counter_date = get_option('niteoCS_counter_date', time()+86400);
43
- $countdown_action = get_option('niteoCS_countdown_action', 'no-action');
44
- $body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
45
- $body = get_option('niteoCS_body');
46
- $copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
47
- $favicon_id = get_option('niteoCS_favicon_id');
48
-
49
- // override options if theme preview isset
50
- if ( isset( $theme_preview ) && $theme_preview == 'postery' ) {
51
- $body_title = 'OUR NEW WEBSITE';
52
- $body = 'IS COMING
53
- SOON!';
54
- }
55
-
56
- // display favicon
57
- if ( $favicon_id && $favicon_id != '' ) {
58
- $favicon_url = wp_get_attachment_image_src($favicon_id, 'thumbnail');
59
- if ( isset($favicon_url[0]) ){
60
- echo '<link id="favicon" rel="shortcut icon" href="'.$favicon_url[0].'" type="image/x-icon"/>';
61
- }
62
- } else {
63
- wp_site_icon();
64
- }
65
-
66
- if ( get_option( 'blog_public' ) == 0 ) {
67
- echo "<meta name='robots' content='noindex,nofollow' />";
68
- } ?>
69
-
70
- <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
71
-
72
- <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . $themeslug.'/style.css?v='.$this->version;?>" type="text/css" media="all">
73
-
74
- <style>
75
- body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $niteoCS_font_color ); ?>;}
76
- h1, h2, h3, h4, h5, h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
77
- a {color:<?php echo esc_attr( $niteoCS_font_color ); ?>;}
78
- input[type="submit"] {background-color: <?php echo esc_attr($niteoCS_font_color);?>;}
79
- ::-webkit-input-placeholder {color: <?php echo esc_attr($niteoCS_font_color);?>;}
80
- ::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color);?>;}
81
- :-ms-input-placeholder {color: <?php echo esc_attr($niteoCS_font_color);?>;}
82
- ::-moz-placeholder {color: <?php echo esc_attr($niteoCS_font_color);?>;}
83
- input[type="email"],input[type="text"]{color: <?php echo esc_attr($niteoCS_font_color);?>;}
84
- .counter-wrap,
85
- .social-list a,
86
- input[type="email"], input[type="text"] {background-color:<?php echo esc_attr( $this->hex2rgba($niteoCS_overlay_color, '0.2') );?>;}
87
- input[type="submit"] {background-color:<?php echo esc_attr($niteoCS_active_color);?>;}
88
- .social-list a {color: <?php echo esc_attr($niteoCS_font_color ); ?>;}
89
- .content{background-color:<?php echo esc_attr($background_overlay);?>;}
90
-
91
- <?php
92
- // if solid color banner, set social icons to same background color
93
- if ( $niteoCS_banner == 4) { ?>
94
- .social-list a {color: <?php echo esc_attr($banner_url ); ?>;background-color: <?php echo $this->hex2rgba($niteoCS_font_color, '0.2'); ?>;}
95
- .social-list a:hover {background-color: <?php echo esc_attr($niteoCS_font_color ); ?>;}
96
- <?php
97
- } ?>
98
-
99
- 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_variant);?>;}
100
- 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_variant);?>;}
101
-
102
- </style>
103
-
104
- <?php
105
- // custom CSS
106
- if ( get_option('niteoCS_custom_css', '') !== '' ) { ?>
107
- <!-- custom CSS -->
108
- <style>
109
- <?php
110
-
111
- echo stripslashes(wp_filter_nohtml_kses(get_option('niteoCS_custom_css'))); ?>
112
- </style>
113
- <?php
114
- }
115
-
116
- // GOOGLE ANALYTICS
117
- if ( get_option('niteoCS_analytics', '') !== '' ) { ?>
118
- <!-- Google analytics code -->
119
- <script>
120
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
121
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
122
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
123
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
124
-
125
- ga('create', '<?php echo esc_attr(get_option('niteoCS_analytics'));?>', 'auto');
126
- ga('send', 'pageview');
127
-
128
- </script>
129
- <?php
130
- }
131
-
132
- // echo pattern copyright
133
- if ( $niteoCS_banner == 3 ) {
134
- echo '<!-- Background pattern from Subtle Patterns --!>';
135
- } ?>
136
-
137
- </head>
138
-
139
- <!-- start body tag -->
140
- <body id="body">
141
-
142
- <div id="background-wrapper">
143
- <?php
144
- if ( method_exists ( $html, 'cmp_background' ) ) {
145
- echo $html->cmp_background( $niteoCS_banner, $themeslug );
146
-
147
- } ?>
148
- </div>
149
-
150
- <div class="inner-content">
151
- <div class="content">
152
- <?php
153
- // display logo
154
- if ( method_exists ( $html, 'cmp_logo' ) ) {
155
- echo $html->cmp_logo( $themeslug );
156
- }
157
-
158
- // display title if not empty
159
- if ( $body_title != '' ) { ?>
160
- <h2 class="title slab">
161
- <span class="slabtext heading"><?php echo esc_html( $body_title );?></span>
162
- </h2>
163
- <?php
164
- }
165
- // display body content if not empty
166
- if ( $body != '' ) {
167
-
168
- $body = explode(PHP_EOL, $body ); ?>
169
- <p class="slab">
170
- <?php
171
- foreach ( $body as $body_part ) {
172
- echo '<span class="slabtext">'.$body_part.'</span>';
173
- } ?>
174
- </p>
175
- <?php
176
- }
177
-
178
- // display countdown timer if set
179
- if ( $niteoCS_counter == '1') {
180
- if ( get_option('niteoCS_translation') ) {
181
- $translation = json_decode( get_option('niteoCS_translation'), true );
182
- $seconds = $translation[0]['translation'];
183
- $minutes = $translation[1]['translation'];
184
- $hours = $translation[2]['translation'];
185
- $days = $translation[3]['translation'];
186
- } else {
187
- $seconds = 'seconds';
188
- $minutes = 'minutes';
189
- $hours = 'hours';
190
- $days = 'days';
191
- } ?>
192
-
193
- <div id="counter" data-date="<?php echo esc_attr($niteoCS_counter_date);?>">
194
- <div class="counter-wrap">
195
- <div class="inner-counter">
196
- <span id="counter-day">00</span>
197
- <p><?php echo esc_html($days);?></p>
198
- </div>
199
- </div>
200
-
201
- <div class="counter-wrap">
202
- <div class="inner-counter">
203
- <span id="counter-hour">00</span>
204
- <p><?php echo esc_html($hours);?></p>
205
- </div>
206
- </div>
207
-
208
- <div class="counter-wrap">
209
- <div class="inner-counter">
210
- <span id="counter-minute">00</span>
211
- <p><?php echo esc_html($minutes);?></p>
212
- </div>
213
- </div>
214
-
215
- <div class="counter-wrap">
216
- <div class="inner-counter">
217
- <span id="counter-second">00</span>
218
- <p><?php echo esc_html($seconds);?></p>
219
- </div>
220
- </div>
221
- </div>
222
- <?php
223
- }
224
-
225
- // display subscribe form
226
- if ( method_exists ( $html, 'cmp_subscribe_form' ) ) {
227
- echo $html->cmp_subscribe_form( );
228
- } ?>
229
-
230
- <div class="subsribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
231
-
232
- <?php
233
-
234
- // display social icons
235
- if ( method_exists ( $html, 'cmp_social_icons' ) ) {
236
- echo $html->cmp_social_icons();
237
- } ?>
238
-
239
- </div>
240
-
241
- </div> <!-- .inner-content -->
242
-
243
- </div> <!-- #background-wrapper -->
244
-
245
- <?php
246
- // render javascripts
247
- if ( method_exists ( $html, 'cmp_javascripts' ) ) {
248
- $html->cmp_javascripts( $niteoCS_banner, $themeslug );
249
- }
250
-
251
- // render script for redirect
252
- if ( method_exists ( $html, 'niteo_redirect' ) ) {
253
- $html->niteo_redirect();
254
- }
255
-
256
- // if counter is enabled attach counter script
257
- if ( $niteoCS_counter == '1') { ?>
258
- <script>
259
- // Set the date we're counting down to
260
- var counter = document.getElementById('counter');
261
- var unixtime = counter.getAttribute('data-date');
262
- var date = new Date(unixtime*1000);
263
- var countDownDate = new Date(date).getTime();
264
-
265
- // Update the count down every 1 second
266
- var x = setInterval(function() {
267
-
268
- // Get todays date and time
269
- var now = new Date().getTime();
270
-
271
- // Find the distance between now an the count down date
272
- var distance = countDownDate - now;
273
-
274
- // Time calculations for days, hours, minutes and seconds
275
- var days = Math.floor(distance / (1000 * 60 * 60 * 24));
276
- var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
277
- var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
278
- var seconds = Math.floor((distance % (1000 * 60)) / 1000);
279
-
280
- if (days < 10) {
281
- days = '0' + days;
282
- }
283
- if (hours < 10) {
284
- hours = '0' + hours;
285
- }
286
- if (minutes < 10) {
287
- minutes = '0' + minutes;
288
- }
289
- if (seconds < 10) {
290
- seconds = '0' + seconds;
291
- }
292
- if (distance >= 0) {
293
- document.getElementById('counter-day').innerHTML = days;
294
- document.getElementById('counter-hour').innerHTML = hours;
295
- document.getElementById('counter-minute').innerHTML = minutes;
296
- document.getElementById('counter-second').innerHTML = seconds;
297
- }
298
-
299
- <?php
300
- if ( $countdown_action != 'no-action' && $countdown_action != 'display-text') { ?>
301
-
302
- // If the count down is over, write some text
303
- if (distance < 0) {
304
- clearInterval(x);
305
- window.location.reload();
306
- }
307
- <?php
308
- } ?>
309
-
310
- }, 1000);
311
- </script>
312
- <?php
313
- } ?>
314
- <!-- scripts needed for slabtext -->
315
- <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
316
- <script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/themes/'.$themeslug.'/js/jquery.slabtext.min.js');?>'></script>
317
- <!-- slabtext script -->
318
- <script>
319
- // Function to slabtext the H1 headings
320
- function slabText() {
321
- $(".slab, .text-logo").slabText({
322
- 'maxFontSize': 450,
323
- // Don't slabtext the headers if the viewport is under 380px
324
- 'onRender': function() {
325
- setTimeout( function () {
326
- var a =[];
327
- $(".slabtextdone .slabtext").each( function(index){
328
- a[index] = $(this);
329
- setTimeout( function () {
330
- a[index].addClass('hover');
331
- }, index * 800);
332
- });
333
- }, 500);
334
-
335
- }
336
- });
337
- };
338
-
339
- // Load fonts using google font loader
340
- var WebFontConfig = {
341
- google: { families: [ '<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>', '<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700' ] },
342
- // slabText the headers when the font has finished loading (or not)
343
- fontactive: slabText,
344
- fontinactive: slabText
345
- };
346
- (function() {
347
- var wf = document.createElement('script');
348
- wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
349
- wf.type = 'text/javascript';
350
- wf.async = 'true';
351
- var s = document.getElementsByTagName('script')[0];
352
- s.parentNode.insertBefore(wf, s);
353
- })();
354
- </script>
355
-
356
- </script>
357
- <?php
358
- if ( !$this->isMobile() ) { ?>
359
-
360
- <!-- 3d rotating script -->
361
- <script>
362
- var moveForce = 30; // max popup movement in pixels
363
- var rotateForce = 20; // max popup rotation in deg
364
-
365
- $(document).mousemove(function(e) {
366
- var docX = $(document).width();
367
- var docY = $(document).height();
368
-
369
- var moveX = (e.pageX - docX/2) / (docX/2) * -moveForce;
370
- var moveY = (e.pageY - docY/2) / (docY/2) * -moveForce;
371
-
372
- var rotateY = (e.pageX / docX * rotateForce*2) - rotateForce;
373
- var rotateX = -((e.pageY / docY * rotateForce*2) - rotateForce);
374
-
375
- $('.content')
376
- .css('left', moveX+'px')
377
- .css('top', moveY+'px')
378
- .css('transform', 'rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)')
379
- .css('-ms-transform', 'rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)')
380
- .css('-webkit-transform', 'rotateX('+rotateX+'deg) rotateY('+rotateY+'deg)');
381
- });
382
-
383
- </script>
384
- <?php
385
- } ?>
386
- </body>
387
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
themes/postery/style.css DELETED
@@ -1,695 +0,0 @@
1
- /*
2
- Theme Name: Postery
3
- Theme URI: http://cmp.niteothemes.com/?cmp_preview=true&theme=postery
4
- Author: Niteo
5
- Author URI: https//niteothemes.com
6
-
7
- Normalizing styles have been helped along thanks to the fine work of
8
- Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normaalize.css/
9
- */
10
- /*--------------------------------------------------------------
11
- # Normalize
12
- --------------------------------------------------------------*/
13
-
14
- html {
15
- -webkit-text-size-adjust: 100%;
16
- -ms-text-size-adjust: 100%;
17
- }
18
-
19
-
20
- article,
21
- aside,
22
- details,
23
- figcaption,
24
- figure,
25
- footer,
26
- header,
27
- main,
28
- menu,
29
- nav,
30
- section,
31
- summary {
32
- display: block;
33
- }
34
-
35
- article {
36
- margin: 0;
37
- }
38
-
39
-
40
- article:last-of-type {
41
- margin-bottom: 0;
42
- }
43
-
44
-
45
- audio,
46
- canvas,
47
- progress,
48
- video {
49
- display: inline-block;
50
- vertical-align: baseline;
51
- }
52
-
53
- audio:not([controls]) {
54
- display: none;
55
- height: 0;
56
- }
57
-
58
- [hidden],
59
- template {
60
- display: none;
61
- }
62
-
63
- p {
64
- margin: 0;
65
- }
66
-
67
- a {
68
- background-color: transparent;
69
- text-decoration: none;
70
- -webkit-transition: color .3s ease-in-out;
71
- transition: color .3s ease-in-out;
72
-
73
- }
74
-
75
- a:active,
76
- a:hover {
77
- outline: 0;
78
- }
79
-
80
- abbr[title] {
81
- border-bottom: 1px dotted;
82
- }
83
-
84
- b,
85
- strong {
86
- font-weight: bold;
87
- }
88
-
89
- dfn {
90
- font-style: italic;
91
- }
92
-
93
-
94
- small {
95
- font-size: 80%;
96
- }
97
-
98
- sub,
99
- sup {
100
- font-size: 75%;
101
- line-height: 0;
102
- position: relative;
103
- vertical-align: baseline;
104
- }
105
-
106
- sup {
107
- top: -0.5em;
108
- }
109
-
110
- sub {
111
- bottom: -0.25em;
112
- }
113
-
114
- img {
115
- border: 0;
116
- }
117
-
118
- svg:not(:root) {
119
- overflow: hidden;
120
- }
121
-
122
- figure {
123
- margin: 0;
124
- width: auto!important;
125
- }
126
-
127
- hr {
128
- -webkit-box-sizing: content-box;
129
- box-sizing: content-box;
130
- height: 0;
131
- }
132
-
133
- pre {
134
- overflow: auto;
135
- }
136
-
137
- code,
138
- kbd,
139
- pre,
140
- samp {
141
- font-family: monospace, monospace;
142
- font-size: 1em;
143
- }
144
-
145
- code {
146
- background-color: #BEFFE9;
147
- }
148
-
149
- button,
150
- input,
151
- optgroup,
152
- select,
153
- textarea {
154
- color: inherit;
155
- font: inherit;
156
- margin: 0;
157
- box-shadow: inset 0 0 0 0 !important;
158
- -webkit-box-shadow: inset 0 0 0 0 !important;
159
- -webkit-appearance: none;
160
- outline: none;
161
- }
162
-
163
- textarea {
164
- text-indent: 5px;
165
- }
166
-
167
- button {
168
- overflow: visible;
169
- }
170
-
171
- button,
172
- select {
173
- text-transform: none;
174
- }
175
-
176
- button,
177
- html input[type="button"],
178
- input[type="reset"],
179
- input[type="submit"] {
180
- -webkit-appearance: button;
181
- cursor: pointer;
182
- text-indent: 0;
183
- }
184
-
185
- button[disabled],
186
- html input[disabled] {
187
- cursor: default;
188
- }
189
-
190
- button::-moz-focus-inner,
191
- input::-moz-focus-inner {
192
- border: 0;
193
- padding: 0;
194
- }
195
-
196
- input {
197
- line-height: normal;
198
- text-indent: 5px;
199
- }
200
-
201
- input[type="checkbox"],
202
- input[type="radio"] {
203
- -webkit-box-sizing: border-box;
204
- box-sizing: border-box;
205
- padding: 0;
206
- }
207
-
208
- input[type="number"]::-webkit-inner-spin-button,
209
- input[type="number"]::-webkit-outer-spin-button {
210
- height: auto;
211
- }
212
-
213
- input[type="search"] {
214
- -webkit-appearance: textfield;
215
- -webkit-box-sizing: content-box;
216
- box-sizing: content-box;
217
- }
218
-
219
- input[type="search"]::-webkit-search-cancel-button,
220
- input[type="search"]::-webkit-search-decoration {
221
- -webkit-appearance: none;
222
- }
223
-
224
- fieldset {
225
- border: 1px solid #c0c0c0;
226
- margin: 0 2px;
227
- padding: 0.35em 0.625em 0.75em;
228
- }
229
-
230
- legend {
231
- border: 0;
232
- padding: 0;
233
- }
234
-
235
- textarea {
236
- overflow: auto;
237
- padding: 5px;
238
- }
239
-
240
- optgroup {
241
- font-weight: bold;
242
- }
243
-
244
- table {
245
- border-collapse: collapse;
246
- border-spacing: 0;
247
- }
248
-
249
- td,
250
- th {
251
- padding: 0;
252
- }
253
-
254
- body{
255
- position: relative;
256
- display: -webkit-box;
257
- display: -ms-flexbox;
258
- display: flex;
259
- -webkit-box-pack: center;
260
- -ms-flex-pack: center;
261
- justify-content: center;
262
- -webkit-box-align: center;
263
- -ms-flex-align: center;
264
- align-items: center;
265
- margin:0;
266
- min-height: 100vh;
267
- }
268
-
269
- h1 {
270
- font-weight: 700;
271
- font-size: 1em;
272
- }
273
-
274
-
275
-
276
- h2,h3,h4,h5,h6 {
277
- font-weight: 700;
278
- font-size: 2em;
279
- margin: 0;
280
- }
281
-
282
-
283
- .container.particle {
284
- position: absolute;
285
- top: 0;
286
- left: 0;
287
- right: 0;
288
- bottom: 0;
289
- overflow: hidden;
290
- }
291
-
292
- #background-wrapper {
293
- text-align: center;
294
- }
295
-
296
-
297
- #background-image,
298
- .video-banner {
299
- position: absolute;
300
- top: 0;
301
- right: 0;
302
- bottom: 0;
303
- left: 0;
304
- background-position: center center;
305
- background-repeat: no-repeat;
306
- background-size: cover;
307
- z-index: -1;
308
- }
309
-
310
- #background-image {
311
- opacity: 0;
312
- -webkit-transition: opacity 400ms;
313
- transition: opacity 400ms;
314
- }
315
-
316
- #background-image.loaded {
317
- opacity: 1;
318
- }
319
-
320
- .video-banner iframe,
321
- .video-banner video {
322
- -webkit-transition: opacity 1500ms;
323
- transition: opacity 1500ms;
324
- }
325
-
326
- .background-overlay {
327
- position: absolute;
328
- top: 0;
329
- right: 0;
330
- bottom: 0;
331
- left: 0;
332
- z-index: -1;
333
- }
334
-
335
- #background-image.pattern {
336
- background-repeat: repeat;
337
- background-size: initial;
338
- }
339
-
340
- .inner-content {
341
- width: 100%;
342
- max-width: 600px;
343
- margin: 0 auto;
344
- -webkit-perspective: 2000px;
345
- perspective: 2000px;
346
- }
347
-
348
-
349
- .logo {
350
- padding-bottom: 0;
351
- }
352
-
353
- .logo h1 {
354
- margin: 0;
355
- }
356
-
357
-
358
- .logo span {
359
- display: block;
360
- }
361
-
362
- .logo img {
363
- max-width: 100%;
364
- margin-bottom: 20px;
365
- }
366
-
367
- .body p {
368
- font-size: 1.1em;
369
- }
370
-
371
- .social-list {
372
- display: inline-block;
373
- padding:0;
374
- margin: 0;
375
- width: 100%;
376
- text-align: center;
377
- }
378
-
379
- .social-list li{
380
- position: relative;
381
- list-style: none;
382
- display: inline-block;
383
- }
384
-
385
- .social-list a {
386
- display: block;
387
- margin: 10px;
388
- margin-top: 0;
389
- width: 2.5em;
390
- height: 2.5em;
391
- font-size: 2em;
392
- line-height: 2.5em;
393
- border-radius: 15px;
394
- background: transparent;
395
- background-color: rgba(0,0,0,0.1);
396
- text-align: center;
397
- -webkit-transition: background 300ms linear;
398
- transition: background 300ms linear;
399
- }
400
-
401
- .social-list a:first-of-type {
402
- margin-left: 0;
403
- }
404
-
405
- .social-list i{
406
- font-size: 1em;
407
- -webkit-transition: all 300ms linear;
408
- transition: all 300ms linear;
409
- }
410
-
411
- .social-list.body li {
412
- padding: 5px 10px;
413
- }
414
-
415
- .social-list.body i {
416
- color: #ffffff;
417
- }
418
-
419
-
420
- #counter,
421
- .subscribe,
422
- .social-list {
423
- margin: 3em 0;
424
- }
425
-
426
- .copyright {
427
- margin-top: 0;
428
- }
429
-
430
- .inner-content h1 {
431
- margin: 0;
432
- /* transform: translateZ(30px); */
433
- }
434
-
435
-
436
- .social-list li,
437
- input,
438
- .input-icon {
439
- -webkit-transform: translateZ(0);
440
- transform: translateZ(0);
441
- -webkit-transition: opacity 500ms, -webkit-transform 500ms;
442
- transition: opacity 500ms, -webkit-transform 500ms;
443
- transition: transform 500ms, opacity 500ms;
444
- transition: transform 500ms, opacity 500ms, -webkit-transform 500ms;
445
- }
446
-
447
- .social-list li:hover,
448
- input:hover,
449
- .input-icon.hover {
450
- -webkit-transition: opacity 300ms, -webkit-transform 500ms;
451
- transition: opacity 300ms, -webkit-transform 500ms;
452
- transition: transform 500ms, opacity 300ms;
453
- transition: transform 500ms, opacity 300ms, -webkit-transform 500ms;
454
- -webkit-transform: translateZ(20px);
455
- transform: translateZ(20px);
456
- }
457
-
458
- .slabtext{
459
- display:block;
460
- line-height: 1;
461
- opacity:.3;
462
- }
463
-
464
- .slabtextdone .slabtext.hover {
465
- opacity:1;
466
- }
467
-
468
-
469
-
470
- .social-list li {
471
- /* transform: translateZ(30px); */
472
- }
473
-
474
- .inner-content form {
475
- text-align: left;
476
- }
477
-
478
- .inner-content form br {
479
- display: none;
480
- }
481
-
482
- input {
483
- display: inline-block;
484
- height: 4em;
485
- line-height: 4em;
486
- -webkit-box-sizing: border-box;
487
- box-sizing: border-box;
488
- vertical-align: middle;
489
- margin-bottom: 10px;
490
- }
491
-
492
- label {
493
- display: block;
494
- text-align: left;
495
- font-size: .8em;
496
- padding: 0 0 5px 5px;
497
- }
498
-
499
- input[type="email"].subscribe-input {
500
- text-indent: 40px;
501
- }
502
-
503
- input:focus {
504
- border: 1px solid #ffffff;
505
- }
506
- input[type="email"],
507
- input[type="text"] {
508
- width: calc(100% - 4em);
509
- /* background-color: rgba(255,255,255,0.21); */
510
- text-indent: 15px;
511
- font-style: italic;
512
- border: none;
513
- border-bottom-left-radius: 5px;
514
- border-top-left-radius: 5px;
515
-
516
- }
517
-
518
- input[type="text"] {
519
- width: 100%;
520
- }
521
- input[type="submit"] {
522
- font-family: FontAwesome;
523
- width: 4em;
524
- padding: 0 10px;
525
- margin-left:-6px;
526
- line-height: 4em;
527
- height: 4em;
528
- border: none;
529
- cursor:pointer;
530
- text-transform: uppercase;
531
- border-bottom-right-radius: 5px;
532
- border-top-right-radius: 5px;
533
- }
534
-
535
- /* Mailchimp css */
536
- .mc4wp-form-fields {
537
- display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6, BB7 */
538
- display: -ms-flexbox; /* TWEENER - IE 10 */ /* NEW - Safari 6.1+. iOS 7.1+, BB10 */
539
- display: flex; /* NEW, Spec - Firefox, Chrome, Opera */
540
- -ms-flex-wrap: wrap;
541
- -o-flex-wrap: wrap;
542
- flex-wrap: wrap;
543
- }
544
-
545
- .mc4wp-form input[type="email"],
546
- .mc4wp-form input[type="text"] {
547
- -webkit-box-flex: 1;
548
- -ms-flex-positive: 1;
549
- flex-grow: 1;
550
- }
551
-
552
- .mc4wp-form input[type="email"],
553
- .mc4wp-form input[type="submit"] {
554
- width: auto;
555
- }
556
-
557
- .counter-wrap {
558
- position: relative;
559
- display: inline-block;
560
- margin: 5px;
561
- width: 120px;
562
- height: 120px;
563
- border-radius: 15px;
564
- }
565
-
566
- .counter-wrap::before {
567
- content: "";
568
- display: block;
569
- padding-top: 100%;
570
- }
571
-
572
-
573
- .inner-counter {
574
- position: absolute;
575
- top: 50%;
576
- right: 0;
577
- left: 0;
578
- padding: 10px;
579
- -webkit-transform: translateY(-50%);
580
- transform: translateY(-50%);
581
- text-align: center;
582
- }
583
-
584
- .counter-wrap p {
585
- margin: 0;
586
- font-weight: 700;
587
- }
588
-
589
- .counter-wrap span {
590
- display: inline-block;
591
- font-weight: 700;
592
- font-size: 3em;
593
- }
594
-
595
-
596
-
597
- /* 3d animation */
598
- .content {
599
- -webkit-transform-style: preserve-3d;
600
- transform-style: preserve-3d;
601
- transform-style: preserve-3d;
602
- background: rgba(0,0,0,.1);
603
- padding: 30px;
604
- border-radius: 10px;
605
- }
606
-
607
- .content:before {
608
- content: '';
609
- position: absolute;
610
- left:5%; top:5%;
611
- width:90%; height:90%;
612
- border-radius: inherit;
613
- background: rgba(0,0,0,.1);
614
- -webkit-box-shadow: 0 0 40px 20px rgba(0,0,0,.1);
615
- box-shadow: 0 0 40px 20px rgba(0,0,0,.1);
616
- -webkit-transform: translateZ(-100px);
617
- transform: translateZ(-100px);
618
- }
619
-
620
-
621
- /* contact form 7 */
622
- .wpcf7 .screen-reader-response, .wpcf7 .wpcf7-validation-errors {display: none;}
623
- .wpcf7 .wpcf7-form-control-wrap {position: relative;}
624
- .wpcf7-form .wpcf7-not-valid-tip {position: absolute;bottom: -3em;left: 15px;right: -100px;text-align: left;}
625
-
626
-
627
- /* slabtext required */
628
- .slabtexted .slabtext{display:-moz-inline-box;display:inline-block;white-space:nowrap}.slabtextinactive .slabtext{display:inline;white-space:normal;font-size:1em !important;letter-spacing:inherit !important;word-spacing:inherit !important;*letter-spacing:normal !important;*word-spacing:normal !important}
629
-
630
-
631
-
632
-
633
- @media only screen and (max-width : 1024px) {
634
- body {font-size:16px!important;}
635
-
636
- }
637
-
638
-
639
-
640
- @media only screen and (max-width : 768px) {
641
- body {font-size:15px!important;}
642
- .content {
643
- padding: 3em
644
- }
645
- .counter-wrap {
646
- width: 105px;
647
- height: 105px;
648
- }
649
-
650
- .social-list a {
651
- width: 3em;
652
- height: 3em;
653
- line-height: 3em;
654
- }
655
-
656
- .social-list a {
657
- font-size: 1em;
658
- }
659
-
660
- input {
661
- height: 3em;
662
- line-height: 3em;
663
- }
664
-
665
- input[type="submit"] {
666
- font-size: 1em;
667
- line-height: 1em;
668
- height: 3em;
669
- }
670
-
671
- .counter-wrap {
672
- width: calc(40% - 15px);
673
- height: calc(40% - 15px);
674
- }
675
-
676
- .counter-wrap span {
677
- font-size: 2.3em;
678
- }
679
-
680
- #counter, .subscribe, .social-list {text-align: center;}
681
- }
682
-
683
- @media only screen and (max-width : 420px) {
684
- input[type="submit"],
685
- input[type="text"],
686
- input[type="email"] {
687
- display: block;
688
- width: 100%;
689
- border-radius: 5px;
690
- margin-left: 0;
691
- }
692
- .content {
693
- padding: 1em;
694
- }
695
- }