IgniteUp – Coming Soon and Maintenance Mode - Version 3.2

Version Description

  • New feature to whitelist IP addresses to skip coming soon page
  • New feature to set a random and unique URL to skip coming soon page
  • New feature to receive an email when you have a new subscriber
  • Fixed a bug with saving subscriber name for external integrations
  • More minor bug fixes
Download this release

Release Info

Developer ceylonsystems
Plugin Icon 128x128 IgniteUp – Coming Soon and Maintenance Mode
Version 3.2
Comparing to
See all releases

Code changes from version 3.1 to 3.2

igniteup.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: IgniteUp
4
  Plugin URI: http://getigniteup.com
5
  Description: IgniteUp is a powerful plugin which allows you to keep your site on launchpad till ignite-up and to build amazing coming soon pages.
6
- Version: 3.1
7
  Author: Ceylon Systems
8
  Author URI: http://getigniteup.com
9
  License: GPLv2 or later
@@ -13,4 +13,4 @@
13
 
14
  require_once 'includes/core-import.php';
15
 
16
- new CSComingSoonCreator(__FILE__, '3.1');
3
  Plugin Name: IgniteUp
4
  Plugin URI: http://getigniteup.com
5
  Description: IgniteUp is a powerful plugin which allows you to keep your site on launchpad till ignite-up and to build amazing coming soon pages.
6
+ Version: 3.2
7
  Author: Ceylon Systems
8
  Author URI: http://getigniteup.com
9
  License: GPLv2 or later
13
 
14
  require_once 'includes/core-import.php';
15
 
16
+ new CSComingSoonCreator(__FILE__, '3.2');
includes/class-admin-options.php CHANGED
@@ -2,8 +2,8 @@
2
 
3
  class CSAdminOptions {
4
 
5
- public static $gener_options = array('enable', 'cs_page_title', 'skipfor', 'powered_by', 'customcss', 'favicon_url', 'send_status');
6
- public static $common_options = array('subscribe_text', 'alert_thankyou', 'alert_error_invalid_email', 'alert_error_already_exists', 'social_twitter', 'social_facebook', 'social_pinterest', 'social_googleplus', 'social_youtube', 'social_behance', 'social_linkedin', 'social_instagram', 'receive_email_addr');
7
  private static $integration_options = array('mailchimp_api', 'mailchimp_list', 'save_email_to', 'enable_integration', 'mailpoet_list');
8
 
9
  public static function registerGeneralOptions() {
@@ -68,53 +68,107 @@ class CSAdminOptions {
68
  $version = get_option(CSCS_GENEROPTION_PREFIX . 'version', '1.0');
69
  $templates = apply_filters('igniteup_get_templates', $cscs_templates);
70
  ksort($templates);
71
-
72
- /*
73
  *
74
  * Check for incompatible templates.
75
  *
76
  */
77
- foreach ($templates as $template => $option){
78
- if (isset($option['igniteup_version']) && floatval($option['igniteup_version']) > floatval($version)){
79
- if ($onlyCheckIfThereAreIncompatibles) {
80
- return TRUE;
81
- } else {
82
- unset($templates[$template]);
83
- }
84
- }
85
- }
86
  $cscs_templates = $templates;
87
  return $onlyCheckIfThereAreIncompatibles ? FALSE : $templates; //Return FALSE if all themes are compatible.
88
  }
89
 
90
  public static function setDefaultOptions() {
91
-
92
  }
93
 
94
  public static function selectOptionIsSelected($saved_val, $current_val) {
95
  if ($saved_val == $current_val)
96
- return 'selected="selected"';
97
  return '';
98
  }
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  public static function getDefaultStrings($key) {
101
  $option_name = CSCS_GENEROPTION_PREFIX . $key;
102
  $return = get_option($option_name);
103
- $array = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  'subscribe_text' => __('Subscribe', CSCS_TEXT_DOMAIN),
105
- 'alert_thankyou' => __('<strong>Thank you!</strong> You are subscribed', CSCS_TEXT_DOMAIN),
106
- 'alert_error_invalid_email' => __('<strong>Invalid Email!</strong> Please try again', CSCS_TEXT_DOMAIN),
107
- 'alert_error_already_exists' => __('<strong>Email already exists!</strong> Please try again', CSCS_TEXT_DOMAIN),
108
- 'days' => __('DAYS', CSCS_TEXT_DOMAIN),
109
- 'hours' => __('HOURS', CSCS_TEXT_DOMAIN),
110
- 'minutes' => __('MINUTES', CSCS_TEXT_DOMAIN),
111
- 'seconds' => __('SECONDS', CSCS_TEXT_DOMAIN),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  'secs' => __('SECS', CSCS_TEXT_DOMAIN),
113
  'mins' => __('MINS', CSCS_TEXT_DOMAIN),
114
  );
115
- if (empty($return))
116
- $return = $array[$key];
117
- return $return;
118
  }
119
 
120
  }
2
 
3
  class CSAdminOptions {
4
 
5
+ public static $gener_options = array('enable', 'cs_page_title', 'skipfor', 'skip_with_get_request', 'whitelisted_ips', 'powered_by', 'customcss', 'favicon_url', 'send_status');
6
+ public static $common_options = array('subscribe_text', 'alert_thankyou', 'alert_error_invalid_email', 'alert_error_already_exists', 'get_email_on_subscribe', 'social_twitter', 'social_facebook', 'social_pinterest', 'social_googleplus', 'social_youtube', 'social_behance', 'social_linkedin', 'social_instagram', 'receive_email_addr','success_notice');
7
  private static $integration_options = array('mailchimp_api', 'mailchimp_list', 'save_email_to', 'enable_integration', 'mailpoet_list');
8
 
9
  public static function registerGeneralOptions() {
68
  $version = get_option(CSCS_GENEROPTION_PREFIX . 'version', '1.0');
69
  $templates = apply_filters('igniteup_get_templates', $cscs_templates);
70
  ksort($templates);
71
+
72
+ /*
73
  *
74
  * Check for incompatible templates.
75
  *
76
  */
77
+ foreach ($templates as $template => $option) {
78
+ if (isset($option['igniteup_version']) && floatval($option['igniteup_version']) > floatval($version)) {
79
+ if ($onlyCheckIfThereAreIncompatibles) {
80
+ return TRUE;
81
+ } else {
82
+ unset($templates[$template]);
83
+ }
84
+ }
85
+ }
86
  $cscs_templates = $templates;
87
  return $onlyCheckIfThereAreIncompatibles ? FALSE : $templates; //Return FALSE if all themes are compatible.
88
  }
89
 
90
  public static function setDefaultOptions() {
91
+ update_option(CSCS_GENEROPTION_PREFIX . 'skip_with_get_request', rand(100000000, 9999999999999));
92
  }
93
 
94
  public static function selectOptionIsSelected($saved_val, $current_val) {
95
  if ($saved_val == $current_val)
96
+ return 'selected';
97
  return '';
98
  }
99
 
100
+ /**
101
+ * Returns a requested default string.
102
+ * Available Strings are listed below.
103
+ *
104
+ * CountDown: days, hours, minutes, secs, mins
105
+ *
106
+ * Forms: subscribe_thankyou, contact_success, contact_failed
107
+ *
108
+ * Common: invalid_email, existing_email, sending, error
109
+ *
110
+ * @param string $key slug
111
+ * @return string Requested translatable string
112
+ */
113
  public static function getDefaultStrings($key) {
114
  $option_name = CSCS_GENEROPTION_PREFIX . $key;
115
  $return = get_option($option_name);
116
+ $array = self::messageBag();
117
+ if (empty($return))
118
+ $return = $array[$key];
119
+ return $return;
120
+ }
121
+
122
+ /**
123
+ * Array of default strings
124
+ *
125
+ * @return array
126
+ */
127
+ static function messageBag() {
128
+ return array(
129
+
130
+ /*
131
+ *
132
+ * Subscribe Form
133
+ *
134
+ */
135
  'subscribe_text' => __('Subscribe', CSCS_TEXT_DOMAIN),
136
+ 'subscribe_done' => __('Subscribed', CSCS_TEXT_DOMAIN),
137
+ 'alert_thankyou' => __('<strong>Thank you!</strong> You are subscribed.', CSCS_TEXT_DOMAIN), //Old templates: before v3.1
138
+ 'alert_error_invalid_email' => __('<strong>Invalid Email!</strong> Please try again.', CSCS_TEXT_DOMAIN), //Old templates: before v3.1
139
+ 'alert_error_already_exists' => __('<strong>Email already exists!</strong> Please try again.', CSCS_TEXT_DOMAIN), //Old templates: before v3.1
140
+ 'subscribe_thankyou' => __('Thanks for subscribing!', CSCS_TEXT_DOMAIN), //Subscribe form on SUCCESS
141
+
142
+ /*
143
+ *
144
+ * Contact Form
145
+ *
146
+ */
147
+ 'contact_success' => __("Thanks for making a sound!", CSCS_TEXT_DOMAIN), //Contact form on SUCCESS
148
+ 'contact_failed' => __("Message not sent.", CSCS_TEXT_DOMAIN), //Contact form on !SUCCESS
149
+
150
+ /*
151
+ *
152
+ * Common
153
+ *
154
+ */
155
+ 'invalid_email' => __("Please enter a valid email.", CSCS_TEXT_DOMAIN),
156
+ 'existing_email' => __("That email is already with us.", CSCS_TEXT_DOMAIN),
157
+ 'sending' => __("Sending...", CSCS_TEXT_DOMAIN), //Button text till ajax completion
158
+ 'error' => __("Something Went Wrong.", CSCS_TEXT_DOMAIN),
159
+
160
+ /*
161
+ *
162
+ * Countdown
163
+ *
164
+ */
165
+ 'days' => __('DAY<span id="day-s">S</span>', CSCS_TEXT_DOMAIN),
166
+ 'hours' => __('HOUR<span id="hrs-s">S</span>', CSCS_TEXT_DOMAIN),
167
+ 'minutes' => __('MINUTE<span id="min-s">S</span>', CSCS_TEXT_DOMAIN),
168
+ 'seconds' => __('SECOND<span id="sec-s">S</span>', CSCS_TEXT_DOMAIN),
169
  'secs' => __('SECS', CSCS_TEXT_DOMAIN),
170
  'mins' => __('MINS', CSCS_TEXT_DOMAIN),
171
  );
 
 
 
172
  }
173
 
174
  }
