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

Version Description

Download this release

Release Info

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

Version 1.0.1

cmp-options.php ADDED
@@ -0,0 +1,954 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ $ajax_nonce = wp_create_nonce( 'cmp-coming-soon-ajax-secret' );
12
+ $title = stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!'));
13
+ $descr = stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page'));
14
+ $niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
15
+ $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
16
+ $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
17
+ $niteoCS_unsplash_id = get_option('niteoCS_unsplash_id', '');
18
+ $logo_id = get_option('niteoCS_logo_id');
19
+
20
+ if ( $logo_id != '' ) {
21
+ $logo_url = wp_get_attachment_image_src($logo_id, 'medium');
22
+ if ( isset($logo_url[0]) ){
23
+ $logo_url = $logo_url[0];
24
+ }
25
+ }
26
+
27
+ $niteoCS_banner = get_option('niteoCS_banner', '0');
28
+ $banner_id = get_option('niteoCS_banner_id');
29
+ $unsplash_feed = get_option('niteoCS_unsplash_feed', '0');
30
+ $niteoCS_unsplash_0 = get_option('niteoCS_unsplash_0');
31
+ $niteoCS_unsplash_2 = get_option('niteoCS_unsplash_2');
32
+ $niteoCS_unsplash_3 = get_option('niteoCS_unsplash_3');
33
+ $unsplash_category = get_option('niteoCS_unsplash_category', 'buildings');
34
+ $niteoCS_cat_keyword = get_option('niteoCS_cat_keyword');
35
+ $niteoCS_soc_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
36
+ $niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '0');
37
+ $subscriber_list = get_option('niteoCS_subscribers_list');
38
+ $niteoCS_csv_export_time = get_option('niteoCS_csv_export_time');
39
+ $niteoCS_font_content = get_option('niteoCS_font_content', 'Average Sans');
40
+ $niteoCS_font_headings = get_option('niteoCS_font_headings', 'Fjalla One');
41
+ $niteoCS_font_content_custom = get_option('niteoCS_font_content_custom');
42
+ $niteoCS_font_headings_custom = get_option('niteoCS_font_headings_custom');
43
+ $niteoCS_body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
44
+ $body = get_option('niteoCS_body');
45
+ $niteoCS_copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
46
+
47
+
48
+ $new_subs = array();
49
+
50
+ if ( $subscriber_list ) {
51
+ foreach ($subscriber_list as $subscriber) {
52
+
53
+ if ( $subscriber['timestamp'] > $niteoCS_csv_export_time )
54
+ array_push($new_subs, $subscriber['email']);
55
+ }
56
+ $new_subs = count($new_subs);
57
+ } else {
58
+ $new_subs = '0';
59
+ }
60
+
61
+ $social_media = array('facebook', 'google-plus', 'twitter', 'instagram', 'skype', '500px', 'deviantart', 'behance', 'dribbble', 'pinterest', 'linkedin', 'tumblr', 'youtube', 'vimeo', 'flickr', 'vk','envelope-o');
62
+ $premium = $this->cmp_plugin_premium();
63
+
64
+ if (isset($_POST['niteoCS_logo_id']) && ( is_numeric($_POST['niteoCS_logo_id']) || empty($_POST['niteoCS_logo_id']))) {
65
+ update_option('niteoCS_logo_id', sanitize_text_field($_POST['niteoCS_logo_id']));
66
+ $logo_id = get_option('niteoCS_logo_id');
67
+ if ( $logo_id != '' ) {
68
+ $logo_url = wp_get_attachment_image_src($logo_id, 'medium');
69
+ if ( isset($logo_url[0]) ){
70
+ $logo_url = $logo_url[0];
71
+ }
72
+ }
73
+ }
74
+
75
+ if (isset($_POST['niteoCS_banner']) && is_numeric($_POST['niteoCS_banner'])) {
76
+ update_option('niteoCS_banner', sanitize_text_field($_POST['niteoCS_banner']));
77
+ $niteoCS_banner = get_option('niteoCS_banner');
78
+ }
79
+
80
+ if (isset($_POST['niteoCS_banner_id'])) {
81
+ $allnums = true;
82
+
83
+ $ids = explode( ',', $_POST['niteoCS_banner_id'] );
84
+ foreach ( $ids as $id ) {
85
+
86
+ if ( !is_numeric($id) ) {
87
+ $allnums = false;
88
+ }
89
+ }
90
+
91
+ if ( $allnums === true || $_POST['niteoCS_banner_id'] == '' ) {
92
+ update_option('niteoCS_banner_id', sanitize_text_field($_POST['niteoCS_banner_id']));
93
+ $banner_id = get_option('niteoCS_banner_id');
94
+ }
95
+
96
+ }
97
+
98
+ if (isset($_POST['unsplash_feed']) && is_numeric($_POST['unsplash_feed'])) {
99
+ update_option('niteoCS_unsplash_feed', sanitize_text_field($_POST['unsplash_feed']));
100
+ $unsplash_feed = get_option('niteoCS_unsplash_feed');
101
+ }
102
+
103
+ if (isset($_POST['niteoCS_unsplash_0'])) {
104
+ $url = $_POST['niteoCS_unsplash_0'];
105
+ // if we have url sanitize url
106
+ if (strpos($url, 'http://') !== false || strpos($url, 'https://') !== false) {
107
+ update_option('niteoCS_unsplash_0', esc_url_raw($_POST['niteoCS_unsplash_0']));
108
+ } else {
109
+ // sanitize string
110
+ update_option('niteoCS_unsplash_0', sanitize_text_field($_POST['niteoCS_unsplash_0']));
111
+ }
112
+ $niteoCS_unsplash_0 = get_option('niteoCS_unsplash_0');
113
+ }
114
+
115
+
116
+ if (isset($_POST['niteoCS_unsplash_2'])) {
117
+ $url = $_POST['niteoCS_unsplash_2'];
118
+ // if we have url sanitize url
119
+ if (strpos($url, 'http://') !== false || strpos($url, 'https://') !== false) {
120
+ update_option('niteoCS_unsplash_2', esc_url_raw($_POST['niteoCS_unsplash_2']));
121
+ } else {
122
+ // sanitize string
123
+ update_option('niteoCS_unsplash_2', sanitize_text_field($_POST['niteoCS_unsplash_2']));
124
+ }
125
+ $niteoCS_unsplash_2 = get_option('niteoCS_unsplash_2');
126
+ }
127
+
128
+ if (isset($_POST['niteoCS_unsplash_3'])) {
129
+ update_option('niteoCS_unsplash_3', sanitize_text_field($_POST['niteoCS_unsplash_3']));
130
+ $niteoCS_unsplash_3 = get_option('niteoCS_unsplash_3');
131
+ }
132
+
133
+ if (isset($_POST['unsplash_category'])) {
134
+ update_option('niteoCS_unsplash_category', sanitize_text_field($_POST['unsplash_category']));
135
+ $unsplash_category = get_option('niteoCS_unsplash_category');
136
+ }
137
+ if (isset($_POST['niteoCS_cat_keyword'])) {
138
+ update_option('niteoCS_cat_keyword', sanitize_text_field($_POST['niteoCS_cat_keyword']));
139
+ $niteoCS_cat_keyword = get_option('niteoCS_cat_keyword');
140
+ }
141
+
142
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
143
+
144
+ if (isset($_POST['niteoCS_unsplash_feat'])) {
145
+ update_option('niteoCS_unsplash_feat', $this->sanitize_checkbox($_POST['niteoCS_unsplash_feat']));
146
+ } else {
147
+ update_option('niteoCS_unsplash_feat', false);
148
+ }
149
+
150
+ }
151
+
152
+
153
+ if (isset($_POST['niteoCS_title'])) {
154
+ update_option('niteoCS_title', sanitize_text_field($_POST['niteoCS_title']));
155
+ $title = get_option('niteoCS_title');
156
+ }
157
+
158
+ if (isset($_POST['niteoCS_descr'])) {
159
+ update_option('niteoCS_descr', sanitize_text_field($_POST['niteoCS_descr']));
160
+ $descr = get_option('niteoCS_descr');
161
+ }
162
+
163
+ if (isset($_POST['niteoCS_analytics'])) {
164
+ update_option('niteoCS_analytics', sanitize_text_field($_POST['niteoCS_analytics']));
165
+ $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics'));
166
+ }
167
+
168
+ if (isset($_POST['niteoCS_custom_css'])) {
169
+ update_option('niteoCS_custom_css', $_POST['niteoCS_custom_css']);
170
+ $niteoCS_custom_css = stripslashes(wp_filter_nohtml_kses(get_option('niteoCS_custom_css')));
171
+ }
172
+
173
+ if ( isset($_POST['select_theme']) && in_array($_POST['select_theme'], $theme_array)) {
174
+ update_option('niteoCS_theme', sanitize_text_field($_POST['select_theme']));
175
+ $selectedTheme = $_POST['select_theme'];
176
+ }
177
+
178
+ if (isset($_POST['niteoCS_subscribe_type']) && is_numeric($_POST['niteoCS_subscribe_type'])) {
179
+ update_option('niteoCS_subscribe_type', sanitize_text_field($_POST['niteoCS_subscribe_type']));
180
+ $niteoCS_subscribe_type= stripslashes(get_option('niteoCS_subscribe_type'));
181
+ }
182
+
183
+
184
+ if (isset($_POST['niteoCS_font_headings'])) {
185
+ update_option('niteoCS_font_headings', sanitize_text_field($_POST['niteoCS_font_headings']));
186
+ $niteoCS_font_headings = get_option('niteoCS_font_headings');
187
+ }
188
+
189
+ if (isset($_POST['niteoCS_font_content'])) {
190
+ update_option('niteoCS_font_content', sanitize_text_field($_POST['niteoCS_font_content']));
191
+ $niteoCS_font_content = get_option('niteoCS_font_content');
192
+ }
193
+
194
+ if (isset($_POST['niteoCS_font_headings_custom'])) {
195
+ update_option('niteoCS_font_headings_custom', ucwords( sanitize_text_field($_POST['niteoCS_font_headings_custom']) ) );
196
+ $niteoCS_font_headings_custom = get_option('niteoCS_font_headings_custom');
197
+ }
198
+
199
+ if (isset($_POST['niteoCS_font_content_custom'])) {
200
+ update_option('niteoCS_font_content_custom', ucwords( sanitize_text_field($_POST['niteoCS_font_content_custom']) ) );
201
+ $niteoCS_font_content_custom = get_option('niteoCS_font_content_custom');
202
+ }
203
+
204
+
205
+ if (isset($_POST['niteoCS_soc_title'])) {
206
+ update_option('niteoCS_soc_title', sanitize_text_field($_POST['niteoCS_soc_title']));
207
+ $niteoCS_soc_title = get_option('niteoCS_soc_title');
208
+ }
209
+
210
+ foreach ( $social_media as $social ) {
211
+ if (isset($_POST['niteoCS_'.$social]) && $social !== 'envelope-o') {
212
+ update_option('niteoCS_'.$social, esc_url_raw($_POST['niteoCS_'.$social]));
213
+ }
214
+
215
+ if (isset($_POST['niteoCS_'.$social]) && $social == 'envelope-o' && is_email($_POST['niteoCS_'.$social])) {
216
+ update_option('niteoCS_'.$social, $_POST['niteoCS_'.$social]);
217
+ }
218
+ }
219
+
220
+ if ( isset($_POST['niteoCS_subscribe_code']) ) {
221
+ $shortcode = str_replace('"', '\'', $_POST['niteoCS_subscribe_code']);
222
+ update_option('niteoCS_subscribe_code', sanitize_text_field($shortcode));
223
+ $niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
224
+ }
225
+
226
+ if (isset($_POST['niteoCS_body_title'])) {
227
+ update_option('niteoCS_body_title', sanitize_text_field($_POST['niteoCS_body_title']));
228
+ $niteoCS_body_title = get_option('niteoCS_body_title');
229
+ }
230
+
231
+ if (isset($_POST['niteoCS_body'])) {
232
+ update_option('niteoCS_body', $this->niteo_sanitize_html( $_POST['niteoCS_body']));
233
+ $body = get_option('niteoCS_body');
234
+ }
235
+
236
+
237
+ if (isset($_POST['niteoCS_copyright'])) {
238
+ update_option('niteoCS_copyright', $this->niteo_sanitize_html( $_POST['niteoCS_copyright']));
239
+ $niteoCS_copyright = get_option('niteoCS_copyright');
240
+ }
241
+
242
+
243
+ // Handle ZIP UPLOAD
244
+
245
+ if( isset($_POST['submit_theme']) ) {
246
+
247
+ // allow zip file to upload
248
+ add_filter('upload_mimes', array($this, 'niteo_allow_zip_mime'));
249
+
250
+ // load PHP WP FILE
251
+ if ( ! function_exists( 'wp_handle_upload' ) ) {
252
+ require realpath('../../../wp-admin/includes/file.php');
253
+ }
254
+
255
+ $uploadedfile = $_FILES['fileToUpload'];
256
+ $filename = $uploadedfile['name'];
257
+ /* You can use wp_check_filetype() function to check the
258
+ file type and go on wit the upload or stop it.*/
259
+ $filetype = wp_check_filetype( $filename );
260
+
261
+ if ( $filetype['ext'] == 'zip' ) {
262
+
263
+
264
+ // Upload file
265
+ $movefile = wp_handle_upload( $uploadedfile, array('test_form' => FALSE) );
266
+
267
+ if ( $movefile && !isset( $movefile['error'] ) ) {
268
+
269
+ WP_Filesystem();
270
+ $source_path = $movefile['file'];
271
+ $theme_name = str_replace('.zip', '', $filename);
272
+ $destination_path = glob( plugin_dir_path( __FILE__ ) . 'themes/' );
273
+ if (isset($destination_path[0])) {
274
+ $destination_path = $destination_path[0];
275
+ }
276
+
277
+ // create new theme DIR
278
+ if ( wp_mkdir_p( $destination_path ) ) {
279
+ // Unzip FILE into that DIR
280
+ $unzipfile = unzip_file( $source_path, $destination_path);
281
+
282
+ if ( $unzipfile ) {
283
+ // delete FILE
284
+ wp_delete_file( $source_path );
285
+ array_push( $theme_array, $theme_name );
286
+ _e('<p class="comingsoon-success">Successfully installed new Theme!</p>', 'cmp');
287
+
288
+ } else {
289
+ _e('<p class="comingsoon-error">There was an error unzipping the file!</p>', 'cmp');
290
+ }
291
+
292
+ } else {
293
+ _e('<p class="comingsoon-error">Error creating Theme subdirectory!</p>', 'cmp');
294
+ }
295
+
296
+ } else {
297
+ /**
298
+ * Error generated by _wp_handle_upload()
299
+ * @see _wp_handle_upload() in wp-admin/includes/file.php
300
+ */
301
+ echo $movefile['error'];
302
+ }
303
+ } else {
304
+ echo '<p class="comingsoon-error">Unable to upload new Theme file. '. strtoupper($filetype['ext']) . ' file extension is not supported. Please upload ZIP file containing Niteo Coming Soon Theme.</p>';
305
+ }
306
+
307
+ add_filter('upload_mimes', array($this, 'niteo_remove_zip_mime'));
308
+
309
+ }
310
+
311
+
312
+ add_thickbox();
313
+
314
+ ?>
315
+ <noscript>
316
+ <div class='updated'>
317
+ <p class="error"><?php _e('JavaScript appears to be disabled in your browser. For this plugin to work correctly, please enable JavaScript or switch to a more modern browser.', 'cmp');?></p>
318
+ </div>
319
+ <style>
320
+ .themes{display: :none;}
321
+ </style>
322
+ </noscript>
323
+
324
+ <div class="wrap">
325
+
326
+ <div id="icon-options-general" class="icon32">
327
+ <br />
328
+ </div>
329
+ <form method="post" action="options-general.php?page=cmp-settings" id="csoptions">
330
+
331
+ <h2 class="nav-tab-wrapper">
332
+ <a class="nav-tab nav-tab-active settings" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="settings"><i class="fa fa-cog" aria-hidden="true"></i><?php _e('Settings', 'cmp');?></a>
333
+ <a class="nav-tab customization" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="customization"><i class="fa fa-wrench" aria-hidden="true"></i><?php _e('Content', 'cmp');?></a>
334
+ <a class="nav-tab seo" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="seo"><i class="fa fa-users" aria-hidden="true"></i><?php _e('SEO', 'cmp');?></a>
335
+ <a class="nav-tab custom_css" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="custom_css"><i class="fa fa-code" aria-hidden="true"></i><?php _e('Custom CSS', 'cmp');?></a>
336
+ <a class="nav-tab theme-preview" href="<?php echo get_home_url(); ?>?cmp_preview=true" data-tab="theme-preview" target="_blank" ><i class="fa fa-external-link" aria-hidden="true"></i><?php _e('Preview', 'cmp');?></a>
337
+ <a class="nav-tab install" href="<?php echo admin_url(); ?>options-general.php?page=cmp-settings" data-tab="install"><i class="fa fa-plus" aria-hidden="true"></i><?php _e('Install New Theme', 'cmp');?></a>
338
+ </h2>
339
+
340
+ <div class="table-wrapper settings">
341
+ <h3><?php _e('General Settings', 'cmp');?></h3>
342
+ <table class="settings">
343
+ <tr>
344
+ <th><h4><?php _e('Status', 'cmp');?></h4></th>
345
+ <td>
346
+ <fieldset>
347
+ <legend class="screen-reader-text">
348
+ <span><?php _e('Status', 'cmp');?></span>
349
+ </legend>
350
+ <label title="disabled">
351
+ <input type="radio" name="activate" value="0"<?php if ($this->cmp_status() == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp');?>
352
+ <p class="info"><?php _e('Disable plugin and display standard WordPress page to all users and indexing engines.','cmp')?></p>
353
+ </label><br />
354
+ <label title="maintanance">
355
+ <input type="radio" name="activate" value="1"<?php if ($this->cmp_status() == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Maintanance Mode', 'cmp');?>
356
+ <p class="info"><?php _e('Returns 503 HTTP Service unavailable code to indexing robots. Set this option if your site is down due to maintanance and you want to display Maintanance page.','cmp')?></p>
357
+ </label><br />
358
+ <label title="comingsoon">
359
+ <input type="radio" name="activate" value="2"<?php if ($this->cmp_status() == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Coming Soon', 'cmp');?>
360
+ <p class="info"><?php _e('Returns standard 200 HTTP OK response code to indexing robots. Set this option if you want to use our plugin as "Coming Soon" page.','cmp')?></p>
361
+ </label>
362
+ </fieldset>
363
+ </td>
364
+ </tr>
365
+ </table>
366
+ </div>
367
+ <div class="table-wrapper settings">
368
+ <h3><?php _e('Select Theme', 'cmp');?></h3>
369
+ <table class="settings">
370
+ <tr>
371
+ <th><h4><?php _e('Free Themes', 'cmp');?></h4></th>
372
+ <td class="theme-selector">
373
+ <fieldset>
374
+ <legend class="screen-reader-text">
375
+ <span><?php _e('Free Themes', 'cmp');?> </span>
376
+ </legend>
377
+ <?php
378
+ $i = 0;
379
+ foreach ( $theme_array as $theme ) {
380
+
381
+ if ( !$this->niteo_in_array_r( $theme, $premium ) ) { ?>
382
+ <div class="thumbnail-holder">
383
+ <label title="<?php echo esc_attr($theme);?>">
384
+ <img src="<?php echo esc_url( plugins_url().'/'.$this->installedFolder.'\/themes/'. $theme . '/img/'. $theme . '_thumbnail.jpg' );?>" alt="<?php echo esc_attr($theme);?>">
385
+ <input type="radio" name="select_theme" value="<?php echo esc_attr($theme);?>" id="displayOption-<?php echo esc_attr($theme);?>"<?php if ( $this->cmp_selectedTheme() == $theme ) { echo ' checked="checked"'; } ?>>&nbsp;<?php echo ucwords(esc_html($theme));?>
386
+ </label>
387
+ </div>
388
+ <?php
389
+ }
390
+ $i++;
391
+ } ?>
392
+ </fieldset>
393
+ </td>
394
+ </tr>
395
+
396
+ <?php
397
+ if ( !empty($premium) ) { ?>
398
+ <tr>
399
+ <th><h4><?php _e('Premium Themes', 'cmp');?></h4></th>
400
+ <td class="theme-selector">
401
+ <fieldset>
402
+ <legend class="screen-reader-text">
403
+ <span><?php _e('Premium Themes', 'cmp');?> </span>
404
+ </legend>
405
+ <?php
406
+
407
+ foreach ( $premium as $premium_theme ) {
408
+ echo '<div class="thumbnail-holder">';
409
+ // if not in available themes array, display buy button
410
+ if ( !in_array( $premium_theme['name'], $theme_array) ) { ?>
411
+
412
+ <img src="<?php echo esc_url( plugins_url().'/'.$this->installedFolder.'\/premium/'. $premium_theme['name']. '.jpg' );?>" alt="<?php echo esc_attr($premium_theme['name']);?>">
413
+ <a class="button" href="<?php echo esc_url($premium_theme['url']);?>" target="_blank">Buy for <?php echo esc_html($premium_theme['price']);?> USD</a>
414
+
415
+ </div>
416
+ <?php
417
+ } else { ?>
418
+ <label title="<?php echo esc_attr($premium_theme['name']);?>">
419
+ <img src="<?php echo esc_url( plugins_url().'/'.$this->installedFolder.'\/themes/'. $premium_theme['name'] . '/img/'. $premium_theme['name'] . '-thumbnail.jpg' );?>" alt="<?php echo esc_attr($premium_theme['name']);?>">
420
+ <input type="radio" name="select_theme" value="<?php echo esc_attr($premium_theme['name']);?>" id="displayOption-<?php echo esc_attr($premium_theme['name']);?>"<?php if ( $this->cmp_selectedTheme() == $premium_theme['name'] ) { echo ' checked="checked"'; } ?>>&nbsp;<?php echo ucwords(esc_html($premium_theme['name']));?>
421
+ </label>
422
+ <?php
423
+ }
424
+ } ?>
425
+ </fieldset>
426
+ </td>
427
+ </tr>
428
+ <?php
429
+ } ?>
430
+ </table>
431
+ </div>
432
+
433
+ <div class="table-wrapper customization">
434
+ <h3><?php _e('Logo', 'cmp');?></h3>
435
+ <table class="customization">
436
+ <tr>
437
+ <th><h4><?php _e('Upload or select Logo', 'cmp');?></h4></th>
438
+ <td>
439
+ <fieldset>
440
+ <input type="hidden" class="widefat" id="niteoCS-logo-id" name="niteoCS_logo_id" type="text" value="<?php echo esc_attr( $logo_id ); ?>" />
441
+ <input id="add-logo" type="button" class="button" value="Select Logo" />
442
+
443
+ <div class="logo-wrapper">
444
+ <?php
445
+ if ( $logo_url !== '' ) {
446
+ echo '<img src="'.esc_url($logo_url).'" alt="">';
447
+ } ?>
448
+ </div>
449
+ <input id="delete-logo" type="button" class="button" value="Remove Logo" />
450
+
451
+ </fieldset>
452
+ </td>
453
+ </tr>
454
+ </table>
455
+ </div>
456
+
457
+ <div class="table-wrapper customization">
458
+ <h3><?php _e('Graphic Banner', 'cmp');?></h3>
459
+ <table class="customization">
460
+ <tr>
461
+ <th>
462
+ <fieldset>
463
+ <legend class="screen-reader-text">
464
+ <span><?php _e('Banner Settings', 'cmp');?></span>
465
+ </legend>
466
+
467
+ <p>
468
+ <label title="Custom Media">
469
+ <input type="radio" name="niteoCS_banner" value="0"<?php if ( $niteoCS_banner == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Custom Media', 'cmp');?>
470
+ </label>
471
+ </p>
472
+
473
+ <p>
474
+ <label title="Unsplash Media">
475
+ <input type="radio" name="niteoCS_banner" value="1"<?php if ( $niteoCS_banner == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Unsplash library', 'cmp');?>
476
+ </label>
477
+ </p>
478
+
479
+ <p>
480
+ <label title="Default Banner">
481
+ <input type="radio" name="niteoCS_banner" value="2"<?php if ( $niteoCS_banner == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Default Media', 'cmp');?>
482
+ </label>
483
+ </p>
484
+
485
+ </fieldset>
486
+ </th>
487
+
488
+ <td>
489
+
490
+ <fieldset id="custom_banner">
491
+ <input type="hidden" class="widefat" id="niteoCS-banner-id" name="niteoCS_banner_id" type="text" value="<?php echo esc_attr( $banner_id ); ?>" />
492
+ <input id="add-banner" type="button" class="button" value="Media Library" />
493
+ <p class="info"><?php _e('Pro Tip! You can select multiple Media from your library by holding CTRL+click (Command+click if you sit on MacOS) while selecting photos.','cmp')?></p>
494
+ <div class="banner-wrapper">
495
+ <?php
496
+ if ( isset( $banner_id ) && $banner_id != '' ) {
497
+ $ids = explode( ',', $banner_id );
498
+ foreach ( $ids as $id ) {
499
+ $img = wp_get_attachment_image_src($id, 'large');
500
+ if (isset($img[0])) {
501
+ echo '<img src="'.$img[0].'" alt="">';
502
+ }
503
+ }
504
+ }
505
+ ?>
506
+ </div>
507
+ <input id="delete-banner" type="button" class="button" value="Remove Media" />
508
+ </fieldset>
509
+
510
+ <fieldset id="unsplash_banner">
511
+ <label for="unsplash_feed"><?php _e('Choose Unsplash Feed', 'cmp');?></label></br>
512
+ <select name="unsplash_feed">
513
+ <option value="0" <?php if ( $unsplash_feed == '0' ) { echo ' selected="selected"'; } ?>><?php _e('Specific Photo', 'cmp');?></option>
514
+ <option value="1" <?php if ( $unsplash_feed == '1' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Category', 'cmp');?></option>
515
+ <option value="2" <?php if ( $unsplash_feed == '2' ) { echo ' selected="selected"'; } ?>><?php _e('Random from Collection', 'cmp');?></option>
516
+ <option value="3" <?php if ( $unsplash_feed == '3' ) { echo ' selected="selected"'; } ?>><?php _e('Random Photo', 'cmp');?></option>
517
+ </select>
518
+
519
+ <p class="unsplash-feed" id="unsplash-feed-0">
520
+ <label for="niteoCS_unsplash_0"><?php _e('Enter Unsplash Photo URL or Photo ID', 'cmp');?></label>
521
+ <input type="text" class="widefat" id="niteoCS-unsplash-0" name="niteoCS_unsplash_0" type="text" value="<?php echo esc_attr($niteoCS_unsplash_0); ?>" />
522
+ </p>
523
+
524
+ <p class="unsplash-feed" id="unsplash-feed-1">
525
+ <label for="unsplash_category"><?php _e('Select Category', 'cmp');?></label></br>
526
+ <select name="unsplash_category">
527
+ <option value="buildings" <?php if ( $unsplash_category == 'buildings') { echo ' selected="selected"'; } ?>><?php _e('Buildings', 'cmp');?></option>
528
+ <option value="food" <?php if ( $unsplash_category == 'food') { echo ' selected="selected"'; } ?>><?php _e('Food', 'cmp');?></option>
529
+ <option value="nature" <?php if ( $unsplash_category == 'nature') { echo ' selected="selected"'; } ?>><?php _e('Nature', 'cmp');?></option>
530
+ <option value="people" <?php if ( $unsplash_category == 'people') { echo ' selected="selected"'; } ?>><?php _e('People', 'cmp');?></option>
531
+ <option value="technology" <?php if ( $unsplash_category == 'technology') { echo ' selected="selected"'; } ?>><?php _e('Technology', 'cmp');?></option>
532
+ <option value="objects" <?php if ( $unsplash_category == 'objects') { echo ' selected="selected"'; } ?>><?php _e('Objects', 'cmp');?></option>
533
+ </select></br>
534
+
535
+ <label for="niteoCS_cat_keyword"><?php _e('You can limit Category to Specific Keyword', 'cmp');?></label>
536
+ <input type="text" class="widefat" id="niteoCS-category-keyword" name="niteoCS_cat_keyword" type="text" value="<?php echo esc_attr($niteoCS_cat_keyword); ?>" />
537
+ </p>
538
+
539
+ <p class="unsplash-feed" id="unsplash-feed-2">
540
+ <label for="niteoCS_unsplash_2"><?php _e('Enter Unsplash Collection URL or Collection ID. Doesn`t work for Curated Collections.', 'cmp');?></label>
541
+ <input type="text" class="widefat" id="niteoCS-unsplash-2" name="niteoCS_unsplash_2" type="text" value="<?php echo esc_attr($niteoCS_unsplash_2); ?>" />
542
+ </p>
543
+
544
+ <p class="unsplash-feed" id="unsplash-feed-3">
545
+ <label for="niteoCS_unsplash_3"><?php _e('Specify search terms', 'cmp');?></label>
546
+ <input type="text" class="widefat" id="niteoCS-unsplash-3" name="niteoCS_unsplash_3" type="text" value="<?php echo esc_attr($niteoCS_unsplash_3); ?>" />
547
+
548
+ </br>
549
+ <input type="checkbox" name="niteoCS_unsplash_feat" id="niteoCS_unsplash_feat" value="1" <?php checked( '1', get_option( 'niteoCS_unsplash_feat', '0' ) ); ?> class="regular-text code"><label for="niteoCS_unsplash_feat"><?php _e('Limit search only to Featured/Curated Photos', 'cmp');?></label>
550
+ </p>
551
+
552
+ <button id="test-unsplash" class="button">Test Unsplash</button>
553
+ <div id="unsplash-media"></div>
554
+ </fieldset>
555
+
556
+ <fieldset id="default_banner">
557
+ <div class="banner-wrapper">
558
+ <img src="<?php echo esc_url( plugins_url().'/'.$this->installedFolder. '/themes/'.$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg');?>" alt="Default Media">
559
+ </div>
560
+ <input id="delete-banner" type="button" class="button" value="Remove Banner" />
561
+ </fieldset>
562
+ </td>
563
+ </tr>
564
+ </table>
565
+ </div>
566
+
567
+ <div class="table-wrapper customization">
568
+ <h3><?php _e('Customize Fonts', 'cmp');?></h3>
569
+ <table class="customization">
570
+
571
+ <tr>
572
+ <th><h4><?php _e('Headings Font', 'cmp');?></h4></th>
573
+ <td>
574
+ <fieldset>
575
+ <label for="niteoCS_font_headings"><?php _e('Select from predefined Google Fonts or insert Custom font', 'cmp');?></label></br>
576
+ <select name="niteoCS_font_headings">
577
+ <option value="Fjalla One" <?php if ( $niteoCS_font_headings == 'Fjalla One' ) { echo ' selected="selected"'; } ?>>Fjalla One</option>
578
+ <option value="Average Sans" <?php if ( $niteoCS_font_headings == 'Average Sans' ) { echo ' selected="selected"'; } ?>>Average Sans</option>
579
+ <option value="Playfair Display" <?php if ( $niteoCS_font_headings == 'Playfair Display' ) { echo ' selected="selected"'; } ?>>Playfair Display</option>
580
+ <option value="Work Sans" <?php if ( $niteoCS_font_headings == 'Work Sans' ) { echo ' selected="selected"'; } ?>>Work Sans</option>
581
+ <option value="Rubik" <?php if ( $niteoCS_font_headings == 'Rubik' ) { echo ' selected="selected"'; } ?>>Rubik</option>
582
+ <option value="Libre Franklin" <?php if ( $niteoCS_font_headings == 'Libre Franklin' ) { echo ' selected="selected"'; } ?>>Libre Franklin</option>
583
+ <option value="Space Mono" <?php if ( $niteoCS_font_headings == 'Space Mono' ) { echo ' selected="selected"'; } ?>>Space Mono</option>
584
+ <option value="Fira Sans" <?php if ( $niteoCS_font_headings == 'Fira Sans' ) { echo ' selected="selected"'; } ?>>Fira Sans</option>
585
+ <option value="Eczar" <?php if ( $niteoCS_font_headings == 'Eczar' ) { echo ' selected="selected"'; } ?>>Eczar</option>
586
+ <option value="Alegreya Sans" <?php if ( $niteoCS_font_headings == 'Alegreya Sans' ) { echo ' selected="selected"'; } ?>>Alegreya Sans</option>
587
+ <option value="Chivo" <?php if ( $niteoCS_font_headings == 'Chivo' ) { echo ' selected="selected"'; } ?>>Chivo</option>
588
+ <option value="Lora" <?php if ( $niteoCS_font_headings == 'Lora' ) { echo ' selected="selected"'; } ?>>Lora</option>
589
+ <option value="Source Sans Pro" <?php if ( $niteoCS_font_headings == 'Source Sans Pro' ) { echo ' selected="selected"'; } ?>>Source Sans Pro</option>
590
+ <option value="Source Serif Pro" <?php if ( $niteoCS_font_headings == 'Source Serif Pro' ) { echo ' selected="selected"'; } ?>>Source Serif Pro</option>
591
+ <option value="Roboto Slab" <?php if ( $niteoCS_font_headings == 'Roboto Slab' ) { echo ' selected="selected"'; } ?>>Roboto Slab</option>
592
+ <option value="Raleway" <?php if ( $niteoCS_font_headings == 'Raleway' ) { echo ' selected="selected"'; } ?>>Raleway</option>
593
+ <option value="custom" <?php if ( $niteoCS_font_headings == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom font...', 'cmp');?></option>
594
+ </select><br>
595
+ </fieldset>
596
+ <fieldset id="custom_headings_font" <?php if ( $niteoCS_font_headings == 'custom' ) { echo 'style="display:block"'; } ?>>
597
+ <label for="niteoCS_font_headings_custom"><?php _e('Enter name of ', 'cmp');?><a href="https://fonts.google.com/" target="_blank">Google font</a></label>
598
+ <input type="text" name="niteoCS_font_headings_custom" id="niteoCS_font_headings_custom" value="<?php echo esc_attr( $niteoCS_font_headings_custom); ?>" class="regular-text code">
599
+ </fieldset>
600
+
601
+ </td>
602
+ </tr>
603
+
604
+ <tr>
605
+ <th><h4><?php _e('Content Font', 'cmp');?></h4></th>
606
+ <td>
607
+ <fieldset>
608
+ <label for="niteoCS_font_content"><?php _e('Select from predefined Google Fonts or insert Custom font', 'cmp');?></label></br>
609
+ <select name="niteoCS_font_content">
610
+ <option value="Fjalla One" <?php if ( $niteoCS_font_content == 'Fjalla One' ) { echo ' selected="selected"'; } ?>>Fjalla One</option>
611
+ <option value="Average Sans" <?php if ( $niteoCS_font_content == 'Average Sans' ) { echo ' selected="selected"'; } ?>>Average Sans</option>
612
+ <option value="Playfair Display" <?php if ( $niteoCS_font_content == 'Playfair Display' ) { echo ' selected="selected"'; } ?>>Playfair Display</option>
613
+ <option value="Work Sans" <?php if ( $niteoCS_font_content == 'Work Sans' ) { echo ' selected="selected"'; } ?>>Work Sans</option>
614
+ <option value="Rubik" <?php if ( $niteoCS_font_content == 'Rubik' ) { echo ' selected="selected"'; } ?>>Rubik</option>
615
+ <option value="Libre Franklin" <?php if ( $niteoCS_font_content == 'Libre Franklin' ) { echo ' selected="selected"'; } ?>>Libre Franklin</option>
616
+ <option value="Space Mono" <?php if ( $niteoCS_font_content == 'Space Mono' ) { echo ' selected="selected"'; } ?>>Space Mono</option>
617
+ <option value="Fira Sans" <?php if ( $niteoCS_font_content == 'Fira Sans' ) { echo ' selected="selected"'; } ?>>Fira Sans</option>
618
+ <option value="Eczar" <?php if ( $niteoCS_font_content == 'Eczar' ) { echo ' selected="selected"'; } ?>>Eczar</option>
619
+ <option value="Alegreya Sans" <?php if ( $niteoCS_font_content == 'Alegreya Sans' ) { echo ' selected="selected"'; } ?>>Alegreya Sans</option>
620
+ <option value="Chivo" <?php if ( $niteoCS_font_content == 'Chivo' ) { echo ' selected="selected"'; } ?>>Chivo</option>
621
+ <option value="Lora" <?php if ( $niteoCS_font_content == 'Lora' ) { echo ' selected="selected"'; } ?>>Lora</option>
622
+ <option value="Source Sans Pro" <?php if ( $niteoCS_font_content == 'Source Sans Pro' ) { echo ' selected="selected"'; } ?>>Source Sans Pro</option>
623
+ <option value="Source Serif Pro" <?php if ( $niteoCS_font_content == 'Source Serif Pro' ) { echo ' selected="selected"'; } ?>>Source Serif Pro</option>
624
+ <option value="Roboto Slab" <?php if ( $niteoCS_font_content == 'Roboto Slab' ) { echo ' selected="selected"'; } ?>>Roboto Slab</option>
625
+ <option value="Raleway" <?php if ( $niteoCS_font_content == 'Raleway' ) { echo ' selected="selected"'; } ?>>Raleway</option>
626
+ <option value="custom" <?php if ( $niteoCS_font_content == 'custom' ) { echo ' selected="selected"'; } ?>><?php _e('Custom Font...', 'cmp');?></option>
627
+ </select><br>
628
+ </fieldset>
629
+
630
+ <fieldset id="custom_content_font" <?php if ( $niteoCS_font_content == 'custom' ) { echo 'style="display:block"'; } ?>>
631
+ <label for="niteoCS_font_content_custom"><?php _e('Enter name of ', 'cmp');?><a href="https://fonts.google.com/" target="_blank">Google font</a></label>
632
+ <input type="text" name="niteoCS_font_content_custom" id="niteoCS_font_content_custom" value="<?php echo esc_attr( $niteoCS_font_content_custom); ?>" class="regular-text code">
633
+ </fieldset>
634
+
635
+ <span>Fonts preview</span>
636
+ <div id="font-example-wrapper">
637
+ <h3 id="heading-example">Hello, I am your Headings font!</h3>
638
+ <p id="content-example">And this is a long paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
639
+ </div>
640
+
641
+ </td>
642
+
643
+ </tr>
644
+ </table>
645
+ </div>
646
+
647
+ <div class="table-wrapper customization">
648
+ <h3><?php _e('Content', 'comingSoon');?></h3>
649
+ <table class="customization">
650
+ <tr>
651
+ <th><h4><?php _e('Body Title', 'comingSoon');?></h4></th>
652
+ <td>
653
+ <fieldset>
654
+ <input type="text" name="niteoCS_body_title" id="niteoCS_body_title" value="<?php echo stripslashes(esc_attr( $niteoCS_body_title)); ?>" class="regular-text code">
655
+ </fieldset>
656
+ </td>
657
+ </tr>
658
+
659
+ <tr>
660
+ <th><h4><?php _e('Body Message', 'comingSoon');?></h4></th>
661
+ <td>
662
+ <?php wp_editor( stripslashes( $this->niteo_sanitize_html( $body ) ), 'niteoCS_body', $settings = array('textarea_name'=>'niteoCS_body', 'editor_height'=>'300') ); ?>
663
+ </td>
664
+ </tr>
665
+
666
+ </table>
667
+ </div>
668
+
669
+ <?php
670
+ // include theme related settings
671
+ include ( 'themes/'.$selectedTheme.'/'.$selectedTheme.'-settings.php' );
672
+ ?>
673
+
674
+ <div class="table-wrapper customization" id="subscribe-section">
675
+ <h3><?php _e('Subscribe Form', 'cmp');?></h3>
676
+ <table class="customization">
677
+ <tr>
678
+ <th>
679
+ <fieldset>
680
+ <legend class="screen-reader-text">
681
+ <span><?php _e('Subscribe Form Options', 'cmp');?></span>
682
+ </legend>
683
+
684
+ <p>
685
+ <label title="Disabled">
686
+ <input type="radio" name="niteoCS_subscribe_type" value="0"<?php if ( $niteoCS_subscribe_type == 0) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Disabled', 'cmp');?>
687
+ </label>
688
+ </p>
689
+
690
+ <p>
691
+ <label title="3rd Party Plugin">
692
+ <input type="radio" name="niteoCS_subscribe_type" value="1"<?php if ( $niteoCS_subscribe_type == 1) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('3rd Party Plugin', 'cmp');?>
693
+ </label>
694
+ </p>
695
+
696
+ <p>
697
+ <label title="Niteo Subscribe">
698
+ <input type="radio" name="niteoCS_subscribe_type" value="2"<?php if ( $niteoCS_subscribe_type == 2) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Niteo Subscribe', 'cmp');?>
699
+ </label>
700
+ </p>
701
+
702
+ </fieldset>
703
+ </th>
704
+
705
+ <td id="subscribe-disabled">
706
+ <p><?php _e('Subscribe Form is disabled.', 'cmp');?></p>
707
+ </td>
708
+
709
+ <td id="subscribe-3rdparty">
710
+ <fieldset>
711
+ <label class="subscribe" for="niteoCS_subscribe_code">3rd Party Plugin Shortcode
712
+ <input type="text" name="niteoCS_subscribe_code" id="niteoCS_subscribe_code" value="<?php echo stripslashes( esc_attr($niteoCS_subscribe_code ));?>" class="regular-text code">
713
+ </label>
714
+
715
+ <p><?php _e('You can find Shortode in your Contact Form Plugin settings. Should be something like: ', 'cmp');?><br><code>[contact-form-7 id="8" title='Contact form 1']</code></p>
716
+
717
+ <p><?php _e('Your Subscribe Form should have only one input (type=email) and submit (input=submit). If you have more than one input field, our design will not work and you need to use custom CSS to style your Subscribe form.', 'cmp');?></p>
718
+ <p><?php _e('Example of Subscribe Form code for ', 'cmp');?><a href="https://wordpress.org/plugins/mailchimp-for-wp/">MailChimp</a> plugin:</p>
719
+ <code>
720
+ &lt;p&gt
721
+ &lt;input type="email" name="EMAIL" placeholder="Your email address" required />
722
+ &lt;input type="submit" value="Sign up" />
723
+ &lt;/p&gt
724
+ </code>
725
+ </fieldset>
726
+ </td>
727
+
728
+ <td id="subscribe-niteo">
729
+ <fieldset>
730
+ <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 this plugin.', 'cmp');?></p>
731
+
732
+ <p><?php _e('Total Subscribers: ', 'cmp'); echo $subscriber_list ? count( $subscriber_list ) : '0';?></p>
733
+ <p><?php _e('Since last export: ', 'cmp'); echo $new_subs;?></p>
734
+ <p><?php _e('Last Export Date: ', 'cmp'); echo $niteoCS_csv_export_time ? gmdate('Y-m-d\ H:i:s\ ', $niteoCS_csv_export_time) : __('Never exported', 'cmp');?></p>
735
+ <a href="#" id="csv-generate" class="button">Generate CSV</a>
736
+
737
+ </fieldset>
738
+ </td>
739
+
740
+ </tr>
741
+ </table>
742
+ </div>
743
+
744
+ <div class="table-wrapper customization" id="social-section">
745
+ <h3><?php _e('Social Media', 'cmp');?></h3>
746
+ <table class="customization">
747
+
748
+ <tr>
749
+ <th><h4><?php _e('Social Section Title', 'cmp');?></h4></th>
750
+ <td>
751
+ <fieldset>
752
+ <input type="text" name="niteoCS_soc_title" id="niteoCS_soc_title" value="<?php echo esc_attr( $niteoCS_soc_title); ?>" class="regular-text code">
753
+ </fieldset>
754
+ </td>
755
+ </tr>
756
+
757
+ <tr>
758
+ <th><h4><?php _e('Social Media Icons', 'cmp');?></h4></th>
759
+ <td>
760
+ <ul class="social-media">
761
+ <?php
762
+ foreach ( $social_media as $social ) {
763
+ $social_active = '';
764
+ $social_field = get_option('niteoCS_'.$social);
765
+ if ($social_field && $social_field !== '' ) {
766
+ $social_active = 'active';
767
+ } ?>
768
+ <li>
769
+ <i class="fa fa-<?php echo $social . ' '. $social_active;?>" data-social="<?php echo esc_attr($social);?>" aria-hidden="true"></i>
770
+ </li>
771
+ <?php
772
+ } ?>
773
+ </ul>
774
+
775
+ <div class="social-inputs">
776
+ <?php
777
+ foreach ( $social_media as $social ) {
778
+ $social_active = '';
779
+ $social_field = get_option('niteoCS_'.$social);
780
+ if ($social_field && $social_field !== '' ) {
781
+ $social_active = 'active';
782
+ } ?>
783
+ <p>
784
+ <label for="niteoCS_<?php echo esc_attr($social);?>" class="<?php echo esc_attr($social . ' '. $social_active);?>"><?php echo ($social == 'envelope-o') ? 'Email' : esc_html( ucfirst( esc_attr($social ) ));?></label>
785
+ <input type="text" name="niteoCS_<?php echo esc_attr($social);?>" id="niteoCS_<?php echo esc_attr($social);?>" value="<?php echo esc_attr( $social_field ); ?>" class="regular-text code <?php echo esc_attr($social . ' '. $social_active);?>">
786
+ </p>
787
+ <?php
788
+ } ?>
789
+ </div>
790
+ </td>
791
+ </tr>
792
+ </table>
793
+ </div>
794
+
795
+ <div class="table-wrapper customization" id="copyright-section">
796
+ <h3><?php _e('Footer Content', 'comingSoon');?></h3>
797
+ <table class="customization">
798
+
799
+ <tr>
800
+ <th><h4><?php _e('Copyright', 'comingSoon');?></h4></th>
801
+ <td>
802
+ <fieldset>
803
+ <input type="text" name="niteoCS_copyright" id="niteoCS_copyright" value="<?php echo esc_attr( $this->niteo_sanitize_html($niteoCS_copyright)); ?>" class="regular-text code">
804
+ </fieldset>
805
+ </td>
806
+ </tr>
807
+ </table>
808
+ </div>
809
+
810
+
811
+ <div class="table-wrapper seo">
812
+ <h3><?php _e('SEO Settings', 'cmp');?></h3>
813
+ <table class="seo">
814
+
815
+ <tr>
816
+ <th><h4><?php _e('Header Title', 'cmp');?></h4></th>
817
+ <td>
818
+ <fieldset>
819
+ <input type="text" name="niteoCS_title" id="niteoCS_title" value="<?php echo esc_attr( $title); ?>" class="regular-text code">
820
+ </fieldset>
821
+ </td>
822
+ </tr>
823
+
824
+ <tr>
825
+ <th><h4><?php _e('Description', 'cmp');?></h4></th>
826
+ <td>
827
+ <fieldset>
828
+ <textarea name="niteoCS_descr" id="niteoCS_descr" class="code"><?php echo esc_attr( $descr); ?></textarea>
829
+ </fieldset>
830
+ </td>
831
+ </tr>
832
+ <tr>
833
+ <th><h4><?php _e('Google Analytics Tracking ID', 'cmp');?></h4></th>
834
+ <td>
835
+ <fieldset>
836
+ <input type="text" name="niteoCS_analytics" id="niteoCS_analytics" value="<?php echo esc_attr( $niteoCS_analytics); ?>" class="regular-text code">
837
+ </fieldset>
838
+ </td>
839
+ </tr>
840
+ </table>
841
+ </div>
842
+
843
+ <div class="table-wrapper custom_css">
844
+ <h3><?php _e('Enter Custom CSS', 'cmp');?></h3>
845
+ <table class="custom_css">
846
+ <tr>
847
+ <td>
848
+ <fieldset>
849
+ <textarea name="niteoCS_custom_css" rows="20" id="niteoCS_custom_css" class="code"><?php echo esc_attr($niteoCS_custom_css); ?></textarea>
850
+ </fieldset>
851
+ </td>
852
+ </tr>
853
+ </table>
854
+ </div>
855
+
856
+ <p class="submit">
857
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
858
+ <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes', 'cmp'); ?>" id="submitChanges" />
859
+ </p>
860
+
861
+ </form>
862
+
863
+ <div class="upload-plugin comingsoon install">
864
+ <form action="options-general.php?page=cmp-settings" class="wp-upload-form" method="post" enctype="multipart/form-data">
865
+ <table class="install">
866
+ <tr>
867
+ <td>
868
+ <h3><?php _e('Install New Coming Soon Theme', 'cmp');?></h3>
869
+ </td>
870
+ </tr>
871
+ <tr>
872
+ <td>
873
+ Select Coming Soon Theme to upload:
874
+ <input type="file" name="fileToUpload" id="fileToUpload">
875
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
876
+ <input type="submit" value="Install Theme" name="submit_theme">
877
+ </td>
878
+ </tr>
879
+ </table>
880
+
881
+ </form>
882
+ </div>
883
+
884
+ </div>
885
+
886
+ <script>
887
+ // test Unsplash
888
+ jQuery(document).ready(function($){
889
+ jQuery('#test-unsplash').click(function(e){
890
+ e.preventDefault();
891
+
892
+ var media_wrapper = jQuery('#unsplash-media');
893
+ var unsplash_feed = jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();
894
+ var unsp_url = '';
895
+ var cat = '';
896
+ var custom_str = '';
897
+
898
+ switch( unsplash_feed ) {
899
+ case '0':
900
+ unsp_url = jQuery('#niteoCS-unsplash-0').val();
901
+ break;
902
+
903
+ case '1':
904
+ unsp_url = jQuery('#niteoCS-unsplash-1').val();
905
+ cat = jQuery('#unsplash_banner select[name="unsplash_category"] option:selected').val();
906
+ custom_str = jQuery('#niteoCS-category-keyword').val();
907
+ break;
908
+
909
+ case '2':
910
+ unsp_url = jQuery('#niteoCS-unsplash-2').val();
911
+ break;
912
+
913
+ case '3':
914
+ unsp_url = jQuery('#niteoCS-unsplash-3').val();
915
+ if ( jQuery('#niteoCS_unsplash_feat' ).is( ':checked' ) ) {
916
+ cat = '1';
917
+ } else {
918
+ cat = '0';
919
+ }
920
+ break;
921
+
922
+ default:
923
+ // code block
924
+ }
925
+
926
+ var params = {feed: unsplash_feed, url: unsp_url, cat: cat, custom_str: custom_str, security: '<?php echo $ajax_nonce; ?>'};
927
+
928
+ jQuery(this).prop('disabled', true);
929
+ jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');
930
+ media_wrapper.html('');
931
+
932
+
933
+ var data = {
934
+ action: 'niteo_unsplash',
935
+ security: '<?php echo $ajax_nonce; ?>',
936
+ params: params
937
+ };
938
+
939
+ $.post(ajaxurl, data, function(response) {
940
+ jQuery('#unsplash_img').remove();
941
+ img_url = response.replace('WIDTHxHEIGHT', '400x225');
942
+ jQuery('<img />', {src: img_url, id: 'unsplash_img'}).
943
+
944
+ one('load', function() { //Set something to run when it finishes loading
945
+ jQuery(this).appendTo(media_wrapper);
946
+ jQuery(this).fadeIn();
947
+ jQuery('#test-unsplash').prop('disabled', false);
948
+ jQuery('#test-unsplash').text('Test Unsplash');
949
+ });
950
+ });
951
+
952
+ });
953
+ });
954
+ </script>
comingsoon.js ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($){
2
+
3
+ navtab = function(tab) {
4
+ jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');
5
+ jQuery('.nav-tab-wrapper .' + tab).addClass('nav-tab-active');
6
+
7
+ jQuery('.table-wrapper.' + tab).css('display', 'block');
8
+ jQuery('.table-wrapper:not(.' + tab + ')').css('display', 'none');
9
+ jQuery('.comingsoon.' + tab).css('display', 'block');
10
+ jQuery('.comingsoon:not(.' + tab + ')').css('display', 'none');
11
+ if ( tab == 'install' ) {
12
+ jQuery('.submit').css('display', 'none');
13
+ } else {
14
+ jQuery('.submit').css('display', 'block');
15
+ }
16
+ }
17
+
18
+ var tab = localStorage.getItem('sc_tab');
19
+
20
+ if (tab) {
21
+ navtab(tab);
22
+ }
23
+
24
+ $('.nav-tab:not(.theme-preview)').click(function(e) {
25
+ e.preventDefault();
26
+ tab = $(this).data('tab');
27
+ navtab(tab);
28
+ localStorage.setItem('sc_tab', tab );
29
+ });
30
+
31
+ // display selected unsplash feed
32
+ var unsplasfeed = jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();
33
+ jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
34
+
35
+ jQuery('#unsplash_banner select[name="unsplash_feed"]').on('change', function() {
36
+ unsplasfeed = jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();
37
+ jQuery('.unsplash-feed').css('display', 'none');
38
+ jQuery('#unsplash-feed-' + unsplasfeed).css('display', 'block');
39
+ })
40
+
41
+
42
+
43
+ // script for logo upload
44
+ var logoContainer = jQuery('.logo-wrapper');
45
+
46
+ if ( jQuery('#niteoCS-logo-id').val() != '' ) {
47
+ // Add Gallery Button To Change Gallery
48
+ jQuery('#add-logo').val( 'Change Logo' );
49
+ // Display Delete Gallery
50
+ jQuery('#delete-logo').css( 'display', 'block' );
51
+ }
52
+
53
+ jQuery('#add-logo').click(function(e) {
54
+ e.preventDefault();
55
+ // If the media frame already exists, reopen it.
56
+ if ( media_uploader ) {
57
+ media_uploader.open();
58
+ return;
59
+ }
60
+ var media_uploader = wp.media({
61
+ title: 'Select Logo',
62
+ button: {
63
+ text: 'Insert Logo'
64
+ },
65
+ multiple: false, // Set this to true to allow multiple files to be selected
66
+ type : 'image'
67
+ })
68
+ .on('select', function() {
69
+ // Get media attachment details from the frame state
70
+ var attachment = media_uploader.state().get('selection').first().toJSON();
71
+
72
+ jQuery('.logo-wrapper').empty();
73
+
74
+ // Send the attachment URL to our custom image input field.
75
+ logoContainer.append( '<img src="' + attachment.url + '" alt="" style="max-width:588px"/>' );
76
+ // Add Gallery Button To Change Gallery
77
+ jQuery('#add-logo').val( 'Change Logo' );
78
+ // Display Delete Gallery
79
+ jQuery('#delete-logo').css( 'display', 'block' );
80
+
81
+ jQuery('#niteoCS-logo-id').val( attachment.id );
82
+
83
+ })
84
+ .open();
85
+ });
86
+
87
+ jQuery('#delete-logo').click(function(e) {
88
+ jQuery('.logo-wrapper').empty();
89
+ jQuery('#add-logo').val( 'Select Logo' );
90
+ jQuery(this).css('display', 'none');
91
+ jQuery('#niteoCS-logo-id').val('');
92
+
93
+ });
94
+
95
+
96
+ // script for banner upload
97
+
98
+ if ( jQuery('#niteoCS-banner-id').val() != '' ) {
99
+ // Display Delete Gallery
100
+ jQuery('#delete-banner').css( 'display', 'block' );
101
+ }
102
+
103
+ jQuery('#add-banner').click(function(e) {
104
+ var bannerContainer = jQuery('.banner-wrapper');
105
+ e.preventDefault();
106
+ // If the media frame already exists, reopen it.
107
+ if ( media_uploader ) {
108
+ media_uploader.open();
109
+ return;
110
+ }
111
+ var media_uploader = wp.media({
112
+ title: 'Select Photos',
113
+ button: {
114
+ text: 'Insert Photos'
115
+ },
116
+ multiple: true, // Set this to true to allow multiple files to be selected
117
+ type : 'image'
118
+ })
119
+ .on('select', function() {
120
+ // Get media attachment details from the frame state
121
+ var attachment = media_uploader.state().get('selection').toJSON();
122
+ var imgID = '';
123
+ var imgURL = '';
124
+
125
+ if (attachment.length > 0) {
126
+
127
+ jQuery('.banner-wrapper').empty();
128
+
129
+ jQuery(attachment).each(function(i) {
130
+ // Send the attachment URL to our custom image input field.
131
+ bannerContainer.append( '<img src="' + attachment[i].url + '" alt="" style="max-width:588px;"/>' );
132
+ // Display Delete Gallery
133
+ jQuery('#delete-banner').css( 'display', 'block' );
134
+
135
+ // add image ID and url to comma-separated variable
136
+ var comma = i === 0 ? '' : ',';
137
+ imgID += ( comma + attachment[i].id );
138
+ });
139
+ // add image ID and url to input val
140
+ jQuery('#niteoCS-banner-id').val( imgID );
141
+ }
142
+
143
+ })
144
+ .open();
145
+ });
146
+
147
+ jQuery('#delete-banner').click(function(e) {
148
+ jQuery('.banner-wrapper').empty();
149
+ jQuery(this).css('display', 'none');
150
+ jQuery('#niteoCS-banner-id').val('');
151
+ });
152
+
153
+ // script for Social Icons
154
+ var social;
155
+ jQuery('.social-media i').click(function() {
156
+ social = jQuery(this).data('social');
157
+ jQuery(this).addClass('active');
158
+ jQuery('.social-inputs label.' + social).addClass('active');
159
+ jQuery('.social-inputs input.' + social).addClass('active');
160
+ // jQuery('.social-media label:not(.' + social + ')').css('display','none');
161
+ });
162
+
163
+ // hiding banner on load
164
+ if ( jQuery('#csoptions input[name="niteoCS_banner"]:checked' ).val() == 0 ) {
165
+ jQuery('#custom_banner').css('display','block');
166
+ jQuery('#unsplash_banner').css('display','none');
167
+ jQuery('#default_banner').css('display','none');
168
+
169
+ } else if ( jQuery('#csoptions input[name="niteoCS_banner"]:checked' ).val() == 1 ) {
170
+ jQuery('#custom_banner').css('display','none');
171
+ jQuery('#default_banner').css('display','none');
172
+ jQuery('#unsplash_banner').css('display','block');
173
+ } else {
174
+ jQuery('#custom_banner').css('display','none');
175
+ jQuery('#default_banner').css('display','block');
176
+ jQuery('#unsplash_banner').css('display','none');
177
+ }
178
+ // hiding banner on change
179
+ jQuery('#csoptions input[name="niteoCS_banner"]').change(function() {
180
+
181
+ if ( jQuery('#csoptions input[name="niteoCS_banner"]:checked' ).val() == 0 ) {
182
+ jQuery('#custom_banner').css('display','block');
183
+ jQuery('#unsplash_banner').css('display','none');
184
+ jQuery('#default_banner').css('display','none');
185
+
186
+ } else if ( jQuery('#csoptions input[name="niteoCS_banner"]:checked' ).val() == 1 ) {
187
+ jQuery('#custom_banner').css('display','none');
188
+ jQuery('#default_banner').css('display','none');
189
+ jQuery('#unsplash_banner').css('display','block');
190
+ } else {
191
+ jQuery('#custom_banner').css('display','none');
192
+ jQuery('#default_banner').css('display','block');
193
+ jQuery('#unsplash_banner').css('display','none');
194
+ }
195
+ });
196
+
197
+ // hiding subscribe from on load
198
+ if ( jQuery('#niteoCS_subscribe').prop('checked') == true) {
199
+ jQuery('.subscribe').css('display','block')
200
+ }
201
+ // hiding subscribe from on change
202
+ jQuery('#niteoCS_subscribe').change(function() {
203
+
204
+ if( jQuery(this)[0].checked ) {
205
+ jQuery('.subscribe').css('display','block')
206
+ } else {
207
+ jQuery('.subscribe').css('display','none')
208
+ }
209
+ });
210
+
211
+ // hiding subscribe on load
212
+ if ( jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked' ).val() == 0 ) {
213
+ jQuery('#subscribe-disabled').css('display','block');
214
+ jQuery('#subscribe-3rdparty').css('display','none');
215
+ jQuery('#subscribe-niteo').css('display','none');
216
+
217
+ } else if ( jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked' ).val() == 1 ) {
218
+ jQuery('#subscribe-disabled').css('display','none');
219
+ jQuery('#subscribe-3rdparty').css('display','block');
220
+ jQuery('#subscribe-niteo').css('display','none');
221
+ } else {
222
+ jQuery('#subscribe-disabled').css('display','none');
223
+ jQuery('#subscribe-3rdparty').css('display','none');
224
+ jQuery('#subscribe-niteo').css('display','block');
225
+ }
226
+ // hiding banner on change
227
+ jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function() {
228
+ if ( jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked' ).val() == 0 ) {
229
+ jQuery('#subscribe-disabled').css('display','block');
230
+ jQuery('#subscribe-3rdparty').css('display','none');
231
+ jQuery('#subscribe-niteo').css('display','none');
232
+
233
+ } else if ( jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked' ).val() == 1 ) {
234
+ jQuery('#subscribe-disabled').css('display','none');
235
+ jQuery('#subscribe-3rdparty').css('display','block');
236
+ jQuery('#subscribe-niteo').css('display','none');
237
+ } else {
238
+ jQuery('#subscribe-disabled').css('display','none');
239
+ jQuery('#subscribe-3rdparty').css('display','none');
240
+ jQuery('#subscribe-niteo').css('display','block');
241
+ }
242
+ });
243
+
244
+ // export CSV
245
+ jQuery('#csv-generate').click(function(e){
246
+ e.preventDefault();
247
+
248
+ if ( jQuery('#csv-download').length ) {
249
+ jQuery('#csv-download').remove();
250
+ }
251
+
252
+ jQuery.ajax({
253
+ type:'POST',
254
+ url: ajaxurl,
255
+ data: {action: 'niteo_export_csv'},
256
+ success: function(data) {
257
+ data = data.slice(0, -1);
258
+ var newLink = $("<a />", {
259
+ id : 'csv-download',
260
+ href : 'data:text/plain;charset=UTF-8,' + encodeURIComponent(data),
261
+ text : 'Download CSV',
262
+ download: "subscriber_list.csv"
263
+ });
264
+
265
+ jQuery('#subscribe-niteo').append(newLink);
266
+
267
+ },
268
+ });
269
+ });
270
+
271
+ function ucwords (str) {
272
+ return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) {
273
+ return $1.toUpperCase();
274
+ });
275
+ }
276
+
277
+ function strtolower (str) {
278
+ return (str+'').toLowerCase();
279
+ }
280
+
281
+ // Google FONTS
282
+ var heading_family = '';
283
+ var content_family = '';
284
+ if ( jQuery('select[name="niteoCS_font_headings"] option:selected').val() == 'custom') {
285
+ heading_family = ucwords(strtolower(jQuery('#niteoCS_font_headings_custom').val()));
286
+ } else {
287
+ heading_family = jQuery('select[name="niteoCS_font_headings"] option:selected').val();
288
+ }
289
+
290
+ if ( jQuery('select[name="niteoCS_font_content"] option:selected').val() == 'custom') {
291
+ content_family = ucwords(strtolower(jQuery('#niteoCS_font_content_custom').val()));
292
+ } else {
293
+ content_family = jQuery('select[name="niteoCS_font_content"] option:selected').val();
294
+ }
295
+
296
+ WebFont.load({
297
+ google: {
298
+ families: [ ucwords(strtolower(heading_family)), ucwords(strtolower(content_family)) ]
299
+ },
300
+ active: function() {
301
+ $('#heading-example').css('font-family', heading_family );
302
+ $('#content-example').css('font-family', content_family );
303
+ },
304
+ });
305
+
306
+ jQuery('select[name="niteoCS_font_headings"]').on('change', function() {
307
+ niteoCS_font_headings = jQuery('select[name="niteoCS_font_headings"] option:selected').val();
308
+ if ( niteoCS_font_headings == 'custom') {
309
+ jQuery('#custom_headings_font').css('display', 'block');
310
+ jQuery('#custom_headings_font').data('timeout', null).keyup(function(){
311
+ clearTimeout(jQuery(this).data('timeout'));
312
+ jQuery(this).data('timeout', setTimeout(function(){
313
+
314
+ WebFont.load({
315
+ google: {
316
+ families: [ ucwords(strtolower(jQuery('#niteoCS_font_headings_custom').val())) ]
317
+ },
318
+ active: function() {
319
+ $('#heading-example').css('font-family', jQuery('#niteoCS_font_headings_custom').val() );
320
+ },
321
+ });
322
+ }, 1000));
323
+ });
324
+
325
+ } else {
326
+ jQuery('#custom_headings_font').css('display', 'none');
327
+ WebFont.load({
328
+ google: {
329
+ families: [niteoCS_font_headings]
330
+ },
331
+ active: function() {
332
+ $('#heading-example').css('font-family', niteoCS_font_headings ? niteoCS_font_headings : '' );
333
+ },
334
+ });;
335
+ }
336
+ });
337
+
338
+ jQuery('select[name="niteoCS_font_content"]').on('change', function() {
339
+ niteoCS_font_content = jQuery('select[name="niteoCS_font_content"] option:selected').val();
340
+ if ( niteoCS_font_content == 'custom') {
341
+ jQuery('#custom_content_font').css('display', 'block');
342
+ jQuery('#custom_content_font').data('timeout', null).keyup(function(){
343
+ clearTimeout(jQuery(this).data('timeout'));
344
+ jQuery(this).data('timeout', setTimeout(function(){
345
+
346
+ WebFont.load({
347
+ google: {
348
+ families: [ ucwords(strtolower(jQuery('#niteoCS_font_content_custom').val())) ]
349
+ },
350
+ active: function() {
351
+ $('#content-example').css('font-family', jQuery('#niteoCS_font_content_custom').val() );
352
+ },
353
+ });
354
+ }, 1000));
355
+ });
356
+
357
+ } else {
358
+ jQuery('#custom_content_font').css('display', 'none');
359
+ WebFont.load({
360
+ google: {
361
+ families: [niteoCS_font_content]
362
+ },
363
+ active: function() {
364
+ $('#content-example').css('font-family', niteoCS_font_content ? niteoCS_font_content : '' );
365
+ },
366
+ });
367
+
368
+ }
369
+ });
370
+ });
371
+
comingsoon.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(document).ready(function(a){function f(a){return(a+"").replace(/^([a-z])|\s+([a-z])/g,function(a){return a.toUpperCase()})}function g(a){return(a+"").toLowerCase()}navtab=function(a){jQuery(".nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+a).addClass("nav-tab-active"),jQuery(".table-wrapper."+a).css("display","block"),jQuery(".table-wrapper:not(."+a+")").css("display","none"),jQuery(".comingsoon."+a).css("display","block"),jQuery(".comingsoon:not(."+a+")").css("display","none"),"install"==a?jQuery(".submit").css("display","none"):jQuery(".submit").css("display","block")};var b=localStorage.getItem("sc_tab");b&&navtab(b),a(".nav-tab:not(.theme-preview)").click(function(c){c.preventDefault(),b=a(this).data("tab"),navtab(b),localStorage.setItem("sc_tab",b)});var c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+c).css("display","block"),jQuery('#unsplash_banner select[name="unsplash_feed"]').on("change",function(){c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+c).css("display","block")});var d=jQuery(".logo-wrapper");""!=jQuery("#niteoCS-logo-id").val()&&(jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block")),jQuery("#add-logo").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Logo",button:{text:"Insert Logo"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();jQuery(".logo-wrapper").empty(),d.append('<img src="'+a.url+'" alt="" style="max-width:588px"/>'),jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block"),jQuery("#niteoCS-logo-id").val(a.id)}).open()}),jQuery("#delete-logo").click(function(a){jQuery(".logo-wrapper").empty(),jQuery("#add-logo").val("Select Logo"),jQuery(this).css("display","none"),jQuery("#niteoCS-logo-id").val("")}),""!=jQuery("#niteoCS-banner-id").val()&&jQuery("#delete-banner").css("display","block"),jQuery("#add-banner").click(function(a){var b=jQuery(".banner-wrapper");if(a.preventDefault(),c)return void c.open();var c=wp.media({title:"Select Photos",button:{text:"Insert Photos"},multiple:!0,type:"image"}).on("select",function(){var a=c.state().get("selection").toJSON(),d="";a.length>0&&(jQuery(".banner-wrapper").empty(),jQuery(a).each(function(c){b.append('<img src="'+a[c].url+'" alt="" style="max-width:588px;"/>'),jQuery("#delete-banner").css("display","block");var e=0===c?"":",";d+=e+a[c].id}),jQuery("#niteoCS-banner-id").val(d))}).open()}),jQuery("#delete-banner").click(function(a){jQuery(".banner-wrapper").empty(),jQuery(this).css("display","none"),jQuery("#niteoCS-banner-id").val("")});var e;jQuery(".social-media i").click(function(){e=jQuery(this).data("social"),jQuery(this).addClass("active"),jQuery(".social-inputs label."+e).addClass("active"),jQuery(".social-inputs input."+e).addClass("active")}),0==jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery("#custom_banner").css("display","block"),jQuery("#unsplash_banner").css("display","none"),jQuery("#default_banner").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery("#custom_banner").css("display","none"),jQuery("#default_banner").css("display","none"),jQuery("#unsplash_banner").css("display","block")):(jQuery("#custom_banner").css("display","none"),jQuery("#default_banner").css("display","block"),jQuery("#unsplash_banner").css("display","none")),jQuery('#csoptions input[name="niteoCS_banner"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery("#custom_banner").css("display","block"),jQuery("#unsplash_banner").css("display","none"),jQuery("#default_banner").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery("#custom_banner").css("display","none"),jQuery("#default_banner").css("display","none"),jQuery("#unsplash_banner").css("display","block")):(jQuery("#custom_banner").css("display","none"),jQuery("#default_banner").css("display","block"),jQuery("#unsplash_banner").css("display","none"))}),1==jQuery("#niteoCS_subscribe").prop("checked")&&jQuery(".subscribe").css("display","block"),jQuery("#niteoCS_subscribe").change(function(){jQuery(this)[0].checked?jQuery(".subscribe").css("display","block"):jQuery(".subscribe").css("display","none")}),0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block")),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block"))}),jQuery("#csv-generate").click(function(b){b.preventDefault(),jQuery("#csv-download").length&&jQuery("#csv-download").remove(),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"niteo_export_csv"},success:function(b){b=b.slice(0,-1);var c=a("<a />",{id:"csv-download",href:"data:text/plain;charset=UTF-8,"+encodeURIComponent(b),text:"Download CSV",download:"subscriber_list.csv"});jQuery("#subscribe-niteo").append(c)}})});var h="",i="";h="custom"==jQuery('select[name="niteoCS_font_headings"] option:selected').val()?f(g(jQuery("#niteoCS_font_headings_custom").val())):jQuery('select[name="niteoCS_font_headings"] option:selected').val(),i="custom"==jQuery('select[name="niteoCS_font_content"] option:selected').val()?f(g(jQuery("#niteoCS_font_content_custom").val())):jQuery('select[name="niteoCS_font_content"] option:selected').val(),WebFont.load({google:{families:[f(g(h)),f(g(i))]},active:function(){a("#heading-example").css("font-family",h),a("#content-example").css("font-family",i)}}),jQuery('select[name="niteoCS_font_headings"]').on("change",function(){niteoCS_font_headings=jQuery('select[name="niteoCS_font_headings"] option:selected').val(),"custom"==niteoCS_font_headings?(jQuery("#custom_headings_font").css("display","block"),jQuery("#custom_headings_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[f(g(jQuery("#niteoCS_font_headings_custom").val()))]},active:function(){a("#heading-example").css("font-family",jQuery("#niteoCS_font_headings_custom").val())}})},1e3))})):(jQuery("#custom_headings_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_headings]},active:function(){a("#heading-example").css("font-family",niteoCS_font_headings?niteoCS_font_headings:"")}}))}),jQuery('select[name="niteoCS_font_content"]').on("change",function(){niteoCS_font_content=jQuery('select[name="niteoCS_font_content"] option:selected').val(),"custom"==niteoCS_font_content?(jQuery("#custom_content_font").css("display","block"),jQuery("#custom_content_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[f(g(jQuery("#niteoCS_font_content_custom").val()))]},active:function(){a("#content-example").css("font-family",jQuery("#niteoCS_font_content_custom").val())}})},1e3))})):(jQuery("#custom_content_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_content]},active:function(){a("#content-example").css("font-family",niteoCS_font_content?niteoCS_font_content:"")}}))})});
cs_admin.css ADDED
@@ -0,0 +1 @@
 
1
+ #wpadminbar ul li#wp-admin-bar-cs-admin-notice{background:red;}
cs_style.css ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .comingsoon-error,
2
+ .comingsoon-success{
3
+ padding: 1em;
4
+ width: calc(100% - 4em);
5
+ border-left: 4px solid red;
6
+ background-color: white;
7
+ }
8
+
9
+ .comingsoon-success {border-left: 4px solid #00d221;}
10
+
11
+ .padding-bottom {padding-bottom: 10px;}
12
+
13
+ input[type="text"], textarea{width:100%;}
14
+ .table-wrapper.customization,
15
+ .table-wrapper.install,
16
+ .table-wrapper.seo {
17
+ display: none;
18
+ }
19
+ .upload-plugin.comingsoon .wp-upload-form {
20
+ max-width: 600px;
21
+ }
22
+
23
+ .table-wrapper table {
24
+ width: 90%;
25
+ }
26
+
27
+ .table-wrapper select {
28
+ margin-bottom: 10px;
29
+ width: 100%;
30
+ }
31
+
32
+ .table-wrapper td {
33
+ display: block;
34
+ max-width: 600px;
35
+ margin-bottom: 1em;
36
+ }
37
+
38
+ .table-wrapper td.theme-selector {
39
+ max-width: 100%;
40
+ }
41
+
42
+ .table-wrapper td {
43
+ display: block;
44
+ }
45
+ .table-wrapper th {
46
+ vertical-align: top;
47
+ width: 180px;
48
+ text-align: left;
49
+ }
50
+ #delete-logo,#delete-banner{display:none;}
51
+ .social-media li {display:inline-block;}
52
+ .social-media i {font-size:1.5em;padding:7px;cursor:pointer;}
53
+ .social-media i.active {color:#d54e21;}
54
+ .social-inputs label,
55
+ .social-inputs input {display: none;}
56
+ .social-inputs label.active,
57
+ .social-inputs input.active{display: block;}
58
+ th label {font-weight: 600;}
59
+ #unsplash_img{display: none;}
60
+ #unsplash-media{padding-top: 1em;}
61
+ .unsplash-feed{display: none;}
62
+
63
+ .info{font-size: 12px;}
64
+ .nav-tab i {padding-right:3px}
65
+ .table-wrapper h4 {margin:0;}
66
+
67
+ .table-wrapper {background-color: #ffffff;border:1px solid #dedede;margin:1em 0;}
68
+ .table-wrapper h3 {padding-bottom: .5em;margin-bottom: 0;padding-left:1em;border-bottom:1px solid #dedede;}
69
+ .table-wrapper table{padding:1em;}
70
+ .logo-wrapper, .banner-wrapper {padding: 1em 0;}
71
+ .logo-wrapper img, .banner-wrapper img,.thumbnail-holder img {max-width: 100%;}
72
+ .thumbnail-holder {display: inline-block;max-width: 250px;padding:1em;margin:1em;text-align: center;border: 1px solid #efefef;}
73
+ #font-example-wrapper {padding:1em;border:1px solid #dedede;}
74
+ #heading-example {padding-left: 0;border-bottom:none;}
75
+ #custom_headings_font,
76
+ #custom_content_font {display:none;}
languages/coming-soon-default.mo ADDED
Binary file
languages/coming-soon-default.po ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2017-03-11 19:22+0100\n"
5
+ "PO-Revision-Date: 2017-03-11 19:22+0100\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "Language: en\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.12\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-KeywordsList: _e;__\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPath-1: themes/construct\n"
18
+ "X-Poedit-SearchPath-2: themes/hardwork\n"
19
+
20
+ #: comingsoon-options.php:241
21
+ msgid "<p class=\"comingsoon-success\">Successfully installed new Theme!</p>"
22
+ msgstr ""
23
+
24
+ #: comingsoon-options.php:244
25
+ msgid ""
26
+ "<p class=\"comingsoon-error\">There was an error unzipping the file!</p>"
27
+ msgstr ""
28
+
29
+ #: comingsoon-options.php:248
30
+ msgid "<p class=\"comingsoon-error\">Error creating Theme subdirectory!</p>"
31
+ msgstr ""
32
+
33
+ #: comingsoon-options.php:272
34
+ msgid ""
35
+ "JavaScript appears to be disabled in your browser. For this plugin to work "
36
+ "correctly, please enable JavaScript or switch to a more modern browser."
37
+ msgstr ""
38
+
39
+ #: comingsoon-options.php:287
40
+ msgid "Settings"
41
+ msgstr ""
42
+
43
+ #: comingsoon-options.php:288 themes/construct/construct-settings.php:77
44
+ #: themes/hardwork/hardwork-settings.php:92
45
+ msgid "Content"
46
+ msgstr ""
47
+
48
+ #: comingsoon-options.php:289
49
+ msgid "SEO"
50
+ msgstr ""
51
+
52
+ #: comingsoon-options.php:290
53
+ msgid "Custom CSS"
54
+ msgstr ""
55
+
56
+ #: comingsoon-options.php:291
57
+ msgid "Preview"
58
+ msgstr ""
59
+
60
+ #: comingsoon-options.php:292
61
+ msgid "Install New Theme"
62
+ msgstr ""
63
+
64
+ #: comingsoon-options.php:296
65
+ msgid "General Settings"
66
+ msgstr ""
67
+
68
+ #: comingsoon-options.php:299 comingsoon-options.php:303
69
+ msgid "Status"
70
+ msgstr ""
71
+
72
+ #: comingsoon-options.php:306 comingsoon-options.php:614
73
+ msgid "Disabled"
74
+ msgstr ""
75
+
76
+ #: comingsoon-options.php:307
77
+ msgid ""
78
+ "Disable plugin and display standard WordPress page to all users and indexing "
79
+ "engines."
80
+ msgstr ""
81
+
82
+ #: comingsoon-options.php:310
83
+ msgid "Maintanance Mode"
84
+ msgstr ""
85
+
86
+ #: comingsoon-options.php:311
87
+ msgid ""
88
+ "Returns 503 HTTP Service unavailable code to indexing robots. Set this "
89
+ "option if your site is down due to maintanance and you want to display "
90
+ "Maintanance page."
91
+ msgstr ""
92
+
93
+ #: comingsoon-options.php:314
94
+ msgid "Coming Soon"
95
+ msgstr ""
96
+
97
+ #: comingsoon-options.php:315
98
+ msgid ""
99
+ "Returns standard 200 HTTP OK response code to indexing robots. Set this "
100
+ "option if you want to use our plugin as \"Coming Soon\" page."
101
+ msgstr ""
102
+
103
+ #: comingsoon-options.php:323
104
+ msgid "Select Theme"
105
+ msgstr ""
106
+
107
+ #: comingsoon-options.php:326 comingsoon-options.php:330
108
+ msgid "Free Themes"
109
+ msgstr ""
110
+
111
+ #: comingsoon-options.php:355 comingsoon-options.php:359
112
+ msgid "Premium Themes"
113
+ msgstr ""
114
+
115
+ #: comingsoon-options.php:390
116
+ msgid "Logo"
117
+ msgstr ""
118
+
119
+ #: comingsoon-options.php:393
120
+ msgid "Upload or select Logo"
121
+ msgstr ""
122
+
123
+ #: comingsoon-options.php:410
124
+ msgid "Graphic Banner"
125
+ msgstr ""
126
+
127
+ #: comingsoon-options.php:416
128
+ msgid "Banner Settings"
129
+ msgstr ""
130
+
131
+ #: comingsoon-options.php:421
132
+ msgid "Custom Media"
133
+ msgstr ""
134
+
135
+ #: comingsoon-options.php:427
136
+ msgid "Unsplash library"
137
+ msgstr ""
138
+
139
+ #: comingsoon-options.php:433
140
+ msgid "Default Media"
141
+ msgstr ""
142
+
143
+ #: comingsoon-options.php:446
144
+ msgid ""
145
+ "Pro Tip! You can select multiple Media from your library by holding CTRL"
146
+ "+click (Command+click if you sit on MacOS) while selecting photos."
147
+ msgstr ""
148
+
149
+ #: comingsoon-options.php:461
150
+ msgid "Choose Unsplash Feed"
151
+ msgstr ""
152
+
153
+ #: comingsoon-options.php:463
154
+ msgid "Specific Photo"
155
+ msgstr ""
156
+
157
+ #: comingsoon-options.php:464
158
+ msgid "Random from Category"
159
+ msgstr ""
160
+
161
+ #: comingsoon-options.php:465
162
+ msgid "Random from Collection"
163
+ msgstr ""
164
+
165
+ #: comingsoon-options.php:466
166
+ msgid "Random Photo"
167
+ msgstr ""
168
+
169
+ #: comingsoon-options.php:470
170
+ msgid "Enter Unsplash Photo URL or Photo ID"
171
+ msgstr ""
172
+
173
+ #: comingsoon-options.php:475
174
+ msgid "Select Category"
175
+ msgstr ""
176
+
177
+ #: comingsoon-options.php:477
178
+ msgid "Buildings"
179
+ msgstr ""
180
+
181
+ #: comingsoon-options.php:478
182
+ msgid "Food"
183
+ msgstr ""
184
+
185
+ #: comingsoon-options.php:479
186
+ msgid "Nature"
187
+ msgstr ""
188
+
189
+ #: comingsoon-options.php:480
190
+ msgid "People"
191
+ msgstr ""
192
+
193
+ #: comingsoon-options.php:481
194
+ msgid "Technology"
195
+ msgstr ""
196
+
197
+ #: comingsoon-options.php:482
198
+ msgid "Objects"
199
+ msgstr ""
200
+
201
+ #: comingsoon-options.php:485
202
+ msgid "You can limit Category to Specific Keyword"
203
+ msgstr ""
204
+
205
+ #: comingsoon-options.php:490
206
+ msgid ""
207
+ "Enter Unsplash Collection URL or Collection ID. Doesn`t work for Curated "
208
+ "Collections."
209
+ msgstr ""
210
+
211
+ #: comingsoon-options.php:495
212
+ msgid "Specify search terms"
213
+ msgstr ""
214
+
215
+ #: comingsoon-options.php:499
216
+ msgid "Limit search only to Featured/Curated Photos"
217
+ msgstr ""
218
+
219
+ #: comingsoon-options.php:518
220
+ msgid "Customize Fonts"
221
+ msgstr ""
222
+
223
+ #: comingsoon-options.php:522
224
+ msgid "Headings Font"
225
+ msgstr ""
226
+
227
+ #: comingsoon-options.php:525 comingsoon-options.php:558
228
+ msgid "Select from predefined Google Fonts or insert Custom font"
229
+ msgstr ""
230
+
231
+ #: comingsoon-options.php:543
232
+ msgid "Custom font..."
233
+ msgstr ""
234
+
235
+ #: comingsoon-options.php:547 comingsoon-options.php:581
236
+ msgid "Enter name of "
237
+ msgstr ""
238
+
239
+ #: comingsoon-options.php:555
240
+ msgid "Content Font"
241
+ msgstr ""
242
+
243
+ #: comingsoon-options.php:576
244
+ msgid "Custom Font..."
245
+ msgstr ""
246
+
247
+ #: comingsoon-options.php:603
248
+ msgid "Subscribe Form"
249
+ msgstr ""
250
+
251
+ #: comingsoon-options.php:609
252
+ msgid "Subscribe Form Options"
253
+ msgstr ""
254
+
255
+ #: comingsoon-options.php:620
256
+ msgid "3rd Party Plugin"
257
+ msgstr ""
258
+
259
+ #: comingsoon-options.php:626
260
+ msgid "Niteo Subscribe"
261
+ msgstr ""
262
+
263
+ #: comingsoon-options.php:634
264
+ msgid "Subscribe Form is disabled."
265
+ msgstr ""
266
+
267
+ #: comingsoon-options.php:643
268
+ msgid ""
269
+ "Your Subscribe Form should have only one input (type=email) and submit "
270
+ "(input=submit). If you have more than one input field, our design will not "
271
+ "work and you need to use custom CSS to style your Subscribe form."
272
+ msgstr ""
273
+
274
+ #: comingsoon-options.php:644
275
+ msgid "Example of Subscribe Form code for "
276
+ msgstr ""
277
+
278
+ #: comingsoon-options.php:656
279
+ msgid ""
280
+ "Default subscribe form will be displayed to visitors. Only export of email "
281
+ "addresses to .csv file is supported. Mailing List will be deleted after "
282
+ "deletion of this plugin."
283
+ msgstr ""
284
+
285
+ #: comingsoon-options.php:658
286
+ msgid "Total Subscribers: "
287
+ msgstr ""
288
+
289
+ #: comingsoon-options.php:659
290
+ msgid "Since last export: "
291
+ msgstr ""
292
+
293
+ #: comingsoon-options.php:660
294
+ msgid "Last Export Date: "
295
+ msgstr ""
296
+
297
+ #: comingsoon-options.php:660
298
+ msgid "Never exported"
299
+ msgstr ""
300
+
301
+ #: comingsoon-options.php:671
302
+ msgid "Social Media"
303
+ msgstr ""
304
+
305
+ #: comingsoon-options.php:675
306
+ msgid "Social Section Title"
307
+ msgstr ""
308
+
309
+ #: comingsoon-options.php:684
310
+ msgid "Social Media Icons"
311
+ msgstr ""
312
+
313
+ #: comingsoon-options.php:723
314
+ msgid "SEO Settings"
315
+ msgstr ""
316
+
317
+ #: comingsoon-options.php:727
318
+ msgid "Header Title"
319
+ msgstr ""
320
+
321
+ #: comingsoon-options.php:736
322
+ msgid "Description"
323
+ msgstr ""
324
+
325
+ #: comingsoon-options.php:744
326
+ msgid "Google Analytics Code"
327
+ msgstr ""
328
+
329
+ #: comingsoon-options.php:755
330
+ msgid "Enter Custom CSS"
331
+ msgstr ""
332
+
333
+ #: comingsoon-options.php:769
334
+ msgid "Save Changes"
335
+ msgstr ""
336
+
337
+ #: comingsoon-options.php:779
338
+ msgid "Install New Coming Soon Theme"
339
+ msgstr ""
340
+
341
+ #: niteo-comingsoon.php:162
342
+ msgid "Maintenance Mode Active"
343
+ msgstr ""
344
+
345
+ #: niteo-comingsoon.php:164
346
+ msgid "Coming Soon Mode Active"
347
+ msgstr ""
348
+
349
+ #: niteo-comingsoon.php:341 niteo-comingsoon.php:349
350
+ msgid "Thank you, your sign-up request was successful!"
351
+ msgstr ""
352
+
353
+ #: niteo-comingsoon.php:352
354
+ msgid "This email address has already been on our subscriber list."
355
+ msgstr ""
356
+
357
+ #: niteo-comingsoon.php:357
358
+ msgid "Please insert valid email."
359
+ msgstr ""
360
+
361
+ #: themes/construct/construct-settings.php:46
362
+ #: themes/hardwork/hardwork-settings.php:61
363
+ msgid "Customize Colors"
364
+ msgstr ""
365
+
366
+ #: themes/construct/construct-settings.php:49
367
+ msgid "Active Color"
368
+ msgstr ""
369
+
370
+ #: themes/construct/construct-settings.php:53
371
+ msgid "Color used for Headings and active elements(buttons, hover links, etc)"
372
+ msgstr ""
373
+
374
+ #: themes/construct/construct-settings.php:58
375
+ #: themes/hardwork/hardwork-settings.php:65
376
+ msgid "Font Color"
377
+ msgstr ""
378
+
379
+ #: themes/construct/construct-settings.php:66
380
+ msgid "Background Color"
381
+ msgstr ""
382
+
383
+ #: themes/construct/construct-settings.php:80
384
+ #: themes/hardwork/hardwork-settings.php:95
385
+ msgid "Body Title"
386
+ msgstr ""
387
+
388
+ #: themes/construct/construct-settings.php:89
389
+ #: themes/hardwork/hardwork-settings.php:104
390
+ msgid "Body Message"
391
+ msgstr ""
392
+
393
+ #: themes/construct/construct-settings.php:99
394
+ msgid "Footer Content"
395
+ msgstr ""
396
+
397
+ #: themes/construct/construct-settings.php:103
398
+ msgid "Copyright"
399
+ msgstr ""
400
+
401
+ #: themes/hardwork/hardwork-settings.php:73
402
+ msgid "Overlay Color"
403
+ msgstr ""
404
+
405
+ #: themes/hardwork/hardwork-settings.php:76
406
+ msgid "Enable Overlay Color"
407
+ msgstr ""
408
+
409
+ #: themes/hardwork/hardwork-settings.php:82
410
+ msgid "Overlay Opacity"
411
+ msgstr ""
niteo-cmp.php ADDED
@@ -0,0 +1,467 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: CMP - Coming Soon & Maintenance Plugin
4
+ Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
5
+ Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
6
+ Version: 1.0.1
7
+ Author: NiteoThemes
8
+ Author URI: http://www.niteo.cz
9
+ Text Domain: cmp
10
+ Domain Path: /languages
11
+ License: GPL-2.0+
12
+ License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13
+ */
14
+
15
+ class niteo_cmp {
16
+ var $installedFolder = '';
17
+
18
+ function __construct() {
19
+ $this->installedFolder = basename(dirname(__FILE__));
20
+ }
21
+
22
+ function cmp() {
23
+ $this->__construct();
24
+ }
25
+
26
+ function cmp_adminInit() {
27
+ wp_register_script('cmp_mainjs', plugins_url().'/'.$this->installedFolder.'/comingsoon.min.js');
28
+ wp_register_style( 'font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
29
+ wp_register_style( 'cmp_style', plugins_url().'/'.$this->installedFolder.'/cs_style.css' );
30
+ wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
31
+ }
32
+
33
+ function cmp_add_admin_style() {
34
+ wp_register_style( 'cmp_admin_style', plugins_url().'/'.$this->installedFolder.'/cs_admin.css' );
35
+ wp_enqueue_style( 'cmp_admin_style');
36
+ }
37
+
38
+ function cmp_enqueueScripts() {
39
+ // enqueue required admin scripts and styles
40
+ wp_enqueue_style('cmp_style');
41
+ wp_enqueue_script('cmp_mainjs');
42
+ wp_enqueue_media();
43
+ wp_enqueue_script( 'wp-color-picker');
44
+ wp_enqueue_style( 'wp-color-picker');
45
+ wp_enqueue_style('font_awesome');
46
+ wp_enqueue_script( 'webfont' );
47
+ }
48
+
49
+
50
+ //register scripts and load styles
51
+ function cmp_adminMenu() {
52
+
53
+ /* Register our plugin page */
54
+ $page = add_options_page('CMP Settings', 'CMP Settings', 'activate_plugins', 'cmp-settings', array($this, 'cmp_admin_options'));
55
+
56
+ /* Using registered $page handle to hook script load */
57
+ add_action('admin_print_scripts-'.$page, array($this, 'cmp_enqueueScripts'));
58
+ // add admin menu notice
59
+
60
+ // check onces and wordpress rights, else DIE
61
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
62
+
63
+ if ( isset($_POST['activate']) ) {
64
+
65
+ //verify nonce and user rights
66
+ if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
67
+ die('Sorry, but this request is invalid');
68
+ }
69
+
70
+ if ($_POST['activate'] == 0) {
71
+ update_option('niteoCS_activation', 0);
72
+ }
73
+
74
+ if ($_POST['activate'] == 1) {
75
+ update_option('niteoCS_activation', 1);
76
+ }
77
+ if ($_POST['activate'] == 2) {
78
+ update_option('niteoCS_activation', 2);
79
+ }
80
+
81
+ }
82
+ }
83
+
84
+ if ( $this->cmp_status() == '1' || $this->cmp_status() == '2' ) {
85
+ add_action('admin_bar_menu',array( $this, 'cmp_admin_bar' ), 1000 );
86
+ }
87
+ }
88
+
89
+ function cmp_admin_options() {
90
+ // get all installed themes [folder names under /themes] and put them to array
91
+ $theme_array = array_map('basename', glob( plugin_dir_path( __FILE__ ) . 'themes/*', GLOB_ONLYDIR));
92
+ // get current theme
93
+ $selectedTheme = $this->cmp_selectedTheme();
94
+
95
+ // include default options page
96
+ require_once ('cmp-options.php');
97
+
98
+ }
99
+
100
+ function cmp_displayPage() {
101
+
102
+ if ( isset($_GET['cmp_preview']) && $_GET['cmp_preview'] == 'true' ) {
103
+
104
+ // for themes preview demos
105
+ if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
106
+ $theme_preview = $_GET['theme'];
107
+ // render html theme page
108
+ if ( file_exists(dirname(__FILE__) . '/themes/'.$theme_preview.'/'.$theme_preview.'-theme.php') ) {
109
+ require_once (dirname(__FILE__) . '/themes/'.$theme_preview.'/'.$theme_preview.'-theme.php');
110
+ die();
111
+ }
112
+
113
+ }
114
+
115
+ // render html theme page
116
+ if ( file_exists(dirname(__FILE__) . '/themes/'.$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php') ) {
117
+ require_once (dirname(__FILE__) . '/themes/'.$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php');
118
+ die();
119
+ }
120
+ }
121
+
122
+ if ( $this->cmp_status() == 1 || $this->cmp_status() == 2 ) {
123
+
124
+ if ( !is_user_logged_in() ) {
125
+ // if maintanance mode set headers
126
+ if( $this->cmp_status() == '1' ){
127
+ header('HTTP/1.1 503 Service Temporarily Unavailable');
128
+ header('Status: 503 Service Temporarily Unavailable');
129
+ header('Retry-After: 86400'); // retry in a day
130
+ }
131
+
132
+ // render html theme page
133
+ require_once (dirname(__FILE__) . '/themes/'.$this->cmp_selectedTheme().'/'.$this->cmp_selectedTheme().'-theme.php');
134
+ die();
135
+
136
+ }
137
+ }
138
+ }
139
+
140
+ function cmp_admin_override(){
141
+
142
+ if( $this->cmp_status() == 0 ){
143
+ return;
144
+ }
145
+
146
+ if( is_user_logged_in() ){
147
+
148
+ if( !current_user_can('administrator') ){
149
+ wp_logout();
150
+ wp_redirect( get_bloginfo('url') );
151
+ }
152
+ }
153
+ }
154
+
155
+ // check plugin status
156
+ function cmp_status() {
157
+
158
+ if ( !get_option('niteoCS_activation') || get_option('niteoCS_activation') == 0 ) {
159
+ return '0';
160
+ } else {
161
+ return get_option('niteoCS_activation');
162
+ }
163
+ }
164
+
165
+ // check selected theme
166
+ function cmp_selectedTheme() {
167
+ if ( !get_option('niteoCS_theme') ) { //if it's not set yet
168
+ update_option('niteoCS_theme', 'construct'); //set it
169
+ }
170
+
171
+ return get_option('niteoCS_theme');
172
+ }
173
+
174
+ // display admin notice
175
+ function cmp_admin_bar(){
176
+ global $wp_admin_bar;
177
+
178
+ $status = $this->cmp_status();
179
+
180
+ $msg= '';
181
+ if ( $status == '1' ){
182
+ $msg = __('Maintenance Mode Active','cmp');
183
+ } elseif( $status == '2' ){
184
+ $msg = __('Coming Soon Mode Active','cmp');
185
+ }
186
+ //Add the main siteadmin menu item
187
+ $wp_admin_bar->add_menu( array(
188
+ 'id' => 'cs-admin-notice',
189
+ 'href' => admin_url().'options-general.php?page=cmp-settings',
190
+ 'parent' => 'top-secondary',
191
+ 'title' => $msg,
192
+ 'meta' => array( 'class' => 'coming-soon-notice' ),
193
+ ) );
194
+ }
195
+
196
+ function cmp_activate() {
197
+ if ( get_option('niteoCS_archive') ) {
198
+ //get all the options back from the archive
199
+ $options = get_option('niteoCS_archive');
200
+ // update options
201
+ foreach ($options as $option) {
202
+ update_option($option['name'], $option['value']);
203
+
204
+ }
205
+
206
+ // delete archive
207
+ delete_option('niteoCS_archive');
208
+ }
209
+
210
+ }
211
+ // archive plugin stuff when plugin is deactivated
212
+ function cmp_deactivate() {
213
+ //get all the options. store them in an array
214
+ $options = array();
215
+
216
+ global $wpdb;
217
+ $saved_options = $wpdb->get_results( "SELECT * FROM $wpdb->options WHERE option_name LIKE 'niteoCS_%'", OBJECT );
218
+ $i = 0;
219
+ foreach ($saved_options as $option) {
220
+ $options[$i] = array('name' => $option->option_name, 'value' => get_option( $option->option_name) );
221
+ $i++;
222
+ }
223
+
224
+
225
+ //store the options all in one record, in case we ever reactivate the plugin
226
+ update_option('niteoCS_archive', $options);
227
+
228
+ //delete the separate ones
229
+ foreach ($options as $option) {
230
+ delete_option($option['name']);
231
+
232
+ }
233
+
234
+ }
235
+ // clean plugin stuff when plugin is deleted
236
+ function cmp_plugin_delete() {
237
+ delete_option('niteoCS_archive');
238
+ }
239
+
240
+ // returns list of premium themes => manually defined
241
+ function cmp_plugin_premium() {
242
+ $premium_themes = array();
243
+ // array_push($premium_themes, array('name' => 'demo1', 'url' => 'https://creativemarket.com/NiteoThemes', 'price' => '10'));
244
+ return $premium_themes;
245
+ }
246
+
247
+
248
+ function cmp_textDomain() {
249
+ load_plugin_textdomain( 'cmp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
250
+ }
251
+
252
+ // unsplash api
253
+
254
+ function niteo_unsplash( $params ) {
255
+ $ajax = false;
256
+
257
+ // check for ajax
258
+ if ( isset( $_POST['params'] ) ) {
259
+ // verify nonce
260
+ check_ajax_referer( 'cmp-coming-soon-ajax-secret', 'security' );
261
+ // verify user rights
262
+ if( !current_user_can('publish_pages') ) {
263
+ die('Sorry, but this request is invalid');
264
+ }
265
+
266
+ // sanitize array
267
+ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
268
+
269
+ if ( !empty( $_POST['params'] ) ) {
270
+ $params = $_POST['params'];
271
+ $ajax = true;
272
+ }
273
+ }
274
+
275
+ array_key_exists ('feed', $params) ? $feed = $params['feed'] : $feed = '';
276
+ array_key_exists ('url', $params) ? $url = $params['url'] : $url = '';
277
+ array_key_exists ('cat', $params) ? $cat = $params['cat'] : $cat = '';
278
+ array_key_exists ('custom_str', $params) ? $custom_str = $params['custom_str'] : $custom_str = '';
279
+ $sig = 'sig='.time();
280
+
281
+ switch ( $feed ) {
282
+ case '0':
283
+ // check if $query contains unsplash.com url
284
+ if ( strpos( $url, 'unsplash.com' ) !== false ) {
285
+ $parts = parse_url( $url );
286
+ parse_str($parts['query'], $query);
287
+ $id = $query['photo'];
288
+ } else {
289
+ // $query is ID
290
+ $id = $url;
291
+ }
292
+
293
+ $unsplash_img = 'https://source.unsplash.com/'.$id.'/WIDTHxHEIGHT/';
294
+ break;
295
+
296
+ case '1':
297
+ if ($custom_str != '') {
298
+ $custom_str = $custom_str . '&';
299
+ }
300
+ $unsplash_img = 'https://source.unsplash.com/category/'.$cat.'/WIDTHxHEIGHT/?'.$custom_str.$sig;
301
+ break;
302
+
303
+ case '2':
304
+ if ( is_numeric( $url ) ) {
305
+ $collection = $url;
306
+ } else {
307
+ $collection = filter_var($url, FILTER_SANITIZE_NUMBER_INT);
308
+ $collection = str_replace('-', '', $collection );
309
+ }
310
+
311
+ $unsplash_img = 'https://source.unsplash.com/collection/'.$collection.'/WIDTHxHEIGHT/?'.$sig;
312
+ break;
313
+
314
+ case '3':
315
+ if ( $cat == '0' || $cat == '') {
316
+ $featured = 'random';
317
+ } else {
318
+ $featured = 'featured';
319
+ }
320
+
321
+ $url = str_replace(' ', ',', $url);
322
+
323
+ $unsplash_img = 'https://source.unsplash.com/'.$featured.'/WIDTHxHEIGHT/?'.$url.'&'.$sig;
324
+ break;
325
+
326
+ default:
327
+ $unsplash_img = 'https://source.unsplash.com/featured/WIDTHxHEIGHT/?'.$sig;
328
+ break;
329
+ }
330
+
331
+ if ( $ajax === true ) {
332
+ echo $unsplash_img;
333
+ wp_die();
334
+
335
+ } else {
336
+ return $unsplash_img;
337
+ }
338
+ }
339
+
340
+ // check value in multidimensional array
341
+ function niteo_in_array_r($needle, $haystack, $strict = false) {
342
+ foreach ( $haystack as $item ) {
343
+ if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && $this->niteo_in_array_r( $needle, $item, $strict ) ) ) {
344
+ return true;
345
+ }
346
+ }
347
+
348
+ return false;
349
+ }
350
+
351
+ // save subscribe function
352
+ function niteo_subscribe( $email ) {
353
+ $response = '';
354
+
355
+ // validate email address
356
+ if ( is_email( $email ) ) {
357
+ $time = time();
358
+ $subscribe_list = get_option('niteoCS_subscribers_list');
359
+
360
+ // if no subscribe list created, create first item
361
+ if ( !$subscribe_list ) {
362
+ $subscribe_list = array();
363
+ $new_email = array('timestamp' => $time, 'email' => $email);
364
+ array_push( $subscribe_list, $new_email );
365
+ update_option( 'niteoCS_subscribers_list', $subscribe_list );
366
+ $response = __('Thank you, your sign-up request was successful!', 'cmp');
367
+
368
+ } else {
369
+ // check if email don`t already exists
370
+ if ( !$this->niteo_in_array_r( $email, $subscribe_list ) ) {
371
+ $new_email = array('timestamp' => $time, 'email' => $email);
372
+ array_push( $subscribe_list, $new_email );
373
+ update_option('niteoCS_subscribers_list', $subscribe_list);
374
+ $response = __('Thank you, your sign-up request was successful!', 'cmp');
375
+ // if it exists return failed response
376
+ } else {
377
+ $response = __('This email address has already been on our subscriber list.', 'cmp');
378
+ }
379
+ }
380
+
381
+ } else {
382
+ $response = __('Please insert valid email.', 'cmp');
383
+ }
384
+
385
+ return $response;
386
+
387
+ }
388
+
389
+ function niteo_export_csv() {
390
+ // load subscribers array
391
+ $subscribers = get_option('niteoCS_subscribers_list');
392
+ $csv = '';
393
+
394
+ foreach ($subscribers as $subscriber) {
395
+ $csv .= $subscriber['email'].';';
396
+ }
397
+
398
+ // set last download
399
+ update_option('niteoCS_csv_export_time', time() );
400
+
401
+ // echo comma separated string;
402
+ echo $csv;
403
+ wp_die();
404
+ }
405
+
406
+ function niteo_allow_zip_mime( $existing_mimes = array() ) {
407
+ // add your own extension here - as many as you like
408
+ $existing_mimes['zip'] = 'application/zip';
409
+
410
+ // return amended array
411
+ return $existing_mimes;
412
+ }
413
+
414
+ function niteo_remove_zip_mime( $existing_mimes = array() ) {
415
+ // remove zip mime
416
+ unset ($existing_mimes['zip']);
417
+
418
+ // return amended array
419
+ return $existing_mimes;
420
+ }
421
+
422
+ // convert hex to rgba
423
+
424
+ function hex2rgba ( $hex, $opacity ) {
425
+ list( $red, $green, $blue ) = sscanf( $hex, '#%02x%02x%02x' );
426
+
427
+ $rgba = 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $opacity.')';
428
+
429
+ return $rgba;
430
+ }
431
+
432
+ function sanitize_checkbox( $input ) {
433
+ return ( ( isset( $input ) && true == $input ) ? true : false );
434
+ }
435
+
436
+ function niteo_sanitize_html( $html ) {
437
+ global $allowedposttags;
438
+ return wp_kses( $html, $allowedposttags );
439
+ }
440
+
441
+ }
442
+
443
+
444
+ $cmpPlugin = new niteo_cmp();
445
+
446
+ add_action('template_redirect', array($cmpPlugin, 'cmp_displayPage'));
447
+
448
+ add_action('wp_login', array($cmpPlugin, 'cmp_admin_override'));
449
+
450
+ add_action( 'wp_ajax_niteo_unsplash', array($cmpPlugin, 'niteo_unsplash') );
451
+ add_action( 'wp_ajax_niteo_export_csv', array($cmpPlugin, 'niteo_export_csv') );
452
+
453
+ add_action('plugins_loaded', array($cmpPlugin, 'cmp_textDomain') );
454
+ add_action('admin_menu', array($cmpPlugin, 'cmp_adminMenu'), 10);
455
+ add_action('admin_init', array($cmpPlugin, 'cmp_adminInit'));
456
+ add_action('admin_init', array($cmpPlugin, 'cmp_admin_override'));
457
+ add_action( 'admin_enqueue_scripts', array($cmpPlugin,'cmp_add_admin_style') );
458
+
459
+ register_activation_hook(__FILE__, array($cmpPlugin, 'cmp_activate'));
460
+ register_deactivation_hook(__FILE__, array($cmpPlugin, 'cmp_deactivate'));
461
+ register_uninstall_hook(__FILE__, 'cmp_plugin_delete');
462
+
463
+
464
+
465
+
466
+
467
+
readme.txt ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === CMP - Coming Soon & Maintenance Plugin by NiteoThemes ===
2
+ Contributors: niteo
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JFJ8NCBYLW&lc=US&item_name=NiteoThemes&item_number=comingsoon&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
4
+ Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, comingsoon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
+ Requires at least: 3.0
6
+ Tested up to: 4.7.2
7
+ Stable tag: 1.0.1
8
+ License: GPLv2 or later
9
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Create and customize your own landing page for Coming soon Page or Maintenance mode including subscribe form with ease of few mouse clicks.
12
+
13
+ == Description ==
14
+
15
+ Free plugin to create and customize your own landing page for Coming soon Page or Maintenance mode with no limitations. Setup custom logo, graphics, messages, subscribe form, your social networks, colors, and many more. No commercials, no PRO versions, just intuitive and clean user interface.
16
+
17
+ <h3>Preview</h3>
18
+ <a href="http://comingsoon.niteo.cz/?cmp_preview=true&theme=construct" target="_blank">Click for preview of Construct Theme >></a><br>
19
+ <a href="http://comingsoon.niteo.cz/?cmp_preview=true&theme=hardwork" target="_blank">Click for preview of Hardwork Theme >></a>
20
+
21
+ <h3>Features</h3>
22
+ <ul>
23
+ <li>Works with any WordPress Theme</li>
24
+ <li>Responsive and Retina ready</li>
25
+ <li>Works on all devices</li>
26
+ <li>Setup custom Social Icons</li>
27
+ <li>Customize Logo, Fonts and Colors</li>
28
+ <li>Subscribe form works with any 3rd party plugin(Mailchimp, etc)</li>
29
+ <li>Custom Subscribe form to store emails in custom database with export to csv</li>
30
+ <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>
31
+ <li>Customize SEO meta tags to search engines</li>
32
+ <li>Set response code to search engines</li>
33
+ <li>Insert Google Analytics Code</li>
34
+ <li>Insert Custom CSS</li>
35
+ <li>Uses HTML5 & CSS3</li>
36
+ <li>Extandable by downloadable Themes.</li>
37
+ <li>Translation Ready</li>
38
+ </ul>
39
+
40
+ == Installation ==
41
+
42
+ <h3>Install from WordPress Plugin Dashboard</h3>
43
+ <ul>
44
+ <li>Navigate to the 'Add New' in the plugins dashboard</li>
45
+ <li>Search for 'CMP - Coming Soon'</li>
46
+ <li>Click 'Install Now'</li>
47
+ <li>Activate the plugin on the Plugin dashboard</li>
48
+ <li>To Setup click Settings->CMP Settings and change the settings there</li>
49
+ </ul>
50
+
51
+ <h3>Upload in WordPress Plugin Dashboard</h3>
52
+ <ul>
53
+ <li>Navigate to the 'Add New' in the plugins dashboard</li>
54
+ <li>Navigate to the 'Upload' area</li>
55
+ <li>Download <code>cmp-coming-soon-maintenance.zip</code> and select <code>cmp-coming-soon-maintenance.zip</code> from your directory</li>
56
+ <li>Click 'Install Now'</li>
57
+ <li>Activate the plugin in the Plugin dashboard</li>
58
+ <li>To Setup click Settings->CMP Settings and change the settings there</li>
59
+ </ul>
60
+
61
+ <h3>FTP Upload</h3>
62
+ <ul>
63
+ <li>Navigate to the 'Add New' in the plugins dashboard</li>
64
+ <li>Navigate to the 'Upload' area</li>
65
+ <li>Download <code>cmp-coming-soon-maintenance.zip</code> and extract the <code>cmp-coming-soon-maintenance.zip</code> zip file to your computer</li>
66
+ <li>Upload the extracted <code>cmp-coming-soon-maintenance</code> directory to the <code>/wp-content/plugins/</code> directory</li>
67
+ <li>Activate the plugin in the Plugin dashboard</li>
68
+ <li>To Setup click Settings->CMP Settings and change the settings there</li>
69
+ </ul>
70
+
71
+
72
+ == Screenshots ==
73
+ 1. CMP - Coming Soon Construct Theme
74
+ 2. CMP - Maintenance Hardwork Theme
75
+ 3. CMP - Settings Page Overview
76
+ 4. CMP - Settings Page Detail
77
+ 5. CMP - Settings Page Unsplash Detail
78
+
79
+ == Frequently Asked Questions ==
80
+ <h4>I can't see the landing page I`ve just created!</h4>
81
+ <p>As long as you're logged in as admin, you cannot see it. That`s what this plugin does! It displays Maintenance or Landing page only to non-logged or non-admin logged visitors of your page. By this way you can work on your real website and display different page to your visitors. You can preview the page by clicking on "preview" tab, loggout from Wordpress or access your website from different browser.</p>
82
+
83
+ <h4>503 or 200 HTTP codes, huh?</h4>
84
+ <p>OK, it`s easy - if you want to display Coming Soon page you usually wants to search and crawling engines (like Google) to be able to index your website. In that case you need to response with 200 HTTP "OK" - set Coming Soon mode.</p>
85
+ <p>On the other hand if you have your website already up and running but you are doing only a short maintenance it`s better to send out response 503 HTTP Service unavailable code. By that way you make sure the search engines do not index your temporarily website while it`s down to maintenance and do not lower your website SEO score.</p>
86
+
87
+ <h4>Is it a bug? Noone likes BUGS!</h4>
88
+ <p>This is awkward and shame on us:(. Fortunately we are nice guys and if you let us know about it trough <a href="http://niteo.cz">NiteoThemes website</a> contact form we promise to fix it as soon as possible!</p>
89
+
90
+ <h4>Features requests or you have new idea?</h4>
91
+ <p>That`s perfect because we want to make our plugin great and to fit exactly your needs! Just let us know <a href="http://niteo.cz">NiteoThemes website</a> contact form and we might include it in next plugin update!</p>
92
+
93
+
94
+ <h4>I really like your plugin and I want to support it!</h4>
95
+ <p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! Also you can buy us a beer if you want via donate link (beer in Prague is pretty cheap tho!:) )</p>
96
+
97
+
98
+
99
+ == Changelog ==
100
+ <h4>1.0.1</h4>
101
+ <ul>
102
+ <li>Resolved bug with save settings on old PHP version.</li>
103
+ </ul>
104
+ <h4>1.0.0</h4>
105
+ <ul>
106
+ <li>Initial release</li>
107
+ </ul>
themes/construct/construct-settings.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // get options
12
+ $niteoCS_active_color = get_option('niteoCS_active_color[construct]', '#f37004');
13
+ $niteoCS_font_color = get_option('niteoCS_font_color[construct]', '#686868');
14
+ $niteoCS_background_color = get_option('niteoCS_background_color[construct]', '#ffffff');
15
+
16
+
17
+
18
+ if ( isset($_POST['niteoCS_active_color_construct']) ) {
19
+ update_option('niteoCS_active_color[construct]', sanitize_hex_color( $_POST['niteoCS_active_color_construct']));
20
+ $niteoCS_active_color = get_option('niteoCS_active_color[construct]');
21
+ }
22
+
23
+ if ( isset($_POST['niteoCS_font_color_construct']) ) {
24
+ update_option('niteoCS_font_color[construct]', sanitize_hex_color($_POST['niteoCS_font_color_construct']));
25
+ $niteoCS_font_color = get_option('niteoCS_font_color[construct]');
26
+ }
27
+
28
+ if ( isset($_POST['niteoCS_background_color_construct']) ) {
29
+ update_option('niteoCS_background_color[construct]', sanitize_hex_color($_POST['niteoCS_background_color_construct']));
30
+ $niteoCS_background_color = get_option('niteoCS_background_color[construct]');
31
+ }
32
+
33
+
34
+ ?>
35
+
36
+ <div class="table-wrapper customization">
37
+ <h3><?php _e('Customize Colors', 'comingSoon');?></h3>
38
+ <table class="customization">
39
+ <tr>
40
+ <th><h4><?php _e('Active Color', 'comingSoon');?></h4></th>
41
+ <td>
42
+ <fieldset>
43
+ <input type="text" name="niteoCS_active_color_construct" id="niteoCS_active_color" value="<?php echo esc_attr( $niteoCS_active_color); ?>" data-default-color="#f37004" class="regular-text code"><br>
44
+ <span><?php _e('Headings and active elements color (buttons, hover links, etc).', 'comingSoon');?></span>
45
+ </fieldset>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <th><h4><?php _e('Font Color', 'comingSoon');?></h4></th>
50
+ <td>
51
+ <fieldset>
52
+ <input type="text" name="niteoCS_font_color_construct" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#686868" class="regular-text code"><br>
53
+ </fieldset>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <th><h4><?php _e('Background Color', 'comingSoon');?></h4></th>
58
+ <td>
59
+ <fieldset>
60
+ <input type="text" name="niteoCS_background_color_construct" id="niteoCS_background_color" value="<?php echo esc_attr( $niteoCS_background_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
61
+ </fieldset>
62
+ </td>
63
+ </tr>
64
+ </table>
65
+ </div>
66
+
67
+ <script>
68
+ jQuery(document).ready(function($){
69
+
70
+ // ini color picker
71
+ jQuery('#niteoCS_font_color').wpColorPicker();
72
+ jQuery('#niteoCS_active_color').wpColorPicker();
73
+ jQuery('#niteoCS_background_color').wpColorPicker();
74
+ });
75
+ </script>
themes/construct/construct-theme.php ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_honeypot'] === '' && isset( $_POST['EMAIL'] ) && is_email( $_POST['EMAIL'] ) ) {
3
+ $subscribe_response = $this->niteo_subscribe( $_POST['EMAIL'] );
4
+ }
5
+ ?>
6
+
7
+ <!DOCTYPE html>
8
+
9
+ <html <?php language_attributes(); ?>>
10
+ <head>
11
+ <meta charset="<?php bloginfo( 'charset' ); ?>">
12
+ <meta name="viewport" content="width=device-width, initial-scale=1">
13
+
14
+ <!-- SEO -->
15
+ <meta name="description" content="<?php echo esc_html( stripslashes(get_option('niteoCS_descr', 'Just another Coming Soon Page')) ); ?>">
16
+ <title><?php echo esc_html( stripslashes(get_option('niteoCS_title', get_bloginfo('name').' Coming soon!')) ); ?></title>
17
+
18
+ <?php
19
+ // get saved style options
20
+ $active_color = get_option('niteoCS_active_color[construct]', '#f37004');
21
+ $font_color = get_option('niteoCS_font_color[construct]', '#686868');
22
+ $background_color = get_option('niteoCS_background_color[construct]', '#ffffff');
23
+ $heading_font = get_option('niteoCS_font_headings', 'Fjalla One');
24
+ $content_font = get_option('niteoCS_font_content', 'Average Sans');
25
+ // get saved content options
26
+ $logo_id = get_option('niteoCS_logo_id');
27
+ $niteoCS_banner = get_option('niteoCS_banner', '0');
28
+ $unplash_feed = get_option('niteoCS_unsplash_feed', '0');
29
+ $body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
30
+ $subscribe = get_option('niteoCS_subscribe_type', '0');
31
+ $copyright = get_option('niteoCS_copyright', 'Copyright 2017 NiteoThemes. All rights reserved.');
32
+ $social_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
33
+
34
+ // override options if theme preview isset
35
+ if ( isset( $theme_preview ) && $theme_preview == 'construct') {
36
+ $heading_font = 'Fjalla One';
37
+ $content_font ='Average Sans';
38
+ $logo_id = '4';
39
+ $niteoCS_banner = '2';
40
+ $body_title = 'SOMETHING IS HAPPENING!';
41
+
42
+ }
43
+
44
+ if ( $heading_font == 'custom' ) {
45
+ $heading_font = get_option('niteoCS_font_headings_custom');
46
+ }
47
+
48
+ if ( $content_font == 'custom' ) {
49
+ $content_font = get_option('niteoCS_font_content_custom');
50
+ }
51
+ $social_media = array('facebook', 'google-plus', 'twitter', 'instagram', 'skype', '500px', 'deviantart', 'behance', 'dribbble', 'pinterest', 'linkedin', 'tumblr', 'youtube', 'vimeo', 'flickr', 'vk','envelope-o');
52
+
53
+ $socials_active = array();
54
+ $i = 0;
55
+ foreach ( $social_media as $social ) {
56
+ if ( get_option('niteoCS_'.$social) != '' ) {
57
+ $socials_active[$i]['name'] = $social;
58
+ $socials_active[$i]['url'] = get_option('niteoCS_'.$social);
59
+ $i++;
60
+ }
61
+ }
62
+
63
+
64
+ if ( get_option( 'blog_public' ) == 0 ) {
65
+ echo "<meta name='robots' content='noindex,nofollow' />";
66
+ } ?>
67
+
68
+ <?php
69
+ if ( !empty( $socials_active ) ) { ?>
70
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
71
+ <?php
72
+ } ?>
73
+ <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'construct/style.css';?>" type="text/css" media="all"></link>
74
+
75
+ <link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
76
+ <?php wp_site_icon();?>
77
+ <style>
78
+ body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
79
+ body{background-color:<?php echo esc_attr( $background_color ); ?>}
80
+ a{color:<?php echo esc_attr( $font_color ); ?>;}
81
+ h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
82
+ h1,h2,h3,h4,h5,h6,a:hover{color:<?php echo esc_attr( $active_color ); ?>;}
83
+ input[type="email"]:focus {border:1px solid <?php echo esc_attr( $active_color ); ?>;}
84
+ input[type="submit"]{background-color: <?php echo esc_attr( $active_color ); ?>;}
85
+ .social-list a:hover{background:<?php echo esc_attr( $active_color ); ?>;}
86
+ </style>
87
+
88
+ <?php
89
+ // custom CSS
90
+ if ( get_option('niteoCS_custom_css', '') !== '' ) { ?>
91
+ <!-- custom CSS -->
92
+ <style>
93
+ <?php
94
+
95
+ echo stripslashes(wp_filter_nohtml_kses(get_option('niteoCS_custom_css'))); ?>
96
+ </style>
97
+ <?php
98
+ }
99
+
100
+ // GOOGLE ANALYTICS
101
+ if ( get_option('niteoCS_analytics', '') !== '' ) { ?>
102
+ <!-- Google analytics code -->
103
+ <script>
104
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
105
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
106
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
107
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
108
+
109
+ ga('create', '<?php echo esc_attr(get_option('niteoCS_analytics'));?>', 'auto');
110
+ ga('send', 'pageview');
111
+
112
+ </script>
113
+ <?php
114
+ } ?>
115
+
116
+ </head>
117
+
118
+ <?php
119
+
120
+
121
+ // check for mobile/desktop and determine image size
122
+ if (preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"])) {
123
+ $size = 'large';
124
+ } else {
125
+ $size = 'full';
126
+ }
127
+ // get logo
128
+ if ( $logo_id != '' ) {
129
+ $logo_url = wp_get_attachment_image_src( $logo_id, $size);
130
+ }
131
+
132
+ // if banner is custom media
133
+ if ( $niteoCS_banner == 0 ) {
134
+ $banner_id = get_option('niteoCS_banner_id');
135
+
136
+ if ( $banner_id != '' ) {
137
+ $banner_ids = explode(',', $banner_id);
138
+ $banner_url = wp_get_attachment_image_src( $banner_ids[mt_rand(0, count( $banner_ids ) - 1)], $size);
139
+ if (isset($banner_url[0])) {
140
+ $banner_url = $banner_url[0];
141
+ }
142
+
143
+ } else {
144
+ // set construct img
145
+ $banner_url = plugin_dir_url( dirname( __FILE__ ) ) . 'construct/img/construct_banner_'.$size.'.jpg';
146
+ }
147
+ } else
148
+ // if banner set to unsplash
149
+ if ( $niteoCS_banner == 1 ) {
150
+
151
+ switch ( $unplash_feed ) {
152
+ // SINGLE IMAGE
153
+ case '0':
154
+ $params = array('feed' => '0', 'url' => get_option('niteoCS_unsplash_0', '') );
155
+ $banner_url = $this->niteo_unsplash( $params );
156
+ break;
157
+ // category random
158
+ case '1':
159
+ $params = array('feed' => '1', 'cat' => get_option('niteoCS_unsplash_category'), 'custom_str' => get_option('niteoCS_cat_keyword', '') );
160
+ $banner_url = $this->niteo_unsplash( $params );
161
+ break;
162
+ // collection
163
+ case '2':
164
+ $params = array('feed' => '2', 'url' => get_option('niteoCS_unsplash_2', '') );
165
+ $banner_url = $this->niteo_unsplash( $params );
166
+ break;
167
+ // random photo
168
+ case '3':
169
+ $params = array('feed' => '3', 'url' => get_option('niteoCS_unsplash_3', ''), 'cat' => get_option('niteoCS_unsplash_feat', '0') );
170
+ $banner_url = $this->niteo_unsplash( $params );
171
+ break;
172
+
173
+ default:
174
+ break;
175
+ }
176
+
177
+
178
+ // else display construct
179
+ } if ( $niteoCS_banner == 2 ) {
180
+ $banner_url = plugin_dir_url( dirname( __FILE__ ) ) . 'construct/img/construct_banner_'.$size.'.jpg';
181
+ }
182
+ ?>
183
+
184
+ <body>
185
+ <section class="section section-logo">
186
+ <?php if ( isset($logo_url[0]) ) { ?>
187
+ <img src="<?php echo esc_url( $logo_url[0] ); ?>" alt="logo">
188
+ <?php } ?>
189
+ </section>
190
+
191
+ <section class="section section-banner" id="banner-wrapper">
192
+ <?php
193
+ // if banner is unsplash
194
+ if ( $niteoCS_banner == 1 ) { ?>
195
+ <script>
196
+ var screenWidth = Math.round(screen.width*window.devicePixelRatio);
197
+ var screenHeight = screenWidth / 1.77777;
198
+ screenHeight = screenHeight.toFixed(0);
199
+
200
+ var banner = '<div class="banner" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>\')"></div>';
201
+ banner = banner.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
202
+ document.getElementById('banner-wrapper').innerHTML = banner;
203
+ </script>
204
+ <?php
205
+
206
+ } else { ?>
207
+ <div class="banner" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
208
+ <?php
209
+ }
210
+ ?>
211
+ </section>
212
+
213
+
214
+ <section class="section section-body">
215
+ <?php if ( $body_title != '' ) { ?>
216
+ <h2><?php echo esc_html( $body_title );?></h2>
217
+ <?php } ?>
218
+
219
+ <?php echo apply_filters('the_content', stripslashes(get_option('niteoCS_body')));?>
220
+
221
+ <?php
222
+ // if subscribers is 3rd party plugin, render form by shortcode
223
+ if ( $subscribe == '1' ) {
224
+ $replace = array('<p>', '</p>' );
225
+ echo str_replace($replace, '', do_shortcode( stripslashes( get_option('niteoCS_subscribe_code') ))) ;
226
+
227
+ // if subsctbiers is niteo, render our html form
228
+ } else if ( $subscribe == '2' ) { ?>
229
+ <form id="subscribe-form" method="post">
230
+ <input type="email" name="EMAIL" placeholder="Your email address" required>
231
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
232
+ <input type="submit" value="Sign up">
233
+
234
+ <div style="display: none;">
235
+ <input type="text" name="form_honeypot" value="" tabindex="-1" autocomplete="off">
236
+ </div>
237
+
238
+ <div class="subsribe-response"><?php echo isset( $subscribe_response ) ? $subscribe_response : '';?></div>
239
+ </form>
240
+ <?php
241
+ }
242
+ ?>
243
+
244
+ </section>
245
+
246
+ <?php
247
+ if ( $social_title != '' || !empty($socials_active)) { ?>
248
+
249
+ <section class="section section-social">
250
+ <?php if ( $social_title != '') { ?>
251
+ <h2><?php echo esc_html( $social_title );?></h2>
252
+ <?php } ?>
253
+
254
+ <ul class="social-list">
255
+ <?php
256
+ foreach ( $socials_active as $social ) {
257
+
258
+ if ( $social['name'] == 'envelope-o' ) {
259
+ echo '<li><a href="mailto:'.antispambot(esc_html($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
260
+
261
+ } else {
262
+ echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
263
+ }
264
+
265
+ } //end foreach ?>
266
+ </ul>
267
+ </section>
268
+ <?php
269
+ }
270
+
271
+ if ( $copyright != '' ) { ?>
272
+ <footer class="section section-footer">
273
+ <p><?php echo esc_html( $copyright );?></p>
274
+ </footer>
275
+ <?php
276
+ } ?>
277
+
278
+ <script type='text/javascript' src='<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'construct/paraxify.min.js';?>'></script>
279
+ </body>
280
+
281
+ </html>
themes/construct/img/construct_banner_full.jpg ADDED
Binary file
themes/construct/img/construct_banner_large.jpg ADDED
Binary file
themes/construct/img/construct_thumbnail.jpg ADDED
Binary file
themes/construct/paraxify.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ (function(){!function(e,t){"use strict";var i;i=function(i,o){var s,n,h,r,f,g,c;return g=0,c=0,h=0,r={},f=[],n=0,s=function(t,i){this.options={speed:1,boost:0};for(h in i)this.options[h]=i[h];if((this.options.speed<0||this.options.speed>1)&&(this.options.speed=1),t||(t="paraxify"),e.getElementsByClassName(t.replace(".","")))this.photos=e.getElementsByClassName(t.replace(".",""));else{if(e.querySelector(t)===!1)throw new Error("The elements you're trying to select don't exist.");this.photos=querySelector(t)}r=this.options,f=this.photos,this._init(this)},s.prototype={update:function(){for(c=t.innerHeight,h=0;h<f.length;)f[h].style.backgroundPosition="center center",f[h].url=t.getComputedStyle(f[h],!1).backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",")[0],f[h].img||(f[h].img=new Image),f[h].url!==f[h].img.src&&(this._check(h),f[h].img.src=f[h].url),h++;this._animate()},_init:function(){this.update(),t.onscroll=function(){this._animate()}.bind(this),t.onresize=function(){this.update()}.bind(this)},_imgReady:function(e){var i;if(i=c,""===e.bgSize||"auto"===e.bgSize){if(this.height<e.offsetHeight)throw e.ok=!1,new Error("The image "+e.url+" ("+this.height+"px) is too short for that container ("+e.offsetHeight+"px).");i=this.height,this.height<c&&(i+=(c-e.offsetHeight)*r.speed)}else if("cover"===e.bgSize){if(c<e.offsetHeight)throw e.ok=!1,new Error("The container ("+e.offsetHeight+"px) can't be bigger than the image ("+c+"px).")}else"cover"===t.getComputedStyle(e,!1).backgroundSize,this._check(h);e.diff=-(i-e.offsetHeight)*r.speed,e.diff=e.diff-e.offsetHeight*r.boost},_check:function(e){var i,o;o=f[e],o.ok=!0,o.bgSize=t.getComputedStyle(o,!1).backgroundSize,i=c,f[e].img.complete?this._imgReady(o):f[e].img.onload=this._imgReady(o)},_visible:function(e){return g+c>f[e].offsetTop&&g<f[e].offsetTop+f[e].offsetHeight?!0:!1},_animate:function(){var i,o;for(g=void 0!==t.pageYOffset?t.pageYOffset:(e.documentElement||e.body.parentNode||e.body).scrollTop,h=0;h<f.length;)this._check(h),f[h].ok&&"fixed"===t.getComputedStyle(f[h],!1).backgroundAttachment&&this._visible(h)?(i=(g-f[h].offsetTop+c)/(f[h].offsetHeight+c),o=f[h].diff*(i-.5),"cover"!==f[h].bgSize&&(o+=(c-f[h].img.height)/2),o=Math.round(100*o)/100):o="center",f[h].style.backgroundPosition="center "+o+"px",h++}},new s(i,o)},t.paraxify=i}(document,window,0)}).call(this);
2
+ // run paraxify
3
+ myParaxify = paraxify('.banner');
themes/construct/style.css ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body{margin:0;}
2
+ :focus {outline:none;}
3
+ h1,h2,h3,h4,h5,h6{font-weight: 400;font-size:2em;}
4
+ .section {padding: 50px 2em;text-align: center;position: relative;}
5
+ .section-logo img {width: 500px;max-width: 100%;}
6
+ .section-banner{height: 300px;}
7
+ .section-body p{width:70%;max-width: 900px;margin:1em auto;}
8
+ .section-social{background-color: #f8f8f8;}
9
+ .section-footer{background-color: #2a2829;color:#a3a1a2;padding: 1em;}
10
+ .banner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;background-attachment: fixed;background-position: center center;background-repeat: no-repeat;background-size: cover;}
11
+ .social-list{padding:0;margin-bottom: 0;}
12
+ .social-list li{list-style: none;display: inline-block; padding: 0 5px;}
13
+ .section-body form{max-width: 400px;margin: 0 auto;margin-top: 70px;margin-bottom: 30px;text-align:left;}
14
+ .section-body form br {display: none;}
15
+ label {display: block;}
16
+ input[type="email"] {width:280px;background-color: #f8f8f8;text-indent: 15px;font-style: italic;border: 1px solid #dcdcdc; border-top-left-radius:5px;border-bottom-left-radius:5px;}
17
+ input[type="submit"] {padding: 0;margin-left:-7px;width: 120px;color: white;font-weight:700;border: none;border-top-right-radius:5px;border-bottom-right-radius:5px;letter-spacing: 1px;cursor:pointer;}
18
+ input[type="email"],
19
+ input[type="submit"] {display: inline-block;line-height: 4em;height: 4em;box-sizing: border-box;vertical-align: middle;}
20
+ .social-list a{display: block;height: 3em;width: 3em;line-height: 3em;background: transparent;-webkit-transition: background 300ms linear;-o-transition: background 300ms linear;transition: background 300ms linear;border-radius: 5px;}
21
+ .social-list i{font-size: 2em;-webkit-transition: all 300ms linear;-o-transition: all 300ms linear;transition: all 300ms linear;vertical-align: middle;}
22
+ .social-list a:hover i {-webkit-animation: spin 300ms linear;-moz-animation: spin 300ms linear;animation: spin 300ms linear;color:#fff;}
23
+ /* contact form 7 */
24
+ .wpcf7 .screen-reader-response, .wpcf7 .wpcf7-validation-errors {display: none;}
25
+ .wpcf7 .wpcf7-form-control-wrap {position: relative;}
26
+ .wpcf7-form .wpcf7-not-valid-tip {position: absolute;bottom: -3em;left: 15px;right: -100px;text-align: left;}
27
+ /* scrollbar */
28
+ ::-webkit-scrollbar {
29
+ width:9px;
30
+ }
31
+ ::-webkit-scrollbar-thumb {
32
+ background:rgba(0,0,0,0.8);
33
+ border:none;
34
+ border-bottom-left-radius:0;
35
+ border-bottom-right-radius:0;
36
+ border-top-left-radius:0;
37
+ border-top-right-radius:0;
38
+ }
39
+ ::-webkit-scrollbar-track {
40
+ background:rgba(170,170,170,0.8);
41
+ } @-moz-keyframes spin {
42
+ from { -moz-transform: rotate(0deg); }
43
+ to { -moz-transform: rotate(360deg); }
44
+ }
45
+ @-webkit-keyframes spin {
46
+ from { -webkit-transform: rotate(0deg); }
47
+ to { -webkit-transform: rotate(360deg); }
48
+ }
49
+ @keyframes spin {
50
+ from {transform:rotate(0deg);}
51
+ to {transform:rotate(360deg);}
52
+ }
53
+
54
+ @media only screen and (max-width : 480px) {
55
+ .section {padding: 20px 10px;}
56
+ input[type="email"],
57
+ input[type="submit"] {line-height: 3em;height: 3em;}
58
+ input[type="email"] {width: 70%;}
59
+ input[type="submit"] {width: 30%;}
60
+ .section-body p {width:90%;}
61
+ }
themes/hardwork/hardwork-settings.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // get options
12
+ $niteoCS_font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
13
+ $niteoCS_overlay_color = get_option('niteoCS_overlay_color[hardwork]', '#0a0a0a');
14
+ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
15
+
16
+
17
+ if (isset($_POST['niteoCS_font_color_hardwork'])) {
18
+ update_option('niteoCS_font_color[hardwork]', sanitize_hex_color($_POST['niteoCS_font_color_hardwork']));
19
+ $niteoCS_font_color = get_option('niteoCS_font_color[hardwork]');
20
+ }
21
+
22
+
23
+ if (isset($_POST['niteoCS_overlay_color_hardwork'])) {
24
+ update_option('niteoCS_overlay_color[hardwork]', sanitize_hex_color($_POST['niteoCS_overlay_color_hardwork']));
25
+ $niteoCS_overlay_color = get_option('niteoCS_overlay_color[hardwork]');
26
+ }
27
+
28
+ if (isset($_POST['niteoCS_overlay_opacity_hardwork'])) {
29
+ update_option('niteoCS_overlay_opacity[hardwork]', sanitize_text_field($_POST['niteoCS_overlay_opacity_hardwork']));
30
+ $niteoCS_overlay_opacity = get_option('niteoCS_overlay_opacity[hardwork]');
31
+ }
32
+
33
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
34
+
35
+ if (isset($_POST['niteoCS_overlay_checkbox_hardwork'])) {
36
+ update_option('niteoCS_overlay_checkbox[hardwork]', $this->sanitize_checkbox($_POST['niteoCS_overlay_checkbox_hardwork']));
37
+ } else {
38
+ update_option('niteoCS_overlay_checkbox[hardwork]', false);
39
+ }
40
+
41
+ }
42
+
43
+ ?>
44
+
45
+ <style>
46
+ #social-section tr:first-of-type,
47
+ #subscribe-section,
48
+ #copyright-section {display: none!important;}
49
+ </style>
50
+
51
+ <div class="table-wrapper customization">
52
+ <h3><?php _e('Customize Colors', 'comingSoon');?></h3>
53
+ <table class="customization">
54
+
55
+ <tr>
56
+ <th><h4><?php _e('Font Color', 'comingSoon');?></h4></th>
57
+ <td>
58
+ <fieldset>
59
+ <input type="text" name="niteoCS_font_color_hardwork" id="niteoCS_font_color" value="<?php echo esc_attr( $niteoCS_font_color); ?>" data-default-color="#ffffff" class="regular-text code"><br>
60
+ </fieldset>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <th><h4><?php _e('Overlay Color', 'comingSoon');?></h4></th>
65
+ <td>
66
+ <fieldset class="padding-bottom">
67
+ <input type="checkbox" name="niteoCS_overlay_checkbox_hardwork" id="niteoCS_overlay_checkbox" value="1" <?php checked( '1', get_option( 'niteoCS_overlay_checkbox', '1' ) ); ?> class="regular-text code"><label for="niteoCS_overlay_checkbox"><?php _e('Enable Overlay Color', 'comingSoon');?></label><br>
68
+ </fieldset>
69
+
70
+ <fieldset id="overlay-color">
71
+ <input type="text" name="niteoCS_overlay_color_hardwork]" id="niteoCS_overlay_color" value="<?php echo esc_attr( $niteoCS_overlay_color); ?>" data-default-color="#0a0a0a" class="regular-text code"><br>
72
+
73
+ <label for="niteoCS_overlay_opacity"><?php _e('Overlay Opacity', 'comingSoon');?></label><br>
74
+ <input type="range" id="niteoCS_overlay_opacity" name="niteoCS_overlay_opacity_hardwork" min="0" max="1" step="0.1"value="<?php echo esc_attr( $niteoCS_overlay_opacity); ?>" />
75
+ <p class="opacity-value">Current value: <span id="current-opacity"><?php echo esc_attr( $niteoCS_overlay_opacity); ?></span></p>
76
+ </fieldset>
77
+ </td>
78
+ </tr>
79
+ </table>
80
+ </div>
81
+
82
+
83
+ <script>
84
+ jQuery(document).ready(function($){
85
+ // ini color picker
86
+ jQuery('#niteoCS_font_color').wpColorPicker();
87
+ jQuery('#niteoCS_overlay_color').wpColorPicker();
88
+
89
+ // hide overlay color checkbox
90
+ if ( jQuery('#niteoCS_overlay_checkbox').prop('checked') !== true) {
91
+ jQuery('#overlay-color').css('display','none')
92
+ }
93
+ // hiding subscribe from on change
94
+ jQuery('#niteoCS_overlay_checkbox').change(function() {
95
+
96
+ if( jQuery(this)[0].checked ) {
97
+ jQuery('#overlay-color').css('display','block')
98
+ } else {
99
+ jQuery('#overlay-color').css('display','none')
100
+ }
101
+ });
102
+
103
+ var currentValue = jQuery('#current-opacity');
104
+
105
+ jQuery('#niteoCS_overlay_opacity').change(function(){
106
+ currentValue.html(this.value);
107
+ });
108
+
109
+ });
110
+ </script>
themes/hardwork/hardwork-theme.php ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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').' Coming soon!')) ); ?></title>
11
+
12
+ <?php
13
+ // get saved style options
14
+ $font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
15
+ $background_color = get_option('niteoCS_overlay_color[hardwork]', '#000000');
16
+ $background_opa = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
17
+ $heading_font = get_option('niteoCS_font_headings', 'Playfair Display');
18
+ $content_font = get_option('niteoCS_font_content', 'Raleway');
19
+ // get saved content options
20
+ $logo_id = get_option('niteoCS_logo_id');
21
+ $niteoCS_banner = get_option('niteoCS_banner', '0');
22
+ $unplash_feed = get_option('niteoCS_unsplash_feed', '0');
23
+ $social_title = get_option('niteoCS_soc_title', 'GET SOCIAL WITH US');
24
+ $body_title = get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!');
25
+
26
+ // override options if theme preview isset
27
+ if ( isset( $theme_preview ) && $theme_preview == 'hardwork' ) {
28
+ $heading_font = 'Playfair Display';
29
+ $content_font ='Raleway';
30
+ $logo_id = '8';
31
+ $niteoCS_banner = '2';
32
+ $body_title = 'We will be back soon!';
33
+
34
+ }
35
+
36
+ if ( $heading_font == 'custom' ) {
37
+ $heading_font = get_option('niteoCS_font_headings_custom');
38
+ }
39
+
40
+ if ( $content_font == 'custom' ) {
41
+ $content_font = get_option('niteoCS_font_content_custom');
42
+ }
43
+
44
+ $social_media = array('facebook', 'google-plus', 'twitter', 'instagram', 'skype', '500px', 'deviantart', 'behance', 'dribbble', 'pinterest', 'linkedin', 'tumblr', 'youtube', 'vimeo', 'flickr', 'vk','envelope-o');
45
+
46
+ $background_social = $this->hex2rgba($background_color, '0.7');
47
+ $socials_active = array();
48
+ $i = 0;
49
+ foreach ($social_media as $social) {
50
+ if ( get_option('niteoCS_'.$social) != '' ) {
51
+ $socials_active[$i]['name'] = $social;
52
+ $socials_active[$i]['url'] = get_option('niteoCS_'.$social);
53
+ $i++;
54
+ }
55
+ }
56
+
57
+
58
+
59
+ if ( get_option( 'blog_public' ) == 0 ) {
60
+ echo "<meta name='robots' content='noindex,nofollow' />";
61
+ } ?>
62
+
63
+ <?php
64
+ if ( !empty( $socials_active ) ) { ?>
65
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
66
+ <?php
67
+ } ?>
68
+ <link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'hardwork/style.css';?>" type="text/css" media="all"></link>
69
+
70
+ <link href="https://fonts.googleapis.com/css?family=<?php echo esc_attr(str_replace(' ', '+', $heading_font));?>|<?php echo esc_attr(str_replace(' ', '+', $content_font));?>:400,400i,700" rel="stylesheet">
71
+
72
+ <?php wp_site_icon();?>
73
+
74
+ <style>
75
+ body,input {font-family:'<?php echo esc_attr($content_font);?>', 'sans-serif';color:<?php echo esc_attr( $font_color ); ?>;}
76
+
77
+ <?php
78
+ if ( get_option( 'niteoCS_overlay_checkbox', '1' ) == 1 ) { ?>
79
+ #background-color {background-color:<?php echo esc_attr( $background_color ); ?>;opacity:<?php echo esc_attr( $background_opa ); ?>;}
80
+ .social-list{background-color: <?php echo esc_attr( $background_social ); ?>;}
81
+ <?php
82
+ } ?>
83
+ a{color:<?php echo esc_attr( $font_color ); ?>;}
84
+ h1,h2,h3,h4,h5,h6 {font-family:'<?php echo esc_attr($heading_font);?>', 'sans-serif';}
85
+ </style>
86
+
87
+ <?php
88
+ // custom CSS
89
+ if ( get_option('niteoCS_custom_css', '') !== '' ) { ?>
90
+ <!-- custom CSS -->
91
+ <style>
92
+ <?php
93
+
94
+ echo stripslashes(wp_filter_nohtml_kses(get_option('niteoCS_custom_css'))); ?>
95
+ </style>
96
+ <?php
97
+ }
98
+
99
+ // GOOGLE ANALYTICS
100
+ if ( get_option('niteoCS_analytics', '') !== '' ) { ?>
101
+ <!-- Google analytics code -->
102
+ <script>
103
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
104
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
105
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
106
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
107
+
108
+ ga('create', '<?php echo esc_attr(get_option('niteoCS_analytics'));?>', 'auto');
109
+ ga('send', 'pageview');
110
+
111
+ </script>
112
+ <?php
113
+ } ?>
114
+
115
+ </head>
116
+
117
+ <?php
118
+
119
+ if ( $heading_font == 'custom' ) {
120
+ $heading_font = str_replace(' ', '+', get_option('niteoCS_font_headings_custom'));
121
+ }
122
+
123
+ if ( $content_font == 'custom' ) {
124
+ $content_font = str_replace(' ', '+', get_option('niteoCS_font_content_custom'));
125
+ }
126
+ // check for mobile/desktop and determine image size
127
+ if (preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"])) {
128
+ $size = 'large';
129
+ } else {
130
+ $size = 'full';
131
+ }
132
+ // get logo
133
+ if ( $logo_id != '' ) {
134
+ $logo_url = wp_get_attachment_image_src( $logo_id, $size);
135
+ }
136
+
137
+ // if banner is custom media
138
+ if ( $niteoCS_banner == 0 ) {
139
+ $banner_id = get_option('niteoCS_banner_id');
140
+
141
+ if ( $banner_id != '' ) {
142
+ $banner_ids = explode(',', $banner_id);
143
+ $banner_url = wp_get_attachment_image_src( $banner_ids[mt_rand(0, count( $banner_ids ) - 1)], $size);
144
+ if (isset($banner_url[0])) {
145
+ $banner_url = $banner_url[0];
146
+ }
147
+
148
+ } else {
149
+ // set construct img
150
+ $banner_url = plugin_dir_url( dirname( __FILE__ ) ) . 'hardwork/img/hardwork_banner_'.$size.'.jpg';
151
+ }
152
+ } else
153
+ // if banner set to unsplash
154
+ if ( $niteoCS_banner == 1 ) {
155
+
156
+ switch ( $unplash_feed ) {
157
+ // SINGLE IMAGE
158
+ case '0':
159
+ $params = array('feed' => '0', 'url' => get_option('niteoCS_unsplash_0', '') );
160
+ $banner_url = $this->niteo_unsplash( $params );
161
+ break;
162
+ // category random
163
+ case '1':
164
+ $params = array('feed' => '1', 'cat' => get_option('niteoCS_unsplash_category'), 'custom_str' => get_option('niteoCS_cat_keyword', '') );
165
+ $banner_url = $this->niteo_unsplash( $params );
166
+ break;
167
+ // collection
168
+ case '2':
169
+ $params = array('feed' => '2', 'url' => get_option('niteoCS_unsplash_2', '') );
170
+ $banner_url = $this->niteo_unsplash( $params );
171
+ break;
172
+ // random photo
173
+ case '3':
174
+ $params = array('feed' => '3', 'url' => get_option('niteoCS_unsplash_3', ''), 'cat' => get_option('niteoCS_unsplash_feat', '0') );
175
+ $banner_url = $this->niteo_unsplash( $params );
176
+ break;
177
+
178
+ default:
179
+ break;
180
+ }
181
+
182
+
183
+ // else display construct
184
+ } if ( $niteoCS_banner == 2 ) {
185
+ $banner_url = plugin_dir_url( dirname( __FILE__ ) ) . 'hardwork/img/hardwork_banner_'.$size.'.jpg';
186
+ }
187
+ ?>
188
+
189
+
190
+
191
+ <body id="body">
192
+ <?php
193
+ // if banner is unsplash
194
+ if ( $niteoCS_banner == 1 ) { ?>
195
+ <script>
196
+ var screenWidth = Math.round(screen.width*window.devicePixelRatio);
197
+ var screenHeight = screenWidth / 1.77777;
198
+ screenHeight = screenHeight.toFixed(0);
199
+
200
+ var banner = '<div id="background-wrapper"><div id="background-image" style="background-image:url(\'<?php echo esc_url( $banner_url ); ?>\')"></div><div id="background-color"></div></div>';
201
+ banner = banner.replace('WIDTHxHEIGHT', screenWidth + 'x' + screenHeight);
202
+ document.getElementById('body').innerHTML = banner;
203
+ </script>
204
+ <?php
205
+
206
+ } else { ?>
207
+ <div id="background-wrapper">
208
+ <div id="background-image" style="background-image:url('<?php echo esc_url( $banner_url ); ?>')"></div>
209
+ <div id="background-color"></div>
210
+ </div>
211
+ <?php
212
+ }
213
+ ?>
214
+ <section class="section section-logo">
215
+ <?php if ( isset($logo_url[0]) ) { ?>
216
+ <img src="<?php echo esc_url( $logo_url[0] ); ?>" alt="logo">
217
+ <?php } ?>
218
+ </section>
219
+
220
+ <section class="section section-body">
221
+ <?php if ( $body_title != '' ) { ?>
222
+ <h2><?php echo esc_html( $body_title );?></h2>
223
+ <?php } ?>
224
+
225
+ <?php echo apply_filters('the_content', stripslashes(get_option('niteoCS_body')));?>
226
+
227
+ </section>
228
+
229
+ <?php
230
+ if ( !empty($socials_active)) { ?>
231
+
232
+ <section class="section section-social">
233
+
234
+ <ul class="social-list">
235
+ <?php
236
+ foreach ( $socials_active as $social ) {
237
+
238
+ if ( $social['name'] == 'envelope-o' ) {
239
+ echo '<li><a href="mailto:'.antispambot(esc_attr($social['url'])).'" target="_blank"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
240
+
241
+ } else {
242
+ echo '<li><a href="'.esc_url($social['url']).'" target="top"><i class="fa fa-'.$social['name'].'" aria-hidden="true"></i></a></li>';
243
+ }
244
+
245
+ } //end foreach ?>
246
+ </ul>
247
+ </section>
248
+ <?php
249
+ } ?>
250
+
251
+
252
+ </body>
253
+
254
+ </html>
themes/hardwork/img/hardwork_banner_full.jpg ADDED
Binary file
themes/hardwork/img/hardwork_banner_large.jpg ADDED
Binary file
themes/hardwork/img/hardwork_thumbnail.jpg ADDED
Binary file
themes/hardwork/style.css ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body{
2
+ display: flex;
3
+ flex-direction: column;
4
+ margin:0;
5
+ min-height: 100vh;
6
+ position: relative;
7
+ }
8
+
9
+ h1,h2,h3,h4,h5,h6{
10
+ font-weight: 400;
11
+ font-size: 3.5em;
12
+ margin-bottom: .3em;
13
+ }
14
+ .section {
15
+ flex-grow: 1;
16
+ padding: 0 2em;
17
+ text-align: center;
18
+ position: relative;
19
+ }
20
+
21
+ .section-body {
22
+ flex-grow: 10;
23
+ }
24
+
25
+ .section-social {
26
+ padding-bottom: 15px;
27
+ }
28
+
29
+ .section-logo {
30
+ padding-top: 50px;
31
+ }
32
+
33
+ .section-logo img {
34
+ width: 500px;
35
+ max-width: 100%;
36
+ }
37
+
38
+
39
+ .section-body p {
40
+ max-width: 70%;
41
+ margin:1em auto;
42
+ font-size: 1.2em;
43
+ }
44
+
45
+ #background-wrapper,
46
+ #background-image,
47
+ #background-color {
48
+ position: absolute;
49
+ top: 0;
50
+ right: 0;
51
+ bottom: 0;
52
+ left: 0;
53
+ }
54
+
55
+ #background-wrapper {
56
+ overflow: hidden;
57
+ }
58
+
59
+ #background-image {
60
+ background-attachment: fixed;
61
+ background-position: center center;
62
+ background-repeat: no-repeat;
63
+ background-size: cover;
64
+ }
65
+
66
+ .social-list {
67
+ display: inline-block;
68
+ padding:0;
69
+ margin-bottom: 0;
70
+ border-radius: 10px;
71
+ padding-bottom: 5px;
72
+ }
73
+
74
+ .social-list li{
75
+ list-style: none;
76
+ display: inline-block;
77
+ padding: 0 2px;
78
+ }
79
+
80
+ .social-list a{
81
+ display: block;
82
+ height: 3em;
83
+ width: 2.5em;
84
+ line-height: 3em;
85
+ background: transparent;
86
+ -webkit-transition: background 300ms linear;
87
+ -o-transition: background 300ms linear;
88
+ transition: background 300ms linear;
89
+ border-radius: 5px;
90
+ }
91
+ .social-list i{
92
+ font-size: 1em;
93
+ -webkit-transition: all 300ms linear;
94
+ -o-transition: all 300ms linear;
95
+ transition: all 300ms linear;
96
+ vertical-align: middle;
97
+ }
98
+ .social-list a:hover i {
99
+ -webkit-animation: spin 300ms linear;
100
+ -moz-animation: spin 300ms linear;
101
+ animation: spin 300ms linear;
102
+ color:#fff;
103
+ }
104
+
105
+
106
+
107
+ @-webkit-keyframes spin {
108
+ from { -webkit-transform: rotate(0deg); }
109
+ to { -webkit-transform: rotate(360deg); }
110
+ }
111
+ @keyframes spin {
112
+ from {transform:rotate(0deg);}
113
+ to {transform:rotate(360deg);}
114
+ }
115
+
116
+ @media only screen and (max-width : 560px) {
117
+ .section {padding: 20px 10px;}
118
+ .section-logo { padding-top: 20px;}
119
+ h2 {font-size: 2.5em;}
120
+ .section-body p {font-size: 1em;}
121
+
122
+ }