Under Construction - Version 2.66

Version Description

  • 2017/10/19
  • fixed bug: some users weren't able to close the notification on front-end
  • added contact option on plugin deactivation
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Under Construction
Version 2.66
Comparing to
See all releases

Code changes from version 2.65 to 2.66

css/ucp-admin-plugins.css CHANGED
@@ -63,6 +63,21 @@
63
  box-sizing: border-box;
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  .ucp-survey-dialog .question-wrapper .details {
67
  display: none;
68
  }
@@ -118,3 +133,7 @@
118
  font-family: Roboto, sans-serif;
119
  font-weight: 900;
120
  }
 
 
 
 
63
  box-sizing: border-box;
64
  }
65
 
66
+ .question-wrapper-assistance {
67
+ border: 2px solid rgba(0, 142, 194, 1);
68
+ padding: 15px 10px;
69
+ background-color: rgba(250,250,250,0.55);
70
+ margin-bottom: 5px;
71
+ width: 100%;
72
+ display: inline-block;
73
+ text-align: center;
74
+ box-sizing: border-box;
75
+ }
76
+
77
+ .question-wrapper-assistance .button {
78
+ margin-top: 10px;
79
+ }
80
+
81
  .ucp-survey-dialog .question-wrapper .details {
82
  display: none;
83
  }
133
  font-family: Roboto, sans-serif;
134
  font-weight: 900;
135
  }
136
+
137
+ .textcenter {
138
+ text-align: center;
139
+ }
css/ucp-admin.css CHANGED
@@ -10,6 +10,11 @@
10
  margin-bottom: 30px;
11
  }
12
 
 
 
 
 
 
13
  #ucp_tabs textarea {
14
  box-sizing: border-box;
15
  resize: none;
10
  margin-bottom: 30px;
11
  }
12
 
13
+ .settings_page_ucp h1 a {
14
+ color: black;
15
+ text-decoration: none;
16
+ }
17
+
18
  #ucp_tabs textarea {
19
  box-sizing: border-box;
20
  resize: none;
js/ucp-admin.js CHANGED
@@ -25,6 +25,13 @@ jQuery(document).ready(function($) {
25
  active: Cookies.get($(this).attr('id'))
26
  });
27
  });
 
 
 
 
 
 
 
28
 
29
  // init select2
30
  $('#whitelisted_users').select2({ 'placeholder': ucp.whitelisted_users_placeholder});
@@ -124,6 +131,7 @@ jQuery(document).ready(function($) {
124
  button.addClass('loading');
125
  $.post(ajaxurl, { support_email: $('#support_email').val(),
126
  support_message: $('#support_message').val(),
 
127
  support_info: $('#support_info:checked').val(),
128
  _ajax_nonce: ucp.nonce_submit_support_message,
129
  action: 'ucp_submit_support_message'},
25
  active: Cookies.get($(this).attr('id'))
26
  });
27
  });
28
+
29
+ // shortcut to urgent support from deactivate dialog
30
+ if (parent.location.hash == '#support') {
31
+ $('#ucp_tabs').tabs('option', 'active', 4);
32
+ $('#tabs_support').tabs('option', 'active', 1);
33
+ parent.location.hash = '';
34
+ }
35
 
36
  // init select2
37
  $('#whitelisted_users').select2({ 'placeholder': ucp.whitelisted_users_placeholder});
131
  button.addClass('loading');