includes/class-coming-soon-creator.php CHANGED
@@ -79,6 +79,10 @@ class CSComingSoonCreator {
79
  return FALSE;
80
  if ($this->checkForSkipping())
81
  return FALSE;
 
 
 
 
82
  return TRUE;
83
  }
84
 
@@ -147,14 +151,16 @@ class CSComingSoonCreator {
147
 
148
  if (isset($_GET['page']) && ($_GET['page'] == 'cscs_options' || $_GET['page'] == 'cscs_subscribers')) {
149
  wp_enqueue_style('wp-color-picker');
 
150
  wp_enqueue_script('jquery');
151
 
152
  wp_enqueue_script('jquery-form', false, array('jquery'));
 
153
  wp_enqueue_script('jquery-ui-accordion', false, array('jquery'));
154
  wp_enqueue_script('jquery-ui-datepicker');
155
  wp_enqueue_style('jquery-ui-theme', '//code.jquery.com/ui/1.11.4/themes/flick/jquery-ui.css');
156
  wp_enqueue_script('bootstrap-switch', plugin_dir_url(CSCS_FILE) . 'includes/js/bootstrap-switch.min.js', array('jquery'), CSCS_CURRENT_VERSION, true);
157
- wp_enqueue_script('igniteup', plugin_dir_url(CSCS_FILE) . 'includes/js/main.js', array('jquery', 'wp-color-picker'), CSCS_CURRENT_VERSION, true);
158
  wp_enqueue_media();
159
  }
160
  }
@@ -236,6 +242,43 @@ class CSComingSoonCreator {
236
  return FALSE;
237
  }
238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  public function showAdminBarMenu() {
240
  if (!$this->checkIfEnabled())
241
  return;
@@ -249,7 +292,7 @@ class CSComingSoonCreator {
249
  }
250
 
251
  public function subscribeEmail() {
252
- $email = trim($_REQUEST['cs_email']);
253
  $errorInput = CSAdminOptions::getDefaultStrings('alert_error_invalid_email');
254
  if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
255
  echo json_encode(array('status' => FALSE, 'error' => TRUE, 'message' => $errorInput));
@@ -269,6 +312,8 @@ class CSComingSoonCreator {
269
 
270
  $wpdb->insert(CSCS_DBTABLE_PREFIX . CSCS_DBTABLE_SUBSCRIPTS, array('name' => $name, 'email' => $email));
271
  $this->subscribeToMailingLists($name, $email);
 
 
272
  echo json_encode(array('status' => TRUE, 'error' => FALSE));
273
  wp_die();
274
  }
@@ -276,13 +321,16 @@ class CSComingSoonCreator {
276
  public function sendContactForm() {
277
  $name = trim($_REQUEST['contact_name']);
278
  $email = trim($_REQUEST['contact_email']);
 
279
  $message = trim($_REQUEST['contact_message']);
280
- // Create the email and send the message
281
  $cs_receive_email_addr = CSCS_GENEROPTION_PREFIX . 'receive_email_addr';
282
  $admin_email = get_bloginfo('admin_email');
283
  $to = get_option($cs_receive_email_addr, $admin_email);
284
  $email_subject = sprintf(__('%1$s Sent you a Message via %2$s Contact Form', CSCS_TEXT_DOMAIN), $name, get_bloginfo('name'));
 
285
  $email_body = "<html><body>" .
 
286
  "<p>" . nl2br(str_replace("\'", "'", $message)) . "</p><hr>" .
287
  "<h4>" . __('This message was sent to you via IgniteUp Contact Form', CSCS_TEXT_DOMAIN) . "</h4>" .
288
  "<p>" . __('Name:', CSCS_TEXT_DOMAIN) . " $name<br>" .
@@ -315,7 +363,8 @@ class CSComingSoonCreator {
315
  $MailChimp = new IgniteUpMailChimp($cs_mailchimp_api_key);
316
  $return = $MailChimp->call('lists/subscribe', array(
317
  'id' => $cs_mailchimp_list,
318
- 'email' => array('email' => $email)
 
319
  ));
320
  update_option(CSCS_GENEROPTION_PREFIX . 'integrat_return', serialize($return));
321
  break;
@@ -408,14 +457,14 @@ class CSComingSoonCreator {
408
  if (defined('DOING_AJAX') && DOING_AJAX)
409
  return;
410
 
411
- // set options for showing welcome message.
412
  $prev_version = get_option(CSCS_GENEROPTION_PREFIX . 'version', '1.0');
413
  if (floatval(CSCS_CURRENT_VERSION) !== floatval($prev_version) && floatval(CSCS_CURRENT_VERSION) > floatval($prev_version)) {
414
  update_option(CSCS_GENEROPTION_PREFIX . 'version', '' . CSCS_CURRENT_VERSION);
415
  wp_redirect(admin_url('admin.php?page=cscs_options&section=help'));
416
  exit;
417
  }
418
- //-------------
419
  }
420
 
421
  public function addHeaderStatics() {
@@ -470,4 +519,20 @@ class CSComingSoonCreator {
470
  wp_die();
471
  }
472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  }
79
  return FALSE;
80
  if ($this->checkForSkipping())
81
  return FALSE;
82
+ if ($this->checkForWhiteListedIPs())
83
+ return FALSE;
84
+ if ($this->checkForGetRequest())
85
+ return FALSE;
86
  return TRUE;
87
  }
88
 
151
 
152
  if (isset($_GET['page']) && ($_GET['page'] == 'cscs_options' || $_GET['page'] == 'cscs_subscribers')) {
153
  wp_enqueue_style('wp-color-picker');
154
+ wp_enqueue_style('jquery-timepicker-css', plugin_dir_url(CSCS_FILE) . 'includes/css/jquery.timepicker.min.css');
155
  wp_enqueue_script('jquery');
156
 
157
  wp_enqueue_script('jquery-form', false, array('jquery'));
158
+ wp_enqueue_script('jquery-timepicker', plugin_dir_url(CSCS_FILE) . 'includes/js/jquery.timepicker.min.js', array('jquery'), CSCS_CURRENT_VERSION, true);
159
  wp_enqueue_script('jquery-ui-accordion', false, array('jquery'));
160
  wp_enqueue_script('jquery-ui-datepicker');
161
  wp_enqueue_style('jquery-ui-theme', '//code.jquery.com/ui/1.11.4/themes/flick/jquery-ui.css');
162
  wp_enqueue_script('bootstrap-switch', plugin_dir_url(CSCS_FILE) . 'includes/js/bootstrap-switch.min.js', array('jquery'), CSCS_CURRENT_VERSION, true);
163
+ wp_enqueue_script('igniteup', plugin_dir_url(CSCS_FILE) . 'includes/js/main.js', array('jquery', 'wp-color-picker', 'jquery-timepicker'), CSCS_CURRENT_VERSION, true);
164
  wp_enqueue_media();
165
  }
166
  }
242
  return FALSE;
243
  }
244
 
245
+ private function checkForWhiteListedIPs() {
246
+ $text = get_option(CSCS_GENEROPTION_PREFIX . 'whitelisted_ips', '');
247
+ if (empty($text))
248
+ return FALSE;
249
+
250
+ $text_br = nl2br(trim($text));
251
+ $iplist = explode("<br />", $text_br);
252
+
253
+ if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
254
+ //check ip from share internet
255
+ $ip = $_SERVER['HTTP_CLIENT_IP'];
256
+ } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
257
+ //to check ip is pass from proxy
258
+ $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
259
+ } else {
260
+ $ip = $_SERVER['REMOTE_ADDR'];
261
+ }
262
+ $trimmed_ips = array_map('trim', $iplist);
263
+ if (in_array($ip, $trimmed_ips))
264
+ return TRUE;
265
+ return FALSE;
266
+ }
267
+
268
+ private function checkForGetRequest() {
269
+ $slug = CSCS_GENEROPTION_PREFIX . 'skip_with_get_request';
270
+ $cookie_slug = 'igniteup_skip';
271
+ $savedGet = get_option($slug, '');
272
+
273
+ if (isset($_GET['ign_skip']) && $_GET['ign_skip'] == $savedGet || //Check if GET has set
274
+ isset($_COOKIE[$cookie_slug]) && $_COOKIE[$cookie_slug] == $savedGet) { //Check if COOKIE has set
275
+ if (!isset($_COOKIE[$cookie_slug])) //Create cookie if not set
276
+ setcookie($cookie_slug, $savedGet);
277
+ return TRUE; //Skip igniteup
278
+ }
279
+ return FALSE; //Show igniteup
280
+ }
281
+
282
  public function showAdminBarMenu() {
283
  if (!$this->checkIfEnabled())
284
  return;
292
  }
