Under Construction - Version 3.40

Version Description

  • 2019/04/17
  • bug fixes
  • partnership with NordVPN
Download this release

Release Info

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

Code changes from version 3.35 to 3.40

css/ucp-admin.css CHANGED
@@ -440,7 +440,7 @@ span.select2-container .select2-search--inline .select2-search__field {
440
  font-weight: 600;
441
  line-height: 32px;
442
  color: #AAAAAA;
443
- padding: 15px 30px;
444
  display: block;
445
  letter-spacing: 1px;
446
  }
@@ -504,6 +504,28 @@ span.select2-container .select2-search--inline .select2-search__field {
504
  -webkit-box-shadow: none;
505
  }
506
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  #ucp_tabs li span.dashicons-star-filled {
508
  color: #FFC107;
509
  }
@@ -550,16 +572,6 @@ s.settings_page_ucp .ucp-tabs-2nd-level li.ui-state-active a:before {
550
  .ucp-tabs-2nd-level .form-table {
551
  margin: 0;
552
  }
553
-
554
- @media screen and (max-width: 782px) {
555
- .settings_page_ucp .ui-tabs .ui-tabs-nav li a {
556
- padding: 5px 10px;
557
- }
558
- .settings_page_ucp .ui-tabs ul.ui-tabs-nav li {
559
- margin: 5px 2px -5px 2px;
560
- }
561
- }
562
-
563
  /* tabs */
564
 
565
 
@@ -959,3 +971,83 @@ option.weglot-promo {
959
  color: #2980b9;
960
  }
961
  /* upsell dialog */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
440
  font-weight: 600;
441
  line-height: 32px;
442
  color: #AAAAAA;
443
+ padding: 10px 20px;
444
  display: block;
445
  letter-spacing: 1px;
446
  }
504
  -webkit-box-shadow: none;
505
  }
506
 
507
+ @media screen and (max-width: 782px) {
508
+ .settings_page_ucp .ui-tabs ul.ui-tabs-nav li .label {
509
+ display: none;
510
+ }
511
+ .settings_page_ucp .ui-tabs .ui-tabs-nav li a {
512
+ padding: 8px 15px 0px 14px;
513
+ }
514
+ .settings_page_ucp .ui-tabs ul.ui-tabs-nav li {
515
+ margin: 5px 2px -5px 2px;
516
+ min-width: inherit;
517
+ }
518
+ }
519
+
520
+ @media screen and (max-width: 1150px) {
521
+ .settings_page_ucp .ui-tabs .ui-tabs-nav li a {
522
+ padding: 10px 15px 10px 15px;
523
+ }
524
+ .settings_page_ucp .ui-tabs ul.ui-tabs-nav li {
525
+ min-width: inherit;
526
+ }
527
+ }
528
+
529
  #ucp_tabs li span.dashicons-star-filled {
530
  color: #FFC107;
531
  }
572
  .ucp-tabs-2nd-level .form-table {
573
  margin: 0;
574
  }
 
 
 
 
 
 
 
 
 
 
575
  /* tabs */
576
 
577
 
971
  color: #2980b9;
972
  }
973
  /* upsell dialog */
