Under Construction - Version 3.55

Version Description

  • 2019/09/18
  • minor bug fixes
  • new theme: Research
  • 2,980,000 downloads
Download this release

Release Info

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

Code changes from version 3.50 to 3.55

css/ucp-admin.css CHANGED
@@ -1067,6 +1067,10 @@ option.weglot-promo {
1067
  line-height: 120%;
1068
  }
1069
 
 
 
 
 
1070
  /* notificationx upsell dialog */
1071
  .notificationx-upsell-dialog .ui-dialog-titlebar {
1072
  background: #5614d5;
@@ -1116,7 +1120,7 @@ option.notificationx-promo {
1116
  border-top: 1px solid #2980b9;
1117
  }
1118
  /* upsell dialog */
1119
-
1120
  #notificationx-popup {
1121
  position: fixed;
1122
  width: 240px;
1067
  line-height: 120%;
1068
  }
1069
 
1070
+ .settings_page_ucp div.fs-notice {
1071
+ display: none !important;
1072
+ }
1073
+
1074
  /* notificationx upsell dialog */
1075
  .notificationx-upsell-dialog .ui-dialog-titlebar {
1076
  background: #5614d5;
1120
  border-top: 1px solid #2980b9;
1121
  }
1122
  /* upsell dialog */
1123
+
1124
  #notificationx-popup {
1125
  position: fixed;
1126
  width: 240px;
images/thumbnails/research.png ADDED
Binary file
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: 5.2
7
- Stable tag: 3.50
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -130,20 +130,27 @@ Or if needed, upload manually;
130
  32. Dumper Truck theme
131
  33. 000webhost theme
132
  34. Work Desk theme
133
- 35. Main settings
134
- 36. Design settings
135
- 37. Content settings
136
- 38. Access settings
137
- 39. Support
 
138
 
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
142
  = 3.50 =
143
  * 2019/08/07
144
  * clean up
145
  * NotificationX plugin integration
146
- * 2,812,000
147
 
148
  = 3.45 =
149
  * 2019/05/21
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.2
7
+ Stable tag: 3.55
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
130
  32. Dumper Truck theme
131
  33. 000webhost theme
132
  34. Work Desk theme
133
+ 35. Research theme
134
+ 36. Main settings
135
+ 37. Design settings
136
+ 38. Content settings
137
+ 39. Access settings
138
+ 40. Support
139
 
140
 
141
  == Changelog ==
142
 
143
+ = 3.55 =
144
+ * 2019/09/18
145
+ * minor bug fixes
146
+ * new theme: Research
147
+ * 2,980,000 downloads
148
+
149
  = 3.50 =
150
  * 2019/08/07
151
  * clean up
152
  * NotificationX plugin integration
153
+ * 2,812,000 downloads
154
 
155
  = 3.45 =
156
  * 2019/05/21
