Under Construction - Version 2.70

Version Description

  • 2017/11/06
  • continued marking strings for translation
  • added button for resetting settings
Download this release

Release Info

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

Code changes from version 2.66 to 2.70

css/ucp-admin-plugins.css CHANGED
@@ -4,8 +4,6 @@
4
  * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
- @import url('//fonts.googleapis.com/css?family=Roboto:900');
8
-
9
  .ui-widget-overlay {
10
  opacity: 0.85;
11
  }
@@ -136,4 +134,4 @@
136
 
137
  .textcenter {
138
  text-align: center;
139
- }
4
  * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
 
 
7
  .ui-widget-overlay {
8
  opacity: 0.85;
9
  }
134
 
135
  .textcenter {
136
  text-align: center;
137
+ }
css/ucp-admin.css CHANGED
@@ -53,6 +53,10 @@ p.submit {
53
  padding-bottom: 0;
54
  }
55
 
 
 
 
 
56
  .button.loading {
57
  pointer-events: none;
58
  cursor: default !important;
53
  padding-bottom: 0;
54
  }
55
 
56
+ a.reset-settings.button:hover {
57
+ color: #ea1919;
58
+ }
59
+
60
  .button.loading {
61
  pointer-events: none;
62
  cursor: default !important;
js/ucp-admin.js CHANGED
@@ -256,6 +256,16 @@ jQuery(document).ready(function($) {
256
  }
257
  }).triggerHandler('change', true);
258
 
 
 
 
 
 
 
 
 
 
 
259
 
260
  // warning if there are unsaved changes when previewing