293
 
294
  public function subscribeEmail() {
295
+ $email = isset($_REQUEST['cs_email']) ? trim($_REQUEST['cs_email']) : '';
296
  $errorInput = CSAdminOptions::getDefaultStrings('alert_error_invalid_email');
297
  if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
298
  echo json_encode(array('status' => FALSE, 'error' => TRUE, 'message' => $errorInput));
312
 
313
  $wpdb->insert(CSCS_DBTABLE_PREFIX . CSCS_DBTABLE_SUBSCRIPTS, array('name' => $name, 'email' => $email));
314
  $this->subscribeToMailingLists($name, $email);
315
+ if (get_option(CSCS_GENEROPTION_PREFIX . 'get_email_on_subscribe') == 'on')
316
+ $this->notifySubscriber($email, $name);
317
  echo json_encode(array('status' => TRUE, 'error' => FALSE));
318
  wp_die();
319
  }
321
  public function sendContactForm() {
322
  $name = trim($_REQUEST['contact_name']);
323
  $email = trim($_REQUEST['contact_email']);
324
+ $subject = isset($_REQUEST['contact_subject']) ? trim($_REQUEST['contact_subject']) : NULL;
325
  $message = trim($_REQUEST['contact_message']);
326
+ // Create the email and send the message
327
  $cs_receive_email_addr = CSCS_GENEROPTION_PREFIX . 'receive_email_addr';
328
  $admin_email = get_bloginfo('admin_email');
329
  $to = get_option($cs_receive_email_addr, $admin_email);
330
  $email_subject = sprintf(__('%1$s Sent you a Message via %2$s Contact Form', CSCS_TEXT_DOMAIN), $name, get_bloginfo('name'));
331
+ $subjectHTML = isset($subject) ? "<h3>" . nl2br(str_replace("\'", "'", $subject)) . "</h3>" : '';
332
  $email_body = "<html><body>" .
333
+ $subjectHTML .
334
  "<p>" . nl2br(str_replace("\'", "'", $message)) . "</p><hr>" .
335
  "<h4>" . __('This message was sent to you via IgniteUp Contact Form', CSCS_TEXT_DOMAIN) . "</h4>" .
336
  "<p>" . __('Name:', CSCS_TEXT_DOMAIN) . " $name<br>" .
363
  $MailChimp = new IgniteUpMailChimp($cs_mailchimp_api_key);
364
  $return = $MailChimp->call('lists/subscribe', array(
365
  'id' => $cs_mailchimp_list,
366
+ 'email' => array('email' => $email),
367
+ 'merge_vars' => array('EMAIL' => $email, 'FNAME' => $name, 'LNAME' => '')
368
  ));
369
  update_option(CSCS_GENEROPTION_PREFIX . 'integrat_return', serialize($return));
370
  break;
457
  if (defined('DOING_AJAX') && DOING_AJAX)
458
  return;
459
 
460
+ // set options for showing welcome message.
461
  $prev_version = get_option(CSCS_GENEROPTION_PREFIX . 'version', '1.0');
462
  if (floatval(CSCS_CURRENT_VERSION) !== floatval($prev_version) && floatval(CSCS_CURRENT_VERSION) > floatval($prev_version)) {
463
  update_option(CSCS_GENEROPTION_PREFIX . 'version', '' . CSCS_CURRENT_VERSION);
464
  wp_redirect(admin_url('admin.php?page=cscs_options&section=help'));
465
  exit;
466
  }
467
+ //-------------
468
  }
469
 
470
  public function addHeaderStatics() {
519
  wp_die();
520
  }
521
 
522
+ function notifySubscriber($email, $name = NULL) {
523
+ $cs_receive_email_addr = CSCS_GENEROPTION_PREFIX . 'receive_email_addr';
524
+ $admin_email = get_bloginfo('admin_email');
525
+ $to = get_option($cs_receive_email_addr, $admin_email);
526
+ $email_subject = __("You have a new subscriber!", CSCS_TEXT_DOMAIN);
527
+ $email_body = "<html><body>" .
528
+ "<h4>" . __('You have a new subscriber to your website via IgniteUp subscribe form.', CSCS_TEXT_DOMAIN) . "</h4>" .
529
+ "<p>" . __('Name:', CSCS_TEXT_DOMAIN) . " $name<br>" .
530
+ __('Email:', CSCS_TEXT_DOMAIN) . " $email</p>" .
531
+ "<p><a href='" . admin_url('admin.php?page=cscs_subscribers') . "'>View all subscribers</a></p>" .
532
+ "</body></html>";
533
+
534
+ $status = wp_mail($to, $email_subject, $email_body, array("MIME-Version: 1.0", "Content-Type: text/html; charset=UTF-8"));
535
+ return $status;
536
+ }
537
+
538
  }