themes/research/index.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * UnderConstructionPage
4
+ * Research theme
5
+ * (c) WebFactory Ltd, 2015 - 2019
6
+ */
7
+
8
+
9
+ // this is an include only WP file
10
+ if (!defined('ABSPATH')) {
11
+ die;
12
+ }
13
+ ?>
14
+ <!DOCTYPE html>
15
+ <html lang="en">
16
+ <head>
17
+ <meta charset="utf-8">
18
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
19
+ <meta name="viewport" content="width=device-width, initial-scale=1">
20
+ <title>[title]</title>
21
+ <meta name="description" content="[description]" />
22
+ <meta name="generator" content="[generator]">
23
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:400,900">
24
+ [head]
25
+ </head>
26
+
27
+ <body>
28
+ <div class="container top-container">
29
+ <div class="row display-table">
30
+ <div class="col-lg-offset-1 col-xs-12 col-md-12 col-lg-5 display-cell">
31
+ <h1>[heading1]</h1>
32
+ </div>
33
+ <div class="col-xs-12 col-md-12 col-lg-5 display-cell">
34
+ <div id="hero-image">
35
+ <img src="[theme-url]research.png" alt="We're doing research to make our new site the best site ever." title="We're doing research to make our new site the best site ever.">
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ <div class="container">
42
+ <div class="row">
43
+ <div class="col-xs-12 col-md-8 col-md-offset-2 col-lg-offset-2 col-lg-8">
44
+ <p class="content">[content]</p>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="row" id="social">
49
+ <div class="col-xs-12 col-md-12 col-lg-12">
50
+ [social-icons]
51
+ </div>
52
+ </div>
53
+
54
+ </div>
55
+ [footer]
56
+ </body>
57
+ </html>
themes/research/research.png ADDED
Binary file
themes/research/style.css ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * UnderConstructionPage
3
+ * Research theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2019
5
+ */
6
+
7
+ html {
8
+ height: 100%;
9
+ padding: 0;
10
+ margin: 0;
11
+ }
12
+
13
+ body {
14
+ font-weight: 400;
15
+ font-size: 14px;
16
+ line-height: 120%;
17
+ color: #2e2e2e;
18
+ background: #f6fafe;
19
+ padding: 0;
20
+ margin: 0;
21
+ height: 100%;
22
+ }
23
+
24
+ .top-container {
25
+ padding: 50px 0;
26
+ }
27
+
28
+ #hero-image {
29
+ text-align: center;
30
+ }
31
+
32
+ #hero-image img {
33
+ max-width: 80%;
34
+ }
35
+
36
+ .display-table {
37
+ display: table;
38
+ table-layout: fixed;
39
+ }
40
+
41
+ .display-cell {
42
+ display: table-cell;
43
+ vertical-align: middle;
44
+ float: none;
45
+ }
46
+
47
+ h1 {
48
+ font-size: 34px;
49
+ color: #2e2e2e;
50
+ font-family: 'Nunito', sans-serif;
51
+ font-weight: 900;
52
+ margin: 20px 0 30px 0;
53
+ text-align: right;
54
+ }
55
+
56
+ .content {
57
+ text-align: center;
58
+ font-family: 'Helvetica', 'Arial', sans-serif;
59
+ }
60
+
61
+ #social {
62
+ text-align: center;
63
+ margin-top: 30px;
64
+ }
65
+
66
+ #social a i {
67
+ color: #414042;
68
+ margin: 10px;
69
+ box-sizing: content-box;
70
+ }
71
+
72
+ #social a:hover i {
73
+ color: #ff7900;
74
+ }
75
+
76
+ @media (max-width: 767px) {
77
+ h1 {
78
+ font-size: 28px;
79
+ margin: 10px 0 30px 0;
80
+ }
81
+ #hero-image img {
82
+ max-width: 95%;
83
+ }
84
+ }
85
+
86
+ @media (max-width: 1200px) {
87
+ h1 {
88
+ text-align: center;
89
+ padding: 0 20px;
90
+ }
91
+ .display-table {
92
+ display: initial;
93
+ table-layout: auto;
94
+ }
95
+ .display-cell {
96
+ display: block;
97
+ vertical-align: middle;
98
+ float: none;
99
+ }
100
+ #hero-image img {
101
+ max-height: 250px;
102
+ }
103
+ .top-container {
104
+ padding: 25px 0;
105
+ }
106
+ }
under-construction.php CHANGED
@@ -4,10 +4,9 @@
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
6
  Author: WebFactory Ltd
7
- Version: 3.50
8
  Author URI: https://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
- Domain Path: lang
11
 
12
  Copyright 2015 - 2019 Web factory Ltd (email: ucp@webfactoryltd.com)
13
 