132
  $.post(ajaxurl, { support_email: $('#support_email').val(),
133
  support_message: $('#support_message').val(),
134
+ support_priority: $('#support_priority').val(),
135
  support_info: $('#support_info:checked').val(),
136
  _ajax_nonce: ucp.nonce_submit_support_message,
137
  action: 'ucp_submit_support_message'},
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: maintenance mode, maintenance page, coming soon page, landing page, under
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 4.8
7
- Stable tag: 2.65
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -120,6 +120,11 @@ Or if needed, upload manually;
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
123
  = 2.65 =
124
  * 2017/10/17
125
  * fixed CORS issue on FontAwesome
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 4.8
7
+ Stable tag: 2.66
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
120
 
121
  == Changelog ==
122
 
123
+ = 2.66 =
124
+ * 2017/10/19
125
+ * fixed bug: some users weren't able to close the notification on front-end
126
+ * added contact option on plugin deactivation
127
+
128
  = 2.65 =
129
  * 2017/10/17
130
  * fixed CORS issue on FontAwesome
themes/fonts/.htaccess CHANGED
@@ -11,4 +11,4 @@
11
  <FilesMatch "\.(woff|woff2|otf|eot|svg|ttf)$">
12
  Header set Access-Control-Allow-Origin "*"
13
  </FilesMatch>
14
- </IfModule>
11
  <FilesMatch "\.(woff|woff2|otf|eot|svg|ttf)$">
12
  Header set Access-Control-Allow-Origin "*"
13
  </FilesMatch>
14
+ </IfModule>
under-construction.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction page while you do maintenance work.
6
  Author: Web factory Ltd
7
- Version: 2.65
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -378,6 +378,9 @@ class UCP {
378
 
379
  $message = stripslashes(sanitize_text_field($_POST['support_message']));
380
  $subject = 'UCP Support';
 
 
 
381
  $body = $message;
382
  if (!empty($_POST['support_info'])) {
383
  $theme = wp_get_theme();
@@ -732,7 +735,8 @@ class UCP {
732
  is_user_logged_in() &&
733
  self::is_construction_mode_enabled(true) &&
734
  !self::is_construction_mode_enabled(false))
735
- echo '<div style="background-color: #333; line-height: 140%; font-size: 14px; position: fixed; display: block; top: 50px; z-index: 99999; color: #fefefe; padding: 20px 35px 20px 20px; width: 500px; border: thin solid #fefefe; left: -1px;"><a style="color: #ea1919; font-weight: 900; text-decoration: none; position: absolute; top: 7px; right: 10px;" href="' . $dismiss_url . '" alt="Dismiss notice" title="Dismiss notice">X</a><b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.<br><a href="' . get_home_url() . '/?ucp_preview" style="text-decoration: underline; color: #fefefe;">Preview UnderConstructionPage</a><br><a href="' . admin_url('options-general.php?page=ucp') . '" style="text-decoration: underline; color: #fefefe;">Configure UnderConstructionPage</a></div>';
 
736
  } // whitelisted_notification
737
 
738
 
@@ -750,7 +754,7 @@ class UCP {
750
 
751
  if (empty($notices['dismiss_rate']) &&
752
  (time() - $meta['first_install']) > (DAY_IN_SECONDS * 1.5)) {
753
- $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?rate=5#new-post';
754
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
755
 
756
  echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . '!<br>We saw you\'ve been using the <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> plugin for a few days (that\'s awesome!) and wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. It helps us out a lot!';
@@ -1067,7 +1071,7 @@ class UCP {
1067
  $epc = new Endurance_Page_Cache;
1068
  $epc->purge_all();
1069
  }
1070
- if (method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
1071
  SG_CachePress_Supercacher::purge_cache(true);
1072
  }
1073
  if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
@@ -1527,6 +1531,16 @@ class UCP {
1527
  echo '<p>Something is not working the way it\'s suppose to? Having problems activating UCP? Contact our friendly support, they\'ll respond ASAP.<br>You can also contact us just to say hello ;)</p>';
1528
 
1529
  echo '<table class="form-table">';
 
 
 
 
 
 
 
 
 
 
1530
  echo '<tr valign="top">
1531
  <th scope="row"><label for="support_email">Your Email Address</label></th>
1532
  <td><input id="support_email" type="text" class="regular-text skip-save" name="support_email" value="' . $user->user_email . '" placeholder="name@domain.com">';
@@ -1672,7 +1686,7 @@ class UCP {
1672
  }
1673
 
1674
  echo '<div class="wrap">
1675
- <h1 class="ucp-logo"><img src="' . UCP_PLUGIN_URL . 'images/ucp_logo.png" alt="UnderConstructionPage" title="UnderConstructionPage">UnderConstructionPage</h1>';
1676
 
1677
  echo '<form action="options.php" method="post" id="ucp_form">';
1678
  settings_fields(UCP_OPTIONS_KEY);
@@ -1750,10 +1764,18 @@ class UCP {
1750
  echo '</p>';
1751
  } // footer_buttons
1752
 
 
 
1753
  static function footer_plugins() {
 
 
1754
  echo '<div id="ucp-deactivate-survey" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
1755
- echo '<p>We want to improve! Please tell us:<br><b>Why are you deactivating <span class="ucp-logo">UnderConstructionPage</span>?</b></p>';
1756
-
 
 
 
 
1757
  $questions = array();
1758
  $questions[] = '<div class="question-wrapper" data-value="temporary">' .
1759
  '<div class="question">It\'s a temporary deactivation. I\'m debugging something.</div>' .
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction page while you do maintenance work.
6
  Author: Web factory Ltd
7
+ Version: 2.66
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
378
 
379
  $message = stripslashes(sanitize_text_field($_POST['support_message']));
380
  $subject = 'UCP Support';
381
+ if ($_POST['support_priority'] == 'urgent') {
382
+ $subject .= ' - Urgent';
383
+ }
384
  $body = $message;
385
  if (!empty($_POST['support_info'])) {
386
  $theme = wp_get_theme();
735
  is_user_logged_in() &&
736
  self::is_construction_mode_enabled(true) &&
737
  !self::is_construction_mode_enabled(false))
738
+ // keeping everything inline due to minimal CSS
739
+ echo '<div style="background-color: #333; line-height: 140%; font-size: 14px; position: fixed; display: block; top: 50px; z-index: 99999; color: #fefefe; padding: 20px 35px 20px 20px; width: 500px; border: thin solid #fefefe; left: -1px;"><a style="color: #ea1919; font-weight: 900; text-decoration: none; position: absolute; top: 7px; right: 10px;" href="' . $dismiss_url . '" alt="Dismiss notice" onclick="window.location.href = \'' . $dismiss_url . '\'; return false;" title="Dismiss notice">X</a><b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.<br><a href="' . get_home_url() . '/?ucp_preview" style="text-decoration: underline; color: #fefefe;">Preview UnderConstructionPage</a><br><a href="' . admin_url('options-general.php?page=ucp') . '" style="text-decoration: underline; color: #fefefe;">Configure UnderConstructionPage</a></div>';
740
  } // whitelisted_notification
741
 
742
 
754
 
755
  if (empty($notices['dismiss_rate']) &&
756
  (time() - $meta['first_install']) > (DAY_IN_SECONDS * 1.5)) {
757
+ $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?filter=5&rate=5#new-post';
758
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
759
 
760
  echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . '!<br>We saw you\'ve been using the <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> plugin for a few days (that\'s awesome!) and wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. It helps us out a lot!';
1071
  $epc = new Endurance_Page_Cache;
1072
  $epc->purge_all();
1073
  }
1074
+ if (class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
1075
  SG_CachePress_Supercacher::purge_cache(true);
1076
  }
1077
  if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
1531
  echo '<p>Something is not working the way it\'s suppose to? Having problems activating UCP? Contact our friendly support, they\'ll respond ASAP.<br>You can also contact us just to say hello ;)</p>';
1532
 
1533
  echo '<table class="form-table">';
1534
+ if (!empty($_GET['urgent-support'])) {
1535
+ echo '<tr valign="top">
1536
+ <th scope="row"><label for="">Ticket Priority</label></th>
1537
+ <td><span style="text-decoration: underline; color: #ea1919;">URGENT</span>';
1538
+ echo '</td></tr>';
1539
+ echo '<input type="hidden" value="urgent" id="support_priority">';
1540
+ } else {
1541
+ echo '<input type="hidden" value="normal" id="support_priority">';
1542
+ }
1543
+
1544
  echo '<tr valign="top">
1545
  <th scope="row"><label for="support_email">Your Email Address</label></th>
1546
  <td><input id="support_email" type="text" class="regular-text skip-save" name="support_email" value="' . $user->user_email . '" placeholder="name@domain.com">';
1686
  }
1687
 
1688
  echo '<div class="wrap">
1689
+ <h1 class="ucp-logo"><a href="' . admin_url('options-general.php?page=ucp') . '"><img src="' . UCP_PLUGIN_URL . 'images/ucp_logo.png" alt="UnderConstructionPage" title="UnderConstructionPage">UnderConstructionPage</a></h1>';
1690
 
1691
  echo '<form action="options.php" method="post" id="ucp_form">';
1692
  settings_fields(UCP_OPTIONS_KEY);
1764
  echo '</p>';
1765
  } // footer_buttons
1766
 
1767
+
1768
+ // markup for deactivate dialog
1769
  static function footer_plugins() {
1770
+ $support_link = admin_url('options-general.php?page=ucp&urgent-support=true#support');
1771
+
1772
  echo '<div id="ucp-deactivate-survey" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
1773
+
1774
+ echo '<div class="question-wrapper-assistance" data-value="urgent">' .
1775
+ '<div class="question"><b>Something\'s not working? We offer URGENT assistance!</b><br><a href="' . $support_link . '" class="button">Send a priority ticket to our friendly support agents</a><br><small><i>average response time is under 10 minutes</i></small></div>' . '</div>';
1776
+
1777
+ echo '<p class="textcenter"><br>We want to improve! Please tell us:<br><b>Why are you deactivating <span class="ucp-logo">UnderConstructionPage</span>?</b></p>';
1778
+
1779
  $questions = array();
1780
  $questions[] = '<div class="question-wrapper" data-value="temporary">' .
1781
  '<div class="question">It\'s a temporary deactivation. I\'m debugging something.</div>' .