974
+
975
+ .nordvpn {
976
+ font-variant: normal;
977
+ font-size: 14px;
978
+ font-weight: 400;
979
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
980
+ font-style: italic;
981
+ }
982
+
983
+ #ucp_security_ninja .button-primary {
984
+ text-decoration: none;
985
+ border-radius: 0px !important;
986
+ border-width: 0px !important;
987
+ border-color: transparent !important;
988
+ background: #499ed7;
989
+ color: #fff;
990
+ font-weight: bold !important;
991
+ box-shadow: none !important;
992
+ padding: 11px 40px;
993
+ height: auto !important;
994
+ text-transform: uppercase;
995
+ display: inline-block;
996
+ box-shadow: none !important;
997
+ outline: none !important;
998
+ white-space: inherit;
999
+ }
1000
+
1001
+ .sn-box p {
1002
+ font-size: 15px;
1003
+ text-align: left;
1004
+ max-width: 800px;
1005
+ display: inline-block;
1006
+ line-height: 1.8;
1007
+ }
1008
+
1009
+ .sn-box {
1010
+ margin: 10px 5px 20px 5px;
1011
+ text-align: center;
1012
+ background: #f9f9f9;
1013
+ padding: 30px 50px;
1014
+ border: 1px solid #e5e5e5;
1015
+ }
1016
+
1017
+ .sn-box h2 {
1018
+ border-bottom: none;
1019
+ font-size: 2em;
1020
+ line-height: 1.1;
1021
+ }
1022
+
1023
+ .sn-box h2 span {
1024
+ position: relative;
1025
+ }
1026
+
1027
+ .sn-box h2 span:after {
1028
+ border-bottom: 3px solid #499ed7;
1029
+ background-color: #499ed7;
1030
+ content: "";
1031
+ width: 100%;
1032
+ position: absolute;
1033
+ bottom: 2px;
1034
+ left: 0;
1035
+ }
1036
+
1037
+ #ucp_security_ninja .ucp-tab-content {
1038
+ max-width: 800px;
1039
+ }
1040
+
1041
+ #ucp_security_ninja .textcenter {
1042
+ text-align: center;
1043
+ }
1044
+
1045
+ .security-ninja-logo {
1046
+ margin: 10px 0 20px 0;
1047
+ display: block;
1048
+ text-align: center;
1049
+ }
1050
+
1051
+ .security-ninja-logo img {
1052
+ height: 80px;
1053
+ }
images/nordvpn-logo.png ADDED
Binary file
images/security-ninja-logo.png ADDED
Binary file
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: WebFactory, UnderConstructionPage, googlemapswidget, securityninja
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction, under construction page, coming soon, launch page, coming soon mode, maintenance mode page, offline page, maintenance, multilingual, multilanguage
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
- Tested up to: 5.1
7
- Stable tag: 3.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -25,6 +25,7 @@ UCP has full support for collecting leads and subscribers via optin boxes in con
25
 
26
  Thanks to our partnership with <a href="https://wordpress.org/plugins/weglot/">Weglot</a>, UCP is fully multilanguage ready and you can instantly translate your under construction page to 100+ languages with one click.
27
 
 
28
 
29
  **Options**
30
 
@@ -137,6 +138,11 @@ Or if needed, upload manually;
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
140
  = 3.35 =
141
  * 2019/03/18
142
  * 300,000 installs hit on 2019/01/18 with 2,151,500 downloads
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction, under construction page, coming soon, launch page, coming soon mode, maintenance mode page, offline page, maintenance, multilingual, multilanguage
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
+ Tested up to: 5.2
7
+ Stable tag: 3.40
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
25
 
26
  Thanks to our partnership with <a href="https://wordpress.org/plugins/weglot/">Weglot</a>, UCP is fully multilanguage ready and you can instantly translate your under construction page to 100+ languages with one click.
27
 
28
+ Under Construction Page is proudly sponsored by <a href="https://nordvpn.com/">NordVPN</a>. The days of "hoping for the best" while surfing are long gone. NordVPN gives you peace of mind every time you use the public Wi-Fi, access personal and work accounts on the road, or want to keep your browsing history to yourself.
29
 
30
  **Options**
31
 
138
 
139
  == Changelog ==
140
 
141
+ = 3.40 =
142
+ * 2019/04/17
143
+ * bug fixes
144
+ * partnership with NordVPN
145
+
146
  = 3.35 =
147
  * 2019/03/18
148
  * 300,000 installs hit on 2019/01/18 with 2,151,500 downloads
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, coming soon, maintenance mode or landing page.
6
  Author: WebFactory Ltd
7
- Version: 3.35
8
  Author URI: https://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -88,6 +88,7 @@ class UCP {
88
  add_action('admin_action_ucp_reset_settings', array(__CLASS__, 'reset_settings'));
89
  add_action('admin_action_install_mailoptin', array(__CLASS__, 'install_mailoptin'));
90
  add_action('admin_action_install_weglot', array(__CLASS__, 'install_weglot'));
 
91
 
92
  // enqueue admin scripts
93
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'), 100, 1);
@@ -1987,6 +1988,18 @@ class UCP {
1987
  } // tab_access
1988
 
1989
 
 
 
 
 
 
 
 
 
 
 
 
 
1990
  // support tab - FAQ and links