@@ -68,7 +67,7 @@ class UCP {
68
  if (is_admin()) {
69
  // if the plugin was updated from ver < 1.20 upgrade settings array
70
  self::maybe_upgrade();
71
-
72
  delete_transient('_nx_meta_activation_notice');
73
 
74
  // add UCP menu to admin tools menu group
@@ -105,11 +104,11 @@ class UCP {
105
  add_filter('install_plugins_table_api_args_featured', array(__CLASS__, 'featured_plugins_tab'));
106
  } else {
107
  // main plugin logic
108
- add_action('wp', array(__CLASS__, 'display_construction_page'), 0, 1);
109
 
110
  if(self::is_notificationx_really_setup_and_active()){
111
  add_action('shutdown', array(__CLASS__, 'display_construction_page_x'), 0, 1);
112
- }
113
  // show under construction notice on login form
114
  add_filter('login_message', array(__CLASS__, 'login_message'));
115
 
@@ -160,13 +159,13 @@ class UCP {
160
  public static function maybe_upgrade() {
161
  $meta = self::get_meta();
162
  $options = self::get_options();
163
-
164
  if (self::$version != $meta['first_version'] && $meta['first_version'] != '3.50' && $meta['options_ver'] != self::$version) {
165
  $pointers = array();
166
  $pointers['nx'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Easily add notifications to your <b style="font-weight: 800; font-variant: small-caps;">Under Construction Page</b> and continue using them once you launch the site. Open <a href="' . admin_url('options-general.php?page=ucp'). '">Settings - UnderConstruction</a> to set them up in a minute.');
167
  update_option(UCP_POINTERS_KEY, $pointers);
168
  }
169
-
170
  // added in v1.70 to rename roles to whitelisted_roles
171
  if (isset($options['roles'])) {
172
  $options['whitelisted_roles'] = $options['roles'];
@@ -247,7 +246,7 @@ class UCP {
247
  if (defined('WP_CLI') && WP_CLI) {
248
  return false;
249
  }
250
-
251
  // some URLs have to be accessible at all times
252
  if ($request_uri == '/wp-admin/' ||
253
  $request_uri == '/feed/' ||
@@ -330,12 +329,12 @@ class UCP {
330
  } else {
331
  $theme = $options['theme'];
332
  }
333
-
334
  libxml_use_internal_errors(true);
335
  $doc = new DOMDocument();
336
  $doc->loadHTML('<?xml encoding="UTF-8">' . ob_get_clean());
337
  $selector = new DOMXPath($doc);
338
-
339
  if($options['notificationx_notification'] == 'all'){
340
  $nx_query = 'nx-bar-';
341
  } else if($options['notificationx_notification']>0){
@@ -343,13 +342,13 @@ class UCP {
343
  } else {
344
  $nx_query = false;
345
  }
346
-
347
  if($nx_query !== false){
348
  $nodes = $selector->query('//*[starts-with(@id, "'.$nx_query.'")]');
349
  $nx_bar_html = array();
350
  foreach($nodes as $node){
351
  $nx_bar_html[] = $node->ownerDocument->saveHTML($node);
352
- }
353
  echo str_replace('<!-- NXBAR -->', implode('',$nx_bar_html),self::get_template($theme));
354
  } else {
355
  echo self::get_template($theme);
@@ -692,8 +691,8 @@ class UCP {
692
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
693
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'font-awesome.min.css?v=' . self::$version . '" type="text/css">' . "\n";
694
 
695
- $out .= '<link rel="shortcut icon" type="image/png" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/images') . 'favicon.png" />';
696
-
697
  $jquery_included = false;
698
  if(self::is_notificationx_really_setup_and_active()){
699
  if(!$jquery_included){
@@ -767,7 +766,7 @@ class UCP {
767
  } elseif ($tmp[0] < '8') {
768
  $out .= '<p id="linkback">Create a <a href="' . self::generate_web_link('show-love-2') . '" target="_blank">free under construction page for WordPress</a> like this one in under a minute.</p>';
769
  } elseif ($tmp[0] < 'c') {
770
- $out .= '<p id="linkback">Join more than 100,000 happy people using the <a href="https://wordpress.org/plugins/under-construction-page/" target="_blank">free Under Construction Page plugin for WordPress</a>.</p>';
771
  } else {
772
  $out .= '<p id="linkback">Create free <a href="' . self::generate_web_link('show-love-3') . '" target="_blank">maintenance mode pages for WordPress</a>.</p>';
773
  }
@@ -1731,7 +1730,7 @@ class UCP {
1731
  );
1732
  $nx_notifications = get_posts( $nx_args );
1733
  $nx_notifications_dd = array();
1734
-
1735
  if(count($nx_notifications)>0){
1736
  foreach($nx_notifications as $nx_notification){
1737
  $nx_notifications_dd[] = array('val' => $nx_notification->ID, 'label' => strlen($nx_notification->post_title)?$nx_notification->post_title:'NotificationX '.$nx_notification->ID.' (no title)');
@@ -1739,7 +1738,7 @@ class UCP {
1739
  } else {
1740
  $nx_notifications_dd = false;
1741
  }
1742
-
1743
  echo '<tr id="notificationx-settings">';
1744
  echo '<th><label for="notificationx_notification">Notifications</label></th>';
1745
  echo '<td>';
@@ -1768,7 +1767,7 @@ class UCP {
1768
  echo '</td>';
1769
  echo '</tr>';
1770
 
1771
-
1772
  } // notificationx not active
1773
 
1774
  echo '<tr>';
@@ -1972,7 +1971,8 @@ class UCP {
1972
  'dumper_truck' => __('Dumper Truck', 'under-construction-page'),
1973
  '000webhost' => __('000webhost', 'under-construction-page'),
1974
  '_pro_grayscale-city' => __('Grayscale City', 'under-construction-page'),
1975
- 'work_desk' => __('Work Desk', 'under-construction-page'));
 
1976
 
1977
  $themes = apply_filters('ucp_themes', $themes);
1978
 
@@ -1996,7 +1996,7 @@ class UCP {
1996
 
1997
  echo '<table class="form-table">';
1998
  echo '<tr valign="top">
1999
- <td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b> (<a target="_blank" href="' . self::generate_web_link('themes-browse-premium', 'templates') . '">browse 100+ premium themes</a>)<br>';
2000
  echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
2001
 
2002
  foreach ($themes as $theme_id => $theme_name) {
@@ -2016,7 +2016,11 @@ class UCP {
2016
  echo '<div class="ribbon"><i><span class="dashicons dashicons-star-filled"></span></i></div></div>';
2017
  } else {
2018
  echo '<div class="ucp-thumb' . $class . '" data-theme-id="' . $theme_id . '"><img src="' . $img_path . $theme_id . '.png" alt="' . $theme_name . '" title="' . $theme_name . '"><span>' . $theme_name . '</span>';
2019
- echo '<div class="buttons"><a href="#" class="button button-primary activate-theme">Activate</a> <a href="' . get_home_url() . '/?ucp_preview&theme=' . $theme_id . '" class="button-secondary" target="_blank">Preview</a></div>';
 
 
 
 
2020
  echo '</div>';
2021
  }
2022
  } // foreach
@@ -2064,7 +2068,7 @@ class UCP {
2064
  <input type="checkbox" id="whitelisted_ips" type="checkbox" value="1" class="skip-save open-ucp-upsell">
2065
  <label for="whitelisted_ips" class="toggle"><span class="toggle_handler"></span></label>
2066
  </div>';
2067
- echo '<p>Listed IP addresses will not be affected by the under construction mode and their users will always see the "normal" site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.';
2068
  echo '<td></tr>';
2069
 
2070
  echo '<tr valign="top">
@@ -2095,7 +2099,7 @@ class UCP {
2095
  echo '</td></tr>';
2096
 
2097
  echo '<tr>';
2098
- echo '<th><label for="url_rules">URL Based Rules</label></th>';
2099
  echo '<td><select class="skip-save open-ucp-upsell" id="url_rules">';
2100
  echo '<option value="0">Disabled</option>';
2101
  echo '<option class="ucp-promo" value="-1">Listed URLs will NEVER be affected by UCP</option>';
@@ -2105,6 +2109,22 @@ class UCP {
2105
  echo '</td>';
2106
  echo '</tr>';
2107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2108
 
2109
  echo '</table>';
2110
  echo '</div>';
@@ -2167,7 +2187,7 @@ class UCP {
2167
  echo '</div>'; // faq
2168
 
2169
  echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">';
2170
-
2171
  echo '<div id="support-hero"><p>Our average response time is 1.5h! <b>85% of tickets are resolved within 1 hour!</b> No ticket is left unanswered. If something is not working, don\'t think twice;</p><p><a class="button button-primary" href="https://wordpress.org/support/plugin/under-construction-page/#new-post" target="_blank">OPEN A SUPPORT TICKET NOW</a></p></div>';
2172
 
2173
  echo '<p class="description">Our support agents need this info to provide faster &amp; better support. Please include the following data in your message;</p>';
@@ -2178,7 +2198,7 @@ class UCP {
2178
  echo 'WordPress URL: <code>' . get_bloginfo('wpurl') . '</code><br>';
2179
  echo 'Theme: <code>' . $theme->get('Name') . ' v' . $theme->get('Version') . '</code>';
2180
  echo '</p>';
2181
-
2182
  echo '</div>'; // contact
2183
 
2184
  echo '</div>'; // tabs
@@ -2404,7 +2424,7 @@ class UCP {
2404
  echo '</div>';
2405
 
2406
  echo '<div class="gmw-pro-feature">';
2407
- echo '<span>160+ Templates</span>';
2408
  echo '<p>Building your own page from scratch is fun, but often you don\'t have time to do it! Use one of our purpose-built templates, change a few lines of text and you\'re ready to rock!</p>';
2409
  echo '</div>';
2410
 
@@ -2469,7 +2489,7 @@ class UCP {
2469
  <td>Drag&amp;Drop Builder</td>
2470
  </tr>
2471
  <tr>
2472
- <td>160+ Templates</td>
2473
  <td><span class="dashicons dashicons-yes"></span>100+ Templates</td>
2474
  <td>100+ Templates</td>
2475
  </tr>
@@ -2533,7 +2553,7 @@ class UCP {
2533
 
2534
  $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.');
2535
  $pointers['getting_started'] = array('target' => '.ucp-main-tab li:nth-child(2)', 'edge' => 'top', 'align' => 'left', '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 that doesn\'t answer your questions watch the longer <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>.<br>If you need the videos later, links are in the <a href="#" class="change_tab" data-tab="4">FAQ</a>.');
2536
-
2537
  update_option(UCP_POINTERS_KEY, $pointers);
2538
  } // reset_pointers
2539
 
@@ -2800,7 +2820,7 @@ class UCP {
2800
  }
2801
  } // is_mailoptin_active
2802
 
2803
-
2804
  // check if NotificationX plugin is active
2805
  static function is_notificationx_really_setup_and_active() {
2806
  if (!function_exists('is_plugin_active') || !function_exists('get_plugin_data')) {
@@ -2858,31 +2878,36 @@ class UCP {
2858
 
2859
  // add single plugin to list of favs
2860
  static function add_plugin_favs($plugin_slug, $res) {
 
 
 
 
2861
  if (!empty($res->plugins) && is_array($res->plugins)) {
2862
  foreach ($res->plugins as $plugin) {
2863
- if (is_object($plugin) && $plugin->slug == $plugin_slug) {
2864
  return $res;
2865
  }
2866
  } // foreach
2867
  }
2868
 
2869
- if ($plugin_info = get_transient('wf-plugin-info-' . $plugin_slug)) {
 
2870
  array_unshift($res->plugins, $plugin_info);
2871
  } else {
2872
  $plugin_info = plugins_api('plugin_information', array(
2873
  'slug' => $plugin_slug,
2874
  'is_ssl' => is_ssl(),
2875
  'fields' => array(
2876
- 'banners' => true,
2877
- 'reviews' => true,
2878
- 'downloaded' => true,
2879
- 'active_installs' => true,
2880
- 'icons' => true,
2881
- 'short_description' => true,
2882
  )
2883
  ));
2884
  if (!is_wp_error($plugin_info)) {
2885
- $res->plugins[] = $plugin_info;
2886
  set_transient('wf-plugin-info-' . $plugin_slug, $plugin_info, DAY_IN_SECONDS * 7);
2887
  }
2888
  }
@@ -2895,7 +2920,9 @@ class UCP {
2895
  static function plugins_api_result($res, $action, $args) {
2896
  remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
2897
 
2898
- $res = self::add_plugin_favs('security-ninja', $res);
 
 
2899
  $res = self::add_plugin_favs('mailoptin', $res);
2900
 
2901
  return $res;
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
6
  Author: WebFactory Ltd
7
+ Version: 3.55
8
  Author URI: https://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
 
10
 
11
  Copyright 2015 - 2019 Web factory Ltd (email: ucp@webfactoryltd.com)
12
 
67
  if (is_admin()) {
68
  // if the plugin was updated from ver < 1.20 upgrade settings array
69
  self::maybe_upgrade();
70
+
71
  delete_transient('_nx_meta_activation_notice');
72
 
73
  // add UCP menu to admin tools menu group
104
  add_filter('install_plugins_table_api_args_featured', array(__CLASS__, 'featured_plugins_tab'));
105
  } else {
106
  // main plugin logic
107
+ add_action('wp', array(__CLASS__, 'display_construction_page'), 0, 1);
108
 
109
  if(self::is_notificationx_really_setup_and_active()){
110
  add_action('shutdown', array(__CLASS__, 'display_construction_page_x'), 0, 1);
111
+ }
112
  // show under construction notice on login form
113
  add_filter('login_message', array(__CLASS__, 'login_message'));
114
 
159
  public static function maybe_upgrade() {
160
  $meta = self::get_meta();
161
  $options = self::get_options();
162
+
163
  if (self::$version != $meta['first_version'] && $meta['first_version'] != '3.50' && $meta['options_ver'] != self::$version) {
164
  $pointers = array();
165
  $pointers['nx'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Easily add notifications to your <b style="font-weight: 800; font-variant: small-caps;">Under Construction Page</b> and continue using them once you launch the site. Open <a href="' . admin_url('options-general.php?page=ucp'). '">Settings - UnderConstruction</a> to set them up in a minute.');
166
  update_option(UCP_POINTERS_KEY, $pointers);
167
  }
168
+
169
  // added in v1.70 to rename roles to whitelisted_roles
170
  if (isset($options['roles'])) {
171
  $options['whitelisted_roles'] = $options['roles'];
246
  if (defined('WP_CLI') && WP_CLI) {
247
  return false;
248
  }
249
+
250
  // some URLs have to be accessible at all times
251
  if ($request_uri == '/wp-admin/' ||
252
  $request_uri == '/feed/' ||
329
  } else {
330
  $theme = $options['theme'];
331
  }
332
+
333
  libxml_use_internal_errors(true);
334
  $doc = new DOMDocument();
335
  $doc->loadHTML('<?xml encoding="UTF-8">' . ob_get_clean());
336
  $selector = new DOMXPath($doc);
337
+
338
  if($options['notificationx_notification'] == 'all'){
339
  $nx_query = 'nx-bar-';
340
  } else if($options['notificationx_notification']>0){
342
  } else {
343
  $nx_query = false;
344
  }
345
+
346
  if($nx_query !== false){
347
  $nodes = $selector->query('//*[starts-with(@id, "'.$nx_query.'")]');
348
  $nx_bar_html = array();
349
  foreach($nodes as $node){
350
  $nx_bar_html[] = $node->ownerDocument->saveHTML($node);
351
+ }
352
  echo str_replace('<!-- NXBAR -->', implode('',$nx_bar_html),self::get_template($theme));
353
  } else {
354
  echo self::get_template($theme);
691
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
692
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'font-awesome.min.css?v=' . self::$version . '" type="text/css">' . "\n";
693
 
694
+ $out .= '<link rel="icon" sizes="128x128" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/images') . 'favicon.png" />';
695
+
696
  $jquery_included = false;
697
  if(self::is_notificationx_really_setup_and_active()){
698
  if(!$jquery_included){
766
  } elseif ($tmp[0] < '8') {
767
  $out .= '<p id="linkback">Create a <a href="' . self::generate_web_link('show-love-2') . '" target="_blank">free under construction page for WordPress</a> like this one in under a minute.</p>';
768
  } elseif ($tmp[0] < 'c') {
769
+ $out .= '<p id="linkback">Join more than 400,000 happy people using the <a href="https://wordpress.org/plugins/under-construction-page/" target="_blank">free Under Construction Page plugin for WordPress</a>.</p>';
770
  } else {
771
  $out .= '<p id="linkback">Create free <a href="' . self::generate_web_link('show-love-3') . '" target="_blank">maintenance mode pages for WordPress</a>.</p>';
772
  }
1730
  );
1731
  $nx_notifications = get_posts( $nx_args );
1732
  $nx_notifications_dd = array();
1733
+
1734
  if(count($nx_notifications)>0){
1735
  foreach($nx_notifications as $nx_notification){
1736
  $nx_notifications_dd[] = array('val' => $nx_notification->ID, 'label' => strlen($nx_notification->post_title)?$nx_notification->post_title:'NotificationX '.$nx_notification->ID.' (no title)');
1738
  } else {
1739
  $nx_notifications_dd = false;
1740
  }
1741
+
1742
  echo '<tr id="notificationx-settings">';
1743
  echo '<th><label for="notificationx_notification">Notifications</label></th>';
1744
  echo '<td>';
1767
  echo '</td>';
1768
  echo '</tr>';
1769
 
1770
+
1771
  } // notificationx not active
1772
 
1773
  echo '<tr>';
1971
  'dumper_truck' => __('Dumper Truck', 'under-construction-page'),
1972
  '000webhost' => __('000webhost', 'under-construction-page'),
1973
  '_pro_grayscale-city' => __('Grayscale City', 'under-construction-page'),
1974
+ 'work_desk' => __('Work Desk', 'under-construction-page'),
1975
+ 'research' => __('Research', 'under-construction-page'));
1976
 
1977
  $themes = apply_filters('ucp_themes', $themes);
1978
 
1996
 
1997
  echo '<table class="form-table">';
1998
  echo '<tr valign="top">
1999
+ <td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b> (<a target="_blank" href="' . self::generate_web_link('themes-browse-premium', 'templates') . '">browse 200+ premium themes</a>)<br>';
2000
  echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
2001
 
2002
  foreach ($themes as $theme_id => $theme_name) {
2016
  echo '<div class="ribbon"><i><span class="dashicons dashicons-star-filled"></span></i></div></div>';
2017
  } else {
2018
  echo '<div class="ucp-thumb' . $class . '" data-theme-id="' . $theme_id . '"><img src="' . $img_path . $theme_id . '.png" alt="' . $theme_name . '" title="' . $theme_name . '"><span>' . $theme_name . '</span>';
2019
+ echo '<div class="buttons">';
2020
+ if ($theme_id !== $options['theme']) {
2021
+ echo '<a href="#" class="button button-primary activate-theme">Activate</a> ';
2022
+ }
2023
+ echo '<a href="' . get_home_url() . '/?ucp_preview&theme=' . $theme_id . '" class="button-secondary" target="_blank">Preview</a></div>';
2024
  echo '</div>';
2025
  }
2026
  } // foreach
2068
  <input type="checkbox" id="whitelisted_ips" type="checkbox" value="1" class="skip-save open-ucp-upsell">
2069
  <label for="whitelisted_ips" class="toggle"><span class="toggle_handler"></span></label>
2070
  </div>';
2071
+ echo '<p>Listed IP addresses (both IPv4 and IPv6 are supported) will not be affected by the under construction mode and their users will always see the "normal" site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.';
2072
  echo '<td></tr>';
2073
 
2074
  echo '<tr valign="top">
2099
  echo '</td></tr>';
2100
 
2101
  echo '<tr>';
2102
+ echo '<th><label for="url_rules">' . __('URL Based Rules', 'under-construction-page') . '</label></th>';
2103
  echo '<td><select class="skip-save open-ucp-upsell" id="url_rules">';
2104
  echo '<option value="0">Disabled</option>';
2105
  echo '<option class="ucp-promo" value="-1">Listed URLs will NEVER be affected by UCP</option>';
2109
  echo '</td>';
2110
  echo '</tr>';
2111
 
2112
+ echo '<tr>
2113
+ <th scope="row"><label for="direct_access_password">' . __('Direct Access Password', 'under-construction-page') . '</label></th>
2114
+ <td>';
2115
+ echo '<input id="direct_access_password" type="text" class="skip-save open-ucp-upsell" value="" placeholder="">';
2116
+ echo '<p class="description">Direct Access Password is the most user-friendly way (especially when working with clients) to give selected users access to the "normal" site. Choose a password, save changes, and send users this link: <a href="' . get_home_url() . '/#access-site-form">' . get_home_url() . '/#access-site-form</a> or enable the "Password Form Button" option to show the password form button. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.</p>';
2117
+ echo '</td></tr>';
2118
+
2119
+ echo '<tr valign="top">
2120
+ <th scope="row"><label for="site_password">' . __('Password Protect Under Construction Page', 'under-construction-page') . '</label></th>
2121
+ <td>';
2122
+ echo '<div class="toggle-wrapper">
2123
+ <input type="checkbox" id="site_password" type="checkbox" value="1" class="skip-save open-ucp-upsell">
2124
+ <label for="site_password" class="toggle"><span class="toggle_handler"></span></label>
2125
+ </div>';
2126
+ echo '<p class="description">Protected the entire site with a password you choose. Only those with the password can view the under construction page. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.</p>';
2127
+ echo '</td></tr>';
2128
 
2129
  echo '</table>';
2130
  echo '</div>';
2187
  echo '</div>'; // faq
2188
 
2189
  echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">';
2190
+
2191
  echo '<div id="support-hero"><p>Our average response time is 1.5h! <b>85% of tickets are resolved within 1 hour!</b> No ticket is left unanswered. If something is not working, don\'t think twice;</p><p><a class="button button-primary" href="https://wordpress.org/support/plugin/under-construction-page/#new-post" target="_blank">OPEN A SUPPORT TICKET NOW</a></p></div>';
2192
 
2193
  echo '<p class="description">Our support agents need this info to provide faster &amp; better support. Please include the following data in your message;</p>';
2198
  echo 'WordPress URL: <code>' . get_bloginfo('wpurl') . '</code><br>';
2199
  echo 'Theme: <code>' . $theme->get('Name') . ' v' . $theme->get('Version') . '</code>';
2200
  echo '</p>';
2201
+
2202
  echo '</div>'; // contact
2203
 
2204
  echo '</div>'; // tabs
2424
  echo '</div>';
2425
 
2426
  echo '<div class="gmw-pro-feature">';
2427
+ echo '<span>200+ Templates</span>';
2428
  echo '<p>Building your own page from scratch is fun, but often you don\'t have time to do it! Use one of our purpose-built templates, change a few lines of text and you\'re ready to rock!</p>';
2429
  echo '</div>';
2430
 
2489
  <td>Drag&amp;Drop Builder</td>
2490
  </tr>
2491
  <tr>
2492
+ <td>200+ Templates</td>
2493
  <td><span class="dashicons dashicons-yes"></span>100+ Templates</td>
2494
  <td>100+ Templates</td>
2495
  </tr>
2553
 
2554
  $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.');
2555
  $pointers['getting_started'] = array('target' => '.ucp-main-tab li:nth-child(2)', 'edge' => 'top', 'align' => 'left', '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 that doesn\'t answer your questions watch the longer <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>.<br>If you need the videos later, links are in the <a href="#" class="change_tab" data-tab="4">FAQ</a>.');
2556
+
2557
  update_option(UCP_POINTERS_KEY, $pointers);
2558
  } // reset_pointers
2559
 
2820
  }
2821
  } // is_mailoptin_active
2822
 
2823
+
2824
  // check if NotificationX plugin is active
2825
  static function is_notificationx_really_setup_and_active() {
2826
  if (!function_exists('is_plugin_active') || !function_exists('get_plugin_data')) {
2878
 
2879
  // add single plugin to list of favs
2880
  static function add_plugin_favs($plugin_slug, $res) {
2881
+ if (!isset($res->plugins) || !is_array($res->plugins)) {
2882
+ return $res;
2883
+ }
2884
+
2885
  if (!empty($res->plugins) && is_array($res->plugins)) {
2886
  foreach ($res->plugins as $plugin) {
2887
+ if (is_object($plugin) && !empty($plugin->slug) && $plugin->slug == $plugin_slug) {
2888
  return $res;
2889
  }
2890
  } // foreach
2891
  }
2892
 
2893
+ $plugin_info = get_transient('wf-plugin-info-' . $plugin_slug);
2894
+ if ($plugin_info && is_object($plugin_info)) {
2895
  array_unshift($res->plugins, $plugin_info);
2896
  } else {
2897
  $plugin_info = plugins_api('plugin_information', array(
2898
  'slug' => $plugin_slug,
2899
  'is_ssl' => is_ssl(),
2900
  'fields' => array(
2901
+ 'banners' => true,
2902
+ 'reviews' => true,
2903
+ 'downloaded' => true,
2904
+ 'active_installs' => true,
2905
+ 'icons' => true,
2906
+ 'short_description' => true,
2907
  )
2908
  ));
2909
  if (!is_wp_error($plugin_info)) {
2910
+ array_unshift($res->plugins, $plugin_info);
2911
  set_transient('wf-plugin-info-' . $plugin_slug, $plugin_info, DAY_IN_SECONDS * 7);
2912
  }
2913
  }
2920
  static function plugins_api_result($res, $action, $args) {
2921
  remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
2922
 
2923
+ $res = self::add_plugin_favs('wp-reset', $res);
2924
+ $res = self::add_plugin_favs('eps-301-redirects', $res);
2925
+ $res = self::add_plugin_favs('wp-force-ssl', $res);
2926
  $res = self::add_plugin_favs('mailoptin', $res);
2927
 
2928
  return $res;