includes/css/jquery.timepicker.min.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery Timepicker - v1.3.2 - 2014-09-13
3
+ * http://timepicker.co
4
+ *
5
+ * Enhances standard form input fields helping users to select (or type) times.
6
+ *
7
+ * Copyright (c) 2014 Willington Vega; Licensed MIT, GPL
8
+ */
9
+
10
+
11
+ .ui-timepicker-container{position:absolute;overflow:hidden;box-sizing:border-box}.ui-timepicker{box-sizing:content-box;display:block;height:205px;list-style:none outside none;margin:0;padding:0 1px;text-align:center}.ui-timepicker-viewport{box-sizing:content-box;display:block;height:205px;margin:0;padding:0;overflow:auto;overflow-x:hidden}.ui-timepicker-standard{font-family:Verdana,Arial,sans-serif;background-color:#FFF;border:1px solid #AAA;color:#222;margin:0;padding:2px}.ui-timepicker-standard a{border:1px solid transparent;color:#222;display:block;text-decoration:none}.ui-timepicker-standard .ui-state-hover{background-color:#DADADA;border:1px solid #999;font-weight:400;color:#212121}.ui-timepicker-standard .ui-menu-item{margin:0;padding:0}.ui-timepicker-corners,.ui-timepicker-corners .ui-corner-all{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.ui-timepicker-hidden{display:none}.ui-timepicker-no-scrollbar .ui-timepicker{border:0}
includes/js/jquery.timepicker.min.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery Timepicker - v1.3.2 - 2014-09-13
3
+ * http://timepicker.co
4
+ *
5
+ * Enhances standard form input fields helping users to select (or type) times.
6
+ *
7
+ * Copyright (c) 2014 Willington Vega; Licensed MIT, GPL
8
+ */
9
+
10
+ "undefined"!=typeof jQuery&&function(e){function t(e,t,i){return Array(i+1-e.length).join(t)+e}function i(){if(1===arguments.length){var t=arguments[0];return"string"==typeof t&&(t=e.fn.timepicker.parseTime(t)),new Date(0,0,0,t.getHours(),t.getMinutes(),t.getSeconds())}return 3===arguments.length?new Date(0,0,0,arguments[0],arguments[1],arguments[2]):2===arguments.length?new Date(0,0,0,arguments[0],arguments[1],0):new Date(0,0,0)}e.TimePicker=function(){var t=this;t.container=e(".ui-timepicker-container"),t.ui=t.container.find(".ui-timepicker"),0===t.container.length&&(t.container=e("<div></div>").addClass("ui-timepicker-container").addClass("ui-timepicker-hidden ui-helper-hidden").appendTo("body").hide(),t.ui=e("<div></div>").addClass("ui-timepicker").addClass("ui-widget ui-widget-content ui-menu").addClass("ui-corner-all").appendTo(t.container),t.viewport=e("<ul></ul>").addClass("ui-timepicker-viewport").appendTo(t.ui),e.fn.jquery>="1.4.2"&&t.ui.delegate("a","mouseenter.timepicker",function(){t.activate(!1,e(this).parent())}).delegate("a","mouseleave.timepicker",function(){t.deactivate(!1)}).delegate("a","click.timepicker",function(i){i.preventDefault(),t.select(!1,e(this).parent())}),t.ui.bind("click.timepicker, scroll.timepicker",function(){clearTimeout(t.closing)}))},e.TimePicker.count=0,e.TimePicker.instance=function(){return e.TimePicker._instance||(e.TimePicker._instance=new e.TimePicker),e.TimePicker._instance},e.TimePicker.prototype={keyCode:{ALT:18,BLOQ_MAYUS:20,CTRL:17,DOWN:40,END:35,ENTER:13,HOME:36,LEFT:37,NUMPAD_ENTER:108,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SHIFT:16,TAB:9,UP:38},_items:function(t,n){var r,a,s=this,o=e("<ul></ul>"),u=null;for(-1===t.options.timeFormat.indexOf("m")&&0!==t.options.interval%60&&(t.options.interval=60*Math.max(Math.round(t.options.interval/60),1)),r=n?i(n):t.options.startTime?i(t.options.startTime):i(t.options.startHour,t.options.startMinutes),a=new Date(r.getTime()+864e5);a>r;)s._isValidTime(t,r)&&(u=e("<li>").addClass("ui-menu-item").appendTo(o),e("<a>").addClass("ui-corner-all").text(e.fn.timepicker.formatTime(t.options.timeFormat,r)).appendTo(u),u.data("time-value",r)),r=new Date(r.getTime()+1e3*60*t.options.interval);return o.children()},_isValidTime:function(e,t){var n=null,r=null;return t=i(t),null!==e.options.minTime?n=i(e.options.minTime):(null!==e.options.minHour||null!==e.options.minMinutes)&&(n=i(e.options.minHour,e.options.minMinutes)),null!==e.options.maxTime?r=i(e.options.maxTime):(null!==e.options.maxHour||null!==e.options.maxMinutes)&&(r=i(e.options.maxHour,e.options.maxMinutes)),null!==n&&null!==r?t>=n&&r>=t:null!==n?t>=n:null!==r?r>=t:!0},_hasScroll:function(){var e=this.ui.prop!==undefined?"prop":"attr";return this.ui.height()<this.ui[e]("scrollHeight")},_move:function(e,t,i){var n=this;if(n.closed()&&n.open(e),!n.active)return n.activate(e,n.viewport.children(i)),undefined;var r=n.active[t+"All"](".ui-menu-item").eq(0);r.length?n.activate(e,r):n.activate(e,n.viewport.children(i))},register:function(t,i){var n=this,r={};r.element=e(t),r.element.data("TimePicker")||(r.options=e.metadata?e.extend({},i,r.element.metadata()):e.extend({},i),r.widget=n,e.extend(r,{next:function(){return n.next(r)},previous:function(){return n.previous(r)},first:function(){return n.first(r)},last:function(){return n.last(r)},selected:function(){return n.selected(r)},open:function(){return n.open(r)},close:function(e){return n.close(r,e)},closed:function(){return n.closed(r)},destroy:function(){return n.destroy(r)},parse:function(e){return n.parse(r,e)},format:function(e,t){return n.format(r,e,t)},getTime:function(){return n.getTime(r)},setTime:function(e,t){return n.setTime(r,e,t)},option:function(e,t){return n.option(r,e,t)}}),n._setDefaultTime(r),n._addInputEventsHandlers(r),r.element.data("TimePicker",r))},_setDefaultTime:function(t){"now"===t.options.defaultTime?t.setTime(i(new Date)):t.options.defaultTime&&t.options.defaultTime.getFullYear?t.setTime(i(t.options.defaultTime)):t.options.defaultTime&&t.setTime(e.fn.timepicker.parseTime(t.options.defaultTime))},_addInputEventsHandlers:function(t){var i=this;t.element.bind("keydown.timepicker",function(e){switch(e.which||e.keyCode){case i.keyCode.ENTER:case i.keyCode.NUMPAD_ENTER:e.preventDefault(),i.closed()?t.element.trigger("change.timepicker"):i.select(t,i.active);break;case i.keyCode.UP:t.previous();break;case i.keyCode.DOWN:t.next();break;default:i.closed()||t.close(!0)}}).bind("focus.timepicker",function(){t.open()}).bind("blur.timepicker",function(){t.close()}).bind("change.timepicker",function(){t.closed()&&t.setTime(e.fn.timepicker.parseTime(t.element.val()))})},select:function(t,i){var n=this,r=t===!1?n.instance:t;clearTimeout(n.closing),n.setTime(r,e.fn.timepicker.parseTime(i.children("a").text())),n.close(r,!0)},activate:function(e,t){var i=this,n=e===!1?i.instance:e;if(n===i.instance){if(i.deactivate(),i._hasScroll()){var r=t.offset().top-i.ui.offset().top,a=i.ui.scrollTop(),s=i.ui.height();0>r?i.ui.scrollTop(a+r):r>=s&&i.ui.scrollTop(a+r-s+t.height())}i.active=t.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-item").end()}},deactivate:function(){var e=this;e.active&&(e.active.children("a").removeClass("ui-state-hover").removeAttr("id"),e.active=null)},next:function(e){return(this.closed()||this.instance===e)&&this._move(e,"next",".ui-menu-item:first"),e.element},previous:function(e){return(this.closed()||this.instance===e)&&this._move(e,"prev",".ui-menu-item:last"),e.element},first:function(e){return this.instance===e?this.active&&0===this.active.prevAll(".ui-menu-item").length:!1},last:function(e){return this.instance===e?this.active&&0===this.active.nextAll(".ui-menu-item").length:!1},selected:function(e){return this.instance===e?this.active?this.active:null:null},open:function(t){var i=this,n=t.getTime(),r=t.options.dynamic&&n;if(!t.options.dropdown)return t.element;switch((t.rebuild||!t.items||r)&&(t.items=i._items(t,r?n:null)),(t.rebuild||i.instance!==t||r)&&("1.4.2">e.fn.jquery?(i.viewport.children().remove(),i.viewport.append(t.items),i.viewport.find("a").bind("mouseover.timepicker",function(){i.activate(t,e(this).parent())}).bind("mouseout.timepicker",function(){i.deactivate(t)}).bind("click.timepicker",function(n){n.preventDefault(),i.select(t,e(this).parent())})):(i.viewport.children().detach(),i.viewport.append(t.items))),t.rebuild=!1,i.container.removeClass("ui-helper-hidden ui-timepicker-hidden ui-timepicker-standard ui-timepicker-corners").show(),t.options.theme){case"standard":i.container.addClass("ui-timepicker-standard");break;case"standard-rounded-corners":i.container.addClass("ui-timepicker-standard ui-timepicker-corners");break;default:}i.container.hasClass("ui-timepicker-no-scrollbar")||t.options.scrollbar||(i.container.addClass("ui-timepicker-no-scrollbar"),i.viewport.css({paddingRight:40}));var a=i.container.outerHeight()-i.container.height(),s=t.options.zindex?t.options.zindex:t.element.offsetParent().css("z-index"),o=t.element.offset();i.container.css({top:o.top+t.element.outerHeight(),left:o.left}),i.container.show(),i.container.css({left:t.element.offset().left,height:i.ui.outerHeight()+a,width:t.element.outerWidth(),zIndex:s,cursor:"default"});var u=i.container.width()-(i.ui.outerWidth()-i.ui.width());return i.ui.css({width:u}),i.viewport.css({width:u}),t.items.css({width:u}),i.instance=t,n?t.items.each(function(){var r,a=e(this);return r="1.4.2">e.fn.jquery?e.fn.timepicker.parseTime(a.find("a").text()):a.data("time-value"),r.getTime()===n.getTime()?(i.activate(t,a),!1):!0}):i.deactivate(t),t.element},close:function(e,t){var i=this;return i.closed()||t?(clearTimeout(i.closing),i.instance===e&&(i.container.addClass("ui-helper-hidden ui-timepicker-hidden").hide(),i.ui.scrollTop(0),i.ui.children().removeClass("ui-state-hover"))):i.closing=setTimeout(function(){i.close(e,!0)},150),e.element},closed:function(){return this.ui.is(":hidden")},destroy:function(e){var t=this;return t.close(e,!0),e.element.unbind(".timepicker").data("TimePicker",null)},parse:function(t,i){return e.fn.timepicker.parseTime(i)},format:function(t,i,n){return n=n||t.options.timeFormat,e.fn.timepicker.formatTime(n,i)},getTime:function(t){var i=this,n=e.fn.timepicker.parseTime(t.element.val());return n instanceof Date&&!i._isValidTime(t,n)?null:n instanceof Date&&t.selectedTime?t.format(n)===t.format(t.selectedTime)?t.selectedTime:n:n instanceof Date?n:null},setTime:function(t,n,r){var a=this,s=t.selectedTime;if("string"==typeof n&&(n=t.parse(n)),n&&n.getMinutes&&a._isValidTime(t,n)){if(n=i(n),t.selectedTime=n,t.element.val(t.format(n,t.options.timeFormat)),r)return t}else t.selectedTime=null;return(null!==s||null!==t.selectedTime)&&(t.element.trigger("time-change",[n]),e.isFunction(t.options.change)&&t.options.change.apply(t.element,[n])),t.element},option:function(t,i,n){if(n===undefined)return t.options[i];var r,a,s=t.getTime();"string"==typeof i?(r={},r[i]=n):r=i,a=["minHour","minMinutes","minTime","maxHour","maxMinutes","maxTime","startHour","startMinutes","startTime","timeFormat","interval","dropdown"],e.each(r,function(i){t.options[i]=r[i],t.rebuild=t.rebuild||e.inArray(i,a)>-1}),t.rebuild&&t.setTime(s)}},e.TimePicker.defaults={timeFormat:"hh:mm p",minHour:null,minMinutes:null,minTime:null,maxHour:null,maxMinutes:null,maxTime:null,startHour:null,startMinutes:null,startTime:null,interval:30,dynamic:!0,theme:"standard",zindex:null,dropdown:!0,scrollbar:!1,change:function(){}},e.TimePicker.methods={chainable:["next","previous","open","close","destroy","setTime"]},e.fn.timepicker=function(t){if("string"==typeof t){var i,n,r=Array.prototype.slice.call(arguments,1);return i="option"===t&&arguments.length>2?"each":-1!==e.inArray(t,e.TimePicker.methods.chainable)?"each":"map",n=this[i](function(){var i=e(this),n=i.data("TimePicker");return"object"==typeof n?n[t].apply(n,r):undefined}),"map"===i&&1===this.length?e.makeArray(n).shift():"map"===i?e.makeArray(n):n}if(1===this.length&&this.data("TimePicker"))return this.data("TimePicker");var a=e.extend({},e.TimePicker.defaults,t);return this.each(function(){e.TimePicker.instance().register(this,a)})},e.fn.timepicker.formatTime=function(e,i){var n=i.getHours(),r=n%12,a=i.getMinutes(),s=i.getSeconds(),o={hh:t(""+(0===r?12:r),"0",2),HH:t(""+n,"0",2),mm:t(""+a,"0",2),ss:t(""+s,"0",2),h:0===r?12:r,H:n,m:a,s:s,p:n>11?"PM":"AM"},u=e,c="";for(c in o)o.hasOwnProperty(c)&&(u=u.replace(RegExp(c,"g"),o[c]));return u=u.replace(RegExp("a","g"),n>11?"pm":"am")},e.fn.timepicker.parseTime=function(){var t=[[/^(\d+)$/,"$1"],[/^:(\d)$/,"$10"],[/^:(\d+)/,"$1"],[/^(\d):([7-9])$/,"0$10$2"],[/^(\d):(\d\d)$/,"$1$2"],[/^(\d):(\d{1,})$/,"0$1$20"],[/^(\d\d):([7-9])$/,"$10$2"],[/^(\d\d):(\d)$/,"$1$20"],[/^(\d\d):(\d*)$/,"$1$2"],[/^(\d{3,}):(\d)$/,"$10$2"],[/^(\d{3,}):(\d{2,})/,"$1$2"],[/^(\d):(\d):(\d)$/,"0$10$20$3"],[/^(\d{1,2}):(\d):(\d\d)/,"$10$2$3"]],n=t.length;return function(r){var a=i(new Date),s=!1,o=!1,u=!1,c=!1,l=!1;if(r===undefined||!r.toLowerCase)return null;r=r.toLowerCase(),s=/a/.test(r),o=s?!1:/p/.test(r),r=r.replace(/[^0-9:]/g,"").replace(/:+/g,":");for(var m=0;n>m;m+=1)if(t[m][0].test(r)){r=r.replace(t[m][0],t[m][1]);break}return r=r.replace(/:/g,""),1===r.length?u=r:2===r.length?u=r:3===r.length||5===r.length?(u=r.substr(0,1),c=r.substr(1,2),l=r.substr(3,2)):(4===r.length||r.length>5)&&(u=r.substr(0,2),c=r.substr(2,2),l=r.substr(4,2)),r.length>0&&5>r.length&&(3>r.length&&(c=0),l=0),u===!1||c===!1||l===!1?!1:(u=parseInt(u,10),c=parseInt(c,10),l=parseInt(l,10),s&&12===u?u=0:o&&12>u&&(u+=12),u>24?r.length>=6?e.fn.timepicker.parseTime(r.substr(0,5)):e.fn.timepicker.parseTime(r+"0"+(s?"a":"")+(o?"p":"")):(a.setHours(u,c,l),a))}}()}(jQuery);
includes/js/main.js CHANGED
@@ -28,6 +28,8 @@ jQuery(document).ready(function ($) {
28
  jQuery('.cs-date-picker').datepicker({
29
  dateFormat: 'mm/dd/yy'
30
  });
 
 
31
  });
32
 
33
  /*
@@ -142,7 +144,7 @@ jQuery(function () {
142
  jQuery(document).on('click', '#igniteup_admin_subscribe', function () {
143
  var email_add = jQuery('#igniteup_admin_subscribe_email').val();
144
  jQuery(this).prop('disabled', true);
145
-
146
  jQuery.ajax({
147
  url: ajaxurl,
148
  dataType: 'json',
@@ -161,4 +163,58 @@ jQuery(document).on('click', '#igniteup_admin_subscribe', function () {
161
 
162
  }
163
  });
164
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  jQuery('.cs-date-picker').datepicker({
29
  dateFormat: 'mm/dd/yy'
30
  });
31
+
32
+ $('[name="cscs_generpotion_whitelisted_ips"]').attr('placeholder','192.168.1.1\n127.0.0.1');
33
  });
34
 
35
  /*
144
  jQuery(document).on('click', '#igniteup_admin_subscribe', function () {
145
  var email_add = jQuery('#igniteup_admin_subscribe_email').val();
146
  jQuery(this).prop('disabled', true);
147
+
148
  jQuery.ajax({
149
  url: ajaxurl,
150
  dataType: 'json',
163
 
164
  }
165
  });
166
+ });
167
+
168
+
169
+ /*
170
+
171
+ *
172
+ * Generate random GET to skip
173
+ *
174
+ */
175
+ jQuery(function (IGN) {
176
+ IGN('#ign-button-generate-get-to-skip').click(function () {
177
+ IGN('#ign-input-get-to-skip').val(generateRandomString(15));
178
+ });
179
+ IGN('#ign-button-edit-skip-with-get').click(function () {
180
+ IGN(this).hide();
181
+ IGN('#ign-anchor-skip-with-get-link').replaceWith(function () {
182
+ return IGN("<span id='ign-anchor-skip-with-get-link'>" + IGN('#ign-anchor-skip-with-get-link').html() + "</span>");
183
+ });
184
+ IGN('#ign-anchor-skip-with-get-link-slug').hide();
185
+ IGN('#ign-input-get-to-skip').parent().show();
186
+ })
187
+ });
188
+
189
+ function generateRandomString(charCount) {
190
+ charCount = typeof charCount === 'undefined' ? 5 : charCount;
191
+ var text = "";
192
+ var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
193
+
194
+ for (var i = 0; i < charCount; i++)
195
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
196
+
197
+ return text;
198
+ }
199
+
200
+ /*
201
+ * Time picker
202
+ */
203
+ jQuery('input.cs-time-picker').timepicker({
204
+ timeFormat: 'HH:mm:ss'
205
+ });
206
+ jQuery(document).on('keydown', 'input.cs-time-picker', function (e) {
207
+ // Allow: delete, backspace, tab, escape, and enter
208
+ if (jQuery.inArray(e.keyCode, [46, 8, 9, 27, 13]) !== -1 ||
209
+ // Allow: Ctrl+A, Command+A
210
+ (e.keyCode == 65 && (e.ctrlKey === true || e.metaKey === true)) ||
211
+ // Allow: home, end, left, right, down, up
212
+ (e.keyCode >= 35 && e.keyCode <= 40)) {
213
+ // let it happen, don't do anything
214
+ return;
215
+ }
216
+ // Ensure that it is a number and stop the keypress
217
+ if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
218
+ e.preventDefault();
219
+ }
220
+ });
includes/js/subscribe.js CHANGED
@@ -8,27 +8,37 @@ jQuery('#cs_email, #cs_name').on('keypress', function (e) {
8
  });
9
 
10
  function subscribe() {
 
 
 
 
11
  jQuery.ajax({
12
  url: igniteup_ajaxurl,
13
  data: {action: 'subscribe_email', cs_email: jQuery("#cs_email").val(), cs_name: jQuery("#cs_name").val()},
14
  dataType: 'json',
15
  success: function (data) {
16
  if (data['error']) {
17
-
18
- function hideMsg() {
19
- jQuery('#ign-notifications #error-msg-text').slideUp();
20
- }
21
- function showMsg(message) {
22
- jQuery('#ign-notifications #error-msg-text').html(message);
23
- jQuery('#ign-notifications #error-msg-text').fadeIn();
24
- }
25
- showMsg(data['message']);
26
  setTimeout(hideMsg, 4000);
27
- }
28
- else {
29
  jQuery('.subscribe-form').slideUp();
30
  jQuery('#ign-notifications .thankyou').slideDown();
31
  }
 
32
  }
33
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
8
  });
9
 
10
  function subscribe() {
11
+ if (!validEmail(jQuery("#cs_email").val()))
12
+ return;
13
+
14
+ jQuery('#ign-subscribe-btn').addClass('disabled');
15
  jQuery.ajax({
16
  url: igniteup_ajaxurl,
17
  data: {action: 'subscribe_email', cs_email: jQuery("#cs_email").val(), cs_name: jQuery("#cs_name").val()},
18
  dataType: 'json',
19
  success: function (data) {
20
  if (data['error']) {
21
+ hideMsg();
22
+ showMsg(data['message']);
 
 
 
 
 
 
 
23
  setTimeout(hideMsg, 4000);
24
+ } else {
 
25
  jQuery('.subscribe-form').slideUp();
26
  jQuery('#ign-notifications .thankyou').slideDown();
27
  }
28
+ jQuery('#ign-subscribe-btn').removeClass('disabled');
29
  }
30
  });
31
+ }
32
+
33
+ function hideMsg() {
34
+ jQuery('#ign-notifications #error-msg-text').slideUp();
35
+ }
36
+ function showMsg(message) {
37
+ jQuery('#ign-notifications #error-msg-text').html(message);
38
+ jQuery('#ign-notifications #error-msg-text').fadeIn();
39
+ }
40
+
41
+ function validEmail(email) {
42
+ var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
43
+ return re.test(email);
44
  }
includes/templates/launcher/launcher.php CHANGED
@@ -177,8 +177,7 @@
177
  function checkSeconds(sec) {
178
  if (sec === '01') {
179
  jQuery("#sec-s").addClass('hidden');
180
- }
181
- else {
182
  jQuery("#sec-s").removeClass('hidden');
183
  }
184
  }
@@ -186,24 +185,21 @@
186
  function checkMins(min) {
187
  if (min === '01') {
188
  jQuery("#min-s").addClass('hidden');
189
- }
190
- else {
191
  jQuery("#min-s").removeClass('hidden');
192
  }
193
  }
194
  function checkHours(hrs) {
195
  if (hrs === '01') {
196
  jQuery("#hrs-s").addClass('hidden');
197
- }
198
- else {
199
  jQuery("#hrs-s").removeClass('hidden');
200
  }
201
  }
202
  function checkDays(days) {
203
  if (days === '01') {
204
  jQuery("#day-s").addClass('hidden');
205
- }
206
- else {
207
  jQuery("#day-s").removeClass('hidden');
208
  }
209
  }
@@ -235,6 +231,7 @@
235
  });
236
 
237
  function subscribe() {
 
238
  jQuery.ajax({
239
  url: '<?php echo admin_url('admin-ajax.php'); ?>',
240
  data: {action: 'subscribe_email', cs_email: jQuery("#cs_email").val()},
@@ -253,8 +250,8 @@
253
  jQuery('.error-msg').removeClass('animated fadeIn fadeOut');
254
  }
255
  setTimeout(showMsg, 4500);
256
- }
257
- else {
258
  jQuery('.subscribe').addClass('animated fadeOutDown');
259
  jQuery('.thankyou').removeClass('hidden');
260
  jQuery('.thankyou').addClass('animated fadeIn');
177
  function checkSeconds(sec) {
178
  if (sec === '01') {
179
  jQuery("#sec-s").addClass('hidden');
180
+ } else {
 
181
  jQuery("#sec-s").removeClass('hidden');
182
  }
183
  }
185
  function checkMins(min) {
186
  if (min === '01') {
187
  jQuery("#min-s").addClass('hidden');
188
+ } else {
 
189
  jQuery("#min-s").removeClass('hidden');
190
  }
191
  }
192
  function checkHours(hrs) {
193
  if (hrs === '01') {
194
  jQuery("#hrs-s").addClass('hidden');
195
+ } else {
 
196
  jQuery("#hrs-s").removeClass('hidden');
197
  }
198
  }
199
  function checkDays(days) {
200
  if (days === '01') {
201
  jQuery("#day-s").addClass('hidden');
202
+ } else {
 
203
  jQuery("#day-s").removeClass('hidden');
204
  }
205
  }
231
  });
232
 
233
  function subscribe() {
234
+ jQuery('.subscribe-btn, #cs_email').attr('disabled', true);
235
  jQuery.ajax({
236
  url: '<?php echo admin_url('admin-ajax.php'); ?>',
237
  data: {action: 'subscribe_email', cs_email: jQuery("#cs_email").val()},
250
  jQuery('.error-msg').removeClass('animated fadeIn fadeOut');
251
  }
252
  setTimeout(showMsg, 4500);
253
+ jQuery('.subscribe-btn, #cs_email').attr('disabled', false);
254
+ } else {
255
  jQuery('.subscribe').addClass('animated fadeOutDown');
256
  jQuery('.thankyou').removeClass('hidden');
257
  jQuery('.thankyou').addClass('animated fadeIn');
includes/views/temp-common-options.php CHANGED
@@ -21,7 +21,7 @@
21
  </td>
22
  </tr>
23
  <tr>
24
- <th><label><?php _e('Thank you message', CSCS_TEXT_DOMAIN); ?></label></th>
25
  <td>
26
  <?php
27
  $cs_thank_msg = CSCS_GENEROPTION_PREFIX . 'alert_thankyou';
@@ -49,6 +49,16 @@
49
  <p class="description"><?php _e('Message to display if the user has already subscribed.', CSCS_TEXT_DOMAIN); ?></p>
50
  </td>
51
  </tr>
 
 
 
 
 
 
 
 
 
 
52
 
53
  </table>
54
  </div>
@@ -80,7 +90,7 @@
80
  <div>
81
  <table class="form-table">
82
  <tr>
83
- <th><label><?php _e('Receive email address', CSCS_TEXT_DOMAIN); ?></label></th>
84
  <td>
85
  <?php
86
  $cs_receive_email_addr = CSCS_GENEROPTION_PREFIX . 'receive_email_addr';
@@ -90,6 +100,17 @@
90
  <p class="description"><?php _e('Receive contact form submits on this email.', CSCS_TEXT_DOMAIN); ?></p>
91
  </td>
92
  </tr>
 
 
 
 
 
 
 
 
 
 
 
93
  </table>
94
  </div>
95
  </div>
21
  </td>
22
  </tr>
23
  <tr>
24
+ <th><label><?php _e('Thank you Message', CSCS_TEXT_DOMAIN); ?></label></th>
25
  <td>
26
  <?php
27
  $cs_thank_msg = CSCS_GENEROPTION_PREFIX . 'alert_thankyou';
49
  <p class="description"><?php _e('Message to display if the user has already subscribed.', CSCS_TEXT_DOMAIN); ?></p>
50
  </td>
51
  </tr>
52
+ <tr>
53
+ <th><label><?php _e('Receive an Email', CSCS_TEXT_DOMAIN); ?></label></th>
54
+ <td>
55
+ <?php
56
+ $cs_get_email_on_subscribe = CSCS_GENEROPTION_PREFIX . 'get_email_on_subscribe';
57
+ ?>
58
+ <input type='checkbox' class='igniteup-checkbox-switch' data-size='mini' data-on-color='info' data-animate='true' name='<?php echo $cs_get_email_on_subscribe; ?>' <?php echo get_option($cs_get_email_on_subscribe) == 'on' ? 'checked' : '' ?>>
59
+ <p class="description"><?php _e('Get an email when a user has subscribed.', CSCS_TEXT_DOMAIN); ?></p>
60
+ </td>
61
+ </tr>
62
 
63
  </table>
64
  </div>
90
  <div>
91
  <table class="form-table">
92
  <tr>
93
+ <th><label><?php _e('Receive Email Address', CSCS_TEXT_DOMAIN); ?></label></th>
94
  <td>
95
  <?php
96
  $cs_receive_email_addr = CSCS_GENEROPTION_PREFIX . 'receive_email_addr';
100
  <p class="description"><?php _e('Receive contact form submits on this email.', CSCS_TEXT_DOMAIN); ?></p>
101
  </td>
102
  </tr>
103
+ <tr>
104
+ <th><label><?php _e('Success Notice', CSCS_TEXT_DOMAIN) ?></label></th>
105
+ <td>
106
+ <?php
107
+ $cs_contact_success_notce_name = CSCS_GENEROPTION_PREFIX . 'success_notice';
108
+ $cs_contact_success_default_str= "Thanks for making a sound.";
109
+ ?>
110
+ <input type="text" class="regular-text" placeholder="" name="<?php echo $cs_contact_success_notce_name; ?>" value="<?php echo get_option($cs_contact_success_notce_name,$cs_contact_success_default_str); ?>" >
111
+ <p class="description"><?php _e('Show success message for contact form submits.',CSCS_TEXT_DOMAIN); ?></p>
112
+ </td>
113
+ </tr>
114
  </table>
115
  </div>
116
  </div>
includes/views/temp-general-options.php CHANGED
@@ -38,6 +38,35 @@
38
  </td>
39
  </tr>
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  <tr>
42
  <th>
43
  <label><?php _e('Enable 503 Status', CSCS_TEXT_DOMAIN); ?></label>
38
  </td>
39
  </tr>
40
 
41
+ <tr>
42
+ <th><label><?php _e('Skip with Secret URL', CSCS_TEXT_DOMAIN); ?></label></th>
43
+ <td>
44
+ <?php $skipWithGetRequest = get_option(CSCS_GENEROPTION_PREFIX . 'skip_with_get_request', ''); ?>
45
+ <?php if ($skipWithGetRequest): ?>
46
+ <a id="ign-anchor-skip-with-get-link" href="<?php echo get_site_url() . "?ign_skip=$skipWithGetRequest" ?>" target="_blank">
47
+ <?php endif; ?>
48
+
49
+ <?php echo get_site_url(); ?>/?ign_skip=<span id="ign-anchor-skip-with-get-link-slug"><?php echo $skipWithGetRequest ?></span>
50
+
51
+ <?php if ($skipWithGetRequest): ?>
52
+ </a>
53
+ <button type="button" id="ign-button-edit-skip-with-get" class="button button-secondary">Reset</button>
54
+ <?php endif; ?>
55
+
56
+ <span style="<?php echo $skipWithGetRequest ? 'display:none;' : '' ?>"><input type="text" id="ign-input-get-to-skip" name="<?php echo CSCS_GENEROPTION_PREFIX . 'skip_with_get_request'; ?>" placeholder="<?php echo rand(100000000,9999999999999)?>" value="<?php echo $skipWithGetRequest ?>"><button type="button" id="ign-button-generate-get-to-skip" class="button button-secondary">Generate</button></span>
57
+ <p class="description"><?php _e('Send this secret unique URL to anyone if you need them to skip the coming soon page.', CSCS_TEXT_DOMAIN); ?></p>
58
+ </td>
59
+ </tr>
60
+
61
+ <tr>
62
+ <th><label><?php _e('Skip Page for These IPs', CSCS_TEXT_DOMAIN); ?></label></th>
63
+ <td>
64
+ <textarea name="<?php echo CSCS_GENEROPTION_PREFIX . 'whitelisted_ips'; ?>" cols="50" rows="3"><?php echo get_option(CSCS_GENEROPTION_PREFIX . 'whitelisted_ips', ''); ?></textarea>
65
+ <p class="description"><?php _e('Type only one IP address in a line', CSCS_TEXT_DOMAIN); ?></p>
66
+ <p class="description"><?php _e('Whitelist IP addresses to skip maintenance mode page.', CSCS_TEXT_DOMAIN); ?></p>
67
+ </td>
68
+ </tr>
69
+
70
  <tr>
71
  <th>
72
  <label><?php _e('Enable 503 Status', CSCS_TEXT_DOMAIN); ?></label>
includes/views/temp-help.php CHANGED
@@ -1,13 +1,24 @@
1
  <div class="update-page">
2
  <h1 class="title"><?php _e('Welcome to IgniteUp', CSCS_TEXT_DOMAIN); ?> <?php echo CSCS_CURRENT_VERSION; ?>!</h1>
3
- <h2 class="sub-title"><?php _e('Even more improved to serve you better.', CSCS_TEXT_DOMAIN); ?></h2>
4
  <div class="widget-wrapper">
5
  <div class="help-page-col">
6
  <div class="changelog help-page-widget">
7
  <h2><?php _e("What's New?", CSCS_TEXT_DOMAIN); ?></h2>
8
  <ul class="changelog-main-list">
9
  <li class="main-item">
10
- 3.1 <span><?php _e('NEW!', CSCS_TEXT_DOMAIN); ?></span><a class="blog_read" target="_blank" href="https://getigniteup.com/blog/igniteup-3-1-is-here/?utm_source=help_page&utm_medium=changelog&utm_campaign=plugin"><?php _e('Read more >>', CSCS_TEXT_DOMAIN); ?></a>
 
 
 
 
 
 
 
 
 
 
 
11
  <ul class="changelog-sub-list">
12
  <li>Used jQuery accordions to organize option page fields.</li>
13
  <li>Added more features to support external templates.</li>
@@ -19,17 +30,6 @@
19
  </ul>
20
 
21
  </li>
22
-
23
- <li class="main-item">
24
- 3.0
25
- <ul class="changelog-sub-list">
26
- <li>Added external template support.</li>
27
- <li>Added feature to set a 503 status response. This will be enabled by default.</li>
28
- <li>Added options to customize subscribe form alerts and the thank you message.</li>
29
- <li>Fixed export to BCC and CSV buttons not working issue.</li>
30
- <li>Added Common Options tab to avoid getting common settings in every template.</li>
31
- </ul>
32
- </li>
33
  </ul>
34
  </div>
35
  </div>
@@ -97,7 +97,7 @@
97
 
98
 
99
  <p><?php _e('If you appreciate our effort, please make a donation with PayPal. In this way we can serve you better and IgniteUp will improve. Thank you in advance!', CSCS_TEXT_DOMAIN); ?></p>
100
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E6MY6RKB8DAEL" target="_blank" class="button button-primary"><?php _e('Donate with PayPal', CSCS_TEXT_DOMAIN); ?></a>
101
  </div>
102
  </div>
103
  </div>
1
  <div class="update-page">
2
  <h1 class="title"><?php _e('Welcome to IgniteUp', CSCS_TEXT_DOMAIN); ?> <?php echo CSCS_CURRENT_VERSION; ?>!</h1>
3
+ <h2 class="sub-title"><?php _e('More cool features for free.', CSCS_TEXT_DOMAIN); ?></h2>
4
  <div class="widget-wrapper">
5
  <div class="help-page-col">
6
  <div class="changelog help-page-widget">
7
  <h2><?php _e("What's New?", CSCS_TEXT_DOMAIN); ?></h2>
8
  <ul class="changelog-main-list">
9
  <li class="main-item">
10
+ 3.2 <span><?php _e('NEW!', CSCS_TEXT_DOMAIN); ?></span><a class="blog_read" target="_blank" href="https://getigniteup.com/blog?p=91&utm_source=help_page&utm_medium=changelog&utm_campaign=plugin"><?php _e('Read more >>', CSCS_TEXT_DOMAIN); ?></a>
11
+ <ul class="changelog-sub-list">
12
+
13
+ <li>Added feature to whitelist IP addresses to skip coming soon page.</li>
14
+ <li>Added feature to set a random secret URL to skip coming soon page.</li>
15
+ <li>Added feature to receive an email when you have a new subscriber.</li>
16
+ <li>Fixed a bug with saving subscriber name for external integrations.</li>
17
+ </ul>
18
+
19
+ </li>
20
+ <li class="main-item">
21
+ 3.1 <a class="blog_read" target="_blank" href="https://getigniteup.com/blog/igniteup-3-1-is-here/?utm_source=help_page&utm_medium=changelog&utm_campaign=plugin"><?php _e('Read more >>', CSCS_TEXT_DOMAIN); ?></a>
22
  <ul class="changelog-sub-list">
23
  <li>Used jQuery accordions to organize option page fields.</li>
24
  <li>Added more features to support external templates.</li>
30
  </ul>
31
 
32
  </li>
 
 
 
 
 
 
 
 
 
 
 
33
  </ul>
34
  </div>
35
  </div>
97
 
98
 
99
  <p><?php _e('If you appreciate our effort, please make a donation with PayPal. In this way we can serve you better and IgniteUp will improve. Thank you in advance!', CSCS_TEXT_DOMAIN); ?></p>
100
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9AFALLGD43AE" target="_blank" class="button button-primary"><?php _e('Donate with PayPal', CSCS_TEXT_DOMAIN); ?></a>
101
  </div>
102
  </div>
103
  </div>
includes/views/temp-template-options.php CHANGED
@@ -57,7 +57,7 @@
57
  <?php
58
  switch ($field['type']) {
59
  case 'text':
60
- echo "<input type='text' class='regular-text reset-supported' id='$option_id' value='" . htmlspecialchars($saved_value, ENT_QUOTES) . "' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . htmlspecialchars($def_val) . "'>";
61
  break;
62
  case 'email':
63
  echo "<input type='email' class='regular-text reset-supported' id='$option_id' value='$saved_value' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . $def_val . "'>";
@@ -68,11 +68,14 @@
68
  case 'date':
69
  echo "<input type='text' class='cs-date-picker regular-text reset-supported' id='$option_id' value='$saved_value' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . $def_val . "'>";
70
  break;
 
 
 
71
  case 'checkbox':
72
  echo "<label><input type='checkbox' class='igniteup-checkbox-switch' data-size='mini' data-on-color='info' data-animate='true' class='reset-supported' id='$option_id' value='1' name='$option_key' data-defval='" . $def_val . "' " . ($saved_value == 1 ? 'checked="checked"' : '' ) . "> " . (isset($field['label']) ? $field['label'] : 'Undefined') . "</label>";
73
  break;
74
  case 'textarea':
75
- echo "<textarea rows='5' cols='46' class='regular-text reset-supported' id='$option_id' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . $def_val . "'>$saved_value</textarea>";
76
  break;
77
  case 'image':
78
  ?>
57
  <?php
58
  switch ($field['type']) {
59
  case 'text':
60
+ echo "<input type='text' class='regular-text reset-supported' id='$option_id' value='" . htmlspecialchars($saved_value, ENT_QUOTES) . "' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . htmlentities($def_val,ENT_QUOTES) . "'>";
61
  break;
62
  case 'email':
63
  echo "<input type='email' class='regular-text reset-supported' id='$option_id' value='$saved_value' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . $def_val . "'>";
68
  case 'date':
69
  echo "<input type='text' class='cs-date-picker regular-text reset-supported' id='$option_id' value='$saved_value' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . $def_val . "'>";
70
  break;
71
+ case 'time':
72
+ echo "<input type='text' class='cs-time-picker regular-text reset-supported' id='$option_id' value='$saved_value' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . $def_val . "'>";
73
+ break;
74
  case 'checkbox':
75
  echo "<label><input type='checkbox' class='igniteup-checkbox-switch' data-size='mini' data-on-color='info' data-animate='true' class='reset-supported' id='$option_id' value='1' name='$option_key' data-defval='" . $def_val . "' " . ($saved_value == 1 ? 'checked="checked"' : '' ) . "> " . (isset($field['label']) ? $field['label'] : 'Undefined') . "</label>";
76
  break;
77
  case 'textarea':
78
+ echo "<textarea rows='5' cols='46' class='regular-text reset-supported' id='$option_id' name='$option_key' placeholder='" . (isset($field['placeholder']) ? $field['placeholder'] : '' ) . "' data-defval='" . htmlentities($def_val,ENT_QUOTES) . "'>$saved_value</textarea>";
79
  break;
80
  case 'image':
81
  ?>
readme.txt CHANGED
@@ -3,12 +3,12 @@ Contributors: ceylonsystems
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9AFALLGD43AE
4
  Tags: coming soon, coming soon page, construction, landing page, launch, launch page, maintenance, maintenance mode, newsletter, subscribe, offline, unavailable, under construction, wordpress coming soon, wordpress maintenance mode, wordpress under construction, igniter
5
  Requires at least: 3.0.1
6
- Tested up to: 4.4
7
- Stable tag: 3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Create your Coming Soon, Under Constructions or Maintenance Mode page with few clicks. More than 7 templates to choose from.
12
 
13
  == Description ==
14
 
@@ -24,6 +24,7 @@ Create decent pages to let users know the site is in Coming Soon, Maintenance Mo
24
  * [Live Demo Glass (PREMIUM) &raquo;](https://getigniteup.com/glass-pro-demo/)
25
  * [Live Demo Cool (PREMIUM) &raquo;](http://demos.getigniteup.com/cool-demo/)
26
  * [Live Demo Round (PREMIUM) &raquo;](http://demos.getigniteup.com/round-demo/)
 
27
 
28
 
29
  = Features =
@@ -34,14 +35,17 @@ Create decent pages to let users know the site is in Coming Soon, Maintenance Mo
34
  * 100% Mobile Responsive, Powered by Twitter Bootstrap
35
  * Fully Customizable Templates
36
  * Email Subscription Forms
 
 
 
 
 
 
37
  * Contact Form Support (AVAILABLE IN COMPACT TEMPLATE)
38
  * Display the Business Location Map (AVAILABLE IN COMPACT TEMPLATE)
39
  * Features or Services Section (AVAILABLE IN COMPACT TEMPLATE)
40
  * YouTube Video for Desktop Page Backgrounds (ONLY ON PREMIUM TEMPLATES)
41
- * Snow Snow / Particleground Animation Effects (ONLY ON PREMIUM TEMPLATES)
42
- * Mailchimp and Mailpoet Integration
43
- * Export Email Subscriber List as a CSV or BCC Text
44
- * Translation Ready
45
 
46
  Note: IgniteUp is fully supported with `/wp-admin` login url.
47
  Don't use it if you have any other URL except `/wp-admin` for your login page.
@@ -121,6 +125,13 @@ You can post your question / suggestion in the [IgniteUp forums](https://wordpre
121
 
122
  == Changelog ==
123
 
 
 
 
 
 
 
 
124
  = 3.1 =
125
  * Used jQuery accordions to organize option page fields
126
  * Added more features to support external templates
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9AFALLGD43AE
4
  Tags: coming soon, coming soon page, construction, landing page, launch, launch page, maintenance, maintenance mode, newsletter, subscribe, offline, unavailable, under construction, wordpress coming soon, wordpress maintenance mode, wordpress under construction, igniter
5
  Requires at least: 3.0.1
6
+ Tested up to: 4.7.4
7
+ Stable tag: 3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Create your Coming Soon, Under Constructions or Maintenance Mode page with a few clicks. More than 9 templates to choose from.
12
 
13
  == Description ==
14
 
24
  * [Live Demo Glass (PREMIUM) &raquo;](https://getigniteup.com/glass-pro-demo/)
25
  * [Live Demo Cool (PREMIUM) &raquo;](http://demos.getigniteup.com/cool-demo/)
26
  * [Live Demo Round (PREMIUM) &raquo;](http://demos.getigniteup.com/round-demo/)
27
+ * [Live Demo Two-Face (PREMIUM) &raquo;](http://demos.getigniteup.com/twoface-demo/)
28
 
29
 
30
  = Features =
35
  * 100% Mobile Responsive, Powered by Twitter Bootstrap
36
  * Fully Customizable Templates
37
  * Email Subscription Forms
38
+ * 503 response to notify search engines that your site is down for maintenance
39
+ * Show the website for specific visitors with a secret URL
40
+ * Show the website for specific visitors with whitelisted IP addresses
41
+ * Mailchimp and Mailpoet Integration
42
+ * Export Email Subscriber List as a CSV or BCC Text
43
+ * Translation Ready
44
  * Contact Form Support (AVAILABLE IN COMPACT TEMPLATE)
45
  * Display the Business Location Map (AVAILABLE IN COMPACT TEMPLATE)
46
  * Features or Services Section (AVAILABLE IN COMPACT TEMPLATE)
47
  * YouTube Video for Desktop Page Backgrounds (ONLY ON PREMIUM TEMPLATES)
48
+ * Snow / Particleground Animation Effects (ONLY ON PREMIUM TEMPLATES)
 
 
 
49
 
50
  Note: IgniteUp is fully supported with `/wp-admin` login url.
51
  Don't use it if you have any other URL except `/wp-admin` for your login page.
125
 
126
  == Changelog ==
127
 
128
+ = 3.2 =
129
+ * New feature to whitelist IP addresses to skip coming soon page
130
+ * New feature to set a random and unique URL to skip coming soon page
131
+ * New feature to receive an email when you have a new subscriber
132
+ * Fixed a bug with saving subscriber name for external integrations
133
+ * More minor bug fixes
134
+
135
  = 3.1 =
136
  * Used jQuery accordions to organize option page fields
137
  * Added more features to support external templates