underConstruction - Version 1.19

Version Description

  • Address security vulnerability.
Download this release

Release Info

Developer grimmdude
Plugin Icon 128x128 underConstruction
Version 1.19
Comparing to
See all releases

Code changes from version 1.18 to 1.19

appsumo-capture-form.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="under-construction-appsumo-capture-container">
2
+ <div class="">
3
+ <div class="under-construction-appsumo-capture-header">You’re never paying full price for software again.</div>
4
+ <div class="under-construction-appsumo-capture-sub-header">
5
+ We’ll send you the hottest deals straight to your inbox so
6
+ you’re always in on the best-kept software secrets.
7
+ </div>
8
+ <form class="signup-email-form" id="signup_email_form" method="post" action="" onsubmit="submitAppsumoCaptureForm(this.email.value);return false;">
9
+ <input type="email" id="email" name="email" placeholder="Email Address" class="under-construction-appsumo-capture-container-input">
10
+ <button class="under-construction-appsumo-capture-container-button" type="submit">Send Me Deals</button>
11
+ </form>
12
+ </div>
13
+ </div>
images/products/appsumo-logo.png ADDED
Binary file
images/products/appsumo-logo.svg ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg id="as-appsumo-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130 20.11">
2
+ <defs>
3
+ <style>
4
+ .cls-1 {
5
+ fill: #fff;
6
+ }
7
+ </style>
8
+ </defs>
9
+ <path id="Path_1007" data-name="Path 1007" class="cls-1" d="M611.906,32.069c0,3.4-1.593,3.4-2.359,3.4s-2.359,0-2.359-3.4V22.5H603.2V32.677c0,3.927,2.614,6.675,6.347,6.675s6.347-2.748,6.347-6.675V22.5h-3.988Z" transform="translate(-529.859 -19.764)"/>
10
+ <path id="Path_1008" data-name="Path 1008" class="cls-1" d="M932.452,18.7a8.845,8.845,0,0,0-8.852,8.815,8.852,8.852,0,0,0,17.7,0A8.853,8.853,0,0,0,932.452,18.7Zm0,13.63A4.8,4.8,0,0,1,927.7,27.5a4.755,4.755,0,1,1,9.508,0A4.8,4.8,0,0,1,932.452,32.33Z" transform="translate(-811.303 -16.426)"/>
11
+ <path id="Path_1009" data-name="Path 1009" class="cls-1" d="M8.9,0,0,19.442H4.523l1.7-3.745H11.6l1.7,3.745h4.523ZM7.234,12.39,8.9,8.292l1.678,4.1Z"/>
12
+ <path id="Path_1010" data-name="Path 1010" class="cls-1" d="M184.7,23.2h-6.5V39.566h4.11V34.848h2.176c4.024,0,6.529-2.249,6.529-5.873v-.049C191.015,25.389,188.6,23.2,184.7,23.2Zm2.2,5.982a2.229,2.229,0,0,1-2.5,2.225H182.31V26.9h2.067c1.6,0,2.529.815,2.529,2.237Z" transform="translate(-156.533 -20.379)"/>
13
+ <path id="Path_1011" data-name="Path 1011" class="cls-1" d="M322.9,23.2h-6.5V39.566h4.11V34.848h2.176c4.025,0,6.529-2.249,6.529-5.873v-.049C329.215,25.389,326.8,23.2,322.9,23.2Zm2.2,5.982a2.229,2.229,0,0,1-2.5,2.225H320.51V26.9h2.067c1.6,0,2.529.815,2.529,2.237Z" transform="translate(-277.93 -20.379)"/>
14
+ <path id="Path_1012" data-name="Path 1012" class="cls-1" d="M455.858,10.045c-3.246-.839-3.9-1.216-3.9-2.31V7.686c0-.9.888-1.483,2.249-1.483a8.5,8.5,0,0,1,4.754,1.812l.122.085,2.286-3.319-.109-.085a10.962,10.962,0,0,0-7-2.4c-3.927,0-6.663,2.371-6.663,5.763v.049c0,3.915,2.724,4.924,6.286,5.836,3.137.8,3.648,1.313,3.648,2.225v.049c0,1.009-.948,1.6-2.541,1.6a8.411,8.411,0,0,1-5.471-2.225l-.109-.1-2.6,3.113.109.1a11.978,11.978,0,0,0,8,3.015c4.3,0,6.979-2.274,6.979-5.921V15.76C461.877,12.319,459.469,10.993,455.858,10.045Z" transform="translate(-392.475 -2.02)"/>
15
+ <path id="Path_1013" data-name="Path 1013" class="cls-1" d="M746.358,36.361l-4.936-8.353-1.459,7.733H736.4L740,18.5l6.444,10.87,6.092-10.87,3.647,17.241h-3.793l-1.41-7.623Z" transform="translate(-646.864 -16.251)"/>
16
+ </svg>
images/products/kingsumo-logo.svg ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 215.6 30" style="enable-background:new 0 0 215.6 30;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#3EC242;}
7
+ .st1{fill:#A7E629;}
8
+ .st2{fill:#6E7687;}
9
+ .st3{fill:#959FAF;}
10
+ </style>
11
+ <g>
12
+ <g>
13
+ <g>
14
+ <g>
15
+ <path class="st0" d="M44.8,23.6c-7.3,3.7-12.8,2-18.6,0.2c-4.8-1.5-10.1-3.1-16.6-1.6l0,0c-1.2,0.3-2.5,0.7-3.8,1.2l0,0l0,0
16
+ L11,26c5.2-1.1,9.5,0.2,14.1,1.6c3.5,1.1,7.1,2.2,11.1,2.2c3.2,0,6.6-0.7,10.4-2.6L44.8,23.6z"/>
17
+ </g>
18
+ <path class="st1" d="M0,7.5l5.9,16l0,0c1.3-0.5,2.5-0.9,3.8-1.2l0,0l0,0L5.1,9.9L0,7.5z"/>
19
+ <polygon class="st0" points="3.2,4.6 18.2,11.8 12.8,13.6 0,7.5 "/>
20
+ <polygon class="st1" points="22.1,4.3 18.2,11.8 14.6,10.1 19.9,0 "/>
21
+ <polygon class="st0" points="24.4,0 19.9,0 26.1,11.8 31.5,13.6 "/>
22
+ <polygon class="st1" points="41.1,4.6 39.2,9.9 31.5,13.6 29.7,10.1 "/>
23
+ <polygon class="st0" points="38.9,22.1 44.3,7.5 41.1,4.6 35.2,20.7 "/>
24
+ </g>
25
+ </g>
26
+ <path class="st2" d="M124.5,11.5c-2.6-0.9-3.4-1.7-3.4-2.8c0-0.6,0.6-1.7,2.4-1.7c1.3,0,2.7,0.8,3.7,2.1l3.1-2.1
27
+ c-1.5-2.1-4-3.6-6.6-3.6c-3.9,0-6.5,2.7-6.5,5.4c0,3.7,3.4,5.2,5.8,6.1c2.8,1,3.7,1.5,3.7,2.8c0,1-1,2-2.9,2
28
+ c-2.1,0-3.6-1.1-4.8-2.4l-2.6,2.7c1.7,1.8,4.4,3.3,7.2,3.3c4.7,0,7-3,7-5.5C130.7,13.7,127.1,12.4,124.5,11.5z"/>
29
+ <rect x="72.5" y="8.6" class="st2" width="4" height="14.2"/>
30
+ <circle class="st2" cx="74.5" cy="3.5" r="2.4"/>
31
+ <path class="st2" d="M143.6,8.7v8.2l0,0c0,1.7-1.3,2.9-3,2.9s-3-1.2-3-2.9l0,0V8.7h-4v8.2l0,0c0,3.7,3.2,6.5,7,6.5
32
+ c3.7,0,7-2.8,7-6.5l0,0V8.7H143.6z"/>
33
+ <path class="st2" d="M186.1,8.2c-4.4,0-7.9,3.3-7.9,7.6s3.5,7.6,7.9,7.6s7.9-3.3,7.9-7.6S190.4,8.2,186.1,8.2z M186.1,19.7
34
+ c-2.3,0-3.9-1.7-3.9-3.9s1.6-3.9,3.9-3.9s3.9,1.7,3.9,3.9S188.4,19.7,186.1,19.7z"/>
35
+ <path class="st2" d="M94.3,14.1c0-3.3-2.7-5.9-5.9-5.9c-1.6,0-3.1,0.5-4.4,1.4v-1h-3.6v14.2h4v-8c0-1.7,1.3-3,3-3s3,1.3,3,3v8h4
36
+ L94.3,14.1L94.3,14.1z"/>
37
+ <path class="st2" d="M169.3,8.2c-2.1,0-4,0.9-5.3,2.3c-1.1-1.4-2.8-2.3-4.6-2.3c-1.6,0-3.1,0.5-4.4,1.4V8.7h-3.6v14.2h4v-8
38
+ c0-1.7,1.3-3,3-3s3,1.3,3,3v8h4v-8c0-1.7,1.3-3,3-3s3,1.3,3,3v8h4v-8.7C175.3,10.8,172.6,8.2,169.3,8.2z"/>
39
+ <polygon class="st2" points="69.1,3.8 63.6,3.8 56.8,10.8 56.8,3.8 52.8,3.8 52.8,22.8 56.8,22.8 56.8,16.5 59.1,14.1 65.6,22.8
40
+ 70.5,22.8 61.9,11.3 "/>
41
+ <path class="st2" d="M113.2,13V8.6h-3.6V10c-1.3-1.2-3-1.9-4.8-1.9c-4.1,0-7.4,3.4-7.4,7.6s3.3,7.6,7.4,7.6c1.7,0,3.3-0.6,4.5-1.6
42
+ v0.5c0,1.8-1.2,4.1-4.5,4.1c-1.5,0-3-0.6-4.3-1.7L98,27.3c2,1.7,4.4,2.6,6.9,2.6c4.9,0,8.4-3.3,8.4-7.8L113.2,13L113.2,13z
43
+ M105.3,19.6c-2.2,0-3.9-1.8-3.9-3.9s1.8-3.9,3.9-3.9c2.2,0,3.9,1.8,3.9,3.9S107.5,19.6,105.3,19.6z"/>
44
+ </g>
45
+ <g>
46
+ <path class="st3" d="M200.6,20.8c0.2,0.2,0.2,0.5,0.2,0.8c0,0.4-0.2,0.7-0.5,1c-0.3,0.2-0.8,0.3-1.4,0.3h-2.5v-4.8h2.3
47
+ c0.6,0,1,0.1,1.3,0.3c0.3,0.2,0.5,0.5,0.5,0.9c0,0.2-0.1,0.4-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.4C200.2,20.5,200.4,20.6,200.6,20.8z
48
+ M197.5,18.9v1.1h1.1c0.3,0,0.5,0,0.6-0.1c0.1-0.1,0.2-0.2,0.2-0.4c0-0.2-0.1-0.3-0.2-0.4c-0.1-0.1-0.4-0.1-0.6-0.1H197.5z
49
+ M199.5,21.9c0.1-0.1,0.2-0.2,0.2-0.4c0-0.4-0.3-0.6-0.9-0.6h-1.3v1.2h1.3C199.1,22.1,199.3,22,199.5,21.9z"/>
50
+ <path class="st3" d="M205.6,22v0.9h-3.7v-4.8h3.6V19H203v1h2.2v0.9H203V22H205.6z"/>
51
+ <path class="st3" d="M207.7,19h-1.5v-0.9h4.2V19h-1.5v3.9h-1.1V19z"/>
52
+ <path class="st3" d="M214,21.9h-2.2l-0.4,1h-1.1l2.1-4.8h1.1l2.1,4.8h-1.2L214,21.9z M213.7,21l-0.8-1.8l-0.8,1.8H213.7z"/>
53
+ </g>
54
+ </svg>
images/products/sendfox-logo.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 105.2 22.1" style="enable-background:new 0 0 105.2 22.1;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#CCDFED;}
7
+ .st1{fill:#FF644D;}
8
+ .st2{fill:#4C5366;}
9
+ </style>
10
+ <title>sendfox-logo</title>
11
+ <g>
12
+ <g>
13
+ <polygon class="st0" points="0,11 9.8,19.8 19.5,11 19.5,22.1 0,22.1 "/>
14
+ <polygon class="st1" points="0,7.9 9.8,16.8 19.5,7.9 "/>
15
+ <polygon class="st1" points="13.3,5.6 19.5,5.6 19.5,0 "/>
16
+ <polygon class="st1" points="0,0 0,5.6 6.2,5.6 "/>
17
+ </g>
18
+ <g>
19
+ <path class="st2" d="M32.3,10c-2-0.8-3.3-1.4-3.3-2.8c0-1.3,1.3-2.3,2.8-2.3c1.5,0,2.5,0.9,2.9,1.9l1.6-0.6
20
+ c-0.6-1.7-2.4-2.9-4.5-2.9c-2.2,0-4.6,1.5-4.6,3.9c0,2.6,2.5,3.6,4.4,4.4c2.1,0.8,3.3,1.5,3.3,2.9c0,1.6-1.1,2.7-2.9,2.7
21
+ c-1.9,0-3.2-1.3-3.6-2.6l-1.7,0.4c0.5,1.9,2.5,3.8,5.2,3.8c2.7,0,4.7-1.8,4.7-4.4C36.8,11.7,34.3,10.8,32.3,10z"/>
22
+ <path class="st2" d="M69.7,8.9C69,8,67.9,7.4,66.6,7.4c-2.8,0-4.9,2.4-4.9,5.7s2.1,5.7,4.9,5.7c1.4,0,2.5-0.6,3.3-1.6v1.4h1.7V3.4
23
+ h-1.8V8.9z M66.6,17.2c-1.8,0-3.2-1.8-3.2-4.1S64.8,9,66.6,9c1.9,0,3.2,1.9,3.2,4.1S68.5,17.2,66.6,17.2z"/>
24
+ <polygon class="st2" points="74.9,18.7 76.8,18.7 76.8,12 82.4,12 82.4,10.4 76.8,10.4 76.8,5.3 83.5,5.3 83.5,3.7 74.9,3.7 "/>
25
+ <path class="st2" d="M55.8,7.4c-1.2,0-2.7,0.5-3.9,2.1v-2h-1.7v11.1h1.8v-6.2C52.8,9.9,54.7,9,55.8,9c1.2,0,1.9,0.9,1.9,2.4v7.2
26
+ h1.8v-7.2C59.5,8.5,57.6,7.4,55.8,7.4z"/>
27
+ <path class="st2" d="M89.3,7.4c-2.8,0-4.9,2.4-4.9,5.7s2.1,5.7,4.9,5.7s4.9-2.4,4.9-5.7S92.2,7.4,89.3,7.4z M89.3,17.2
28
+ c-1.8,0-3.1-1.8-3.1-4.1S87.5,9,89.3,9c1.8,0,3.1,1.8,3.1,4.1S91.2,17.2,89.3,17.2z"/>
29
+ <path class="st2" d="M47.8,10.8c0-1.7-1.5-3.4-4-3.4c-2.5,0-5.2,2.1-5.2,5.7c0,3.7,2.7,5.7,5.3,5.7c0.9,0,2.3-0.2,3.7-1.1
30
+ l-0.9-1.4c-1,0.7-2.1,0.9-2.8,0.9c-1.5,0-2.9-1-3.3-2.6C43.9,14.5,47.8,14,47.8,10.8z M40.5,13.1c0-2.5,1.8-4.1,3.4-4.1
31
+ c1.3,0,2.2,1,2.2,1.8C46,12.2,44.1,13,40.5,13.1z"/>
32
+ <polygon class="st2" points="105.2,18.7 101.2,13 105,7.6 102.8,7.6 100.2,11.5 97.5,7.6 95.3,7.6 99.1,13 95.1,18.7 97.3,18.7
33
+ 100.2,14.5 103,18.7 "/>
34
+ </g>
35
+ </g>
36
+ </svg>
images/products/sumo-logo.png ADDED
Binary file
other_tools.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_thickbox();
3
+ wp_enqueue_script('under-construction-admin',plugin_dir_url( __FILE__ ). 'scripts/underconstruction-scripts.js',array('jquery'));
4
+ wp_enqueue_style('under-construction-admin-style',plugin_dir_url( __FILE__ ).'styles/underconstruction-style-common.css', array(), '3.1.1');
5
+
6
+ ?>
7
+ <div class="wrap">
8
+ <h2>Other Tools</h2>
9
+ <p>
10
+ <div class="under-construction-plugin-box">
11
+ <div class="under-construction-plugin-box-logo-container">
12
+ <img src="<?php echo plugin_dir_url(__FILE__) . 'images/products/appsumo-logo.png'; ?>">
13
+ </div>
14
+ <a href="https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=underconstruction" target="_blank">AppSumo</a> Promotes great products to help you in your career and life.
15
+ </div>
16
+
17
+ <div class="under-construction-plugin-box">
18
+ <div class="under-construction-plugin-box-logo-container">
19
+ <img src="<?php echo plugin_dir_url( __FILE__ ) . 'images/products/sendfox-logo.svg'; ?>">
20
+ </div>
21
+ <a href="http://sendfox.com" target="_blank">SendFox</a> Email marketing for content creators.
22
+ </div>
23
+
24
+ <div class="under-construction-plugin-box">
25
+ <div class="under-construction-plugin-box-logo-container">
26
+ <img src="<?php echo plugin_dir_url( __FILE__ ) . 'images/products/sumo-logo.png'; ?>">
27
+ </div>
28
+ <a href="<?php echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox">Sumo</a> Tools to grow your Email List, Social Sharing and Analytics.
29
+ </div>
30
+
31
+ <div class="under-construction-plugin-box">
32
+ <div class="under-construction-plugin-box-logo-container">
33
+ <img src="<?php echo plugin_dir_url( __FILE__ ) . 'images/products/kingsumo-logo.svg'; ?>">
34
+ </div>
35
+ <a href="https://kingsumo.com/" target="_blank">KingSumo</a> Grow your email list through Viral Giveaways for WordPress
36
+ </div>
37
+ </p>
38
+
39
+ <div class="under-construction-plugin-box-form">
40
+ <?php include plugin_dir_path( __FILE__ ).'appsumo-capture-form.php'; ?>
41
+ </div>
42
+ </div>
readme.txt CHANGED
@@ -2,13 +2,15 @@
2
  Contributors: Jeremy Massel
3
  Tags: construction, under construction, private, preview, security, coming soon
4
  Requires at least: 2.7
5
- Tested up to: 4.7
6
- Stable tag: 1.18
7
 
8
  Creates a 'Coming Soon' page that will show for all users who are not logged in
9
 
10
  == Description ==
11
 
 
 
12
  Creates a 'Coming Soon' page that will show for all users who are not logged in. Useful for developing a site on a live server, without the world being able to see it
13
 
14
  == Installation ==
@@ -41,6 +43,9 @@ I've had a few people ask me this. If you like it, please go to WordPress.org an
41
  Sorry, I get a lot of questions. But visit the homepage for this plugin and leave me a comment. They go right to my inbox, and well I might not be able to for a few days, I promise I'll get back to you.
42
 
43
  == Changelog ==
 
 
 
44
  = 1.18 =
45
  * Fix PHP warnings and update Wordpress version compatibility.
46
 
2
  Contributors: Jeremy Massel
3
  Tags: construction, under construction, private, preview, security, coming soon
4
  Requires at least: 2.7
5
+ Tested up to: 5.6
6
+ Stable tag: 1.19
7
 
8
  Creates a 'Coming Soon' page that will show for all users who are not logged in
9
 
10
  == Description ==
11
 
12
+ [Check out the latest WordPress deals for your site.](https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=underconstruction)
13
+
14
  Creates a 'Coming Soon' page that will show for all users who are not logged in. Useful for developing a site on a live server, without the world being able to see it
15
 
16
  == Installation ==
43
  Sorry, I get a lot of questions. But visit the homepage for this plugin and leave me a comment. They go right to my inbox, and well I might not be able to for a few days, I promise I'll get back to you.
44
 
45
  == Changelog ==
46
+ = 1.19 =
47
+ * Address security vulnerability.
48
+
49
  = 1.18 =
50
  * Fix PHP warnings and update Wordpress version compatibility.
51
 
scripts/underconstruction-scripts.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ function submitAppsumoCaptureForm(emailAddress) {
2
+ var xhr = new XMLHttpRequest();
3
+ xhr.open('POST', 'https://hooks.zapier.com/hooks/catch/2130556/ot6a0xg/');
4
+ xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
5
+ xhr.send(encodeURI('email=' + emailAddress));
6
+ alert("You're signed up!");
7
+ }
styles/underconstruction-style-common.css ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .under-construction-settings {
3
+ width: 600px;
4
+ }
5
+
6
+ .under-construction-content-left,.under-construction-content-right {
7
+ display: inline-block;
8
+ margin:0px;
9
+ padding:0px;
10
+ vertical-align: top;
11
+ }
12
+ .under-construction-content-left {
13
+ width:calc(100% - 400px) !important;
14
+ }
15
+ .under-construction-content-right {
16
+ text-align: right;
17
+ width: 300px !important;
18
+ position: relative;
19
+ right: 0px;
20
+ }
21
+
22
+ .under-construction-sidebar-appsumo-link {
23
+ color: #ff644d;
24
+ font-weight: 700;
25
+ text-shadow: 1px 1px 1px #000;
26
+ }
27
+
28
+ .under-construction-plugin-box {
29
+ width: calc( (100% / 2) - 160px);
30
+ padding: 25px;
31
+ margin: 25px 50px;
32
+ min-width: 200px;
33
+ display:inline-block;
34
+ box-shadow: 3px 5px 9px #888888;
35
+ background-color: white;
36
+ height: 125px;
37
+ vertical-align: top;
38
+ text-align: center;
39
+ }
40
+ .under-construction-plugin-box-form {
41
+ width: calc(100% / 3);
42
+ padding: 25px;
43
+ margin: 0px auto;
44
+ min-width: 200px;
45
+ display:block;
46
+ box-shadow: 3px 5px 9px #888888;
47
+ background-color: white;
48
+ vertical-align: top;
49
+ text-align: center;
50
+ }
51
+ .under-construction-plugin-box a {
52
+ font-weight: bold;
53
+ padding: 10px 0px;
54
+ display: block;
55
+ font-size: 20px;
56
+ }
57
+ .under-construction-plugin-box img {
58
+ max-width:150px;
59
+ max-height:40px;
60
+ }
61
+ .under-construction-plugin-box-logo-container {
62
+ height:40px;
63
+ }
64
+
65
+ .under-construction-plugin-box-form .under-construction-appsumo-capture-container{
66
+ background-image: unset !important;
67
+ width: unset;
68
+ height:unset;
69
+ }
70
+
71
+ .under-construction-plugin-box-form .under-construction-appsumo-capture-container .under-construction-appsumo-capture-sub-header {
72
+ color: #000 !important;
73
+ }
74
+
75
+ .under-construction-plugin-box-form .under-construction-appsumo-capture-container .under-construction-appsumo-capture-header {
76
+ color: #d54f21;
77
+ }
78
+
79
+ .under-construction-promo-box-form .under-construction-appsumo-capture-container{
80
+ background-image: unset !important;
81
+ width: unset;
82
+ height:unset;
83
+ }
84
+ .under-construction-promo-box-form {
85
+ width:auto;
86
+
87
+ }
88
+ .under-construction-promo-box-form .under-construction-appsumo-capture-container {
89
+ background-image: none;
90
+ width: 100%;
91
+ margin: 0px;
92
+ color: #444;
93
+ padding: 0px;
94
+ }
95
+ .under-construction-promo-box-form .under-construction-appsumo-capture-container .under-construction-appsumo-capture-container-input{
96
+ width: 100%;
97
+ }
98
+ .under-construction-promo-box-form .under-construction-appsumo-capture-container .under-construction-appsumo-capture-container-button{
99
+ display: block;
100
+ margin: 5px auto !important;
101
+ }
102
+ .under-construction-promo-box-form .under-construction-appsumo-capture-container .under-construction-appsumo-capture-header{
103
+ font-weight: bold;
104
+ color: #d54f21;
105
+ font-size: 18px;
106
+ margin: 0px !important;
107
+ }
108
+ .under-construction-promo-box-form .under-construction-appsumo-capture-container .under-construction-appsumo-capture-sub-header{
109
+ padding:10px;
110
+ }
111
+ .under-construction-promo-box-header {
112
+ font-weight: bold;
113
+ color: #d54f21;
114
+ font-size: 18px;
115
+ margin: 0px !important;
116
+ white-space: nowrap;
117
+ }
118
+ .under-construction-promo-box ul {
119
+ text-align: left;
120
+ }
121
+
122
+
123
+ .under-construction-appsumo-capture-container {
124
+ background-image: url('../images/triangle-pattern.svg');
125
+ background-repeat:no-repeat;
126
+ min-height:180px;
127
+ max-width:550px;
128
+ width: calc(100% / 3);
129
+ padding: 30px;
130
+ border-radius: 10px;
131
+ margin: 0px auto;
132
+ }
133
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-header {
134
+ text-align: left;
135
+ box-sizing: border-box;
136
+ margin-top: 0;
137
+ line-height: 1.3;
138
+ font-weight: bold;
139
+ font-size: 1.5rem;
140
+ color: #ffffff;
141
+ text-align: center;
142
+ }
143
+ .under-construction-plugin-box-form .under-construction-appsumo-capture-container .under-construction-appsumo-capture-sub-header {
144
+ text-align: left;
145
+ font-weight: 400;
146
+ color: #FFF;
147
+ box-sizing: border-box;
148
+ margin-top: 0;
149
+ margin-bottom: 1rem;
150
+ line-height: 1.7;
151
+ font-size: 14px;
152
+ text-align: center;
153
+ padding: 10px;
154
+ width: 80%;
155
+ margin: 0px auto 20px auto;
156
+ }
157
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-container-input {
158
+ overflow: visible;
159
+ margin-right: 0.5rem !important;
160
+ display: inline-block;
161
+ width: calc(100% - 170px);
162
+ vertical-align: middle;
163
+ transition: all 0.3s;
164
+ outline: none;
165
+ box-shadow: none;
166
+ box-sizing: border-box;
167
+ background: #fff;
168
+ height: 3rem;
169
+ font-weight: 100;
170
+ color: #272727;
171
+ margin: 0;
172
+ border-radius: 5px;
173
+ border: 1px solid #CCCCCC;
174
+ line-height: 1;
175
+ font-size: 1em;
176
+ padding: 14px 10px;
177
+ margin-bottom: 0;
178
+ min-width: 150px;
179
+ }
180
+ .under-construction-appsumo-capture-container-button {
181
+ display: inline-block;
182
+ text-align: center;
183
+ vertical-align: middle;
184
+ user-select: none;
185
+ line-height: 1.5;
186
+ transition: all 0.2s ease-in-out;
187
+ border: 0;
188
+ white-space: normal;
189
+ word-wrap: break-word;
190
+ text-transform: none;
191
+ color: #272727 !important;
192
+ padding: 12px 32px;
193
+ font-size: 14px;
194
+ border-radius: 5px;
195
+ font-weight: 600;
196
+ margin-top: 0 !important;
197
+ height: 3rem;
198
+ margin: 0;
199
+ text-decoration: none;
200
+ border-color: #0062cc;
201
+ outline: 0;
202
+ box-shadow: inset 0px 0px 0px 1px rgba(9,132,227,0);
203
+ background-color: #FFBC00 !important;
204
+ cursor: pointer;
205
+ }
206
+ .under-construction-promo-box {
207
+ text-align:left;
208
+ width: 250px;
209
+ min-width: 250px;
210
+ border: 1px solid #ccc;
211
+ padding: 20px;
212
+ background:#FFFFFF;
213
+ right: 20px;
214
+ margin: 25px 50px;
215
+ box-shadow: 3px 5px 9px #888888;
216
+ background-color: white;
217
+ vertical-align: top;
218
+ text-align: center;
219
+ }
220
+
221
+
222
+ @media only screen and (max-width: 1400px) {
223
+
224
+ .under-construction-plugin-box {
225
+ height: 145px;
226
+ width: calc( (100% /2) - 160px);
227
+ }
228
+
229
+ .under-construction-appsumo-capture-container {
230
+ width: calc(100% / 2);
231
+ }
232
+
233
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-header {
234
+ font-size: 1.5rem;
235
+ text-align: center;
236
+ }
237
+
238
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-sub-header {
239
+ text-align: center;
240
+ }
241
+
242
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-container-input {
243
+ width: 100%;
244
+ }
245
+
246
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-container-button {
247
+ display: block;
248
+ margin: 5px auto !important;
249
+ }
250
+
251
+ .under-construction-content-left,.under-construction-content-right {
252
+ display: block;
253
+ width: 100% !important;
254
+ }
255
+
256
+ .under-construction-settings {
257
+ width: 100% !important;
258
+ }
259
+
260
+ .under-construction-promo-box {
261
+ /*display: none;*/
262
+ width: auto !important;
263
+ max-width: 250px;
264
+ margin: 20px auto;
265
+ }
266
+ .under-construction-promo-box-form .under-construction-appsumo-capture-container {
267
+ width: auto !important;
268
+ max-width: 250px;
269
+ margin: 20px auto;
270
+ }
271
+
272
+
273
+
274
+
275
+ }
276
+
277
+ @media only screen and (max-width: 800px) {
278
+ .under-construction-plugin-box {
279
+ width: 80%;
280
+ height: 125px;
281
+ margin: 25px auto;
282
+ display: block;
283
+ }
284
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-header {
285
+ font-size: 1.5rem;
286
+ }
287
+
288
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-sub-header {
289
+
290
+ }
291
+
292
+ .under-construction-appsumo-capture-container .under-construction-appsumo-capture-container-button {
293
+ height: 4rem;
294
+ }
295
+
296
+ }
297
+
styles/underconstruction-style.css ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Wordpress Google Fonts admin style */
2
+ .under-construction-selections{
3
+ display:none;
4
+ }
5
+ .under-construction-variants .variant-items,
6
+ .under-construction-subsets .subset-items{
7
+ border:1px solid #ccc;
8
+ margin:10px;
9
+ padding:5px;
10
+
11
+ }
12
+ .under-construction-block{
13
+ padding:20px;
14
+ margin-bottom:20px;
15
+ border:1px solid #ccc;
16
+ clear:both;
17
+ overflow:hidden;
18
+ position:relative;
19
+ }
20
+ .under-construction-variants,
21
+ .under-construction-subsets,
22
+ .under-construction-usage,
23
+ .under-construction-css{
24
+ float:left;
25
+ width: 44%;
26
+ margin-right:3%;
27
+ }
28
+ .under-construction-subsets.single{
29
+ display:none;
30
+ }
31
+ .under-construction-css textarea{
32
+ width: 96%;
33
+ height: 100px;
34
+ }
35
+ #under-constructions_options .slight{
36
+ font-style:italic;
37
+ color:#ccc;
38
+ }
39
+ .under-construction-block .gfspinner{
40
+ background:url('../images/spinner.gif') no-repeat 0 0 scroll transparent;
41
+ height:60px;
42
+ width:60px;
43
+ position:absolute;
44
+ left:50%;
45
+ top:10px;
46
+ z-index:1;
47
+ display:block;
48
+ }
49
+ .under-construction-block .button-primary{
50
+ margin-top:10px;
51
+ }
ucOptions.php CHANGED
@@ -164,186 +164,197 @@ if (array_key_exists('underconstruction_global_notification', $_GET) && $_GET['u
164
  #underconstruction_global_notification a.button:active {vertical-align:baseline;}
165
  </style>
166
  <div class="wrap">
167
- <?php
168
- if (!is_plugin_active( 'sumome/sumome.php' ))
169
- {
170
- ?>
171
- <div id="underconstruction_global_notification" style="border:3px solid #31964D;position:relative;background:#6AB07B;color:#ffffff;height:70px;margin:5px 0 15px;padding:1px 12px;">
172
- <p style="font-size:16px;line-height:40px;">
173
- <?php _e('Tools to grow your Email List, Social Sharing and Analytics.'); ?> &nbsp;<a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a>
174
- </p>
175
- </div>
176
- <?php
177
- }
178
- ?>
179
- <div id="icon-options-general" class="icon32">
180
- <br />
181
- </div>
182
- <form method="post"
183
- action="<?php echo $GLOBALS['PHP_SELF'] . '?page=' . $this->mainOptionsPage; ?>"
184
- id="ucoptions">
185
- <h2><?php _e('Under Construction', 'underconstruction');?></h2>
186
- <table>
187
- <tr>
188
- <td>
189
- <h3><?php _e('Activate or Deactivate', 'underconstruction');?></h3>
190
- </td>
191
- </tr>
192
- <tr>
193
- <td>
194
- <fieldset>
195
- <legend class="screen-reader-text">
196
- <span><?php _e('Activate or Deactivate', 'underconstruction');?></span>
197
- </legend>
198
- <label title="activate">
199
- <input type="radio" name="activate" value="1"<?php if ($this->pluginIsActive()) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('on', 'underconstruction');?>
200
- </label><br />
201
- <label title="deactivate">
202
- <input type="radio" name="activate" value="0"<?php if (!$this->pluginIsActive()) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('off', 'underconstruction');?>
203
- </label>
204
- </fieldset>
205
- </td>
206
- </tr>
207
- <tr>
208
- <td>
209
- <h3><?php _e('HTTP Status Code', 'underconstruction');?></h3>
210
- <p><?php _e("You can choose to send the standard HTTP status code with the under construction page, or send a 503 \"Service Unavailable\" status code. This will tell Google that this page isn't ready yet, and cause your site not to be listed until this plugin is disabled.", 'underconstruction');?></p>
211
- </td>
212
- </tr>
213
- <tr>
214
- <td>
215
- <fieldset>
216
- <legend class="screen-reader-text">
217
- <span><?php _e('HTTP Status Code', 'underconstruction');?></span>
218
- </legend>
219
- <label title="HTTP200">
220
- <input type="radio" name="http_status" value="200" id="200_status"<?php if ($this->httpStatusCodeIs(200)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('HTTP 200 - ok', 'underconstruction');?>
221
- </label> <br />
222
- <label title="HTTP301">
223
- <input type="radio" name="http_status" value="301" id="301_status"<?php if ($this->httpStatusCodeIs(301)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('HTTP 301 - Redirect', 'underconstruction');?> </label> <br />
224
- <label title="HTTP503">
225
- <input type="radio" name="http_status" value="503" id="503_status"<?php if ($this->httpStatusCodeIs(503)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('HTTP 503 - Service Unavailable', 'underconstruction');?>
226
- </label>
227
- </fieldset>
228
- <div id="redirect_panel" <?php echo !$this->httpStatusCodeIs(301) ? 'class="hidden"' : '';?>><br />
229
- <label for="url"><?php _e('Redirect Location:', 'underconstruction');?></label>
230
- <input type="text" name="url" id="url" value="<?php echo get_option('underConstructionRedirectURL');?>" />
231
- </div>
232
- </td>
233
- </tr>
234
- <tr>
235
- <td>
236
- <h3><?php _e('Restrict By Role', 'underconstruction');?></h3>
237
- </td>
238
- </tr>
239
- <tr>
240
- <td><?php _e('Only users at or above this level will be able to log in:', 'underconstruction');?>
241
- <select id="required_role" name="required_role">
242
- <option value="0"><?php _e('All Users', 'underconstruction');?></option>
243
- <?php
244
- $selected = get_option('underConstructionRequiredRole');
245
- $editable_roles = get_editable_roles();
246
- //to get rid of Notices "Undefined var"...
247
- $p = $r = '';
248
-
249
- foreach ( $editable_roles as $role => $details ) {
250
- $name = translate_user_role($details['name'] );
251
- if ( $selected == $role ) // preselect specified role
252
- $p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>";
253
- else
254
- $r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>";
255
- }
256
- echo $p . $r;
257
- ?>
258
- </select>
259
- </td>
260
- </tr>
261
- <tr>
262
- <td>
263
- <h3><?php _e('IP Address Whitelist', 'underconstruction');?></h3>
264
- </td>
265
- </tr>
266
- <tr>
267
- <td>
268
- <?php $whitelist = get_option('underConstructionIPWhitelist');
269
- if(count($whitelist)): ?>
270
- <select size="4" id="ip_whitelist" name="ip_whitelist" style="width: 250px; height: 100px;">
271
- <?php for($i = 0; $i < count($whitelist); $i++):?>
272
- <option id="<?php echo $i; ?>" value="<?php echo $i;?>">
273
- <?php echo $whitelist[$i];?>
274
- </option>
275
- <?php endfor;?>
276
- </select><br />
277
-
278
- <input type="submit" value="<?php _e('Remove Selected IP Address', 'underconstruction'); ?>" name="remove_selected_ip_btn" class="button" id="remove_selected_ip_btn" /> <br /> <br />
279
- <?php endif; ?>
280
- <label><?php _e('IP Address:', 'underconstruction');?> <input type="text" name="ip_address" id="ip_address" /> </label>
281
- <a id="add_current_address_btn" style="cursor: pointer;" class="button"><?php _e('Add Current Address', 'underconstruction');?></a>
282
- <span id="loading_current_address" class="hidden">Loading...</span>
283
- <br />
284
- </td>
285
- </tr>
286
- <tr>
287
- <td>
288
- <h3><?php _e('Display Options', 'underconstruction');?></h3>
289
- </td>
290
- </tr>
291
- <tr>
292
- <td>
293
- <fieldset>
294
- <legend class="screen-reader-text">
295
- <span><?php _e('Display Options', 'underconstruction');?> </span>
296
- </legend>
297
- <label title="<?php _e('Display the default under construction page', 'underconstruction');?>">
298
- <input type="radio" name="display_options" value="0" id="displayOption0"<?php if ($this->displayStatusCodeIs(0)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display the default under construction page', 'underconstruction');?>
299
- </label> <br />
300
- <label title="<?php _e('Display the under construction page that is part of the active theme', 'underconstruction');?>">
301
- <input <?php if(!$current_theme_has_uc_page): ?>disabled="disabled" <?php endif; ?> type="radio" name="display_options" value="3" id="displayOption3"<?php if ($this->displayStatusCodeIs(3)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display the under construction page that is part of the active theme', 'underconstruction');?>
302
-
303
- <?php if(!$current_theme_has_uc_page): ?>
304
- <br /> <em style="margin-left: 24px;"><?php _e('Only available for themes with an under-construction.php file', 'underconstruction');?></em>
305
- <?php endif; ?>
306
-
307
- </label> <br />
308
- <label title="<?php _e('Display the default under construction page, but use custom text', 'underconstruction');?>">
309
- <input type="radio" name="display_options" value="1" id="displayOption1"<?php if ($this->displayStatusCodeIs(1)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display the default under construction page, but use custom text', 'underconstruction');?>
310
- </label> <br />
311
- <label title="<?php _e('Display a custom page using your own HTML', 'underconstruction');?>">
312
- <input type="radio" name="display_options" value="2" id="displayOption2"<?php if ($this->displayStatusCodeIs(2)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display a custom page using your own HTML', 'underconstruction');?>
313
- </label> <br />
314
- </fieldset>
315
- </td>
316
- </tr>
317
- </table>
318
-
319
- <div id="customText"<?php if (!$this->displayStatusCodeIs(1) && !$this->displayStatusCodeIs(2)) { echo ' style="display: none;"'; } ?>>
320
- <h3><?php _e('Display Custom Text', 'underconstruction');?></h3>
321
- <p><?php _e('The text here will replace the text on the default page', 'underconstruction');?></p>
322
  <table>
323
- <tr valign="top">
324
- <th scope="row"><label for="pageTitle"> <?php _e('Page Title', 'underconstruction');?> </label></th>
325
- <td><input name="pageTitle" type="text" id="pageTitle" value="<?php echo $this->getCustomPageTitle(); ?>" class="regular-text" size="50"></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  </tr>
327
- <tr valign="top">
328
- <th scope="row"><label for="headerText"> <?php _e('Header Text', 'underconstruction');?> </label></th>
329
- <td><input name="headerText" type="text" id="headerText" value="<?php echo $this->getCustomHeaderText(); ?>" class="regular-text" size="50"></td>
 
330
  </tr>
331
- <tr valign="top">
332
- <th scope="row"><label for="bodyText"> <?php _e('Body Text', 'underconstruction');?> </label></th>
333
- <td><?php echo '<textarea rows="2" cols="44" name="bodyText" id="bodyText" class="regular-text">'.trim($this->getCustomBodyText()).'</textarea>'; ?></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  </tr>
335
  </table>
336
- </div>
337
-
338
- <div id="customHTML"<?php if (!$this->displayStatusCodeIs(2)) { echo ' style="display: none;"'; } ?>>
339
- <h3><?php _e('Under Construction Page HTML', 'underconstruction');?></h3>
340
- <p><?php _e('Put in this area the HTML you want to show up on your front page', 'underconstruction');?></p>
341
- <?php echo '<textarea name="ucHTML" rows="15" cols="75">'.$this->getCustomHTML().'</textarea>'; ?>
342
- </div>
343
-
344
- <p class="submit">
345
- <?php wp_nonce_field('save_options','save_options_field'); ?>
346
- <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes', 'underconstruction'); ?>" id="submitChangesToUnderConstructionPlugin" />
347
- </p>
348
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  </div>
164
  #underconstruction_global_notification a.button:active {vertical-align:baseline;}
165
  </style>
166
  <div class="wrap">
167
+ <div class="under-construction-content-left">
168
+ <div id="icon-options-general" class="icon32">
169
+ <br />
170
+ </div>
171
+ <form method="post"
172
+ action="<?php echo esc_url_raw($GLOBALS['PHP_SELF']) . '?page=' . $this->mainOptionsPage; ?>"
173
+ id="ucoptions">
174
+ <h2><?php _e('Under Construction', 'underconstruction');?></h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  <table>
176
+ <tr>
177
+ <td>
178
+ <h3><?php _e('Activate or Deactivate', 'underconstruction');?></h3>
179
+ </td>
180
+ </tr>
181
+ <tr>
182
+ <td>
183
+ <fieldset>
184
+ <legend class="screen-reader-text">
185
+ <span><?php _e('Activate or Deactivate', 'underconstruction');?></span>
186
+ </legend>
187
+ <label title="activate">
188
+ <input type="radio" name="activate" value="1"<?php if ($this->pluginIsActive()) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('on', 'underconstruction');?>
189
+ </label><br />
190
+ <label title="deactivate">
191
+ <input type="radio" name="activate" value="0"<?php if (!$this->pluginIsActive()) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('off', 'underconstruction');?>
192
+ </label>
193
+ </fieldset>
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <td>
198
+ <h3><?php _e('HTTP Status Code', 'underconstruction');?></h3>
199
+ <p><?php _e("You can choose to send the standard HTTP status code with the under construction page, or send a 503 \"Service Unavailable\" status code. This will tell Google that this page isn't ready yet, and cause your site not to be listed until this plugin is disabled.", 'underconstruction');?></p>
200
+ </td>
201
+ </tr>
202
+ <tr>
203
+ <td>
204
+ <fieldset>
205
+ <legend class="screen-reader-text">
206
+ <span><?php _e('HTTP Status Code', 'underconstruction');?></span>
207
+ </legend>
208
+ <label title="HTTP200">
209
+ <input type="radio" name="http_status" value="200" id="200_status"<?php if ($this->httpStatusCodeIs(200)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('HTTP 200 - ok', 'underconstruction');?>
210
+ </label> <br />
211
+ <label title="HTTP301">
212
+ <input type="radio" name="http_status" value="301" id="301_status"<?php if ($this->httpStatusCodeIs(301)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('HTTP 301 - Redirect', 'underconstruction');?> </label> <br />
213
+ <label title="HTTP503">
214
+ <input type="radio" name="http_status" value="503" id="503_status"<?php if ($this->httpStatusCodeIs(503)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('HTTP 503 - Service Unavailable', 'underconstruction');?>
215
+ </label>
216
+ </fieldset>
217
+ <div id="redirect_panel" <?php echo !$this->httpStatusCodeIs(301) ? 'class="hidden"' : '';?>><br />
218
+ <label for="url"><?php _e('Redirect Location:', 'underconstruction');?></label>
219
+ <input type="text" name="url" id="url" value="<?php echo get_option('underConstructionRedirectURL');?>" />
220
+ </div>
221
+ </td>
222
+ </tr>
223
+ <tr>
224
+ <td>
225
+ <h3><?php _e('Restrict By Role', 'underconstruction');?></h3>
226
+ </td>
227
+ </tr>
228
+ <tr>
229
+ <td><?php _e('Only users at or above this level will be able to log in:', 'underconstruction');?>
230
+ <select id="required_role" name="required_role">
231
+ <option value="0"><?php _e('All Users', 'underconstruction');?></option>
232
+ <?php
233
+ $selected = get_option('underConstructionRequiredRole');
234
+ $editable_roles = get_editable_roles();
235
+ //to get rid of Notices "Undefined var"...
236
+ $p = $r = '';
237
+
238
+ foreach ( $editable_roles as $role => $details ) {
239
+ $name = translate_user_role($details['name'] );
240
+ if ( $selected == $role ) // preselect specified role
241
+ $p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>";
242
+ else
243
+ $r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>";
244
+ }
245
+ echo $p . $r;
246
+ ?>
247
+ </select>
248
+ </td>
249
  </tr>
250
+ <tr>
251
+ <td>
252
+ <h3><?php _e('IP Address Whitelist', 'underconstruction');?></h3>
253
+ </td>
254
  </tr>
255
+ <tr>
256
+ <td>
257
+ <?php $whitelist = get_option('underConstructionIPWhitelist');
258
+ if($whitelist && count($whitelist)): ?>
259
+ <select size="4" id="ip_whitelist" name="ip_whitelist" style="width: 250px; height: 100px;">
260
+ <?php for($i = 0; $i < count($whitelist); $i++):?>
261
+ <option id="<?php echo $i; ?>" value="<?php echo $i;?>">
262
+ <?php echo $whitelist[$i];?>
263
+ </option>
264
+ <?php endfor;?>
265
+ </select><br />
266
+
267
+ <input type="submit" value="<?php _e('Remove Selected IP Address', 'underconstruction'); ?>" name="remove_selected_ip_btn" class="button" id="remove_selected_ip_btn" /> <br /> <br />
268
+ <?php endif; ?>
269
+ <label><?php _e('IP Address:', 'underconstruction');?> <input type="text" name="ip_address" id="ip_address" /> </label>
270
+ <a id="add_current_address_btn" style="cursor: pointer;" class="button"><?php _e('Add Current Address', 'underconstruction');?></a>
271
+ <span id="loading_current_address" class="hidden">Loading...</span>
272
+ <br />
273
+ </td>
274
+ </tr>
275
+ <tr>
276
+ <td>
277
+ <h3><?php _e('Display Options', 'underconstruction');?></h3>
278
+ </td>
279
+ </tr>
280
+ <tr>
281
+ <td>
282
+ <fieldset>
283
+ <legend class="screen-reader-text">
284
+ <span><?php _e('Display Options', 'underconstruction');?> </span>
285
+ </legend>
286
+ <label title="<?php _e('Display the default under construction page', 'underconstruction');?>">
287
+ <input type="radio" name="display_options" value="0" id="displayOption0"<?php if ($this->displayStatusCodeIs(0)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display the default under construction page', 'underconstruction');?>
288
+ </label> <br />
289
+ <label title="<?php _e('Display the under construction page that is part of the active theme', 'underconstruction');?>">
290
+ <input <?php if(!$current_theme_has_uc_page): ?>disabled="disabled" <?php endif; ?> type="radio" name="display_options" value="3" id="displayOption3"<?php if ($this->displayStatusCodeIs(3)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display the under construction page that is part of the active theme', 'underconstruction');?>
291
+
292
+ <?php if(!$current_theme_has_uc_page): ?>
293
+ <br /> <em style="margin-left: 24px;"><?php _e('Only available for themes with an under-construction.php file', 'underconstruction');?></em>
294
+ <?php endif; ?>
295
+
296
+ </label> <br />
297
+ <label title="<?php _e('Display the default under construction page, but use custom text', 'underconstruction');?>">
298
+ <input type="radio" name="display_options" value="1" id="displayOption1"<?php if ($this->displayStatusCodeIs(1)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display the default under construction page, but use custom text', 'underconstruction');?>
299
+ </label> <br />
300
+ <label title="<?php _e('Display a custom page using your own HTML', 'underconstruction');?>">
301
+ <input type="radio" name="display_options" value="2" id="displayOption2"<?php if ($this->displayStatusCodeIs(2)) { echo ' checked="checked"'; } ?>>&nbsp;<?php _e('Display a custom page using your own HTML', 'underconstruction');?>
302
+ </label> <br />
303
+ </fieldset>
304
+ </td>
305
  </tr>
306
  </table>
307
+
308
+ <div id="customText"<?php if (!$this->displayStatusCodeIs(1) && !$this->displayStatusCodeIs(2)) { echo ' style="display: none;"'; } ?>>
309
+ <h3><?php _e('Display Custom Text', 'underconstruction');?></h3>
310
+ <p><?php _e('The text here will replace the text on the default page', 'underconstruction');?></p>
311
+ <table>
312
+ <tr valign="top">
313
+ <th scope="row"><label for="pageTitle"> <?php _e('Page Title', 'underconstruction');?> </label></th>
314
+ <td><input name="pageTitle" type="text" id="pageTitle" value="<?php echo $this->getCustomPageTitle(); ?>" class="regular-text" size="50"></td>
315
+ </tr>
316
+ <tr valign="top">
317
+ <th scope="row"><label for="headerText"> <?php _e('Header Text', 'underconstruction');?> </label></th>
318
+ <td><input name="headerText" type="text" id="headerText" value="<?php echo $this->getCustomHeaderText(); ?>" class="regular-text" size="50"></td>
319
+ </tr>
320
+ <tr valign="top">
321
+ <th scope="row"><label for="bodyText"> <?php _e('Body Text', 'underconstruction');?> </label></th>
322
+ <td><?php echo '<textarea rows="2" cols="44" name="bodyText" id="bodyText" class="regular-text">'.trim($this->getCustomBodyText()).'</textarea>'; ?></td>
323
+ </tr>
324
+ </table>
325
+ </div>
326
+
327
+ <div id="customHTML"<?php if (!$this->displayStatusCodeIs(2)) { echo ' style="display: none;"'; } ?>>
328
+ <h3><?php _e('Under Construction Page HTML', 'underconstruction');?></h3>
329
+ <p><?php _e('Put in this area the HTML you want to show up on your front page', 'underconstruction');?></p>
330
+ <?php echo '<textarea name="ucHTML" rows="15" cols="75">'.$this->getCustomHTML().'</textarea>'; ?>
331
+ </div>
332
+
333
+ <p class="submit">
334
+ <?php wp_nonce_field('save_options','save_options_field'); ?>
335
+ <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes', 'underconstruction'); ?>" id="submitChangesToUnderConstructionPlugin" />
336
+ </p>
337
+ </form>
338
+ </div>
339
+
340
+ <div class="under-construction-content-right">
341
+ <div class="under-construction-content-container-right">
342
+ <div class="under-construction-promo-box entry-content">
343
+ <p class="under-construction-promo-box-header">Your one stop WordPress shop</p>
344
+ <ul>
345
+ <li>&#8226; Get the latest WordPress software deals</li>
346
+ <li>&#8226; Plugins, themes, form builders, and more</li>
347
+ <li>&#8226; Shop with confidence; 60-day money-back guarantee</li>
348
+ </ul>
349
+ <div align="center">
350
+ <button onclick="window.open('https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=underconstruction')" class="under-construction-appsumo-capture-container-button" type="submit">Show Me The Deals</button>
351
+ </div>
352
+ </div>
353
+
354
+ <div class="under-construction-promo-box under-construction-promo-box-form entry-content">
355
+ <?php include plugin_dir_path( __FILE__ ).'appsumo-capture-form.php'; ?>
356
+ </div>
357
+ </div>
358
+ </div>
359
+
360
  </div>
underConstruction.php CHANGED
@@ -3,9 +3,9 @@
3
  Plugin Name: Under Construction
4
  Plugin URI: https://wordpress.org/plugins/underconstruction/
5
  Description: Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
6
- Version: 1.18
7
  Author: Noah Kagan
8
- Author URI: http://SumoMe.com/
9
  */
10
 
11
  /*
@@ -24,10 +24,15 @@
24
 
25
  ?>
26
  <?php
 
 
 
 
 
27
  class underConstruction
28
  {
29
  var $installedFolder = "";
30
- var $mainOptionsPage = "underConstructionMainOptions";
31
 
32
  function __construct()
33
  {
@@ -48,6 +53,10 @@ class underConstruction
48
  {
49
  /* Register our script. */
50
  wp_register_script('underConstructionJS', WP_PLUGIN_URL.'/'.$this->installedFolder.'/underconstruction.min.js');
 
 
 
 
51
  }
52
 
53
  function uc_changeMessage()
@@ -320,6 +329,44 @@ class underConstruction
320
  delete_option('underconstruction_global_notification');
321
  }
322
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  }
324
 
325
  $underConstructionPlugin = new underConstruction();
@@ -332,13 +379,16 @@ add_action('wp_login', array($underConstructionPlugin, 'uc_admin_override_WP'));
332
  add_action('plugins_loaded', 'underConstructionInitTranslation');
333
 
334
  add_action('admin_init', array($underConstructionPlugin, 'underConstructionAdminInit'));
335
- add_action('admin_menu', array($underConstructionPlugin, 'uc_adminMenu'));
336
 
337
  register_activation_hook(__FILE__, array($underConstructionPlugin, 'uc_activate'));
338
  register_deactivation_hook(__FILE__, array($underConstructionPlugin, 'uc_deactivate'));
339
  register_uninstall_hook(__FILE__, 'underConstructionPlugin_delete');
340
 
341
 
 
 
 
342
 
343
  function underConstructionPlugin_delete()
344
  {
@@ -357,7 +407,7 @@ function underConstructionPluginLinks($links, $file)
357
  if ($file == basename(dirname(__FILE__)).'/'.basename(__FILE__) && function_exists("admin_url"))
358
  {
359
  //add settings page
360
- $manage_link = '<a href="'.admin_url('options-general.php?page='.$underConstructionPlugin->getMainOptionsPage()).'">'.__('Settings').'</a>';
361
  array_unshift($links, $manage_link);
362
 
363
 
3
  Plugin Name: Under Construction
4
  Plugin URI: https://wordpress.org/plugins/underconstruction/
5
  Description: Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
6
+ Version: 1.19
7
  Author: Noah Kagan
8
+ Author URI: https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=underconstruction
9
  */
10
 
11
  /*
24
 
25
  ?>
26
  <?php
27
+
28
+ if (!defined('UNDERCONSTRUCTION_PLUGIN_DIR')) {
29
+ define('UNDERCONSTRUCTION_PLUGIN_DIR', dirname(__FILE__));
30
+ }
31
+
32
  class underConstruction
33
  {
34
  var $installedFolder = "";
35
+ var $mainOptionsPage = "under-construction";
36
 
37
  function __construct()
38
  {
53
  {
54
  /* Register our script. */
55
  wp_register_script('underConstructionJS', WP_PLUGIN_URL.'/'.$this->installedFolder.'/underconstruction.min.js');
56
+ $this->uc_handle_external_redirects();
57
+
58
+ wp_enqueue_script('under-construction-admin',plugin_dir_url( __FILE__ ). 'scripts/underconstruction-scripts.js',array('jquery'));
59
+ wp_enqueue_style('under-construction-admin-style',plugin_dir_url( __FILE__ ).'styles/underconstruction-style-common.css', array(), '3.1.1');
60
  }
61
 
62
  function uc_changeMessage()
329
  delete_option('underconstruction_global_notification');
330
  }
331
 
332
+ function admin_menu_link() {
333
+ add_menu_page( 'Under Construction', 'Under Construction', 'manage_options', 'under-construction', array(& $this, 'uc_changeMessage'), 'dashicons-hammer');
334
+
335
+ add_submenu_page( 'under-construction', 'Other Tools', 'Other Tools', 'manage_options', 'under-construction-plugin-other-tools', array($this, 'uc_other_tools_page'));
336
+
337
+ add_submenu_page(
338
+ 'under-construction',
339
+ 'Appsumo',
340
+ '<span class="under-construction-sidebar-appsumo-link"><span class="dashicons dashicons-star-filled" style="font-size: 17px"></span> AppSumo</span>',
341
+ 'manage_options',
342
+ 'uc_go_appsumo_pro',
343
+ array($this, 'uc_handle_external_redirects')
344
+ );
345
+
346
+ //add_filter( 'plugin_action_links_' . plugin_basename(__FILE__),array($this, 'uc_filter_plugin_actions'), 10, 2 );
347
+ }
348
+
349
+ function uc_filter_plugin_actions($links, $file) {
350
+ $settings_link = '<a href="admin.php?page=underConstruction">' . __('Settings') . '</a>';
351
+ array_unshift( $links, $settings_link );
352
+
353
+ return $links;
354
+ }
355
+
356
+ function uc_other_tools_page() {
357
+ include(UNDERCONSTRUCTION_PLUGIN_DIR.'/other_tools.php');
358
+ }
359
+
360
+ function uc_handle_external_redirects() {
361
+ if ( empty( $_GET['page'] ) ) {
362
+ return;
363
+ }
364
+
365
+ if ( 'uc_go_appsumo_pro' === $_GET['page'] ) {
366
+ wp_redirect( ( 'https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=underconstruction' ) );
367
+ die;
368
+ }
369
+ }
370
  }
371
 
372
  $underConstructionPlugin = new underConstruction();
379
  add_action('plugins_loaded', 'underConstructionInitTranslation');
380
 
381
  add_action('admin_init', array($underConstructionPlugin, 'underConstructionAdminInit'));
382
+ //add_action('admin_menu', array($underConstructionPlugin, 'uc_adminMenu'));
383
 
384
  register_activation_hook(__FILE__, array($underConstructionPlugin, 'uc_activate'));
385
  register_deactivation_hook(__FILE__, array($underConstructionPlugin, 'uc_deactivate'));
386
  register_uninstall_hook(__FILE__, 'underConstructionPlugin_delete');
387
 
388
 
389
+ add_action("admin_menu", array($underConstructionPlugin, 'admin_menu_link'));
390
+
391
+
392
 
393
  function underConstructionPlugin_delete()
394
  {
407
  if ($file == basename(dirname(__FILE__)).'/'.basename(__FILE__) && function_exists("admin_url"))
408
  {
409
  //add settings page
410
+ $manage_link = '<a href="'.admin_url('?page='.$underConstructionPlugin->getMainOptionsPage()).'">'.__('Settings').'</a>';
411
  array_unshift($links, $manage_link);
412
 
413