1991
  static function tab_support() {
1992
  $user = wp_get_current_user();
@@ -2102,6 +2115,7 @@ class UCP {
2102
  }
2103
  echo '</div>';
2104
  }
 
2105
 
2106
 
2107
  echo '<div class="ucp-tab-content">';
@@ -2161,11 +2175,8 @@ class UCP {
2161
  wp_die('You do not have sufficient permissions to access this page.');
2162
  }
2163
 
2164
- $options = self::get_options();
2165
- $default_options = self::default_options();
2166
-
2167
  echo '<div class="wrap">
2168
- <h1 class="ucp-logo"><a href="' . admin_url('options-general.php?page=ucp') . '"><img src="' . UCP_PLUGIN_URL . 'images/ucp_logo.png" class="rotate" alt="UnderConstructionPage" title="UnderConstructionPage"><img src="' . UCP_PLUGIN_URL . 'images/ucp_logo_2.png" class="ucp-logo-text" alt="UnderConstructionPage" title="UnderConstructionPage"></a></h1>';
2169
 
2170
  echo '<form action="options.php" method="post" id="ucp_form">';
2171
  settings_fields(UCP_OPTIONS_KEY);
@@ -2177,25 +2188,28 @@ class UCP {
2177
  $tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => __('Access', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_access'));
2178
  $tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => __('Support', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_support'));
2179
  $tabs[] = array('id' => 'ucp_pro', 'icon' => 'dashicons-star-filled', 'class' => '', 'label' => __('PRO', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_pro'));
 
 
 
 
2180
  $tabs = apply_filters('ucp_tabs', $tabs);
2181
 
2182
  echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
2183
  echo '<ul class="ucp-main-tab">';
2184
  foreach ($tabs as $tab) {
2185
- if(!empty($tab['label'])){
2186
  echo '<li><a href="#' . $tab['id'] . '" class="' . $tab['class'] . '"><span class="icon"><span class="dashicons ' . $tab['icon'] . '"></span></span><span class="label">' . $tab['label'] . '</span></a></li>';
2187
  }
2188
  }
2189
  echo '</ul>';
2190
 
2191
  foreach ($tabs as $tab) {
2192
- if(is_callable($tab['callback'])) {
2193
  echo '<div style="display: none;" id="' . $tab['id'] . '">';
2194
  call_user_func($tab['callback']);
2195
  echo '</div>';
2196
  }
2197
  } // foreach
2198
-
2199
  echo '</div>'; // ucp_tabs
2200
 
2201
  echo '</form>'; // ucp_tabs
@@ -2407,6 +2421,10 @@ class UCP {
2407
 
2408
  // auto download / install / activate MailOptin plugin
2409
  static function install_mailoptin() {
 
 
 
 
2410
  $plugin_slug = 'mailoptin/mailoptin.php';
2411
  $plugin_zip = 'https://downloads.wordpress.org/plugin/mailoptin.latest-stable.zip';
2412
 
@@ -2461,6 +2479,10 @@ class UCP {
2461
 
2462
  // auto download / install / activate Weglot plugin
2463
  static function install_weglot() {
 
 
 
 
2464
  $plugin_slug = 'weglot/weglot.php';
2465
  $plugin_zip = 'https://downloads.wordpress.org/plugin/weglot.latest-stable.zip';
2466
 
@@ -2513,6 +2535,64 @@ class UCP {
2513
  } // install_weglot
2514
 
2515
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2516
  static function is_plugin_installed($slug) {
2517
  if (!function_exists('get_plugins')) {
2518
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
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.40
8
  Author URI: https://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
88
  add_action('admin_action_ucp_reset_settings', array(__CLASS__, 'reset_settings'));
89
  add_action('admin_action_install_mailoptin', array(__CLASS__, 'install_mailoptin'));
90
  add_action('admin_action_install_weglot', array(__CLASS__, 'install_weglot'));
91
+ add_action('admin_action_install_security_ninja', array(__CLASS__, 'install_security_ninja'));
92
 
93
  // enqueue admin scripts
94
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'), 100, 1);
1988
  } // tab_access
1989
 
1990
 
1991
+ // security ninja tab
1992
+ static function tab_security_ninja() {
1993
+ echo '<div class="ucp-tab-content">';
1994
+ echo '<h3 class="security-ninja-logo"><a href="https://wpsecurityninja.com/?utm_source=ucp-free&utm_medium=plugin&utm_content=sn-tab-logo&utm_campaign=ucp-free-v3.40" target="_blank"><img src="' . UCP_PLUGIN_URL . 'images/security-ninja-logo.png" alt="Security Ninja" title="Security Ninja"></a></h3>';
1995
+
1996
+ echo '<div class="sn-box"><h2>Protect your site from hackers <span>from day one</span>! Perform 50+ tests to see how secure it is</h2>';
1997
+ echo '<p>Getting hacked sucks! We created <b>Security Ninja</b> more than seven years ago to <b>save you money, time &amp; nerves</b>. Security Ninja will give you a clear understanding of what\'s going on if an attack occurs, and cleaning up a site in a worse-case scenario will be a breeze. Save yourself hours of frustration and <b>hundreds of dollars in repair fees</b> by installing Security Ninja for free.</p>';
1998
+ echo '<p class="textcenter"><a href="' . add_query_arg(array('action' => 'install_security_ninja'), admin_url('admin.php')), '" target="_blank" class="button button-primary button-large">Install &amp; activate Security Ninja for FREE and perform 50+ tests on your site</a><br>or visit <a href="https://wpsecurityninja.com/?utm_source=ucp-free&utm_medium=plugin&utm_content=sn-tab-more&utm_campaign=ucp-free-v3.40" target="_blank">wpsecurityninja.com</a> to find out more</p>';
1999
+ echo '</div>';
2000
+ echo '</div>';
2001
+ } // tab_security_ninja
2002
+
2003
  // support tab - FAQ and links
2004
  static function tab_support() {
2005
  $user = wp_get_current_user();
2115
  }
2116
  echo '</div>';
2117
  }
2118
+ echo '</div>';
2119
 
2120
 
2121
  echo '<div class="ucp-tab-content">';
2175
  wp_die('You do not have sufficient permissions to access this page.');
2176
  }
2177
 
 
 
 
2178
  echo '<div class="wrap">
2179
+ <h1 class="ucp-logo"><a href="' . admin_url('options-general.php?page=ucp') . '"><img src="' . UCP_PLUGIN_URL . 'images/ucp_logo.png" class="rotate" alt="UnderConstructionPage" title="UnderConstructionPage"><img src="' . UCP_PLUGIN_URL . 'images/ucp_logo_2.png" class="ucp-logo-text" alt="UnderConstructionPage" title="UnderConstructionPage"></a> <span class="nordvpn">proudly sponsored by <a href="http://nordvpn.org/webfactory" title="NordVPN" target="_blank"><img src="' . UCP_PLUGIN_URL . '/images/nordvpn-logo.png" alt="NordVPN" title="NordVPN"></a></span></h1>';
2180
 
2181
  echo '<form action="options.php" method="post" id="ucp_form">';
2182
  settings_fields(UCP_OPTIONS_KEY);
2188
  $tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => __('Access', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_access'));
2189
  $tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => __('Support', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_support'));
2190
  $tabs[] = array('id' => 'ucp_pro', 'icon' => 'dashicons-star-filled', 'class' => '', 'label' => __('PRO', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_pro'));
2191
+ if (!defined('WF_SN_BASE_FILE')) {
2192
+ $tabs[] = array('id' => 'ucp_security_ninja', 'icon' => 'dashicons-shield-alt', 'class' => '', 'label' => __('Security Ninja', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_security_ninja'));
2193
+ }
2194
+
2195
  $tabs = apply_filters('ucp_tabs', $tabs);
2196
 
2197
  echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
2198
  echo '<ul class="ucp-main-tab">';
2199
  foreach ($tabs as $tab) {
2200
+ if (!empty($tab['label'])){
2201
  echo '<li><a href="#' . $tab['id'] . '" class="' . $tab['class'] . '"><span class="icon"><span class="dashicons ' . $tab['icon'] . '"></span></span><span class="label">' . $tab['label'] . '</span></a></li>';
2202
  }
2203
  }
2204
  echo '</ul>';
2205
 
2206
  foreach ($tabs as $tab) {
2207
+ if (is_callable($tab['callback'])) {
2208
  echo '<div style="display: none;" id="' . $tab['id'] . '">';
2209
  call_user_func($tab['callback']);
2210
  echo '</div>';
2211
  }
2212
  } // foreach
 
2213
  echo '</div>'; // ucp_tabs
2214
 
2215
  echo '</form>'; // ucp_tabs
2421
 
2422
  // auto download / install / activate MailOptin plugin
2423
  static function install_mailoptin() {
2424
+ if (false === current_user_can('administrator')) {
2425
+ wp_die('Sorry, you have to be an admin to run this action.');
2426
+ }
2427
+
2428
  $plugin_slug = 'mailoptin/mailoptin.php';
2429
  $plugin_zip = 'https://downloads.wordpress.org/plugin/mailoptin.latest-stable.zip';
2430
 
2479
 
2480
  // auto download / install / activate Weglot plugin
2481
  static function install_weglot() {
2482
+ if (false === current_user_can('administrator')) {
2483
+ wp_die('Sorry, you have to be an admin to run this action.');
2484
+ }
2485
+
2486
  $plugin_slug = 'weglot/weglot.php';
2487
  $plugin_zip = 'https://downloads.wordpress.org/plugin/weglot.latest-stable.zip';
2488
 
2535
  } // install_weglot
2536
 
2537
 
2538
+ // auto download / install / activate Security Ninja
2539
+ static function install_security_ninja() {
2540
+ if (false === current_user_can('administrator')) {
2541
+ wp_die('Sorry, you have to be an admin to run this action.');
2542
+ }
2543
+
2544
+ $plugin_slug = 'security-ninja/security-ninja.php';
2545
+ $plugin_zip = 'https://downloads.wordpress.org/plugin/security-ninja.latest-stable.zip';
2546
+
2547
+ @include_once ABSPATH . 'wp-admin/includes/plugin.php';
2548
+ @include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
2549
+ @include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
2550
+ @include_once ABSPATH . 'wp-admin/includes/file.php';
2551
+ @include_once ABSPATH . 'wp-admin/includes/misc.php';
2552
+ echo '<style>
2553
+ body{
2554
+ font-family: sans-serif;
2555
+ font-size: 14px;
2556
+ line-height: 1.5;
2557
+ color: #444;
2558
+ }
2559
+ </style>';
2560
+
2561
+ echo '<div style="margin: 20px; color:#444;">';
2562
+ echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=security+ninja&tab=search&type=term') .'">install the plugin manually via Plugins page</a><br><br>';
2563
+ echo 'Starting ...<br><br>';
2564
+
2565
+ wp_cache_flush();
2566
+ $upgrader = new Plugin_Upgrader();
2567
+ echo 'Check if Security Ninja is already installed ... <br />';
2568
+ if (self::is_plugin_installed($plugin_slug)) {
2569
+ echo 'Security Ninja is already installed! <br /><br />Making sure it\'s the latest version.<br />';
2570
+ $upgrader->upgrade($plugin_slug);
2571
+ $installed = true;
2572
+ } else {
2573
+ echo 'Installing Security Ninja.<br />';
2574
+ $installed = $upgrader->install($plugin_zip);
2575
+ }
2576
+ wp_cache_flush();
2577
+
2578
+ if (!is_wp_error($installed) && $installed) {
2579
+ echo 'Activating Security Ninja.<br />';
2580
+ $activate = activate_plugin($plugin_slug);
2581
+
2582
+ if (is_null($activate)) {
2583
+ echo 'Security Ninja Activated.<br />';
2584
+
2585
+ echo '<script>setTimeout(function() { top.location = "tools.php?page=wf-sn"; }, 500);</script>';
2586
+ echo '<br>If you are not redirected in a few seconds - <a href="tools.php?page=wf-sn" target="_parent">click here</a>.';
2587
+ }
2588
+ } else {
2589
+ echo 'Could not install Security Ninja. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=security+ninja&tab=search&type=term') .'">download and install manually</a>.';
2590
+ }
2591
+
2592
+ echo '</div>';
2593
+ } // install_security_ninja
2594
+
2595
+
2596
  static function is_plugin_installed($slug) {
2597
  if (!function_exists('get_plugins')) {
2598
  require_once ABSPATH . 'wp-admin/includes/plugin.php';