261
  $('.settings_page_ucp .wrap').on('click', '#ucp_preview', function(e) {
@@ -295,7 +305,7 @@ jQuery(document).ready(function($) {
295
 
296
 
297
  // helper for linking anchors in different tabs
298
- $('.settings_page_ucp .wrap').on('click', '.change_tab', function(e) {
299
  $('#ucp_tabs').tabs('option', 'active', $(this).data('tab'));
300
 
301
  // get the link anchor and scroll to it
256
  }
257
  }).triggerHandler('change', true);
258
 
259
+
260
+ $('.settings_page_ucp .wrap').on('click', '.reset-settings', function(e) {
261
+ if (!confirm('Are you sure you want to reset all UCP settings to their default values? There is NO undo.')) {
262
+ e.preventDefault();
263
+ return false;
264
+ }
265
+
266
+ return true;
267
+ }); // reset-settings
268
+
269
 
270
  // warning if there are unsaved changes when previewing
271
  $('.settings_page_ucp .wrap').on('click', '#ucp_preview', function(e) {
305
 
306
 
307
  // helper for linking anchors in different tabs
308
+ $('.settings_page_ucp').on('click', '.change_tab', function(e) {
309
  $('#ucp_tabs').tabs('option', 'active', $(this).data('tab'));
310
 
311
  // get the link anchor and scroll to it
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: WebFactory, UnderConstructionPage
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
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
 
@@ -64,6 +64,7 @@ UCP has a built-in support system. It requires no registration or any kind of me
64
  * <a href="https://planetwp.com/underconstruction-page-plugin/">Planet WP</a> gave it 5/5 stars
65
  * <a href="https://firstsiteguide.com/under-construction-page-review/">FirstSiteGuide</a> says: "a perfect choice"
66
  * WPblog wrote a <a href="https://www.wpblog.com/quick-ways-to-put-wordpress-site-under-construction/">review</a> as well
 
67
 
68
  == Installation ==
69
 
@@ -120,6 +121,11 @@ Or if needed, upload manually;
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
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
+ Tested up to: 4.9
7
+ Stable tag: 2.70
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
64
  * <a href="https://planetwp.com/underconstruction-page-plugin/">Planet WP</a> gave it 5/5 stars
65
  * <a href="https://firstsiteguide.com/under-construction-page-review/">FirstSiteGuide</a> says: "a perfect choice"
66
  * WPblog wrote a <a href="https://www.wpblog.com/quick-ways-to-put-wordpress-site-under-construction/">review</a> as well
67
+ * <a href="https://wptopdog.com/under-construction-plugin-review/">WP TopDog</a> had Daniel explain how to use UCP
68
 
69
  == Installation ==
70
 
121
 
122
  == Changelog ==
123
 
124
+ = 2.70 =
125
+ * 2017/11/06
126
+ * continued marking strings for translation
127
+ * added button for resetting settings
128
+
129
  = 2.66 =
130
  * 2017/10/19
131
  * fixed bug: some users weren't able to close the notification on front-end
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.66
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -82,6 +82,7 @@ class UCP {
82
  add_action('admin_notices', array(__CLASS__, 'admin_notices'));
83
  add_action('admin_action_ucp_dismiss_notice', array(__CLASS__, 'dismiss_notice'));
84
  add_action('admin_action_ucp_change_status', array(__CLASS__, 'change_status'));
 
85
 
86
  // enqueue admin scripts
87
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
@@ -279,6 +280,13 @@ class UCP {
279
  static function admin_enqueue_scripts($hook) {
280
  $surveys = get_option(UCP_SURVEYS_KEY);
281
  $meta = self::get_meta();
 
 
 
 
 
 
 
282
 
283
  // survey is shown min 5min after install
284
  // no active surveys at the moment
@@ -321,8 +329,7 @@ class UCP {
321
  wp_localize_script('ucp-admin-plugins', 'ucp', $js_localize);
322
  }
323
 
324
- $pointers = get_option(UCP_POINTERS_KEY);
325
- if ($pointers && 'settings_page_ucp' != $hook) {
326
  $pointers['_nonce_dismiss_pointer'] = wp_create_nonce('ucp_dismiss_pointer');
327
  wp_enqueue_script('wp-pointer');
328
  wp_enqueue_script('ucp-pointers', plugins_url('js/ucp-admin-pointers.js', __FILE__), array('jquery'), self::$version, true);
@@ -373,7 +380,7 @@ class UCP {
373
 
374
  $email = sanitize_text_field($_POST['support_email']);
375
  if (!is_email($email)) {
376
- wp_send_json_error('Please double-check your email address.');
377
  }
378
 
379
  $message = stripslashes(sanitize_text_field($_POST['support_message']));
@@ -397,7 +404,7 @@ class UCP {
397
  if (true === wp_mail('ucp@webfactoryltd.com', $subject, $body, $headers)) {
398
  wp_send_json_success();
399
  } else {
400
- wp_send_json_error('Something is not right with your wp_mail() function. Email as at ucp@webfactoryltd.com.');
401
  }
402
  } // submit_support_message
403
 
@@ -457,7 +464,7 @@ class UCP {
457
  $vars = wp_parse_args($_POST, array('type' => '', 'email' => ''));
458
 
459
  if (empty($vars['email']) || empty($vars['type'])) {
460
- wp_send_json_error('Please tell us your email and how you use UCP.');
461
  }
462
 
463
  $request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
@@ -736,7 +743,7 @@ class UCP {
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
 
@@ -753,7 +760,7 @@ class UCP {
753
  }
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
 
@@ -761,14 +768,13 @@ class UCP {
761
 
762
  echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . __('Help make the plugin better by rating it', 'under-construction-page') . '</a>';
763
  echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '">' . __('I\'ve already rated the plugin', 'under-construction-page') . '</a>';
764
- echo '<br><br><b>Thank you very much! The UCP team</b>';
765
  echo '</p></div>';
766
  }
767
 
768
  if (self::is_plugin_page() && self::is_construction_mode_enabled(true) && !empty($options['end_date']) && $options['end_date'] != '0000-00-00 00:00' && $options['end_date'] < current_time('mysql')) {
769
  echo '<div id="ucp_end_date_notice" class="notice-error notice"><p>Under construction mode is enabled but the <a href="#end_date" class="change_tab" data-tab="0">end date</a> is set to a past date so the <b>under construction page will not be shown</b>. Either move the <a href="#end_date" class="change_tab" data-tab="0">end date</a> to a future date or disable it.</p></div>';
770
  }
771
-
772
  } // notices
773
 
774
 
@@ -800,6 +806,21 @@ class UCP {
800
  exit;
801
  } // dismiss_notice
802
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
803
 
804
  // change status via admin bar
805
  static function change_status() {
@@ -853,14 +874,12 @@ class UCP {
853
  if (self::is_construction_mode_enabled(true)) {
854
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon.png" alt="' . __('Under construction mode is enabled', 'under-construction-page') . '" title="' . __('Under construction mode is enabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-enabled">&#9679;</i></span>';
855
  $class = 'ucp-enabled';
856
- $status = 'Under construction mode is <b style="font-weight: bold;">enabled</b>';
857
  $action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
858
  $action = __('Under Construction Mode', 'under-construction-page');
859
  $action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="on"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
860
  } else {
861
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon.png" alt="' . __('Under construction mode is disabled', 'under-construction-page') . '" title="' . __('Under construction mode is disabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-disabled">&#9679;</i></span>';
862
  $class = 'ucp-disabled';
863
- $status = 'Under construction mode is <b style="font-weight: bold;">disabled</b>';
864
  $action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
865
  $action = __('Under Construction Mode', 'under-construction-page');
866
  $action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="off"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
@@ -927,7 +946,7 @@ class UCP {
927
  return $text;
928
  }
929
 
930
- $text = '<i><a href="https://underconstructionpage.com/" title="Visit UCP\'s site for more info" target="_blank">UnderConstructionPage</a> v' . self::$version . ' by <a href="https://www.webfactoryltd.com/" title="Visit our site to get more great plugins" target="_blank">WebFactory Ltd</a>.</i> '. $text;
931
 
932
  return $text;
933
  } // admin_footer_text
@@ -1159,7 +1178,7 @@ class UCP {
1159
  <label for="status" class="toggle"><span class="toggle_handler"></span></label>
1160
  </div>';
1161
 
1162
- echo '<p class="description">By enabling construction mode users will not be able to access the site\'s content. They will only see the under construction page.<br> To configure exceptions set <a class="change_tab" data-tab="3" href="#whitelisted-roles">whitelisted user roles</a>.</p>';
1163
  echo '</td></tr>';
1164
 
1165
  echo '<tr valign="top">
@@ -1170,8 +1189,8 @@ class UCP {
1170
  <label for="end_date_toggle" class="toggle"><span class="toggle_handler"></span></label>
1171
  </div>';
1172
  echo '<div id="end_date_wrapper"><input id="end_date" type="text" class="datepicker" name="' . UCP_OPTIONS_KEY . '[end_date]" value="' . esc_attr($options['end_date']) . '" placeholder="yyyy-mm-dd hh:mm"><span title="' . __('Open date & time picker', 'under-construction-page') . '" alt="' . __('Open date & time picker', 'under-construction-page') . '" class="show-datepicker dashicons dashicons-calendar-alt"></span>';
1173
- echo '<p class="description">If enabled, construction mode will automatically stop showing on the selected date.<br>
1174
- This option will not "auto-enable" construction mode. Status has to be set to "On".</p></div>';
1175
  echo '</td></tr>';
1176
 
1177
  echo '<tr valign="top">
@@ -1182,7 +1201,15 @@ class UCP {
1182
  <label for="ga_tracking_id_toggle" class="toggle"><span class="toggle_handler"></span></label>
1183
  </div>';
1184
  echo '<div id="ga_tracking_id_wrapper"><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
1185
- echo '<p class="description">Enter the unique tracking ID found in your GA tracking profile settings to track visits to pages.</p></div>';
 
 
 
 
 
 
 
 
1186
  echo '</td></tr>';
1187
 
1188
  echo '</table>';
@@ -1200,7 +1227,7 @@ class UCP {
1200
  echo '<table class="form-table">';
1201
 
1202
  echo '<tr valign="top">
1203
- <th scope="row"><label for="title">Title</label></th>
1204
  <td><input type="text" id="title" class="regular-text" name="' . UCP_OPTIONS_KEY . '[title]" value="' . esc_attr($options['title']) . '" />';
1205
  echo '<p class="description">Page title. Default: ' . $default_options['title'] . '</p>';
1206
  echo '<p><b>Available shortcodes:</b> (only active in UC themes, not on the rest of the site)</p>
@@ -1214,26 +1241,26 @@ class UCP {
1214
  echo '</td></tr>';
1215
 
1216
  echo '<tr valign="top">
1217
- <th scope="row"><label for="description">Description</label></th>
1218
  <td><input id="description" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[description]" value="' . esc_attr($options['description']) . '" />';
1219
  echo '<p class="description">Description meta tag (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['description'] . '</p>';
1220
  echo '</td></tr>';
1221
 
1222
  echo '<tr valign="top">
1223
- <th scope="row"><label for="heading1">Headline</label></th>
1224
  <td><input id="heading1" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[heading1]" value="' . esc_attr($options['heading1']) . '" />';
1225
  echo '<p class="description">Main heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['heading1'] . '</p>';
1226
  echo '</td></tr>';
1227
 
1228
  echo '<tr valign="top" id="content_wrap">
1229
- <th scope="row"><label for="content">Content</label></th>
1230
  <td>';
1231
  wp_editor($options['content'], 'content', array('tabfocus_elements' => 'insert-media-button,save-post', 'editor_height' => 250, 'resize' => 1, 'textarea_name' => UCP_OPTIONS_KEY . '[content]', 'drag_drop_upload' => 1));
1232
  echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC template ones</a>. Default: ' . $default_options['content'] . '</p>';
1233
  echo '</td></tr>';
1234
 
1235
  echo '<tr valign="top" id="login_button_wrap">
1236
- <th scope="row"><label for="login_button">Login Button</label></th>
1237
  <td>';
1238
  echo '<div class="toggle-wrapper">
1239
  <input type="checkbox" id="login_button" ' . self::checked(1, $options['login_button']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[login_button]">
@@ -1243,7 +1270,7 @@ class UCP {
1243
  echo '</td></tr>';
1244
 
1245
  echo '<tr valign="top">
1246
- <th scope="row"><label for="linkback">Show Some Love</label></th>
1247
  <td>';
1248
  echo '<div class="toggle-wrapper">
1249
  <input type="checkbox" id="linkback" ' . self::checked(1, $options['linkback']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[linkback]">
@@ -1257,106 +1284,106 @@ class UCP {
1257
 
1258
  self::footer_buttons();
1259
 
1260
- echo '<h2 class="title">Social &amp; Contact Icons</h2>';
1261
 
1262
  echo '<table class="form-table" id="ucp-social-icons">';
1263
  echo '<tr valign="top">
1264
- <th scope="row"><label for="social_facebook">Facebook Page</label></th>
1265
- <td><input id="social_facebook" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_facebook]" value="' . esc_attr($options['social_facebook']) . '" placeholder="Facebook business or personal page URL">';
1266
- echo '<p class="description">Complete URL, with http prefix, to Facebook page.</p>';
1267
  echo '</td></tr>';
1268
 
1269
  echo '<tr valign="top">
1270
- <th scope="row"><label for="social_twitter">Twitter Profile</label></th>
1271
- <td><input id="social_twitter" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_twitter]" value="' . esc_attr($options['social_twitter']) . '" placeholder="Twitter profile URL">';
1272
- echo '<p class="description">Complete URL, with http prefix, to Twitter profile page.</p>';
1273
  echo '</td></tr>';
1274
 
1275
  echo '<tr valign="top">
1276
- <th scope="row"><label for="social_google">Google Page</label></th>
1277
- <td><input id="social_google" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_google]" value="' . esc_attr($options['social_google']) . '" placeholder="Google+ page URL">';
1278
- echo '<p class="description">Complete URL, with http prefix, to Google+ page.</p>';
1279
  echo '</td></tr>';
1280
 
1281
  echo '<tr valign="top">
1282
- <th scope="row"><label for="social_linkedin">LinkedIn Profile</label></th>
1283
- <td><input id="social_linkedin" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_linkedin]" value="' . esc_attr($options['social_linkedin']) . '" placeholder="LinkedIn profile page URL">';
1284
- echo '<p class="description">Complete URL, with http prefix, to LinkedIn profile page.</p>';
1285
  echo '</td></tr>';
1286
 
1287
  echo '<tr valign="top">
1288
- <th scope="row"><label for="social_youtube">YouTube Profile Page or Video</label></th>
1289
- <td><input id="social_youtube" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_youtube]" value="' . esc_attr($options['social_youtube']) . '" placeholder="YouTube page or video URL">';
1290
- echo '<p class="description">Complete URL, with http prefix, to YouTube page or video.</p>';
1291
  echo '</td></tr>';
1292
 
1293
  echo '<tr valign="top" class="hidden">
1294
- <th scope="row"><label for="social_vimeo">Vimeo Profile Page or Video</label></th>
1295
- <td><input id="social_vimeo" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_vimeo]" value="' . esc_attr($options['social_vimeo']) . '" placeholder="Vimeo page or video URL">';
1296
- echo '<p class="description">Complete URL, with http prefix, to Vimeo page or video.</p>';
1297
  echo '</td></tr>';
1298
 
1299
  echo '<tr valign="top" class="hidden">
1300
- <th scope="row"><label for="social_pinterest">Pinterest Profile</label></th>
1301
- <td><input id="social_pinterest" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_pinterest]" value="' . esc_attr($options['social_pinterest']) . '" placeholder="Pinterest profile URL">';
1302
- echo '<p class="description">Complete URL, with http prefix, to Pinterest profile.</p>';
1303
  echo '</td></tr>';
1304
 
1305
  echo '<tr valign="top" class="hidden">
1306
- <th scope="row"><label for="social_dribbble">Dribbble Profile</label></th>
1307
- <td><input id="social_dribbble" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_dribbble]" value="' . esc_attr($options['social_dribbble']) . '" placeholder="Dribbble profile URL">';
1308
- echo '<p class="description">Complete URL, with http prefix, to Dribbble profile.</p>';
1309
  echo '</td></tr>';
1310
 
1311
  echo '<tr valign="top" class="hidden">
1312
- <th scope="row"><label for="social_behance">Behance Profile</label></th>
1313
- <td><input id="social_behance" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_behance]" value="' . esc_attr($options['social_behance']) . '" placeholder="Behance profile URL">';
1314
- echo '<p class="description">Complete URL, with http prefix, to Behance profile.</p>';
1315
  echo '</td></tr>';
1316
 
1317
  echo '<tr valign="top" class="hidden">
1318
- <th scope="row"><label for="social_instagram">Instagram Profile</label></th>
1319
- <td><input id="social_instagram" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_instagram]" value="' . esc_attr($options['social_instagram']) . '" placeholder="Instagram profile URL">';
1320
- echo '<p class="description">Complete URL, with http prefix, to Instagram profile.</p>';
1321
  echo '</td></tr>';
1322
 
1323
  echo '<tr valign="top" class="hidden">
1324
- <th scope="row"><label for="social_tumblr">Tumblr Blog</label></th>
1325
- <td><input id="social_tumblr" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_tumblr]" value="' . esc_attr($options['social_tumblr']) . '" placeholder="Tumblr blog URL">';
1326
- echo '<p class="description">Complete URL, with http prefix, to Tumblr blog.</p>';
1327
  echo '</td></tr>';
1328
 
1329
  echo '<tr valign="top" class="hidden">
1330
- <th scope="row"><label for="social_telegram">Telegram Group, Channel or Account</label></th>
1331
- <td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="Telegram group, channel or account URL">';
1332
- echo '<p class="description">Complete URL, with https prefix to Telegram group, channel or account.</p>';
1333
  echo '</td></tr>';
1334
 
1335
  echo '<tr valign="top" class="hidden">
1336
- <th scope="row"><label for="social_skype">Skype Username</label></th>
1337
- <td><input id="social_skype" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="Skype username / account name">';
1338
- echo '<p class="description">Skype username / account name.</p>';
1339
  echo '</td></tr>';
1340
 
1341
  echo '<tr valign="top" class="hidden">
1342
- <th scope="row"><label for="social_whatsapp">WhatsApp Phone Number</label></th>
1343
- <td><input id="social_whatsapp" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_whatsapp]" value="' . esc_attr($options['social_whatsapp']) . '" placeholder="+1-123-456-789">';
1344
- echo '<p class="description">WhatsApp phone number in full international format.</p>';
1345
  echo '</td></tr>';
1346
 
1347
  echo '<tr valign="top" class="hidden">
1348
- <th scope="row"><label for="social_email">Email Address</label></th>
1349
- <td><input id="social_email" type="email" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_email]" value="' . esc_attr($options['social_email']) . '" placeholder="name@domain.com">';
1350
- echo '<p class="description">Email will be encoded on the page to protect it from email address harvesters.</p>';
1351
  echo '</td></tr>';
1352
 
1353
  echo '<tr valign="top" class="hidden">
1354
- <th scope="row"><label for="social_phone">Phone Number</label></th>
1355
- <td><input id="social_phone" type="tel" class="regular-text" name="' . UCP_OPTIONS_KEY . '[social_phone]" value="' . esc_attr($options['social_phone']) . '" placeholder="+1-123-456-789">';
1356
- echo '<p class="description">Complete phone number in international format.</p>';
1357
  echo '</td></tr>';
1358
 
1359
- echo '<tr><th colspan="2"><a id="show-social-icons" href="#" class="js-action">Show more Social &amp; Contact Icons</a></th></tr>';
1360
 
1361
  echo '</table>';
1362
  echo '</div>';
@@ -1477,7 +1504,7 @@ class UCP {
1477
  foreach ($roles as $tmp_role) {
1478
  echo '<input name="' . UCP_OPTIONS_KEY . '[whitelisted_roles][]" id="roles-' . $tmp_role['val'] . '" ' . self::checked($tmp_role['val'], $options['whitelisted_roles'], false) . ' value="' . $tmp_role['val'] . '" type="checkbox" /> <label for="roles-' . $tmp_role['val'] . '">' . $tmp_role['label'] . '</label><br />';
1479
  }
1480
- echo '<p class="description">Selected user roles will <b>not</b> be affected by the under construction mode and will always see the "normal" site. Default: administrator.</p>';
1481
  echo '</td></tr>';
1482
 
1483
  echo '<tr valign="top">
@@ -1485,7 +1512,7 @@ class UCP {
1485
  <td><select id="whitelisted_users" class="select2" style="width: 50%; max-width: 300px;" name="' . UCP_OPTIONS_KEY . '[whitelisted_users][]" multiple>';
1486
  self::create_select_options($users, $options['whitelisted_users'], true);
1487
 
1488
- echo '</select><p class="description">Selected users (when logged in) will <b>not</b> be affected by the under construction mode and will always see the "normal" site.</p>';
1489
  echo '</td></tr>';
1490
 
1491
  echo '</table>';
@@ -1503,11 +1530,14 @@ class UCP {
1503
 
1504
  echo '<div id="tabs_support" class="ui-tabs ucp-tabs-2nd-level">';
1505
  echo '<ul>';
1506
- echo '<li><a href="#tab_support_faq">FAQ</a></li>';
1507
- echo '<li><a href="#tab_support_contact">Contact Support</a></li>';
1508
  echo '</ul>';
1509
 
1510
  echo '<div style="display: none;" id="tab_support_faq" class="ucp-tab-content">';
 
 
 
1511
  echo '<p><b>How can I check if construction mode is really enabled on my site?</b><br>If the under construction status is green in the admin bar (the very top of the page, above this text), then it\'s enabled. But we made a tool specifically for these kinds of situations so you can double-check everything. <a href="https://underconstructionpage.com/under-construction-tester/?url=' . urlencode(get_home_url()) . '" target="_blank">Run under construction mode tester</a>.</p>';
1512
 
1513
  echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
@@ -1528,7 +1558,7 @@ class UCP {
1528
  echo '</div>'; // faq
1529
 
1530
  echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">';
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'])) {
@@ -1542,19 +1572,19 @@ class UCP {
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">';
1547
- echo '<p class="description">We will reply to this email, so please, double-check it.</p>';
1548
  echo '</td></tr>';
1549
 
1550
  echo '<tr valign="top">
1551
- <th scope="row"><label for="support_message">Message</label></th>
1552
  <td><textarea rows="5" cols="75" id="support_message" class="skip-save" name="support_message" placeholder="Hi, I just wanted to ..."></textarea>';
1553
  echo '<p class="description">Please be as descriptive as possible. It will help us to provide faster &amp; better support.</p>';
1554
  echo '</td></tr>';
1555
 
1556
  echo '<tr valign="top">
1557
- <th scope="row"><label for="support_info">Send Extra Site Info to Support Agents</label></th>
1558
  <td>';
1559
  echo '<div class="toggle-wrapper">
1560
  <input type="checkbox" id="support_info" checked type="checkbox" value="1" name="support_info">
@@ -1569,7 +1599,7 @@ class UCP {
1569
  echo 'UCP Options: <i>all option values will be sent to support to ease debugging</i>';
1570
  echo '</p></td></tr>';
1571
  echo '</table>';
1572
- echo '<a id="ucp-send-support-message" href="#" class="js-action button button-primary"><span class="dashicons dashicons-update"></span>Send Message to Support</a>';
1573
  echo '</table>';
1574
  echo '</div>'; // contact
1575
 
@@ -1584,7 +1614,7 @@ class UCP {
1584
  echo '<div class="ucp-tab-content">';
1585
  echo '<h3 class="ucp-pro-logo"><img src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage">UnderConstructionPage<span>pro</span></h3>';
1586
 
1587
- echo '<div id="ucp-earlybird"><span>Build <b>landing pages, coming soon pages, maintenance &amp; under construction pages</b> faster &amp; easier!<br>UCP PRO comes out on October 30th. Get on the earlybird list - <b>get it cheaper &amp; a week before others</b>.</span>';
1588
  echo '<p><input value="" type="email" placeholder="Your best email address" class="skip-save regular-text" id="ucp-earlybird-email"> <select id="ucp-earlybird-type"><option value="0">- How do you use UCP? Please select -</option><option value="solo-use">I use it only on one site</option><option value="multi-site">I use it on multiple sites I own</option><option value="webmaster">I use it on multiple sites I build/maintain for others</option></select> <a href="#" class="button button-primary button-large" id="ucp-earlybird-submit">I want the discount! Put me on the Earlybird List!</a></p>';
1589
  echo '</div>';
1590
 
@@ -1677,13 +1707,6 @@ class UCP {
1677
 
1678
  $options = self::get_options();
1679
  $default_options = self::default_options();
1680
- $pointers = get_option(UCP_POINTERS_KEY);
1681
-
1682
- // auto remove welcome pointer when options are opened
1683
- if (isset($pointers['welcome'])) {
1684
- unset($pointers['welcome']);
1685
- update_option(UCP_POINTERS_KEY, $pointers);
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>';
@@ -1817,7 +1840,9 @@ class UCP {
1817
  // reset all pointers to default state - visible
1818
  static function reset_pointers() {
1819
  $pointers = array();
 
1820
  $pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b style="font-weight: 800; font-variant: small-caps;">UnderConstructionPage</b> plugin! Please open <a href="' . admin_url('options-general.php?page=ucp'). '">Settings - UnderConstruction</a> to create a beautiful under construction page.');
 
1821
 
1822
  update_option(UCP_POINTERS_KEY, $pointers);
1823
  } // reset_pointers
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.70
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
82
  add_action('admin_notices', array(__CLASS__, 'admin_notices'));
83
  add_action('admin_action_ucp_dismiss_notice', array(__CLASS__, 'dismiss_notice'));
84
  add_action('admin_action_ucp_change_status', array(__CLASS__, 'change_status'));
85
+ add_action('admin_action_ucp_reset_settings', array(__CLASS__, 'reset_settings'));
86
 
87
  // enqueue admin scripts
88
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
280
  static function admin_enqueue_scripts($hook) {
281
  $surveys = get_option(UCP_SURVEYS_KEY);
282
  $meta = self::get_meta();
283
+ $pointers = get_option(UCP_POINTERS_KEY);
284
+
285
+ // auto remove welcome pointer when options are opened
286
+ if (isset($pointers['welcome']) && 'settings_page_ucp' == $hook) {
287
+ unset($pointers['welcome']);
288
+ update_option(UCP_POINTERS_KEY, $pointers);
289
+ }
290
 
291
  // survey is shown min 5min after install
292
  // no active surveys at the moment
329
  wp_localize_script('ucp-admin-plugins', 'ucp', $js_localize);
330
  }
331
 
332
+ if ($pointers) {
 
333
  $pointers['_nonce_dismiss_pointer'] = wp_create_nonce('ucp_dismiss_pointer');
334
  wp_enqueue_script('wp-pointer');
335
  wp_enqueue_script('ucp-pointers', plugins_url('js/ucp-admin-pointers.js', __FILE__), array('jquery'), self::$version, true);
380
 
381
  $email = sanitize_text_field($_POST['support_email']);
382
  if (!is_email($email)) {
383
+ wp_send_json_error(__('Please double-check your email address.', 'under-construction-page'));
384
  }
385
 
386
  $message = stripslashes(sanitize_text_field($_POST['support_message']));
404
  if (true === wp_mail('ucp@webfactoryltd.com', $subject, $body, $headers)) {
405
  wp_send_json_success();
406
  } else {
407
+ wp_send_json_error(__('Something is not right with your wp_mail() function. Please email as at ucp@webfactoryltd.com.', 'under-construction-page'));
408
  }
409
  } // submit_support_message
410
 
464
  $vars = wp_parse_args($_POST, array('type' => '', 'email' => ''));
465
 
466
  if (empty($vars['email']) || empty($vars['type'])) {
467
+ wp_send_json_error(__('Please tell us your email and how you use UCP.', 'under-construction-page'));
468
  }
469
 
470
  $request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
743
  self::is_construction_mode_enabled(true) &&
744
  !self::is_construction_mode_enabled(false))
745
  // keeping everything inline due to minimal CSS
746
+ 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>' . __('<b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.', 'under-construction-page') . '<br><a href="' . get_home_url() . '/?ucp_preview" style="text-decoration: underline; color: #fefefe;">' . __('Preview UnderConstructionPage', 'under-construction-page') . '</a><br><a href="' . admin_url('options-general.php?page=ucp') . '" style="text-decoration: underline; color: #fefefe;">' . __('Configure UnderConstructionPage', 'under-construction-page') . '</a></div>';
747
  } // whitelisted_notification
748
 
749
 
760
  }
761
 
762
  if (empty($notices['dismiss_rate']) &&
763
+ (time() - $meta['first_install']) > (DAY_IN_SECONDS * 1.0)) {
764
  $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?filter=5&rate=5#new-post';
765
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
766
 
768
 
769
  echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . __('Help make the plugin better by rating it', 'under-construction-page') . '</a>';
770
  echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '">' . __('I\'ve already rated the plugin', 'under-construction-page') . '</a>';
771
+ echo '<br><br><b>' . __('Thank you very much! The UCP team', 'under-construction-page') . '</b>';
772
  echo '</p></div>';
773
  }
774
 
775
  if (self::is_plugin_page() && self::is_construction_mode_enabled(true) && !empty($options['end_date']) && $options['end_date'] != '0000-00-00 00:00' && $options['end_date'] < current_time('mysql')) {
776
  echo '<div id="ucp_end_date_notice" class="notice-error notice"><p>Under construction mode is enabled but the <a href="#end_date" class="change_tab" data-tab="0">end date</a> is set to a past date so the <b>under construction page will not be shown</b>. Either move the <a href="#end_date" class="change_tab" data-tab="0">end date</a> to a future date or disable it.</p></div>';
777
  }
 
778
  } // notices
779
 
780
 
806
  exit;
807
  } // dismiss_notice
808
 
809
+
810
+ // reset all settings to default values
811
+ static function reset_settings() {
812
+ $options = self::default_options();
813
+ update_option(UCP_OPTIONS_KEY, $options);
814
+
815
+ if (!empty($_GET['redirect'])) {
816
+ wp_redirect($_GET['redirect']);
817
+ } else {
818
+ wp_redirect(admin_url());
819
+ }
820
+
821
+ exit;
822
+ } // reset_settings
823
+
824
 
825
  // change status via admin bar
826
  static function change_status() {
874
  if (self::is_construction_mode_enabled(true)) {
875
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon.png" alt="' . __('Under construction mode is enabled', 'under-construction-page') . '" title="' . __('Under construction mode is enabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-enabled">&#9679;</i></span>';
876
  $class = 'ucp-enabled';
 
877
  $action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
878
  $action = __('Under Construction Mode', 'under-construction-page');
879
  $action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="on"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
880
  } else {
881
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon.png" alt="' . __('Under construction mode is disabled', 'under-construction-page') . '" title="' . __('Under construction mode is disabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-disabled">&#9679;</i></span>';
882
  $class = 'ucp-disabled';
 
883
  $action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
884
  $action = __('Under Construction Mode', 'under-construction-page');
885
  $action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="off"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
946
  return $text;
947
  }
948
 
949
+ $text = '<i><a href="https://underconstructionpage.com/" title="' . __('Visit UCP\'s site for more info', 'under-construction-page') . '" target="_blank">UnderConstructionPage</a> v' . self::$version . ' by <a href="https://www.webfactoryltd.com/" title="' . __('Visit our site to get more great plugins', 'under-construction-page') . '" target="_blank">WebFactory Ltd</a>.</i> '. $text;
950
 
951
  return $text;
952
  } // admin_footer_text
1178
  <label for="status" class="toggle"><span class="toggle_handler"></span></label>
1179
  </div>';
1180
 
1181
+ echo '<p class="description">' . __('By enabling construction mode users will not be able to access the site\'s content. They will only see the under construction page. To configure exceptions set <a class="change_tab" data-tab="3" href="#whitelisted-roles">whitelisted user roles</a>.', 'under-construction-page') . '</p>';
1182
  echo '</td></tr>';
1183
 
1184
  echo '<tr valign="top">
1189
  <label for="end_date_toggle" class="toggle"><span class="toggle_handler"></span></label>
1190
  </div>';
1191
  echo '<div id="end_date_wrapper"><input id="end_date" type="text" class="datepicker" name="' . UCP_OPTIONS_KEY . '[end_date]" value="' . esc_attr($options['end_date']) . '" placeholder="yyyy-mm-dd hh:mm"><span title="' . __('Open date & time picker', 'under-construction-page') . '" alt="' . __('Open date & time picker', 'under-construction-page') . '" class="show-datepicker dashicons dashicons-calendar-alt"></span>';
1192
+ echo '<p class="description">' . __('If enabled, construction mode will automatically stop showing on the selected date.
1193
+ This option will not "auto-enable" construction mode. Status has to be set to "On".', 'under-construction-page') . '</p></div>';
1194
  echo '</td></tr>';
1195
 
1196
  echo '<tr valign="top">
1201
  <label for="ga_tracking_id_toggle" class="toggle"><span class="toggle_handler"></span></label>
1202
  </div>';
1203
  echo '<div id="ga_tracking_id_wrapper"><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
1204
+ echo '<p class="description">' . __('Enter the unique tracking ID found in your GA tracking profile settings to track visits to pages.', 'under-construction-page') . '</p></div>';
1205
+ echo '</td></tr>';
1206
+
1207
+ $reset_url = add_query_arg(array('action' => 'ucp_reset_settings', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
1208
+ echo '<tr valign="top">
1209
+ <th scope="row"><label for="">' . __('Reset Settings', 'under-construction-page') . '</label></th>
1210
+ <td>';
1211
+ echo '<a href="' . $reset_url . '" class="button button-secondary reset-settings">Reset all settings to default values</a>';
1212
+ echo '<p class="description">' . __('By resetting all settings to their default values any customizations you have done will be lost. There is no undo.', 'under-construction-page') . '</p>';
1213
  echo '</td></tr>';
1214
 
1215
  echo '</table>';
1227
  echo '<table class="form-table">';
1228
 
1229
  echo '<tr valign="top">
1230
+ <th scope="row"><label for="title">' . __('Title', 'under-construction-page') . '</label></th>
1231
  <td><input type="text" id="title" class="regular-text" name="' . UCP_OPTIONS_KEY . '[title]" value="' . esc_attr($options['title']) . '" />';
1232
  echo '<p class="description">Page title. Default: ' . $default_options['title'] . '</p>';
1233
  echo '<p><b>Available shortcodes:</b> (only active in UC themes, not on the rest of the site)</p>
1241
  echo '</td></tr>';
1242
 
1243
  echo '<tr valign="top">
1244
+ <th scope="row"><label for="description">' . __('Description', 'under-construction-page') . '</label></th>
1245
  <td><input id="description" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[description]" value="' . esc_attr($options['description']) . '" />';
1246
  echo '<p class="description">Description meta tag (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['description'] . '</p>';
1247
  echo '</td></tr>';
1248
 
1249
  echo '<tr valign="top">
1250
+ <th scope="row"><label for="heading1">' . __('Headline', 'under-construction-page') . '</label></th>
1251
  <td><input id="heading1" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[heading1]" value="' . esc_attr($options['heading1']) . '" />';
1252
  echo '<p class="description">Main heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['heading1'] . '</p>';
1253
  echo '</td></tr>';
1254
 
1255
  echo '<tr valign="top" id="content_wrap">
1256
+ <th scope="row"><label for="content">' . __('Content', 'under-construction-page') . '</label></th>
1257
  <td>';
1258
  wp_editor($options['content'], 'content', array('tabfocus_elements' => 'insert-media-button,save-post', 'editor_height' => 250, 'resize' => 1, 'textarea_name' => UCP_OPTIONS_KEY . '[content]', 'drag_drop_upload' => 1));
1259
  echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC template ones</a>. Default: ' . $default_options['content'] . '</p>';
1260
  echo '</td></tr>';
1261
 
1262
  echo '<tr valign="top" id="login_button_wrap">
1263
+ <th scope="row"><label for="login_button">' . __('Login Button', 'under-construction-page') . '</label></th>
1264
  <td>';
1265
  echo '<div class="toggle-wrapper">
1266
  <input type="checkbox" id="login_button" ' . self::checked(1, $options['login_button']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[login_button]">
1270
  echo '</td></tr>';
1271
 
1272
  echo '<tr valign="top">
1273
+ <th scope="row"><label for="linkback">' . __('Show Some Love', 'under-construction-page') . '</label></th>
1274
  <td>';
1275
  echo '<div class="toggle-wrapper">
1276
  <input type="checkbox" id="linkback" ' . self::checked(1, $options['linkback']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[linkback]">
1284
 
1285
  self::footer_buttons();
1286
 
1287
+ echo '<h2 class="title">' . __('Social &amp; Contact Icons', 'under-construction-page') . '</h2>';
1288
 
1289
  echo '<table class="form-table" id="ucp-social-icons">';
1290
  echo '<tr valign="top">
1291
+ <th scope="row"><label for="social_facebook">' . __('Facebook Page', 'under-construction-page') . '</label></th>
1292
+ <td><input id="social_facebook" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_facebook]" value="' . esc_attr($options['social_facebook']) . '" placeholder="' . __('Facebook business or personal page URL', 'under-construction-page') . '">';
1293
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Facebook page.', 'under-construction-page') . '</p>';
1294
  echo '</td></tr>';
1295
 
1296
  echo '<tr valign="top">
1297
+ <th scope="row"><label for="social_twitter">' . __('Twitter Profile', 'under-construction-page') . '</label></th>
1298
+ <td><input id="social_twitter" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_twitter]" value="' . esc_attr($options['social_twitter']) . '" placeholder="' . __('Twitter profile URL', 'under-construction-page') . '">';
1299
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Twitter profile page.', 'under-construction-page') . '</p>';
1300
  echo '</td></tr>';
1301
 
1302
  echo '<tr valign="top">
1303
+ <th scope="row"><label for="social_google">' . __('Google Page', 'under-construction-page') . '</label></th>
1304
+ <td><input id="social_google" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_google]" value="' . esc_attr($options['social_google']) . '" placeholder="' . __('Google+ page URL', 'under-construction-page') . '">';
1305
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Google+ page.', 'under-construction-page') . '</p>';
1306
  echo '</td></tr>';
1307
 
1308
  echo '<tr valign="top">
1309
+ <th scope="row"><label for="social_linkedin">' . __('LinkedIn Profile', 'under-construction-page') . '</label></th>
1310
+ <td><input id="social_linkedin" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_linkedin]" value="' . esc_attr($options['social_linkedin']) . '" placeholder="' . __('LinkedIn profile page URL', 'under-construction-page') . '">';
1311
+ echo '<p class="description">' . __('Complete URL, with http prefix, to LinkedIn profile page.', 'under-construction-page') . '</p>';
1312
  echo '</td></tr>';
1313
 
1314
  echo '<tr valign="top">
1315
+ <th scope="row"><label for="social_youtube">' . __('YouTube Profile Page or Video', 'under-construction-page') . '</label></th>
1316
+ <td><input id="social_youtube" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_youtube]" value="' . esc_attr($options['social_youtube']) . '" placeholder="' . __('YouTube page or video URL', 'under-construction-page') . '">';
1317
+ echo '<p class="description">' . __('Complete URL, with http prefix, to YouTube page or video.', 'under-construction-page') . '</p>';
1318
  echo '</td></tr>';
1319
 
1320
  echo '<tr valign="top" class="hidden">
1321
+ <th scope="row"><label for="social_vimeo">' . __('Vimeo Profile Page or Video', 'under-construction-page') . '</label></th>
1322
+ <td><input id="social_vimeo" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_vimeo]" value="' . esc_attr($options['social_vimeo']) . '" placeholder="' . __('Vimeo page or video URL', 'under-construction-page') . '">';
1323
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Vimeo page or video.', 'under-construction-page') . '</p>';
1324
  echo '</td></tr>';
1325
 
1326
  echo '<tr valign="top" class="hidden">
1327
+ <th scope="row"><label for="social_pinterest">' . __('Pinterest Profile', 'under-construction-page') . '</label></th>
1328
+ <td><input id="social_pinterest" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_pinterest]" value="' . esc_attr($options['social_pinterest']) . '" placeholder="' . __('Pinterest profile URL', 'under-construction-page') . '">';
1329
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Pinterest profile.', 'under-construction-page') . '</p>';
1330
  echo '</td></tr>';
1331
 
1332
  echo '<tr valign="top" class="hidden">
1333
+ <th scope="row"><label for="social_dribbble">' . __('Dribbble Profile', 'under-construction-page') . '</label></th>
1334
+ <td><input id="social_dribbble" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_dribbble]" value="' . esc_attr($options['social_dribbble']) . '" placeholder="' . __('Dribbble profile URL', 'under-construction-page') . '">';
1335
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Dribbble profile.', 'under-construction-page') . '</p>';
1336
  echo '</td></tr>';
1337
 
1338
  echo '<tr valign="top" class="hidden">
1339
+ <th scope="row"><label for="social_behance">' . __('Behance Profile', 'under-construction-page') . '</label></th>
1340
+ <td><input id="social_behance" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_behance]" value="' . esc_attr($options['social_behance']) . '" placeholder="' . __('Behance profile URL', 'under-construction-page') . '">';
1341
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Behance profile.', 'under-construction-page') . '</p>';
1342
  echo '</td></tr>';
1343
 
1344
  echo '<tr valign="top" class="hidden">
1345
+ <th scope="row"><label for="social_instagram">' . __('Instagram Profile', 'under-construction-page') . '</label></th>
1346
+ <td><input id="social_instagram" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_instagram]" value="' . esc_attr($options['social_instagram']) . '" placeholder="' . __('Instagram profile URL', 'under-construction-page') . '">';
1347
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Instagram profile.', 'under-construction-page') . '</p>';
1348
  echo '</td></tr>';
1349
 
1350
  echo '<tr valign="top" class="hidden">
1351
+ <th scope="row"><label for="social_tumblr">' . __('Tumblr Blog', 'under-construction-page') . '</label></th>
1352
+ <td><input id="social_tumblr" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_tumblr]" value="' . esc_attr($options['social_tumblr']) . '" placeholder="' . __('Tumblr blog URL', 'under-construction-page') . '">';
1353
+ echo '<p class="description">' . __('Complete URL, with http prefix, to Tumblr blog.', 'under-construction-page') . '</p>';
1354
  echo '</td></tr>';
1355
 
1356
  echo '<tr valign="top" class="hidden">
1357
+ <th scope="row"><label for="social_telegram">' . __('Telegram Group, Channel or Account', 'under-construction-page') . '</label></th>
1358
+ <td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="' . __('Telegram group, channel or account URL', 'under-construction-page') . '">';
1359
+ echo '<p class="description">' . __('Complete URL, with https prefix to Telegram group, channel or account.', 'under-construction-page') . '</p>';
1360
  echo '</td></tr>';
1361
 
1362
  echo '<tr valign="top" class="hidden">
1363
+ <th scope="row"><label for="social_skype">' . __('Skype Username', 'under-construction-page') . '</label></th>
1364
+ <td><input id="social_skype" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="' . __('Skype username or account name', 'under-construction-page') . '">';
1365
+ echo '<p class="description">' . __('Skype username or account name.', 'under-construction-page') . '</p>';
1366
  echo '</td></tr>';
1367
 
1368
  echo '<tr valign="top" class="hidden">
1369
+ <th scope="row"><label for="social_whatsapp">' . __('WhatsApp Phone Number', 'under-construction-page') . '</label></th>
1370
+ <td><input id="social_whatsapp" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_whatsapp]" value="' . esc_attr($options['social_whatsapp']) . '" placeholder="' . __('+1-123-456-789', 'under-construction-page') . '">';
1371
+ echo '<p class="description">' . __('WhatsApp phone number in full international format.', 'under-construction-page') . '</p>';
1372
  echo '</td></tr>';
1373
 
1374
  echo '<tr valign="top" class="hidden">
1375
+ <th scope="row"><label for="social_email">' . __('Email Address', 'under-construction-page') . '</label></th>
1376
+ <td><input id="social_email" type="email" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_email]" value="' . esc_attr($options['social_email']) . '" placeholder="' . __('name@domain.com', 'under-construction-page') . '">';
1377
+ echo '<p class="description">' . __('Email will be encoded on the page to protect it from email address harvesters.', 'under-construction-page') . '</p>';
1378
  echo '</td></tr>';
1379
 
1380
  echo '<tr valign="top" class="hidden">
1381
+ <th scope="row"><label for="social_phone">' . __('Phone Number', 'under-construction-page') . '</label></th>
1382
+ <td><input id="social_phone" type="tel" class="regular-text" name="' . UCP_OPTIONS_KEY . '[social_phone]" value="' . esc_attr($options['social_phone']) . '" placeholder="' . __('+1-123-456-789', 'under-construction-page') . '">';
1383
+ echo '<p class="description">' . __('Phone number in full international format.', 'under-construction-page') . '</p>';
1384
  echo '</td></tr>';
1385
 
1386
+ echo '<tr><th colspan="2"><a id="show-social-icons" href="#" class="js-action">' . __('Show more Social &amp; Contact Icons', 'under-construction-page') . '</a></th></tr>';
1387
 
1388
  echo '</table>';
1389
  echo '</div>';
1504
  foreach ($roles as $tmp_role) {
1505
  echo '<input name="' . UCP_OPTIONS_KEY . '[whitelisted_roles][]" id="roles-' . $tmp_role['val'] . '" ' . self::checked($tmp_role['val'], $options['whitelisted_roles'], false) . ' value="' . $tmp_role['val'] . '" type="checkbox" /> <label for="roles-' . $tmp_role['val'] . '">' . $tmp_role['label'] . '</label><br />';
1506
  }
1507
+ echo '<p class="description">' . __('Selected user roles will <b>not</b> be affected by the under construction mode and will always see the "normal" site. Default: administrator.', 'under-construction-page') . '</p>';
1508
  echo '</td></tr>';
1509
 
1510
  echo '<tr valign="top">
1512
  <td><select id="whitelisted_users" class="select2" style="width: 50%; max-width: 300px;" name="' . UCP_OPTIONS_KEY . '[whitelisted_users][]" multiple>';
1513
  self::create_select_options($users, $options['whitelisted_users'], true);
1514
 
1515
+ echo '</select><p class="description">' . __('Selected users (when logged in) will <b>not</b> be affected by the under construction mode and will always see the "normal" site.', 'under-construction-page') . '</p>';
1516
  echo '</td></tr>';
1517
 
1518
  echo '</table>';
1530
 
1531
  echo '<div id="tabs_support" class="ui-tabs ucp-tabs-2nd-level">';
1532
  echo '<ul>';
1533
+ echo '<li><a href="#tab_support_faq">' . __('FAQ', 'under-construction-page') . '</a></li>';
1534
+ echo '<li><a href="#tab_support_contact">' . __('Contact Support', 'under-construction-page') . '</a></li>';
1535
  echo '</ul>';
1536
 
1537
  echo '<div style="display: none;" id="tab_support_faq" class="ucp-tab-content">';
1538
+
1539
+ echo '<p><b>Do you have a video to help me get started?</b><br>We sure do! <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">Getting started with the UnderConstructionPage plugin</a>. If that doesn\'t help don\'t hesitate to contact our friendly support.</p>';
1540
+
1541
  echo '<p><b>How can I check if construction mode is really enabled on my site?</b><br>If the under construction status is green in the admin bar (the very top of the page, above this text), then it\'s enabled. But we made a tool specifically for these kinds of situations so you can double-check everything. <a href="https://underconstructionpage.com/under-construction-tester/?url=' . urlencode(get_home_url()) . '" target="_blank">Run under construction mode tester</a>.</p>';
1542
 
1543
  echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
1558
  echo '</div>'; // faq
1559
 
1560
  echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">';
1561
+ 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 ;)', 'under-construction-page') . '</p>';
1562
 
1563
  echo '<table class="form-table">';
1564
  if (!empty($_GET['urgent-support'])) {
1572
  }
1573
 
1574
  echo '<tr valign="top">
1575
+ <th scope="row"><label for="support_email">' . __('Your Email Address', 'under-construction-page') . '</label></th>
1576
  <td><input id="support_email" type="text" class="regular-text skip-save" name="support_email" value="' . $user->user_email . '" placeholder="name@domain.com">';
1577
+ echo '<p class="description">' . __('We will reply to this email, so please, double-check it.', 'under-construction-page') . '</p>';
1578
  echo '</td></tr>';
1579
 
1580
  echo '<tr valign="top">
1581
+ <th scope="row"><label for="support_message">' . __('Message', 'under-construction-page') . '</label></th>
1582
  <td><textarea rows="5" cols="75" id="support_message" class="skip-save" name="support_message" placeholder="Hi, I just wanted to ..."></textarea>';
1583
  echo '<p class="description">Please be as descriptive as possible. It will help us to provide faster &amp; better support.</p>';
1584
  echo '</td></tr>';
1585
 
1586
  echo '<tr valign="top">
1587
+ <th scope="row"><label for="support_info">' . __('Send Extra Site Info to Support Agents', 'under-construction-page') . '</label></th>
1588
  <td>';
1589
  echo '<div class="toggle-wrapper">
1590
  <input type="checkbox" id="support_info" checked type="checkbox" value="1" name="support_info">
1599
  echo 'UCP Options: <i>all option values will be sent to support to ease debugging</i>';
1600
  echo '</p></td></tr>';
1601
  echo '</table>';
1602
+ echo '<a id="ucp-send-support-message" href="#" class="js-action button button-primary"><span class="dashicons dashicons-update"></span>' . __('Send Message to Support', 'under-construction-page') . '</a>';
1603
  echo '</table>';
1604
  echo '</div>'; // contact
1605
 
1614
  echo '<div class="ucp-tab-content">';
1615
  echo '<h3 class="ucp-pro-logo"><img src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage">UnderConstructionPage<span>pro</span></h3>';
1616
 
1617
+ echo '<div id="ucp-earlybird"><span>Build <b>landing pages, coming soon pages, maintenance &amp; under construction pages</b> faster &amp; easier!<br>UCP PRO comes out on Black Friday. Get on the earlybird list - <b>get it cheaper &amp; a week before others</b>.</span>';
1618
  echo '<p><input value="" type="email" placeholder="Your best email address" class="skip-save regular-text" id="ucp-earlybird-email"> <select id="ucp-earlybird-type"><option value="0">- How do you use UCP? Please select -</option><option value="solo-use">I use it only on one site</option><option value="multi-site">I use it on multiple sites I own</option><option value="webmaster">I use it on multiple sites I build/maintain for others</option></select> <a href="#" class="button button-primary button-large" id="ucp-earlybird-submit">I want the discount! Put me on the Earlybird List!</a></p>';
1619
  echo '</div>';
1620
 
1707
 
1708
  $options = self::get_options();
1709
  $default_options = self::default_options();
 
 
 
 
 
 
 
1710
 
1711
  echo '<div class="wrap">
1712
  <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>';
1840
  // reset all pointers to default state - visible
1841
  static function reset_pointers() {
1842
  $pointers = array();
1843
+
1844
  $pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b style="font-weight: 800; font-variant: small-caps;">UnderConstructionPage</b> plugin! Please open <a href="' . admin_url('options-general.php?page=ucp'). '">Settings - UnderConstruction</a> to create a beautiful under construction page.');
1845
+ $pointers['getting_started'] = array('target' => '#ucp_tabs #ui-id-1', 'edge' => 'left', 'align' => 'right', 'content' => 'Watch the short <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">Getting Started Video</a> to get you up to speed with UCP in no time. If you need the video later, link is in the <a href="#" class="change_tab" data-tab="4">FAQ</a>.');
1846
 
1847
  update_option(UCP_POINTERS_KEY, $pointers);
1848
  } // reset_pointers