Under Construction - Version 2.85

Version Description

  • 2018/02/05
  • involving users into translation efforts
  • no more "rate us" notice
  • we crossed the 1M downloads mark
Download this release

Release Info

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

Code changes from version 2.80 to 2.85

Files changed (72) hide show
  1. css/ucp-admin-plugins.css +1 -1
  2. css/ucp-admin.css +170 -4
  3. images/thumbnails/_pro_clouds.jpg +0 -0
  4. images/thumbnails/_pro_custom.jpg +0 -0
  5. images/thumbnails/_pro_mountain.jpg +0 -0
  6. images/thumbnails/_pro_smoothie.jpg +0 -0
  7. images/thumbnails/_pro_video.jpg +0 -0
  8. images/thumbnails/_pro_watch.jpg +0 -0
  9. images/thumbnails/more_coming_soon.png +0 -0
  10. images/ucp_pro_logo_white.png +0 -0
  11. js/ucp-admin-plugins.js +1 -1
  12. js/ucp-admin-pointers.js +1 -1
  13. js/ucp-admin.js +101 -63
  14. js/ucp-jquery-plugins.js +1 -1
  15. readme.txt +9 -3
  16. themes/ambulance/index.php +1 -1
  17. themes/ambulance/style.css +1 -1
  18. themes/bulldozer/index.php +1 -1
  19. themes/bulldozer/style.css +1 -1
  20. themes/clock/index.php +1 -1
  21. themes/clock/style.css +1 -1
  22. themes/css/common.css +1 -1
  23. themes/cyber_chick/index.php +1 -1
  24. themes/cyber_chick/style.css +1 -1
  25. themes/cyber_chick_dark/index.php +1 -1
  26. themes/cyber_chick_dark/style.css +1 -1
  27. themes/dark/index.php +1 -1
  28. themes/dark/style.css +1 -1
  29. themes/forklift/index.php +1 -1
  30. themes/forklift/style.css +1 -1
  31. themes/hot_air_baloon/index.php +1 -1
  32. themes/hot_air_baloon/style.css +1 -1
  33. themes/iot/index.php +1 -1
  34. themes/iot/style.css +1 -1
  35. themes/laptop/index.php +1 -1
  36. themes/laptop/style.css +1 -1
  37. themes/light_bulb/index.php +1 -1
  38. themes/light_bulb/style.css +1 -1
  39. themes/lighthouse/index.php +1 -1
  40. themes/lighthouse/style.css +1 -1
  41. themes/loader/index.php +1 -1
  42. themes/loader/style.css +1 -1
  43. themes/mad_designer/index.php +1 -1
  44. themes/mad_designer/style.css +1 -1
  45. themes/people/index.php +1 -1
  46. themes/people/style.css +1 -1
  47. themes/people_2/index.php +1 -1
  48. themes/people_2/style.css +1 -1
  49. themes/plain_text/index.php +1 -1
  50. themes/plain_text/style.css +1 -1
  51. themes/puzzles/index.php +1 -1
  52. themes/puzzles/style.css +1 -1
  53. themes/rocket/index.php +1 -1
  54. themes/rocket/style.css +1 -1
  55. themes/rocket_2/index.php +1 -1
  56. themes/rocket_2/style.css +1 -1
  57. themes/sad_site/index.php +1 -1
  58. themes/sad_site/style.css +1 -1
  59. themes/safe/index.php +1 -1
  60. themes/safe/style.css +1 -1
  61. themes/setup/index.php +1 -1
  62. themes/setup/style.css +1 -1
  63. themes/stop/index.php +1 -1
  64. themes/stop/style.css +1 -1
  65. themes/under_construction/index.php +1 -1
  66. themes/under_construction/style.css +1 -1
  67. themes/under_construction_text/index.php +1 -1
  68. themes/under_construction_text/style.css +1 -1
  69. themes/windmill/index.php +1 -1
  70. themes/windmill/style.css +1 -1
  71. ucp-license.php +183 -0
  72. under-construction.php +402 -181
css/ucp-admin-plugins.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Backend CSS - plugin deactivation survey
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
  .ui-widget-overlay {
1
  /*
2
  * UnderConstructionPage
3
  * Backend CSS - plugin deactivation survey
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
  .ui-widget-overlay {
css/ucp-admin.css CHANGED
@@ -100,7 +100,53 @@ a.reset-settings.button:hover {
100
  max-width: 300px;
101
  }
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  div.ucp-thumb, div.ucp-thumb-special {
 
104
  max-width: 300px;
105
  width: calc(31% - 20px);
106
  margin: 0 10px 5px 0;
@@ -570,12 +616,11 @@ Any+Time is a trademark of Andrew M. Andrews III */
570
  display: inline-block;
571
  width: 32%;
572
  background: rgba(128, 128, 128, 0.03);
573
- margin: 0 5px 30px 5px;
574
  padding: 10px;
575
  box-sizing: border-box;
576
  vertical-align: top;
577
  position: relative;
578
- min-width: 300px;
579
  border-top: 1px solid rgba(255, 121, 0, 0.54);
580
  }
581
 
@@ -617,10 +662,10 @@ Any+Time is a trademark of Andrew M. Andrews III */
617
  }
618
 
619
  .gmw-pro-feature p {
620
- margin-bottom: 0;
621
  text-align: justify;
622
  }
623
-
624
  h3.ucp-pro-logo {
625
  font-variant: small-caps;
626
  font-family: Roboto, sans-serif;
@@ -639,3 +684,124 @@ h3.ucp-pro-logo span {
639
  vertical-align: super;
640
  font-size: smaller;
641
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  max-width: 300px;
101
  }
102
 
103
+ div.ucp-thumb .ribbon {
104
+ width: 100px;
105
+ height: 100px;
106
+ overflow: hidden;
107
+ position: absolute;
108
+ top: 0;
109
+ right: 0;
110
+ }
111
+ div.ucp-thumb .ribbon::before,
112
+ div.ucp-thumb .ribbon::after {
113
+ position: absolute;
114
+ z-index: -1;
115
+ content: '';
116
+ display: block;
117
+ }
118
+ div.ucp-thumb .ribbon i {
119
+ position: absolute;
120
+ display: inline-block;
121
+ width: 106px;
122
+ padding: 22px 0px 6px 9px;
123
+ background-color: #ff7900e6;
124
+ box-shadow: 0 5px 10px rgba(0,0,0,.1);
125
+ color: #fff;
126
+ font: 700 18px/1 'Lato', sans-serif;
127
+ text-shadow: 0 1px 1px rgba(0,0,0,.2);
128
+ text-transform: uppercase;
129
+ text-align: center;
130
+ left: 25px;
131
+ top: -11px;
132
+ transform: rotate(45deg);
133
+ }
134
+ div.ucp-thumb .ribbon::before,
135
+ div.ucp-thumb .ribbon::after {
136
+ border-top-color: transparent;
137
+ border-right-color: transparent;
138
+ }
139
+ div.ucp-thumb .ribbon::before {
140
+ top: 0;
141
+ left: 0;
142
+ }
143
+ div.ucp-thumb .ribbon::after {
144
+ bottom: 0;
145
+ right: 0;
146
+ }
147
+
148
  div.ucp-thumb, div.ucp-thumb-special {
149
+ position: relative;
150
  max-width: 300px;
151
  width: calc(31% - 20px);
152
  margin: 0 10px 5px 0;
616
  display: inline-block;
617
  width: 32%;
618
  background: rgba(128, 128, 128, 0.03);
619
+ margin: 0 5px 20px 5px;
620
  padding: 10px;
621
  box-sizing: border-box;
622
  vertical-align: top;
623
  position: relative;
 
624
  border-top: 1px solid rgba(255, 121, 0, 0.54);
625
  }
626
 
662
  }
663
 
664
  .gmw-pro-feature p {
665
+ margin: 10px 0 0 0;
666
  text-align: justify;
667
  }
668
+
669
  h3.ucp-pro-logo {
670
  font-variant: small-caps;
671
  font-family: Roboto, sans-serif;
684
  vertical-align: super;
685
  font-size: smaller;
686
  }
687
+
688
+ /* upsell dialog */
689
+ .ucp-upsell-dialog .ui-dialog-titlebar {
690
+ background: #ff7900;
691
+ text-align: center;
692
+ height: 55px;
693
+ }
694
+ .ucp-upsell-dialog .ui-dialog-titlebar img {
695
+ height: 32px;
696
+ display: inline-block;
697
+ margin: 11px 0 0 0;
698
+ }
699
+ .ucp-upsell-dialog .ui-dialog-titlebar-close {
700
+ color: #fff;
701
+ height: 55px;
702
+ }
703
+ .ucp-upsell-dialog .ui-dialog-titlebar-close:hover {
704
+ color: #333;
705
+ }
706
+ .ucp-upsell-dialog .ui-dialog-content {
707
+ padding: 0;
708
+ }
709
+ .ucp-upsell-dialog .ui-tabs-nav {
710
+ text-align: center;
711
+ }
712
+ .ucp-upsell-dialog .ui-tabs .upsell-tab {
713
+ padding: 20px 15px;
714
+ text-align: center;
715
+ }
716
+ .ucp-upsell-dialog a {
717
+ color: #333;
718
+ }
719
+ .ucp-upsell-dialog a:hover {
720
+ color: #000;
721
+ }
722
+ #ucp-pricing-table, #ucp-pricing-table tr, #ucp-pricing-table td, #ucp-pricing-table h3 {
723
+ margin: 0;
724
+ padding: 0;
725
+ border: 0;
726
+ border-spacing: 0;
727
+ border-collapse: collapse;
728
+ }
729
+ #ucp-pricing-table tr:first-child td {
730
+ background-color: #ff7900;
731
+ padding: 10px;
732
+ text-align: center;
733
+ width: 33%;
734
+ }
735
+ #ucp-pricing-table tr:last-child td {
736
+ border-top: 2px solid #ff7900;
737
+ border-bottom: none;
738
+ }
739
+ #ucp-pricing-table h3 {
740
+ color: #fff;
741
+ font-size: 24px;
742
+ font-weight: bold;
743
+ line-height: 105%;
744
+ }
745
+ #ucp-pricing-table td {
746
+ padding: 8px 15px;
747
+ border-bottom: solid thin #ff7900;
748
+ text-align: center;
749
+ background-color: rgba(128, 128, 128, 0.03);
750
+ }
751
+ #ucp-pricing-table tr td:first-child {
752
+ border-right: 10px solid #fff;
753
+ }
754
+ #ucp-pricing-table tr td:last-child {
755
+ border-left: 10px solid #fff;
756
+ }
757
+ #ucp-pricing-table .dashicons {
758
+ color: #ff7900;
759
+ }
760
+ #ucp-pricing-table .dashicons.dashicons-no {
761
+ color: #000;
762
+ }
763
+ #ucp-pricing-table .hover {
764
+ background-color: #fff;
765
+ }
766
+ #ucp-pricing-table .promo-button {
767
+ color: #fff;
768
+ background: #ff7900;
769
+ padding: 10px 5px;
770
+ margin: 0px 0 10px 0;
771
+ text-align: center;
772
+ display: block;
773
+ text-decoration: none;
774
+ font-weight: bolder;
775
+ font-size: 22px;
776
+ line-height: 120%;
777
+ }
778
+ #ucp-pricing-table .promo-button del {
779
+ color: #333;
780
+ }
781
+ #ucp-pricing-table .promo-button:hover {
782
+ background-color: #d5661c;
783
+ }
784
+ #ucp-pricing-table .instant-download {
785
+ text-align: center;
786
+ display: inline-block;
787
+ font-style: italic;
788
+ margin: 0 -5px 0 -5px;
789
+ }
790
+ #ucp-pricing-table .promo-button small {
791
+ font-size: x-small;
792
+ line-height: 0px;
793
+ }
794
+ .upsell-footer {
795
+ padding: 20px;
796
+ box-sizing: border-box;
797
+ text-align: center;
798
+ margin: 20px -15px -20px -15px;
799
+ background-color: rgba(128, 128, 128, 0.03);
800
+ }
801
+ #tab-upsell-features .upsell-footer {
802
+ margin-top: 0;
803
+ }
804
+ option.ucp-promo {
805
+ color: #e14d43;
806
+ }
807
+ /* upsell dialog */
images/thumbnails/_pro_clouds.jpg ADDED
Binary file
images/thumbnails/_pro_custom.jpg ADDED
Binary file
images/thumbnails/_pro_mountain.jpg ADDED
Binary file
images/thumbnails/_pro_smoothie.jpg ADDED
Binary file
images/thumbnails/_pro_video.jpg ADDED
Binary file
images/thumbnails/_pro_watch.jpg ADDED
Binary file
images/thumbnails/more_coming_soon.png DELETED
Binary file
images/ucp_pro_logo_white.png ADDED
Binary file
js/ucp-admin-plugins.js CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Plugin deactivation survey
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Plugin deactivation survey
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
js/ucp-admin-pointers.js CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Backend GUI pointers
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Backend GUI pointers
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
js/ucp-admin.js CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Main backend JS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
@@ -15,23 +15,16 @@ jQuery(document).ready(function($) {
15
  },
16
  active: Cookies.get('ucp_tabs')
17
  }).show();
18
-
19
- // init 2nd level of tabs
20
  $('.ucp-tabs-2nd-level').each(function() {
21
  $(this).tabs({
22
  activate: function(event, ui) {
23
  Cookies.set($(this).attr('id'), $(this).tabs('option', 'active'), { expires: 365 });
24
  },
25
  active: Cookies.get($(this).attr('id'))
26
- });
27
  });
28
-
29
- // shortcut to urgent support from deactivate dialog
30
- if (parent.location.hash == '#support') {
31
- $('#ucp_tabs').tabs('option', 'active', 4);
32
- $('#tabs_support').tabs('option', 'active', 1);
33
- parent.location.hash = '';
34
- }
35
 
36
  // init select2
37
  $('#whitelisted_users').select2({ 'placeholder': ucp.whitelisted_users_placeholder});
@@ -95,7 +88,7 @@ jQuery(document).ready(function($) {
95
 
96
  answers = $('.question-wrapper.selected').data('value');
97
  answers += '-' + $('.question-wrapper').index($('.question-wrapper.selected'));
98
-
99
  $.post(ajaxurl, { survey: $(this).data('survey'),
100
  answers: answers,
101
  emailme: $('#features-survey-dialog #emailme:checked').val(),
@@ -110,7 +103,7 @@ jQuery(document).ready(function($) {
110
  return false;
111
  });
112
 
113
-
114
  // send support message
115
  $('#ucp-send-support-message').on('click', function(e) {
116
  e.preventDefault();
@@ -131,7 +124,6 @@ jQuery(document).ready(function($) {
131
  button.addClass('loading');
132
  $.post(ajaxurl, { support_email: $('#support_email').val(),
133
  support_message: $('#support_message').val(),
134
- support_priority: $('#support_priority').val(),
135
  support_info: $('#support_info:checked').val(),
136
  _ajax_nonce: ucp.nonce_submit_support_message,
137
  action: 'ucp_submit_support_message'},
@@ -149,44 +141,7 @@ jQuery(document).ready(function($) {
149
 
150
  return false;
151
  });
152
-
153
-
154
- // get on earlybird list
155
- $('#ucp-earlybird-submit').on('click', function(e) {
156
- e.preventDefault();
157
- button = $(this);
158
-
159
- if ($('#ucp-earlybird-email').val().length < 5 || $('#ucp-earlybird-email').is(':invalid')) {
160
- alert('Please double-check your email.');
161
- $('#ucp-earlybird-email').select().focus();
162
- return false;
163
- }
164
 
165
- if ($('#ucp-earlybird-type').val() == '0') {
166
- alert('Please tell us how you use UCP.');
167
- $('#ucp-earlybird-type').select().focus();
168
- return false;
169
- }
170
-
171
- button.addClass('loading');
172
- $.post(ajaxurl, { email: $('#ucp-earlybird-email').val(),
173
- type: $('#ucp-earlybird-type').val(),
174
- _ajax_nonce: ucp.nonce_submit_earlybird,
175
- action: 'ucp_submit_earlybird'},
176
- function(data) {
177
- if (data.success) {
178
- alert('You\'re on the list ;) Expect an email from us soon!');
179
- } else {
180
- alert(data.message);
181
- }
182
- }).fail(function() {
183
- alert('Something is not right. Please reload the page and try again');
184
- }).always(function() {
185
- button.removeClass('loading');
186
- });
187
-
188
- return false;
189
- }); // earlybird list
190
 
191
  // fix for enter press in support email
192
  $('#support_email').on('keypress', function(e) {
@@ -196,11 +151,14 @@ jQuery(document).ready(function($) {
196
  return false;
197
  }
198
  }); // if enter on support email
199
-
200
  // select theme via thumb
201
  $('.ucp-thumb').on('click', function(e) {
202
- e.preventDefault();
 
 
203
 
 
204
  theme_id = $(this).data('theme-id');
205
  $('.ucp-thumb').removeClass('active');
206
  $(this).addClass('active');
@@ -223,7 +181,7 @@ jQuery(document).ready(function($) {
223
  return false;
224
  });
225
 
226
-
227
  $('#ga_tracking_id_toggle').on('change', function(e, is_triggered) {
228
  if ($(this).is(':checked')) {
229
  if (is_triggered) {
@@ -239,7 +197,7 @@ jQuery(document).ready(function($) {
239
  }
240
  }
241
  }).triggerHandler('change', true);
242
-
243
  $('#end_date_toggle').on('change', function(e, is_triggered) {
244
  if ($(this).is(':checked')) {
245
  if (is_triggered) {
@@ -255,17 +213,17 @@ jQuery(document).ready(function($) {
255
  }
256
  }
257
  }).triggerHandler('change', true);
258
-
259
-
260
  $('.settings_page_ucp .wrap').on('click', '.reset-settings', function(e) {
261
  if (!confirm('Are you sure you want to reset all UCP settings to their default values? There is NO undo.')) {
262
  e.preventDefault();
263
  return false;
264
  }
265
-
266
  return true;
267
  }); // reset-settings
268
-
269
 
270
  // warning if there are unsaved changes when previewing
271
  $('.settings_page_ucp .wrap').on('click', '#ucp_preview', function(e) {
@@ -275,11 +233,11 @@ jQuery(document).ready(function($) {
275
  return false;
276
  }
277
  }
278
-
279
  return true;
280
  });
281
-
282
-
283
  // check if there are invalid fields
284
  // assume they are social icons
285
  $('.settings_page_ucp .wrap').on('click', '#submit', function(e) {
@@ -287,7 +245,7 @@ jQuery(document).ready(function($) {
287
  $('#ucp_tabs').tabs('option', 'active', 2);
288
  $('#ucp_form input:invalid').first().focus();
289
  alert('Please correct the errors before saving.');
290
-
291
  return false;
292
  }
293
 
@@ -314,6 +272,86 @@ jQuery(document).ready(function($) {
314
  $.scrollTo('#' + target, 500, {offset: {top:-50, left:0}});
315
  }
316
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  }); // on ready
318
 
319
 
1
  /*
2
  * UnderConstructionPage
3
  * Main backend JS
4
+ * (c) Web factory Ltd, 2015 - 2018
5
  */
6
 
7
 
15
  },
16
  active: Cookies.get('ucp_tabs')
17
  }).show();
18
+
19
+ // init 2nd level of tabs
20
  $('.ucp-tabs-2nd-level').each(function() {
21
  $(this).tabs({
22
  activate: function(event, ui) {
23
  Cookies.set($(this).attr('id'), $(this).tabs('option', 'active'), { expires: 365 });
24
  },
25
  active: Cookies.get($(this).attr('id'))
26
+ });
27
  });
 
 
 
 
 
 
 
28
 
29
  // init select2
30
  $('#whitelisted_users').select2({ 'placeholder': ucp.whitelisted_users_placeholder});
88
 
89
  answers = $('.question-wrapper.selected').data('value');
90
  answers += '-' + $('.question-wrapper').index($('.question-wrapper.selected'));
91
+
92
  $.post(ajaxurl, { survey: $(this).data('survey'),
93
  answers: answers,
94
  emailme: $('#features-survey-dialog #emailme:checked').val(),
103
  return false;
104
  });
105
 
106
+
107
  // send support message
108
  $('#ucp-send-support-message').on('click', function(e) {
109
  e.preventDefault();
124
  button.addClass('loading');
125
  $.post(ajaxurl, { support_email: $('#support_email').val(),
126
  support_message: $('#support_message').val(),
 
127
  support_info: $('#support_info:checked').val(),
128
  _ajax_nonce: ucp.nonce_submit_support_message,
129
  action: 'ucp_submit_support_message'},
141
 
142
  return false;
143
  });
 
 
 
 
 
 
 
 
 
 
 
 
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
  // fix for enter press in support email
147
  $('#support_email').on('keypress', function(e) {
151
  return false;
152
  }
153
  }); // if enter on support email
154
+
155
  // select theme via thumb
156
  $('.ucp-thumb').on('click', function(e) {
157
+ if ($(this).hasClass('ucp-thumb-pro')) {
158
+ return true;
159
+ }
160
 
161
+ e.preventDefault();
162
  theme_id = $(this).data('theme-id');
163
  $('.ucp-thumb').removeClass('active');
164
  $(this).addClass('active');
181
  return false;
182
  });
183
 
184
+
185
  $('#ga_tracking_id_toggle').on('change', function(e, is_triggered) {
186
  if ($(this).is(':checked')) {
187
  if (is_triggered) {
197
  }
198
  }
199
  }).triggerHandler('change', true);
200
+
201
  $('#end_date_toggle').on('change', function(e, is_triggered) {
202
  if ($(this).is(':checked')) {
203
  if (is_triggered) {
213
  }
214
  }
215
  }).triggerHandler('change', true);
216
+
217
+
218
  $('.settings_page_ucp .wrap').on('click', '.reset-settings', function(e) {
219
  if (!confirm('Are you sure you want to reset all UCP settings to their default values? There is NO undo.')) {
220
  e.preventDefault();
221
  return false;
222
  }
223
+
224
  return true;
225
  }); // reset-settings
226
+
227
 
228
  // warning if there are unsaved changes when previewing
229
  $('.settings_page_ucp .wrap').on('click', '#ucp_preview', function(e) {
233
  return false;
234
  }
235
  }
236
+
237
  return true;
238
  });
239
+
240
+
241
  // check if there are invalid fields
242
  // assume they are social icons
243
  $('.settings_page_ucp .wrap').on('click', '#submit', function(e) {
245
  $('#ucp_tabs').tabs('option', 'active', 2);
246
  $('#ucp_form input:invalid').first().focus();
247
  alert('Please correct the errors before saving.');
248
+
249
  return false;
250
  }
251
 
272
  $.scrollTo('#' + target, 500, {offset: {top:-50, left:0}});
273
  }
274
  });
275
+
276
+
277
+ // upsell dialog init
278
+ $('#upsell-dialog').dialog({'dialogClass': 'wp-dialog ucp-dialog ucp-upsell-dialog',
279
+ 'modal': 1,
280
+ 'resizable': false,
281
+ 'title': 'asdasd <b>asdasd</b>',
282
+ 'zIndex': 9999,
283
+ 'width': 900,
284
+ 'height': 'auto',
285
+ 'show': 'fade',
286
+ 'hide': 'fade',
287
+ 'open': function(event, ui) {
288
+ ucp_fix_dialog_close(event, ui);
289
+ $(this).siblings().find('span.ui-dialog-title').html(ucp.dialog_upsell_title);
290
+ },
291
+ 'close': function(event, ui) { },
292
+ 'autoOpen': false,
293
+ 'closeOnEscape': true
294
+ });
295
+ $(window).resize(function(e){
296
+ $('#upsell-dialog').dialog("option", "position", {my: "center", at: "center", of: window});
297
+ });
298
+
299
+ // zebra on pricing table, per column
300
+ $('#ucp-pricing-table').find('tr').each(function() {
301
+ $(this).find('td').eq(1).addClass('hover');
302
+ });
303
+
304
+ $('.settings_page_ucp').on('click change', '.open-ucp-upsell', function(e) {
305
+ if ($(this).is('select') && $(this).val() != '-1') {
306
+ return true;
307
+ }
308
+
309
+ e.preventDefault();
310
+
311
+ if (ucp.is_activated) {
312
+ $('#ucp_tabs').tabs('option', 'active', 5);
313
+ $.scrollTo('#license_key');
314
+ $('#license_key').focus();
315
+
316
+ return;
317
+ }
318
+
319
+ if ($(this).is('select')) {
320
+ $(this).find('option').attr('selected', '');
321
+ $(this).find('option:first').attr('selected', 'selected');
322
+ }
323
+ $(this).blur();
324
+
325
+ $('#upsell-dialog').dialog('open');
326
+
327
+ if ($(this).data('tab') == 'buy') {
328
+ $('#tabs_upsell').tabs('option', 'active', 0);
329
+ }
330
+ if ($(this).data('tab') == 'features') {
331
+ $('#tabs_upsell').tabs('option', 'active', 1);
332
+ }
333
+
334
+ return false;
335
+ });
336
+
337
+ $('#tabs_upsell').on('tabsactivate', function(event, ui) {
338
+ $('#upsell-dialog').dialog("option", "position", {my: "center", at: "center", of: window});
339
+ });
340
+
341
+ $('.settings_page_ucp').on('click', '.go-to-license-key', function(e) {
342
+ $('#upsell-dialog').dialog('close');
343
+ $('#ucp_tabs').tabs('option', 'active', 5);
344
+ $.scrollTo('#license_key');
345
+ $('#license_key').focus();
346
+ });
347
+
348
+ $('#license_key').on('keypress', function(e) {
349
+ if (e.which == 13) {
350
+ e.preventDefault();
351
+ $('#license-submit').trigger('click');
352
+ return false;
353
+ }
354
+ });
355
  }); // on ready
356
 
357
 
js/ucp-jquery-plugins.js CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * jQuery plugins
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
  /**
1
  /*
2
  * UnderConstructionPage
3
  * jQuery plugins
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: maintenance mode, maintenance page, coming soon page, landing page, under
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 4.9
7
- Stable tag: 2.80
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -13,11 +13,11 @@ The fastest & simplest Under Construction Page, Landing Page, Maintenance Mode &
13
 
14
  == Description ==
15
 
16
- Create an Under Construction Page, Maintenance Mode Page or a Landing Page that takes **less than a minute to install & configure**. This plugin won't waste your time! UCP is simple, fast, efficient & user-friendly with <a href="https://underconstructionpage.com/">great designs</a>.
17
 
18
  [youtube https://www.youtube.com/watch?v=fqqWrQENSDc]
19
 
20
- > > **PRO** version offers more than 100 extra features and options including the drag&drop builder, 300,000+ searchable images, 100+ templates, affiliate&traffic tracking, advanced access control, MailChimp, Zapier & universal autoresponder integration, and priority USA based support. Find out more on the <a href="https://underconstructionpage.com/">official plugin site</a>.
21
 
22
  A simple, no-nonsense plugin for all those situations when you have to hide the site behind an Under Construction page for a while. Live examples are available on the <a href="https://underconstructionpage.com/" rel="friend">Under Construction website</a>. Give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a> or check out the <a href="https://youtu.be/fqqWrQENSDc">video</a>.
23
 
@@ -124,6 +124,12 @@ Or if needed, upload manually;
124
 
125
  == Changelog ==
126
 
 
 
 
 
 
 
127
  = 2.80 =
128
  * 2017/12/05
129
  * translation efforts are still in full swing
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 4.9
7
+ Stable tag: 2.85
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
 
14
  == Description ==
15
 
16
+ Create an Under Construction Page, Maintenance Mode Page, Coming Soon Page or a Landing Page that takes **less than a minute to install & configure**. This plugin won't waste your time! UCP is simple, fast, efficient & user-friendly with <a href="https://underconstructionpage.com/">great designs</a>.
17
 
18
  [youtube https://www.youtube.com/watch?v=fqqWrQENSDc]
19
 
20
+ > > **PRO** version offers more than 100 extra features and options including the drag&drop builder, 400,000+ hi-res searchable images, 100+ templates, affiliate&traffic tracking, advanced access control, MailChimp, Zapier & universal autoresponder integration, and priority USA based support. Find out more on the <a href="https://underconstructionpage.com/">official plugin site</a>.
21
 
22
  A simple, no-nonsense plugin for all those situations when you have to hide the site behind an Under Construction page for a while. Live examples are available on the <a href="https://underconstructionpage.com/" rel="friend">Under Construction website</a>. Give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a> or check out the <a href="https://youtu.be/fqqWrQENSDc">video</a>.
23
 
124
 
125
  == Changelog ==
126
 
127
+ = 2.85 =
128
+ * 2018/02/05
129
+ * involving users into translation efforts
130
+ * no more "rate us" notice
131
+ * we crossed the 1M downloads mark
132
+
133
  = 2.80 =
134
  * 2017/12/05
135
  * translation efforts are still in full swing
themes/ambulance/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Ambulance theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Ambulance theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/ambulance/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Ambulance theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Ambulance theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/bulldozer/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Bulldozer theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Bulldozer theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/bulldozer/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Bulldozer theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Bulldozer theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/clock/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Clock theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Clock theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/clock/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Clock CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Clock CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/css/common.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Common frontend CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Common frontend CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/cyber_chick/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Chyber Chick theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Chyber Chick theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/cyber_chick/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Cyber Chick theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Cyber Chick theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/cyber_chick_dark/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Cyber Chick Dark theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Cyber Chick Dark theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/cyber_chick_dark/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Cyber Chick Dark theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Cyber Chick Dark theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/dark/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Things Went Dark theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Things Went Dark theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/dark/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Things Went Dark theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Things Went Dark theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/forklift/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Forklift theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Forklift theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/forklift/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Forklift theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Forklift theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/hot_air_baloon/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Hot Air Baloon theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Hot Air Baloon theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/hot_air_baloon/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Hot Air Baloon theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Hot Air Baloon theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/iot/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Internet of Things theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Internet of Things theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/iot/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Internet of Things theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Internet of Things theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/laptop/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Laptop theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Laptop theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/laptop/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Laptop theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Laptop theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/light_bulb/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Light Bulb theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Light Bulb theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/light_bulb/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Light Bulb theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Light Bulb theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/lighthouse/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Lighthouse theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Lighthouse theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/lighthouse/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Lighthouse theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Lighthouse theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/loader/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Loader theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Loader theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/loader/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Loader theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Loader theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/mad_designer/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Mad Designer theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Mad Designer theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/mad_designer/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Mad Designer theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Mad Designer theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/people/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * People at Work theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * People at Work theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/people/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * People at Work theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * People at Work theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/people_2/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * People at Work #2 theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * People at Work #2 theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/people_2/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * People at Work #2 theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * People at Work #2 theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/plain_text/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Plain Text theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Plain Text theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/plain_text/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Plain Text theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Plain Text theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/puzzles/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Puzzles theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Puzzles theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/puzzles/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Puzzles theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Puzzles theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/rocket/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Rocket theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Rocket theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/rocket/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Rocket theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Rocket theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/rocket_2/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Rocket #2 theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Rocket #2 theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/rocket_2/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Rocket #2 theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Rocket #2 theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/sad_site/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Sad Site theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Sad Site theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/sad_site/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Sad Site theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Sad Site theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/safe/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Safe theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Safe theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/safe/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Safe theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Safe theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/setup/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Setup theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Setup theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/setup/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Setup theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Setup theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/stop/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Stop theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Stop theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/stop/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Stop theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Stop theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/under_construction/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Under Construction theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Under Construction theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/under_construction/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Under Construction theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Under Construction theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/under_construction_text/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Under Construction Text theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Under Construction Text theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/under_construction_text/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Under Construction Text theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Under Construction Text theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
themes/windmill/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * UnderConstructionPage
4
  * Windmill theme
5
- * (c) Web factory Ltd, 2015 - 2017
6
  */
7
 
8
 
2
  /*
3
  * UnderConstructionPage
4
  * Windmill theme
5
+ * (c) WebFactory Ltd, 2015 - 2018
6
  */
7
 
8
 
themes/windmill/style.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * UnderConstructionPage
3
  * Windmill theme CSS
4
- * (c) Web factory Ltd, 2015 - 2017
5
  */
6
 
7
 
1
  /*
2
  * UnderConstructionPage
3
  * Windmill theme CSS
4
+ * (c) WebFactory Ltd, 2015 - 2018
5
  */
6
 
7
 
ucp-license.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * UnderConstructionPage
5
+ * PRO license related functions
6
+ * (c) WebFactory Ltd, 2015 - 2018
7
+ */
8
+
9
+ class UCP_license extends UCP {
10
+ // hook things up
11
+ static function init() {
12
+ if (is_admin()) {
13
+ add_filter('pre_set_site_transient_update_plugins', array(__CLASS__, 'update_filter'));
14
+ add_filter('plugins_api', array(__CLASS__, 'update_details'), 100, 3);
15
+ }
16
+ } // init
17
+
18
+
19
+ // get plugin info for lightbox
20
+ static function update_details($result, $action, $args) {
21
+ if (!self::is_activated()) {
22
+ return $result;
23
+ }
24
+
25
+ static $response = false;
26
+ $options = parent::get_options();
27
+ $plugin = 'under-construction-page';
28
+
29
+ if ($action != 'plugin_information' || empty($args->slug) || ($args->slug != $plugin)) {
30
+ return $result;
31
+ }
32
+
33
+ if(empty($response) || is_wp_error($response)) {
34
+ $request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
35
+ $request_args = array('action' => 'plugin_information',
36
+ 'request_details' => serialize($args),
37
+ 'timestamp' => time(),
38
+ 'codebase' => 'free',
39
+ 'version' => parent::$version,
40
+ 'license_key' => $options['license_key'],
41
+ 'license_expires' => $options['license_expires'],
42
+ 'license_type' => $options['license_type'],
43
+ 'license_active' => $options['license_active'],
44
+ 'site' => get_home_url());
45
+
46
+ $url = add_query_arg($request_args, parent::$licensing_servers[0]);
47
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
48
+
49
+ if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {
50
+ $url = add_query_arg($request_args, parent::$licensing_servers[1]);
51
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
52
+ }
53
+ } // if !$response
54
+
55
+ if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {
56
+ $res = new WP_Error('plugins_api_failed', __('An unexpected HTTP error occurred during the API request.', 'under-construction-page'), $response->get_error_message());
57
+ } else {
58
+ $res = json_decode(wp_remote_retrieve_body($response), false);
59
+
60
+ if (!is_object($res)) {
61
+ $res = new WP_Error('plugins_api_failed', __('Invalid API respone.', 'under-construction-page'), wp_remote_retrieve_body($response));
62
+ } else {
63
+ $res->sections = (array) $res->sections;
64
+ $res->banners = (array) $res->banners;
65
+ $res->icons = (array) $res->icons;
66
+ }
67
+ }
68
+
69
+ return $res;
70
+ } // update_details
71
+
72
+ // get info on new plugin version if one exists
73
+ static function update_filter($current) {
74
+ if (!self::is_activated()) {
75
+ return $current;
76
+ }
77
+
78
+ static $response = false;
79
+ $options = parent::get_options();
80
+ $plugin = 'under-construction-page/under-construction.php';
81
+
82
+ if(empty($response) || is_wp_error($response)) {
83
+ $request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
84
+ $request_args = array('action' => 'update_info',
85
+ 'timestamp' => time(),
86
+ 'codebase' => 'free',
87
+ 'version' => parent::$version,
88
+ 'license_key' => $options['license_key'],
89
+ 'license_expires' => $options['license_expires'],
90
+ 'license_type' => $options['license_type'],
91
+ 'license_active' => $options['license_active'],
92
+ 'site' => get_home_url());
93
+
94
+ $url = add_query_arg($request_args, parent::$licensing_servers[0]);
95
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
96
+
97
+ if (is_wp_error($response)) {
98
+ $url = add_query_arg($request_args, parent::$licensing_servers[1]);
99
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
100
+ }
101
+ } // if !$response
102
+
103
+ if (!is_wp_error($response) && wp_remote_retrieve_body($response)) {
104
+ $data = json_decode(wp_remote_retrieve_body($response), false);
105
+ if (empty($current)) {
106
+ $current = new stdClass();
107
+ }
108
+ if (empty($current->response)) {
109
+ $current->response = array();
110
+ }
111
+ if (!empty($data) && is_object($data)) {
112
+ $data->icons = (array) $data->icons;
113
+ $data->banners = (array) $data->banners;
114
+ $current->response[$plugin] = $data;
115
+ }
116
+ }
117
+
118
+ return $current;
119
+ } // update_filter
120
+
121
+
122
+ // check if license key is valid and not expired
123
+ static function is_activated() {
124
+ $options = parent::get_options();
125
+
126
+ if (!empty($options['license_active']) && $options['license_active'] === true &&
127
+ !empty($options['license_expires']) && $options['license_expires'] >= date('Y-m-d')) {
128
+ return true;
129
+ } else {
130
+ return false;
131
+ }
132
+ } // is_activated
133
+
134
+
135
+ // check if activation code is valid
136
+ static function validate_license_key($code) {
137
+ $out = array('success' => false, 'license_active' => false, 'license_key' => $code, 'error' => '', 'license_type' => '', 'license_expires' => '1900-01-01');
138
+ $result = self::query_licensing_server('validate_license', array('license_key' => $code));
139
+
140
+ if (false === $result) {
141
+ $out['error'] = 'Unable to contact licensing server. Please try again in a few moments.';
142
+ } elseif (!is_array($result['data']) || sizeof($result['data']) != 4) {
143
+ $out['error'] = 'Invalid response from licensing server. Please try again later.';
144
+ } else {
145
+ $out['success'] = true;
146
+ $out = array_merge($out, $result['data']);
147
+ }
148
+
149
+ return $out;
150
+ } // validate_license_key
151
+
152
+
153
+ // run any query on licensing server
154
+ static function query_licensing_server($action, $data = array(), $method = 'GET', $array_response = true) {
155
+ $options = parent::get_options();
156
+ $request_params = array('sslverify' => false, 'timeout' => 25, 'redirection' => 2);
157
+ $default_data = array('license_key' => $options['license_key'],
158
+ 'code_base' => 'free',
159
+ '_rand' => rand(1000, 9999),
160
+ 'version' => self::$version,
161
+ 'site' => get_home_url());
162
+
163
+ $request_data = array_merge($default_data, $data, array('action' => $action));
164
+
165
+ $url = add_query_arg($request_data, parent::$licensing_servers[0]);
166
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
167
+
168
+ if (is_wp_error($response) || !($body = wp_remote_retrieve_body($response)) || !($result = @json_decode($body, $array_response))) {
169
+ $url = add_query_arg($request_data, parent::$licensing_servers[1]);
170
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
171
+ $body = wp_remote_retrieve_body($response);
172
+ $result = @json_decode($body, $array_response);
173
+ }
174
+
175
+ $result['success'] = true;
176
+
177
+ if (!is_array($result) || !isset($result['success'])) {
178
+ return false;
179
+ } else {
180
+ return $result;
181
+ }
182
+ } // query_licensing_server
183
+ } // class UCP_license
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: Web factory Ltd
7
- Version: 2.80
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -40,6 +40,10 @@ define('UCP_POINTERS_KEY', 'ucp_pointers');
40
  define('UCP_NOTICES_KEY', 'ucp_notices');
41
  define('UCP_SURVEYS_KEY', 'ucp_surveys');
42
 
 
 
 
 
43
  // main plugin class
44
  class UCP {
45
  static $version = 0;
@@ -93,7 +97,7 @@ class UCP {
93
  add_action('wp_ajax_ucp_submit_survey', array(__CLASS__, 'submit_survey_ajax'));
94
  add_action('wp_ajax_ucp_submit_earlybird', array(__CLASS__, 'submit_earlybird_ajax'));
95
  add_action('wp_ajax_ucp_submit_support_message', array(__CLASS__, 'submit_support_message_ajax'));
96
-
97
  // uninstall survey on plugins page
98
  add_action('admin_footer-plugins.php', array(__CLASS__, 'footer_plugins'));
99
  } else {
@@ -108,7 +112,7 @@ class UCP {
108
  add_action('do_feed_rss', array(__CLASS__, 'disable_feed'), 0, 1);
109
  add_action('do_feed_rss2', array(__CLASS__, 'disable_feed'), 0, 1);
110
  add_action('do_feed_atom', array(__CLASS__, 'disable_feed'), 0, 1);
111
-
112
  add_action('wp_footer', array(__CLASS__, 'whitelisted_notice'));
113
  } // if not admin
114
 
@@ -116,9 +120,11 @@ class UCP {
116
  add_action('wp_before_admin_bar_render', array(__CLASS__, 'admin_bar'));
117
  add_action('wp_head', array(__CLASS__, 'admin_bar_style'));
118
  add_action('admin_head', array(__CLASS__, 'admin_bar_style'));
 
 
119
  } // init
120
 
121
-
122
  // check if user has the minimal WP version required by UCP
123
  static function check_wp_version($min_version) {
124
  if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
@@ -244,7 +250,7 @@ class UCP {
244
 
245
  if (true == self::is_construction_mode_enabled(false)
246
  || (is_user_logged_in() && isset($_GET['ucp_preview']))) {
247
- header(self::wp_get_server_protocol() . ' 503 Service Unavailable');
248
  if ($options['end_date'] && $options['end_date'] != '0000-00-00 00:00') {
249
  header('Retry-After: ' . date('D, d M Y H:i:s T', strtotime($options['end_date'])));
250
  } else {
@@ -301,6 +307,8 @@ class UCP {
301
  'settings_url' => admin_url('options-general.php?page=ucp'),
302
  'whitelisted_users_placeholder' => __('Select whitelisted user(s)', 'under-construction-page'),
303
  'open_survey' => $open_survey,
 
 
304
  'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
305
  'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
306
  'nonce_submit_earlybird' => wp_create_nonce('ucp_submit_earlybird'),
@@ -318,7 +326,7 @@ class UCP {
318
  wp_enqueue_script('ucp-select2', UCP_PLUGIN_URL . 'js/select2.min.js', array(), self::$version, true);
319
  wp_enqueue_script('ucp-admin', UCP_PLUGIN_URL . 'js/ucp-admin.js', array('jquery'), self::$version, true);
320
  wp_localize_script('ucp-admin', 'ucp', $js_localize);
321
-
322
  // fix for agressive plugins
323
  wp_dequeue_style('uiStyleSheet');
324
  wp_dequeue_style('wpcufpnAdmin' );
@@ -334,10 +342,11 @@ class UCP {
334
  wp_dequeue_style('wp-botwatch-css');
335
  }
336
 
337
- if ('plugins.php' == $hook) {
 
338
  wp_enqueue_style('wp-jquery-ui-dialog');
339
  wp_enqueue_style('ucp-admin-plugins', UCP_PLUGIN_URL . 'css/ucp-admin-plugins.css', array(), self::$version);
340
-
341
  wp_enqueue_script('jquery-ui-dialog');
342
  wp_enqueue_script('ucp-admin-plugins', UCP_PLUGIN_URL . 'js/ucp-admin-plugins.js', array('jquery'), self::$version, true);
343
  wp_localize_script('ucp-admin-plugins', 'ucp', $js_localize);
@@ -391,7 +400,7 @@ class UCP {
391
  check_ajax_referer('ucp_submit_support_message');
392
 
393
  $options = self::get_options();
394
-
395
  $email = sanitize_text_field($_POST['support_email']);
396
  if (!is_email($email)) {
397
  wp_send_json_error(__('Please double-check your email address.', 'under-construction-page'));
@@ -399,9 +408,6 @@ class UCP {
399
 
400
  $message = stripslashes(sanitize_text_field($_POST['support_message']));
401
  $subject = 'UCP Support';
402
- if ($_POST['support_priority'] == 'urgent') {
403
- $subject .= ' - Urgent';
404
- }
405
  $body = $message;
406
  if (!empty($_POST['support_info'])) {
407
  $theme = wp_get_theme();
@@ -435,7 +441,7 @@ class UCP {
435
  $vars = wp_parse_args($_POST, array('survey' => '', 'answers' => '', 'custom_answer' => $options['theme'], 'emailme' => ''));
436
  $vars['answers'] = trim($vars['answers'], ',');
437
  $vars['custom_answer'] = trim(strip_tags($vars['custom_answer']));
438
-
439
  $vars['custom_answer'] .= '; ' . date('Y-m-d H:i:s', $meta['first_install']);
440
  $vars['custom_answer'] = trim($vars['custom_answer'], ' ;');
441
 
@@ -467,8 +473,8 @@ class UCP {
467
 
468
  wp_send_json_success();
469
  } // submit_survey_ajax
470
-
471
-
472
  // submit earlybird email
473
  static function submit_earlybird_ajax() {
474
  check_ajax_referer('ucp_submit_earlybird');
@@ -481,7 +487,7 @@ class UCP {
481
  if (empty($vars['email']) || empty($vars['type'])) {
482
  wp_send_json_error(__('Please tell us your email and how you use UCP.', 'under-construction-page'));
483
  }
484
-
485
  $request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
486
  $request_args = array('action' => 'submit_survey',
487
  'survey' => 'earlybird',
@@ -605,7 +611,7 @@ class UCP {
605
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'common.css?v=' . self::$version . '" type="text/css">' . "\n";
606
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
607
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'font-awesome.min.css?v=' . self::$version . '" type="text/css">' . "\n";
608
-
609
  $out .= '<link rel="shortcut icon" type="image/png" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/images') . 'favicon.png" />';
610
 
611
  if (!empty($options['ga_tracking_id'])) {
@@ -638,13 +644,13 @@ class UCP {
638
  if ($options['linkback'] == '1') {
639
  $tmp = md5(get_site_url());
640
  if ($tmp[0] < '4') {
641
- $out .= '<p id="linkback">Create stunning <a href="https://underconstructionpage.com/" target="_blank">under construction pages for WordPress</a>. Completely free.</p>';
642
  } elseif ($tmp[0] < '8') {
643
- $out .= '<p id="linkback">Create a <a href="https://underconstructionpage.com/" target="_blank">free under construction page for WordPress</a> like this one in under a minute.</p>';
644
  } elseif ($tmp[0] < 'c') {
645
  $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>';
646
  } else {
647
- $out .= '<p id="linkback">Create free <a href="https://underconstructionpage.com/" target="_blank">maintenance mode pages for WordPress</a>.</p>';
648
  }
649
  }
650
 
@@ -748,20 +754,20 @@ class UCP {
748
  return in_array($user_role, $roles);
749
  } // user_has_role
750
 
751
-
752
  // frontend notification when UCP is enabled but current user is whitelisted
753
  static function whitelisted_notice() {
754
  $notices = get_option(UCP_NOTICES_KEY);
755
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'whitelisted', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
756
-
757
- if (empty($notices['dismiss_whitelisted']) &&
758
  is_user_logged_in() &&
759
- self::is_construction_mode_enabled(true) &&
760
  !self::is_construction_mode_enabled(false))
761
  // keeping everything inline due to minimal CSS
762
  echo '<div style="background-color: #333; line-height: 140%; font-size: 14px; position: fixed; display: block; top: 50px; z-index: 99999; color: #fefefe; padding: 20px 35px 20px 20px; width: 500px; border: thin solid #fefefe; left: -1px;"><a style="color: #ea1919; font-weight: 900; text-decoration: none; position: absolute; top: 7px; right: 10px;" href="' . $dismiss_url . '" alt="Dismiss notice" onclick="window.location.href = \'' . $dismiss_url . '\'; return false;" title="Dismiss notice">X</a><b>' . __('<b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.', 'under-construction-page') . '<br><a href="' . get_home_url() . '/?ucp_preview" style="text-decoration: underline; color: #fefefe;">' . __('Preview UnderConstructionPage', 'under-construction-page') . '</a><br><a href="' . admin_url('options-general.php?page=ucp') . '" style="text-decoration: underline; color: #fefefe;">' . __('Configure UnderConstructionPage', 'under-construction-page') . '</a></div>';
763
  } // whitelisted_notification
764
-
765
 
766
  // displays various notices in admin header
767
  static function admin_notices() {
@@ -769,14 +775,27 @@ class UCP {
769
  $options = self::get_options();
770
  $meta = self::get_meta();
771
  $current_user = wp_get_current_user();
772
-
773
  $name = '';
774
  if (!empty($current_user->user_firstname)) {
775
  $name = ' ' . $current_user->user_firstname;
776
  }
777
 
 
 
 
 
 
 
 
 
 
 
 
 
778
  // todo translate
779
- if (empty($notices['dismiss_rate']) &&
 
780
  (time() - $meta['first_install']) > (DAY_IN_SECONDS * 1.0)) {
781
  $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?filter=5&rate=5#new-post';
782
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
@@ -789,9 +808,24 @@ class UCP {
789
  echo '</p></div>';
790
  }
791
 
 
792
  if (self::is_plugin_page() && self::is_construction_mode_enabled(true) && !empty($options['end_date']) && $options['end_date'] != '0000-00-00 00:00' && $options['end_date'] < current_time('mysql')) {
793
  echo '<div id="ucp_end_date_notice" class="notice-error notice"><p>Under construction mode is enabled but the <a href="#end_date" class="change_tab" data-tab="0">end date</a> is set to a past date so the <b>under construction page will not be shown</b>. Either move the <a href="#end_date" class="change_tab" data-tab="0">end date</a> to a future date or disable it.</p></div>';
794
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
795
  } // notices
796
 
797
 
@@ -807,7 +841,11 @@ class UCP {
807
  if ($_GET['notice'] == 'rate') {
808
  $notices['dismiss_rate'] = true;
809
  }
810
-
 
 
 
 
811
  if ($_GET['notice'] == 'whitelisted') {
812
  $notices['dismiss_whitelisted'] = true;
813
  }
@@ -823,12 +861,12 @@ class UCP {
823
  exit;
824
  } // dismiss_notice
825
 
826
-
827
  // reset all settings to default values
828
  static function reset_settings() {
829
  $options = self::default_options();
830
  update_option(UCP_OPTIONS_KEY, $options);
831
-
832
  if (!empty($_GET['redirect'])) {
833
  wp_redirect($_GET['redirect']);
834
  } else {
@@ -837,7 +875,7 @@ class UCP {
837
 
838
  exit;
839
  } // reset_settings
840
-
841
 
842
  // change status via admin bar
843
  static function change_status() {
@@ -873,7 +911,7 @@ class UCP {
873
  }
874
 
875
  // no sense in loading a new CSS file for 2 lines of CSS
876
- $custom_css = '<style type="text/css">#wpadminbar ul li#wp-admin-bar-ucp-info { padding: 5px 0; } #wpadminbar ul li#wp-admin-bar-ucp-settings, #wpadminbar ul li#wp-admin-bar-ucp-status { } #wpadminbar i.ucp-status-dot { font-size: 17px; margin-top: -7px; color: #02ca02; height: 17px; display: inline-block; } #wpadminbar i.ucp-status-dot-enabled { color: #87c826; } #wpadminbar i.ucp-status-dot-disabled { color: #ea1919; } #wpadminbar #ucp-status-wrapper { display: inline; border: 1px solid rgba(240,245,250,.7); padding: 0; margin: 0 0 0 5px; background: rgb(35, 40, 45); } #wpadminbar .ucp-status-btn { padding: 0 7px; color: #fff; } #wpadminbar #ucp-status-wrapper.off #ucp-status-off { background: #ea1919;} #wpadminbar #ucp-status-wrapper.on #ucp-status-on { background: #66b317; }#wp-admin-bar-under-construction-page img.logo { height: 17px; margin-bottom: 4px; padding-right: 3px; } body.wp-admin #wp-admin-bar-under-construction-page img.logo { margin-bottom: -4px; }</style>';
877
 
878
  echo $custom_css;
879
  } // admin_bar_style
@@ -915,6 +953,13 @@ class UCP {
915
  'href' => false,
916
  'parent'=> 'under-construction-page'
917
  ));
 
 
 
 
 
 
 
918
  $wp_admin_bar->add_node( array(
919
  'id' => 'ucp-settings',
920
  'title' => __('Settings', 'under-construction-page'),
@@ -938,10 +983,10 @@ class UCP {
938
  static function plugin_action_links($links) {
939
  $settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="' . __('UnderConstruction Settings', 'under-construction-page') . '">' . __('Settings', 'under-construction-page') . '</a>';
940
  $pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-left') . '" title="' . __('Get PRO', 'under-construction-page') . '">' . __('Go <b>PRO</b>', 'under-construction-page') . '</a>';
941
-
942
  array_unshift($links, $pro_link);
943
  array_unshift($links, $settings_link);
944
-
945
  if (!empty($links['deactivate'])) {
946
  $links['deactivate'] = str_replace('href=',' data-under-construction-page="true" href=', $links['deactivate']);
947
  }
@@ -954,7 +999,7 @@ class UCP {
954
  static function plugin_meta_links($links, $file) {
955
  $support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page" title="' . __('Get help', 'under-construction-page') . '">' . __('Support', 'under-construction-page') . '</a>';
956
  $pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-right') . '" title="' . __('Get PRO', 'under-construction-page') . '">' . __('Get the <b>PRO</b> version', 'under-construction-page') . '</a>';
957
-
958
 
959
  if ($file == plugin_basename(__FILE__)) {
960
  $links[] = $support_link;
@@ -971,7 +1016,7 @@ class UCP {
971
  return $text;
972
  }
973
 
974
- $text = '<i><a href="https://underconstructionpage.com/" title="' . __('Visit UCP\'s site for more info', 'under-construction-page') . '" target="_blank">' . __('UnderConstructionPage', 'under-construction-page') . '</a> v' . self::$version . ' by <a href="https://www.webfactoryltd.com/" title="' . __('Visit our site to get more great plugins', 'under-construction-page') . '" target="_blank">' . __('WebFactory Ltd', 'under-construction-page') . '</a>.</i> '. $text;
975
 
976
  return $text;
977
  } // admin_footer_text
@@ -1004,6 +1049,10 @@ class UCP {
1004
  // set default settings
1005
  static function default_options() {
1006
  $defaults = array('status' => '0',
 
 
 
 
1007
  'end_date' => '',
1008
  'ga_tracking_id' => '',
1009
  'theme' => 'mad_designer',
@@ -1064,6 +1113,7 @@ class UCP {
1064
  case 'social_phone':
1065
  case 'social_telegram':
1066
  case 'social_whatsapp':
 
1067
  $options[$key] = trim($value);
1068
  break;
1069
  case 'ga_tracking_id':
@@ -1086,7 +1136,7 @@ class UCP {
1086
  $options['end_date'] = '';
1087
  }
1088
  unset($options['end_date_toggle']);
1089
-
1090
  if (empty($options['ga_tracking_toggle'])) {
1091
  $options['ga_tracking_id'] = '';
1092
  }
@@ -1095,12 +1145,36 @@ class UCP {
1095
  }
1096
  unset($options['ga_tracking_toggle']);
1097
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1098
  // empty cache in 3rd party plugins
1099
  if ($options != $old_options) {
1100
  $notices = get_option(UCP_NOTICES_KEY);
1101
  unset($notices['dismiss_whitelisted']);
1102
  update_option(UCP_NOTICES_KEY, $notices);
1103
-
1104
  if (function_exists('w3tc_pgcache_flush')) {
1105
  w3tc_pgcache_flush();
1106
  }
@@ -1181,24 +1255,27 @@ class UCP {
1181
  return $out;
1182
  }
1183
  } // create_select_options
1184
-
1185
-
1186
  // helper function to generate tagged buy links
1187
  static function generate_web_link($placement = '', $page = '/', $params = array(), $anchor = '') {
1188
  $base_url = 'https://underconstructionpage.com';
1189
-
1190
  if ('/' != $page) {
1191
- $page = '/' . trim($page, '/') . '/';
1192
  }
1193
-
 
 
 
1194
  $parts = array_merge(array('utm_source' => 'ucp-free', 'utm_medium' => 'plugin', 'utm_content' => $placement, 'utm_campaign' => 'ucp-free-v' . self::$version), $params);
1195
-
1196
  if (!empty($anchor)) {
1197
  $anchor = '#' . trim($anchor, '#');
1198
  }
1199
-
1200
  $out = $base_url . $page . '?' . http_build_query($parts, '', '&amp;') . $anchor;
1201
-
1202
  return $out;
1203
  } // generate_web_link
1204
 
@@ -1214,7 +1291,7 @@ class UCP {
1214
  echo '<tr valign="top">
1215
  <th scope="row"><label for="status">' . __('Under Construction Mode', 'under-construction-page') . '</label></th>
1216
  <td>';
1217
-
1218
  echo '<div class="toggle-wrapper" id="main-status">
1219
  <input type="checkbox" id="status" ' . self::checked(1, $options['status']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[status]">
1220
  <label for="status" class="toggle"><span class="toggle_handler"></span></label>
@@ -1223,6 +1300,17 @@ class UCP {
1223
  echo '<p class="description">' . __('By enabling construction mode users will not be able to access the site\'s content. They will only see the under construction page. To configure exceptions set <a class="change_tab" data-tab="3" href="#whitelisted-roles">whitelisted user roles</a>.', 'under-construction-page') . '</p>';
1224
  echo '</td></tr>';
1225
 
 
 
 
 
 
 
 
 
 
 
 
1226
  echo '<tr valign="top">
1227
  <th scope="row"><label for="end_date_toggle">' . __('Automatic End Date &amp; Time', 'under-construction-page') . '</label></th>
1228
  <td>';
@@ -1245,7 +1333,7 @@ class UCP {
1245
  echo '<div id="ga_tracking_id_wrapper"><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
1246
  echo '<p class="description">' . __('Enter the unique tracking ID found in your GA tracking profile settings to track visits to pages.', 'under-construction-page') . '</p></div>';
1247
  echo '</td></tr>';
1248
-
1249
  $reset_url = add_query_arg(array('action' => 'ucp_reset_settings', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
1250
  echo '<tr valign="top">
1251
  <th scope="row"><label for="">' . __('Reset Settings', 'under-construction-page') . '</label></th>
@@ -1302,6 +1390,16 @@ class UCP {
1302
  echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC template ones</a>. Default: ' . $default_options['content'] . '</p>';
1303
  echo '</td></tr>';
1304
 
 
 
 
 
 
 
 
 
 
 
1305
  echo '<tr valign="top" id="login_button_wrap">
1306
  <th scope="row"><label for="login_button">' . __('Login Button', 'under-construction-page') . '</label></th>
1307
  <td>';
@@ -1309,7 +1407,7 @@ class UCP {
1309
  <input type="checkbox" id="login_button" ' . self::checked(1, $options['login_button']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[login_button]">
1310
  <label for="login_button" class="toggle"><span class="toggle_handler"></span></label>
1311
  </div>';
1312
- echo '<p class="description">Show a descrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.</p>';
1313
  echo '</td></tr>';
1314
 
1315
  echo '<tr valign="top">
@@ -1401,7 +1499,7 @@ class UCP {
1401
  <td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="' . __('Telegram group, channel or account URL', 'under-construction-page') . '">';
1402
  echo '<p class="description">' . __('Complete URL, with https prefix to Telegram group, channel or account.', 'under-construction-page') . '</p>';
1403
  echo '</td></tr>';
1404
-
1405
  echo '<tr valign="top" class="hidden">
1406
  <th scope="row"><label for="social_skype">' . __('Skype Username', 'under-construction-page') . '</label></th>
1407
  <td><input id="social_skype" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="' . __('Skype username or account name', 'under-construction-page') . '">';
@@ -1436,23 +1534,28 @@ class UCP {
1436
 
1437
 
1438
  static function get_themes() {
1439
- $themes = array('christmas' => __('Christmas Greetings', 'under-construction-page'),
1440
  'mad_designer' => __('Mad Designer', 'under-construction-page'),
1441
  'plain_text' => __('Plain Text', 'under-construction-page'),
 
1442
  'under_construction' => __('Under Construction', 'under-construction-page'),
1443
  'dark' => __('Things Went Dark', 'under-construction-page'),
1444
  'forklift' => __('Forklift at Work', 'under-construction-page'),
 
1445
  'under_construction_text' => __('Under Construction Text', 'under-construction-page'),
1446
  'cyber_chick' => __('Cyber Chick', 'under-construction-page'),
 
1447
  'rocket' => __('Rocket Launch', 'under-construction-page'),
1448
  'loader' => __('Loader at Work', 'under-construction-page'),
1449
  'cyber_chick_dark' => __('Cyber Chick Dark', 'under-construction-page'),
1450
  'safe' => __('Safe', 'under-construction-page'),
1451
  'people' => __('People at Work', 'under-construction-page'),
 
1452
  'windmill' => __('Windmill', 'under-construction-page'),
1453
  'sad_site' => __('Sad Site', 'under-construction-page'),
1454
  'lighthouse' => __('Lighthouse', 'under-construction-page'),
1455
- 'hot_air_baloon' => __('Hot Air Baloon', 'under-construction-page'),
 
1456
  'people_2' => __('People at Work #2', 'under-construction-page'),
1457
  'rocket_2' => __('Rocket Launch #2', 'under-construction-page'),
1458
  'light_bulb' => __('Light Bulb', 'under-construction-page'),
@@ -1463,8 +1566,9 @@ class UCP {
1463
  'setup' => __('Setup', 'under-construction-page'),
1464
  'stop' => __('Stop', 'under-construction-page'),
1465
  'clock' => __('Clock', 'under-construction-page'),
1466
- 'bulldozer' => __('Bulldozer at Work', 'under-construction-page'));
1467
-
 
1468
  $themes = apply_filters('ucp_themes', $themes);
1469
 
1470
  return $themes;
@@ -1483,15 +1587,17 @@ class UCP {
1483
  <td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b><br>';
1484
  echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
1485
 
1486
- echo '<div class="ucp-thumb-special"><a href="' . self::generate_web_link('thumb-build-theme') . '" target="_blank"><img src="' . $img_path . 'more_coming_soon.png" alt="' . __('Build your own custom theme with our drag & drop editor', 'under-construction-page') . '" title="' . __('Build your own custom theme with our drag & drop editor', 'under-construction-page') . '"></a><span>' . __('Build your own custom theme', 'under-construction-page') . '</span></div>';
1487
-
1488
  foreach ($themes as $theme_id => $theme_name) {
1489
  if ($theme_id === $options['theme']) {
1490
  $class = ' active';
1491
  } else {
1492
  $class = '';
1493
  }
1494
- 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></div>';
 
 
 
 
1495
  } // foreach
1496
 
1497
  echo '</td></tr>';
@@ -1531,15 +1637,28 @@ class UCP {
1531
  echo '<table class="form-table">';
1532
 
1533
  echo '<tr valign="top">
1534
- <th scope="row">' . __('Whitelisted IP Addresses', 'under-construction-page') . '</th>
1535
  <td>';
1536
- echo 'Whitelisting users by IP address, enabling UCP only on certain pages, expiring direct access links, and many more features are available in <a href="' . self::generate_web_link('access-whitelisted-ip') . '" target="_blank">UnderConstructionPage PRO</a>.';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1537
  echo '<td></tr>';
1538
-
1539
  echo '<tr valign="top" id="whitelisted-roles">
1540
  <th scope="row">' . __('Whitelisted User Roles', 'under-construction-page') . '</th>
1541
  <td>';
1542
-
1543
  foreach ($roles as $tmp_role) {
1544
  echo '<input name="' . UCP_OPTIONS_KEY . '[whitelisted_roles][]" id="roles-' . $tmp_role['val'] . '" ' . self::checked($tmp_role['val'], $options['whitelisted_roles'], false) . ' value="' . $tmp_role['val'] . '" type="checkbox" /> <label for="roles-' . $tmp_role['val'] . '">' . $tmp_role['label'] . '</label><br />';
1545
  }
@@ -1554,6 +1673,18 @@ class UCP {
1554
  echo '</select><p class="description">' . __('Selected users (when logged in) will <b>not</b> be affected by the under construction mode and will always see the "normal" site.', 'under-construction-page') . '</p>';
1555
  echo '</td></tr>';
1556
 
 
 
 
 
 
 
 
 
 
 
 
 
1557
  echo '</table>';
1558
  echo '</div>';
1559
 
@@ -1566,19 +1697,21 @@ class UCP {
1566
  $user = wp_get_current_user();
1567
  $theme = wp_get_theme();
1568
  $options = self::get_options();
1569
-
1570
  echo '<div id="tabs_support" class="ui-tabs ucp-tabs-2nd-level">';
1571
  echo '<ul>';
1572
- echo '<li><a href="#tab_support_faq">' . __('FAQ', 'under-construction-page') . '</a></li>';
1573
  echo '<li><a href="#tab_support_contact">' . __('Contact Support', 'under-construction-page') . '</a></li>';
 
1574
  echo '</ul>';
1575
-
1576
  echo '<div style="display: none;" id="tab_support_faq" class="ucp-tab-content">';
1577
-
 
 
1578
  echo '<p><b>Do you have a video to help me get started?</b><br>We sure do! <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">Getting started with the UnderConstructionPage plugin</a>. If that doesn\'t help we also have an <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>. In case you\'re still uncertain about something don\'t hesitate to contact our friendly support.</p>';
1579
-
1580
- echo '<p><b>How can I check if construction mode is really enabled on my site?</b><br>If the under construction status is green in the admin bar (the very top of the page, above this text), then it\'s enabled. But we made a tool specifically for these kinds of situations so you can double-check everything. <a href="https://underconstructionpage.com/under-construction-tester/?url=' . urlencode(get_home_url()) . '" target="_blank">Run under construction mode tester</a>.</p>';
1581
-
1582
  echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
1583
 
1584
  echo '<p><b>How can I log in / access WordPress admin after construction mode has been enabled?</b><br>Enable the <a class="change_tab" data-tab="2" href="#login_button_wrap">Login Button</a> option under Content, and a login link will be shown in the lower right corner of the under construction page.</p>';
@@ -1592,24 +1725,25 @@ class UCP {
1592
  echo '<p><b>How can I edit designs?</b><br>There is an option to add <a class="change_tab" data-tab="1" href="#custom_css">custom CSS</a>. If you want more than that you will have to edit the source files located in <code>/under-construction-page/themes/</code>.</p>';
1593
 
1594
  echo '<p><b>I have disabled UCP but the under construction page is still visible. How do I remove it?</b><br>Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\'t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>';
1595
-
1596
  echo '<p><b>I have disabled UCP but the site\'s favicon is still the UCP logo. How do I change/remove it?</b><br>Make sure your theme has a favicon defined and empty all caches - browser and server ones. Open the site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\'t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>';
1597
  echo '</div>'; // faq
1598
-
1599
  echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">';
1600
  echo '<p>' . __('Something is not working the way it\'s suppose to? Having problems activating UCP? Contact our friendly support, they\'ll respond ASAP.<br>You can also contact us just to say hello ;)', 'under-construction-page') . '</p>';
1601
 
1602
  echo '<table class="form-table">';
1603
- if (!empty($_GET['urgent-support'])) {
1604
- echo '<tr valign="top">
1605
- <th scope="row"><label for="">Ticket Priority</label></th>
1606
- <td><span style="text-decoration: underline; color: #ea1919;">URGENT</span>';
1607
- echo '</td></tr>';
1608
- echo '<input type="hidden" value="urgent" id="support_priority">';
1609
- } else {
1610
- echo '<input type="hidden" value="normal" id="support_priority">';
1611
- }
1612
-
 
1613
  echo '<tr valign="top">
1614
  <th scope="row"><label for="support_email">' . __('Your Email Address', 'under-construction-page') . '</label></th>
1615
  <td><input id="support_email" type="text" class="regular-text skip-save" name="support_email" value="' . $user->user_email . '" placeholder="name@domain.com">';
@@ -1628,7 +1762,7 @@ class UCP {
1628
  echo '<div class="toggle-wrapper">
1629
  <input type="checkbox" id="support_info" checked type="checkbox" value="1" name="support_info">
1630
  <label for="support_info" class="toggle"><span class="toggle_handler"></span></label>
1631
- </div>';
1632
  echo '<p class="description">Our support agents need this info to provide faster &amp; better support. The following data will be added to your message;</p>';
1633
  echo '<p>WordPress version: <code>' . get_bloginfo('version') . '</code><br>';
1634
  echo 'UCP Version: <code>' . self::$version . '</code><br>';
@@ -1642,100 +1776,77 @@ class UCP {
1642
  echo '<a id="ucp-send-support-message" href="#" class="js-action button button-primary"><span class="dashicons dashicons-update"></span>' . __('Send Message to Support', 'under-construction-page') . '</a>';
1643
  echo '</table>';
1644
  echo '</div>'; // contact
1645
-
1646
  echo '</div>'; // tabs
1647
  } // tab_support
1648
-
1649
-
1650
  // tab PRO
1651
  static function tab_pro() {
1652
- $user = wp_get_current_user();
1653
-
1654
  echo '<div class="ucp-tab-content">';
1655
  echo '<h3 class="ucp-pro-logo"><a href="' . self::generate_web_link('pro-tab-logo') . '" target="_blank"><img src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage"></a></h3>';
1656
-
1657
- echo '<div id="ucp-earlybird"><span>Build <b>landing pages, coming soon pages, maintenance &amp; under construction pages</b> faster &amp; easier!</span>';
1658
- echo '<p class="textcenter"><a target="_blank" href="' . self::generate_web_link('pro-tab-20-discount', '', array('coupon' => 'welcome')) . '" class="button button-primary button-large">Get <b>PRO</b> now with a special <b>20% discount</b>!</a></p>';
1659
- echo '</div>';
1660
-
1661
- echo '<h3 class="ucp-small-title">Some of the features available in the PRO version</h3>';
1662
-
1663
- echo '<div class="gmw-pro-feature">';
1664
- echo '<span>Versatile &amp; User-friendly Drag&Drop</span>';
1665
- echo '<p>Need more control over your pages? Change, adjust &amp; configure everything! From countdown timers, forms and videos, to animated backgrounds and custom layouts.</p>';
1666
- echo '</div>';
1667
-
1668
- echo '<div class="gmw-pro-feature">';
1669
- echo '<span>Local Emails/Leads Storage</span>';
1670
- echo '<p>Hate paying &amp; setting up 3rd party autoresponder services? We have your back! No setup, no fees. All leads are stored in UCP and can easily be viewed, searched and exported.</p>';
1671
- echo '</div>';
1672
-
1673
- echo '<div class="gmw-pro-feature">';
1674
- echo '<span>Native MailChimp Support</span>';
1675
- echo '<p>Full MailChimp API support is built-in. Lists, list segments and double-optin configuration. Just enter your API key and you\'re good to collect emails.</p>';
1676
- echo '</div>';
1677
-
1678
- echo '<div class="gmw-pro-feature">';
1679
- echo '<span>Universal 3rd Party Autoresponder Support</span>';
1680
- echo '<p>Using GetResponse, ActiveCampaign, Aweber, CampaignMonitor, Drip, MadMimi or any other mailing service? No worries! They\'re fully supported too.</p>';
1681
- echo '</div>';
1682
-
1683
- echo '<div class="gmw-pro-feature">';
1684
- echo '<span>Custom Private Access Links</span>';
1685
- echo '<p>Want to show the new sparkling site only to your client? Create a private access link that expires after one session or after one day. Create as many links as you need with custom expire settings.</p>';
1686
- echo '</div>';
1687
-
1688
- echo '<div class="gmw-pro-feature">';
1689
- echo '<span>Conversion Tracking</span>';
1690
- echo '<p>Conversions from newsletter signups and contact form submits are tracked automatically but you can track any action. From button clicks to video plays. Data is sent to Google &amp; built-in analytics.</p>';
1691
- echo '</div>';
1692
-
1693
- echo '<div class="gmw-pro-feature">';
1694
- echo '<span>Track Referrals &amp; Affiliate Links</span>';
1695
- echo '<p>Create a unique access link for every referral and track how many sessions, clicks and conversions it brings in. The perfect solution for tracking quality of various traffic sources.</p>';
1696
- echo '</div>';
1697
-
1698
- echo '<div class="gmw-pro-feature">';
1699
- echo '<span>+300,000 Searchable Photos Library</span>';
1700
- echo '<p>There\'s nothing worse than searching Google just to find that the perfect image you need is either copyrighted or too small. Enjoy a huge library of 4HD+ sized images - categorised &amp; copyright free!</p>';
1701
- echo '</div>';
1702
-
1703
- echo '<div class="gmw-pro-feature">';
1704
- echo '<span>Built-in Analytics</span>';
1705
- echo '<p>Don\'t like Google Analytics? Don\'t have time to set it up? No need to! Built-in analytics work with absolutely no setup at all. They provide a great, quick overview of your stats at a glance.</p>';
1706
- echo '</div>';
1707
-
1708
- echo '<div class="gmw-pro-feature">';
1709
- echo '<span>Custom Access &amp; Page Rules</span>';
1710
- echo '<p>Allow visitors to view your full site based on IP, role, or username. Selected pages can be whitelisted or blacklisted so that they are always or never hidden by UCP.</p>';
1711
- echo '</div>';
1712
-
1713
- echo '<div class="gmw-pro-feature">';
1714
- echo '<span>Integrated Contact Form</span>';
1715
- echo '<p>Building a landing page? Add a contact form in a second. Besides the email you get and the confirmation email the visitor receives, the form data is saved in the site\'s database for backup.</p>';
1716
- echo '</div>';
1717
-
1718
- echo '<div class="gmw-pro-feature">';
1719
- echo '<span>+100 Templates for Everything</span>';
1720
- echo '<p>UCP PRO is so much more than an under construction page builder. Landing pages, sales pages, coming soon pages - you can build them all. Templates are available for everything.</p>';
1721
- echo '</div>';
1722
-
1723
- echo '<div class="gmw-pro-feature">';
1724
- echo '<span>Extreme ease-of-use You Love</span>';
1725
- echo '<p>You\'re busy, we know that and don\'t have time to read manuals. That\'s why we spent days optimising the GUI and default options to make everything as intuitive and easy to use as possible.</p>';
1726
- echo '</div>';
1727
-
1728
- echo '<div class="gmw-pro-feature">';
1729
- echo '<span>Top-notch Quality &amp; Continuous Updates</span>';
1730
- echo '<p>You\'ve seen how much energy we put into the free version of UCP. We do the same with UCP PRO which means continuous updates, properly tested code and a bug-free experience.</p>';
1731
- echo '</div>';
1732
-
1733
- echo '<div class="gmw-pro-feature">';
1734
- echo '<span>Superior Support</span>';
1735
- echo '<p>We don\'t outsource support! That\'s why it\'s awesome! Super fast and friendly USA based crew is always prepared to help you. Don\'t believe us? <a class="change_tab" data-tab="4" href="#contact">Try out our support now.</a></p>';
1736
- echo '</div>';
1737
-
1738
  echo '</div>';
 
 
 
 
1739
  } // tab_pro
1740
 
1741
 
@@ -1747,7 +1858,7 @@ class UCP {
1747
 
1748
  $options = self::get_options();
1749
  $default_options = self::default_options();
1750
-
1751
  echo '<div class="wrap">
1752
  <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>';
1753
 
@@ -1784,7 +1895,7 @@ class UCP {
1784
 
1785
  echo '</form>'; // ucp_tabs
1786
  echo '</div>'; // wrap
1787
-
1788
  echo '<div id="features-survey-dialog" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
1789
  echo '<p>We continuously add new features to <span class="ucp-logo">UnderConstructionPage</span>. In order to know what features to add we need to understand who our users are.<br><b>In what situations do you most often use UCP?</b></p>';
1790
 
@@ -1814,8 +1925,118 @@ class UCP {
1814
  echo '<a data-survey="usage" class="submit-survey button-primary button button-large" href="#">Cast my Vote</a>';
1815
  echo '<a href="#" class="dismiss-survey" data-survey="usage"><small><i>Close survey &amp; never show it again</i></small></a>';
1816
  echo '</div>';
1817
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1818
  echo '</div>';
 
 
1819
  } // main_page
1820
 
1821
 
@@ -1826,19 +2047,19 @@ class UCP {
1826
  echo ' &nbsp; &nbsp; <a id="ucp_preview" href="' . get_home_url() . '/?ucp_preview" class="button button-large button-secondary" target="_blank">' . __('Preview', 'under-construction-page') . '</a>';
1827
  echo '</p>';
1828
  } // footer_buttons
1829
-
1830
-
1831
  // markup for deactivate dialog
1832
  static function footer_plugins() {
1833
  $support_link = admin_url('options-general.php?page=ucp&urgent-support=true#support');
1834
-
1835
  echo '<div id="ucp-deactivate-survey" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
1836
-
1837
  echo '<div class="question-wrapper-assistance" data-value="urgent">' .
1838
  '<div class="question"><b>Something\'s not working? We offer URGENT assistance!</b><br><a href="' . $support_link . '" class="button">Send a priority ticket to our friendly support agents</a><br><small><i>average response time is under 20 minutes</i></small></div>' . '</div>';
1839
-
1840
  echo '<p class="textcenter"><br>We want to improve! Please tell us:<br><b>Why are you deactivating <span class="ucp-logo">UnderConstructionPage</span>?</b></p>';
1841
-
1842
  $questions = array();
1843
  $questions[] = '<div class="question-wrapper" data-value="temporary">' .
1844
  '<div class="question">It\'s a temporary deactivation, I\'m debugging something</div>' .
@@ -1855,7 +2076,7 @@ class UCP {
1855
  $questions[] = '<div class="question-wrapper" data-value="site-live">' .
1856
  '<div class="question">It served its purpose - site is now live</div>' .
1857
  '</div>';
1858
-
1859
  $questions[] = '<div class="question-wrapper" data-value="missing-feature">' .
1860
  '<div class="question">It doesn\'t have all the features I need<div class="details">Please tell us what features are missing: <input type="text" class="normal-text ucp-deactivation-details"></div></div>' .
1861
  '</div>';
@@ -1865,14 +2086,14 @@ class UCP {
1865
  '<div class="question">Something else<div class="details">Please tell us the reason: <input type="text" class="normal-text ucp-deactivation-details"></div></div>' .
1866
  '</div>';
1867
  echo implode(' ', $questions);
1868
-
1869
 
1870
  $current_user = wp_get_current_user();
1871
  echo '<div class="footer">';
1872
  echo '<a class="ucp-cancel-deactivate js-action button-secondary button button-large" href="#">Cancel Deactivation</a> <a data-survey="deactivate" class="button-primary button button-large ucp-deactivate" href="#">Continue with Deactivation</a>';
1873
  echo '<br><br><a href="#" class="js-action ucp-deactivate-direct"><small><i>Deactivate without providing feedback</i></small></a>';
1874
  echo '</div>';
1875
-
1876
  echo '</div>';
1877
  } // footer_plugins
1878
 
@@ -1880,7 +2101,7 @@ class UCP {
1880
  // reset all pointers to default state - visible
1881
  static function reset_pointers() {
1882
  $pointers = array();
1883
-
1884
  $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.');
1885
  $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>.');
1886
 
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: Web factory Ltd
7
+ Version: 2.85
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
40
  define('UCP_NOTICES_KEY', 'ucp_notices');
41
  define('UCP_SURVEYS_KEY', 'ucp_surveys');
42
 
43
+
44
+ require_once UCP_PLUGIN_DIR . 'ucp-license.php';
45
+
46
+
47
  // main plugin class
48
  class UCP {
49
  static $version = 0;
97
  add_action('wp_ajax_ucp_submit_survey', array(__CLASS__, 'submit_survey_ajax'));
98
  add_action('wp_ajax_ucp_submit_earlybird', array(__CLASS__, 'submit_earlybird_ajax'));
99
  add_action('wp_ajax_ucp_submit_support_message', array(__CLASS__, 'submit_support_message_ajax'));
100
+
101
  // uninstall survey on plugins page
102
  add_action('admin_footer-plugins.php', array(__CLASS__, 'footer_plugins'));
103
  } else {
112
  add_action('do_feed_rss', array(__CLASS__, 'disable_feed'), 0, 1);
113
  add_action('do_feed_rss2', array(__CLASS__, 'disable_feed'), 0, 1);
114
  add_action('do_feed_atom', array(__CLASS__, 'disable_feed'), 0, 1);
115
+
116
  add_action('wp_footer', array(__CLASS__, 'whitelisted_notice'));
117
  } // if not admin
118
 
120
  add_action('wp_before_admin_bar_render', array(__CLASS__, 'admin_bar'));
121
  add_action('wp_head', array(__CLASS__, 'admin_bar_style'));
122
  add_action('admin_head', array(__CLASS__, 'admin_bar_style'));
123
+
124
+ UCP_license::init();
125
  } // init
126
 
127
+
128
  // check if user has the minimal WP version required by UCP
129
  static function check_wp_version($min_version) {
130
  if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
250
 
251
  if (true == self::is_construction_mode_enabled(false)
252
  || (is_user_logged_in() && isset($_GET['ucp_preview']))) {
253
+ header(self::wp_get_server_protocol() . ' 200 OK');
254
  if ($options['end_date'] && $options['end_date'] != '0000-00-00 00:00') {
255
  header('Retry-After: ' . date('D, d M Y H:i:s T', strtotime($options['end_date'])));
256
  } else {
307
  'settings_url' => admin_url('options-general.php?page=ucp'),
308
  'whitelisted_users_placeholder' => __('Select whitelisted user(s)', 'under-construction-page'),
309
  'open_survey' => $open_survey,
310
+ 'is_activated' => UCP_license::is_activated(),
311
+ 'dialog_upsell_title' => '<img alt="' . __('UnderConstructionPage PRO', 'under-construction-page') . '" title="' . __('UnderConstructionPage PRO', 'under-construction-page') . '" src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo_white.png' . '">',
312
  'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
313
  'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
314
  'nonce_submit_earlybird' => wp_create_nonce('ucp_submit_earlybird'),
326
  wp_enqueue_script('ucp-select2', UCP_PLUGIN_URL . 'js/select2.min.js', array(), self::$version, true);
327
  wp_enqueue_script('ucp-admin', UCP_PLUGIN_URL . 'js/ucp-admin.js', array('jquery'), self::$version, true);
328
  wp_localize_script('ucp-admin', 'ucp', $js_localize);
329
+
330
  // fix for agressive plugins
331
  wp_dequeue_style('uiStyleSheet');
332
  wp_dequeue_style('wpcufpnAdmin' );
342
  wp_dequeue_style('wp-botwatch-css');
343
  }
344
 
345
+ // disabled - regular deactivation is back
346
+ if (false && 'plugins.php' == $hook) {
347
  wp_enqueue_style('wp-jquery-ui-dialog');
348
  wp_enqueue_style('ucp-admin-plugins', UCP_PLUGIN_URL . 'css/ucp-admin-plugins.css', array(), self::$version);
349
+
350
  wp_enqueue_script('jquery-ui-dialog');
351
  wp_enqueue_script('ucp-admin-plugins', UCP_PLUGIN_URL . 'js/ucp-admin-plugins.js', array('jquery'), self::$version, true);
352
  wp_localize_script('ucp-admin-plugins', 'ucp', $js_localize);
400
  check_ajax_referer('ucp_submit_support_message');
401
 
402
  $options = self::get_options();
403
+
404
  $email = sanitize_text_field($_POST['support_email']);
405
  if (!is_email($email)) {
406
  wp_send_json_error(__('Please double-check your email address.', 'under-construction-page'));
408
 
409
  $message = stripslashes(sanitize_text_field($_POST['support_message']));
410
  $subject = 'UCP Support';
 
 
 
411
  $body = $message;
412
  if (!empty($_POST['support_info'])) {
413
  $theme = wp_get_theme();
441
  $vars = wp_parse_args($_POST, array('survey' => '', 'answers' => '', 'custom_answer' => $options['theme'], 'emailme' => ''));
442
  $vars['answers'] = trim($vars['answers'], ',');
443
  $vars['custom_answer'] = trim(strip_tags($vars['custom_answer']));
444
+
445
  $vars['custom_answer'] .= '; ' . date('Y-m-d H:i:s', $meta['first_install']);
446
  $vars['custom_answer'] = trim($vars['custom_answer'], ' ;');
447
 
473
 
474
  wp_send_json_success();
475
  } // submit_survey_ajax
476
+
477
+
478
  // submit earlybird email
479
  static function submit_earlybird_ajax() {
480
  check_ajax_referer('ucp_submit_earlybird');
487
  if (empty($vars['email']) || empty($vars['type'])) {
488
  wp_send_json_error(__('Please tell us your email and how you use UCP.', 'under-construction-page'));
489
  }
490
+
491
  $request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
492
  $request_args = array('action' => 'submit_survey',
493
  'survey' => 'earlybird',
611
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'common.css?v=' . self::$version . '" type="text/css">' . "\n";
612
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
613
  $out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'font-awesome.min.css?v=' . self::$version . '" type="text/css">' . "\n";
614
+
615
  $out .= '<link rel="shortcut icon" type="image/png" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/images') . 'favicon.png" />';
616
 
617
  if (!empty($options['ga_tracking_id'])) {
644
  if ($options['linkback'] == '1') {
645
  $tmp = md5(get_site_url());
646
  if ($tmp[0] < '4') {
647
+ $out .= '<p id="linkback">Create stunning <a href="' . self::generate_web_link('show-love-1') . '" target="_blank">under construction pages for WordPress</a>. Completely free.</p>';
648
  } elseif ($tmp[0] < '8') {
649
+ $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>';
650
  } elseif ($tmp[0] < 'c') {
651
  $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>';
652
  } else {
653
+ $out .= '<p id="linkback">Create free <a href="' . self::generate_web_link('show-love-3') . '" target="_blank">maintenance mode pages for WordPress</a>.</p>';
654
  }
655
  }
656
 
754
  return in_array($user_role, $roles);
755
  } // user_has_role
756
 
757
+
758
  // frontend notification when UCP is enabled but current user is whitelisted
759
  static function whitelisted_notice() {
760
  $notices = get_option(UCP_NOTICES_KEY);
761
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'whitelisted', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
762
+
763
+ if (empty($notices['dismiss_whitelisted']) &&
764
  is_user_logged_in() &&
765
+ self::is_construction_mode_enabled(true) &&
766
  !self::is_construction_mode_enabled(false))
767
  // keeping everything inline due to minimal CSS
768
  echo '<div style="background-color: #333; line-height: 140%; font-size: 14px; position: fixed; display: block; top: 50px; z-index: 99999; color: #fefefe; padding: 20px 35px 20px 20px; width: 500px; border: thin solid #fefefe; left: -1px;"><a style="color: #ea1919; font-weight: 900; text-decoration: none; position: absolute; top: 7px; right: 10px;" href="' . $dismiss_url . '" alt="Dismiss notice" onclick="window.location.href = \'' . $dismiss_url . '\'; return false;" title="Dismiss notice">X</a><b>' . __('<b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.', 'under-construction-page') . '<br><a href="' . get_home_url() . '/?ucp_preview" style="text-decoration: underline; color: #fefefe;">' . __('Preview UnderConstructionPage', 'under-construction-page') . '</a><br><a href="' . admin_url('options-general.php?page=ucp') . '" style="text-decoration: underline; color: #fefefe;">' . __('Configure UnderConstructionPage', 'under-construction-page') . '</a></div>';
769
  } // whitelisted_notification
770
+
771
 
772
  // displays various notices in admin header
773
  static function admin_notices() {
775
  $options = self::get_options();
776
  $meta = self::get_meta();
777
  $current_user = wp_get_current_user();
778
+
779
  $name = '';
780
  if (!empty($current_user->user_firstname)) {
781
  $name = ' ' . $current_user->user_firstname;
782
  }
783
 
784
+ // pro activated - update
785
+ if (self::is_plugin_page() && UCP_license::is_activated()) {
786
+ $plugin = plugin_basename(__FILE__);
787
+ $update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&amp;plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin);
788
+ echo '<div id="ucp_update_pro" class="notice-error notice">';
789
+ echo '<p class="center">Thank you for purchasing UnderConstructionPage PRO! <b>Your license has been verified and activated.</b></p><p>Please <b>click the button below</b> to update plugin files to PRO version.</p>';
790
+ echo '<p><a href="' . esc_url($update_url) . '" class="button button-primary">Update UnderConstructionPage files to PRO</a></p>';
791
+ echo '</div>';
792
+
793
+ return;
794
+ }
795
+
796
  // todo translate
797
+ // ask for rating - disabled
798
+ if (false && empty($notices['dismiss_rate']) &&
799
  (time() - $meta['first_install']) > (DAY_IN_SECONDS * 1.0)) {
800
  $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?filter=5&rate=5#new-post';
801
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
808
  echo '</p></div>';
809
  }
810
 
811
+ // end date in past
812
  if (self::is_plugin_page() && self::is_construction_mode_enabled(true) && !empty($options['end_date']) && $options['end_date'] != '0000-00-00 00:00' && $options['end_date'] < current_time('mysql')) {
813
  echo '<div id="ucp_end_date_notice" class="notice-error notice"><p>Under construction mode is enabled but the <a href="#end_date" class="change_tab" data-tab="0">end date</a> is set to a past date so the <b>under construction page will not be shown</b>. Either move the <a href="#end_date" class="change_tab" data-tab="0">end date</a> to a future date or disable it.</p></div>';
814
  }
815
+
816
+ // ask for translation
817
+ if (self::is_plugin_page() &&
818
+ empty($notices['dismiss_translate']) &&
819
+ (time() - $meta['first_install']) > (DAY_IN_SECONDS * 1)) {
820
+ $translate_url = self::generate_web_link('translate-notification', 'translate-the-plugin/');
821
+ $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'translate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
822
+
823
+ echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . ',<br>Help us translate UCP into your language and <b>get a PRO license for free</b>!<br>We want to make <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> accessible to as many users as possible by translating it into their language. And we need your help!';
824
+
825
+ echo '<br><a target="_blank" href="' . esc_url($translate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . __('Translate UCP into your language &amp; get a PRO license for free', 'under-construction-page') . '</a>';
826
+ echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '">' . __('I\'m not interested (remove this notice)', 'under-construction-page') . '</a>';
827
+ echo '</p></div>';
828
+ }
829
  } // notices
830
 
831
 
841
  if ($_GET['notice'] == 'rate') {
842
  $notices['dismiss_rate'] = true;
843
  }
844
+
845
+ if ($_GET['notice'] == 'translate') {
846
+ $notices['dismiss_translate'] = true;
847
+ }
848
+
849
  if ($_GET['notice'] == 'whitelisted') {
850
  $notices['dismiss_whitelisted'] = true;
851
  }
861
  exit;
862
  } // dismiss_notice
863
 
864
+
865
  // reset all settings to default values
866
  static function reset_settings() {
867
  $options = self::default_options();
868
  update_option(UCP_OPTIONS_KEY, $options);
869
+
870
  if (!empty($_GET['redirect'])) {
871
  wp_redirect($_GET['redirect']);
872
  } else {
875
 
876
  exit;
877
  } // reset_settings
878
+
879
 
880
  // change status via admin bar
881
  static function change_status() {
911
  }
912
 
913
  // no sense in loading a new CSS file for 2 lines of CSS
914
+ $custom_css = '<style type="text/css">#wpadminbar ul li#wp-admin-bar-ucp-info { padding: 5px 0; } #wpadminbar ul li#wp-admin-bar-ucp-settings, #wpadminbar ul li#wp-admin-bar-ucp-status { padding-bottom: 2px; } #wpadminbar i.ucp-status-dot { font-size: 17px; margin-top: -7px; color: #02ca02; height: 17px; display: inline-block; } #wpadminbar i.ucp-status-dot-enabled { color: #87c826; } #wpadminbar i.ucp-status-dot-disabled { color: #ea1919; } #wpadminbar #ucp-status-wrapper { display: inline; border: 1px solid rgba(240,245,250,.7); padding: 0; margin: 0 0 0 5px; background: rgb(35, 40, 45); } #wpadminbar .ucp-status-btn { padding: 0 7px; color: #fff; } #wpadminbar #ucp-status-wrapper.off #ucp-status-off { background: #ea1919;} #wpadminbar #ucp-status-wrapper.on #ucp-status-on { background: #66b317; }#wp-admin-bar-under-construction-page img.logo { height: 17px; margin-bottom: 4px; padding-right: 3px; } body.wp-admin #wp-admin-bar-under-construction-page img.logo { margin-bottom: -4px; }</style>';
915
 
916
  echo $custom_css;
917
  } // admin_bar_style
953
  'href' => false,
954
  'parent'=> 'under-construction-page'
955
  ));
956
+ $wp_admin_bar->add_node( array(
957
+ 'id' => 'ucp-preview',
958
+ 'title' => __('Preview', 'under-construction-page'),
959
+ 'meta' => array('target' => 'blank'),
960
+ 'href' => get_home_url() . '/?ucp_preview',
961
+ 'parent' => 'under-construction-page'
962
+ ));
963
  $wp_admin_bar->add_node( array(
964
  'id' => 'ucp-settings',
965
  'title' => __('Settings', 'under-construction-page'),
983
  static function plugin_action_links($links) {
984
  $settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="' . __('UnderConstruction Settings', 'under-construction-page') . '">' . __('Settings', 'under-construction-page') . '</a>';
985
  $pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-left') . '" title="' . __('Get PRO', 'under-construction-page') . '">' . __('Go <b>PRO</b>', 'under-construction-page') . '</a>';
986
+
987
  array_unshift($links, $pro_link);
988
  array_unshift($links, $settings_link);
989
+
990
  if (!empty($links['deactivate'])) {
991
  $links['deactivate'] = str_replace('href=',' data-under-construction-page="true" href=', $links['deactivate']);
992
  }
999
  static function plugin_meta_links($links, $file) {
1000
  $support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page" title="' . __('Get help', 'under-construction-page') . '">' . __('Support', 'under-construction-page') . '</a>';
1001
  $pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-right') . '" title="' . __('Get PRO', 'under-construction-page') . '">' . __('Get the <b>PRO</b> version', 'under-construction-page') . '</a>';
1002
+
1003
 
1004
  if ($file == plugin_basename(__FILE__)) {
1005
  $links[] = $support_link;
1016
  return $text;
1017
  }
1018
 
1019
+ $text = '<i><a href="' . self::generate_web_link('admin-footer') . '" title="' . __('Visit UCP\'s site for more info', 'under-construction-page') . '" target="_blank">' . __('UnderConstructionPage', 'under-construction-page') . '</a> v' . self::$version . ' by <a href="https://www.webfactoryltd.com/" title="' . __('Visit our site to get more great plugins', 'under-construction-page') . '" target="_blank">' . __('WebFactory Ltd', 'under-construction-page') . '</a>.</i> '. $text;
1020
 
1021
  return $text;
1022
  } // admin_footer_text
1049
  // set default settings
1050
  static function default_options() {
1051
  $defaults = array('status' => '0',
1052
+ 'license_key' => '',
1053
+ 'license_active' => false,
1054
+ 'license_expires' => '1900-01-01',
1055
+ 'license_type' => '',
1056
  'end_date' => '',
1057
  'ga_tracking_id' => '',
1058
  'theme' => 'mad_designer',
1113
  case 'social_phone':
1114
  case 'social_telegram':
1115
  case 'social_whatsapp':
1116
+ case 'license_key':
1117
  $options[$key] = trim($value);
1118
  break;
1119
  case 'ga_tracking_id':
1136
  $options['end_date'] = '';
1137
  }
1138
  unset($options['end_date_toggle']);
1139
+
1140
  if (empty($options['ga_tracking_toggle'])) {
1141
  $options['ga_tracking_id'] = '';
1142
  }
1145
  }
1146
  unset($options['ga_tracking_toggle']);
1147
 
1148
+ if (!empty($_POST['license-submit'])) {
1149
+ if (empty($options['license_key'])) {
1150
+ $options['license_type'] = '';
1151
+ $options['license_expires'] = '1900-01-01';
1152
+ $options['license_active'] = false;
1153
+ $options['license_key'] = '';
1154
+ add_settings_error(UCP_OPTIONS_KEY, 'license_key', __('License key saved.', 'under-construction-page'), 'updated');
1155
+ } else {
1156
+ $tmp = UCP_license::validate_license_key($options['license_key']);
1157
+ if ($tmp['success']) {
1158
+ $options['license_type'] = $tmp['license_type'];
1159
+ $options['license_expires'] = $tmp['license_expires'];
1160
+ $options['license_active'] = $tmp['license_active'];
1161
+ if ($tmp['license_active']) {
1162
+ add_settings_error(UCP_OPTIONS_KEY, 'license_key', __('License key saved and activated!', 'under-construction-page'), 'updated');
1163
+ } else {
1164
+ add_settings_error(UCP_OPTIONS_KEY, 'license_key', 'License not active. ' . $tmp['error'], 'error');
1165
+ }
1166
+ } else {
1167
+ add_settings_error(UCP_OPTIONS_KEY, 'license_key', 'Unable to contact licensing server. Please try again in a few moments.', 'error');
1168
+ }
1169
+ }
1170
+ } // update license
1171
+
1172
  // empty cache in 3rd party plugins
1173
  if ($options != $old_options) {
1174
  $notices = get_option(UCP_NOTICES_KEY);
1175
  unset($notices['dismiss_whitelisted']);
1176
  update_option(UCP_NOTICES_KEY, $notices);
1177
+
1178
  if (function_exists('w3tc_pgcache_flush')) {
1179
  w3tc_pgcache_flush();
1180
  }
1255
  return $out;
1256
  }
1257
  } // create_select_options
1258
+
1259
+
1260
  // helper function to generate tagged buy links
1261
  static function generate_web_link($placement = '', $page = '/', $params = array(), $anchor = '') {
1262
  $base_url = 'https://underconstructionpage.com';
1263
+
1264
  if ('/' != $page) {
1265
+ $page = '/' . trim($page, '/') . '/';
1266
  }
1267
+ if ($page == '//') {
1268
+ $page = '/';
1269
+ }
1270
+
1271
  $parts = array_merge(array('utm_source' => 'ucp-free', 'utm_medium' => 'plugin', 'utm_content' => $placement, 'utm_campaign' => 'ucp-free-v' . self::$version), $params);
1272
+
1273
  if (!empty($anchor)) {
1274
  $anchor = '#' . trim($anchor, '#');
1275
  }
1276
+
1277
  $out = $base_url . $page . '?' . http_build_query($parts, '', '&amp;') . $anchor;
1278
+
1279
  return $out;
1280
  } // generate_web_link
1281
 
1291
  echo '<tr valign="top">
1292
  <th scope="row"><label for="status">' . __('Under Construction Mode', 'under-construction-page') . '</label></th>
1293
  <td>';
1294
+
1295
  echo '<div class="toggle-wrapper" id="main-status">
1296
  <input type="checkbox" id="status" ' . self::checked(1, $options['status']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[status]">
1297
  <label for="status" class="toggle"><span class="toggle_handler"></span></label>
1300
  echo '<p class="description">' . __('By enabling construction mode users will not be able to access the site\'s content. They will only see the under construction page. To configure exceptions set <a class="change_tab" data-tab="3" href="#whitelisted-roles">whitelisted user roles</a>.', 'under-construction-page') . '</p>';
1301
  echo '</td></tr>';
1302
 
1303
+ echo '<tr valign="top">
1304
+ <th scope="row"><label for="search_engines">' . __('Prevent Search Engines from Indexing the Temporary Site', 'under-construction-page') . '</label></th>
1305
+ <td>';
1306
+ echo '<div class="toggle-wrapper">
1307
+ <input type="checkbox" id="search_engines" type="checkbox" value="1" class="skip-save open-ucp-upsell">
1308
+ <label for="search_engines" class="toggle"><span class="toggle_handler"></span></label>
1309
+ </div>';
1310
+
1311
+ echo '<p class="description">' . __('While performing maintenance or having any temporary content displayed, it is favorable for SEO to prevent search engines from indexing the temporaray site. This is a <a href="#" class="open-ucp-upsell">PRO feature</a>.', 'under-construction-page') . '</p>';
1312
+ echo '</td></tr>';
1313
+
1314
  echo '<tr valign="top">
1315
  <th scope="row"><label for="end_date_toggle">' . __('Automatic End Date &amp; Time', 'under-construction-page') . '</label></th>
1316
  <td>';
1333
  echo '<div id="ga_tracking_id_wrapper"><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
1334
  echo '<p class="description">' . __('Enter the unique tracking ID found in your GA tracking profile settings to track visits to pages.', 'under-construction-page') . '</p></div>';
1335
  echo '</td></tr>';
1336
+
1337
  $reset_url = add_query_arg(array('action' => 'ucp_reset_settings', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
1338
  echo '<tr valign="top">
1339
  <th scope="row"><label for="">' . __('Reset Settings', 'under-construction-page') . '</label></th>
1390
  echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC template ones</a>. Default: ' . $default_options['content'] . '</p>';
1391
  echo '</td></tr>';
1392
 
1393
+ echo '<tr valign="top">
1394
+ <th scope="row"><label for="external_shortcodes">' . __('3rd Party Shortcode Support in Content', 'under-construction-page') . '</label></th>
1395
+ <td>';
1396
+ echo '<div class="toggle-wrapper">
1397
+ <input type="checkbox" id="external_shortcodes" type="checkbox" value="1" class="skip-save open-ucp-upsell">
1398
+ <label for="external_shortcodes" class="toggle"><span class="toggle_handler"></span></label>
1399
+ </div>';
1400
+ echo '<p class="description">Enable if you have a 3rd party shortcode you\'d like to use on the under construction page. This is a <a href="#" class="open-ucp-upsell">PRO feature</a>.</p>';
1401
+ echo '</td></tr>';
1402
+
1403
  echo '<tr valign="top" id="login_button_wrap">
1404
  <th scope="row"><label for="login_button">' . __('Login Button', 'under-construction-page') . '</label></th>
1405
  <td>';
1407
  <input type="checkbox" id="login_button" ' . self::checked(1, $options['login_button']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[login_button]">
1408
  <label for="login_button" class="toggle"><span class="toggle_handler"></span></label>
1409
  </div>';
1410
+ echo '<p class="description">Show a discrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.</p>';
1411
  echo '</td></tr>';
1412
 
1413
  echo '<tr valign="top">
1499
  <td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="' . __('Telegram group, channel or account URL', 'under-construction-page') . '">';
1500
  echo '<p class="description">' . __('Complete URL, with https prefix to Telegram group, channel or account.', 'under-construction-page') . '</p>';
1501
  echo '</td></tr>';
1502
+
1503
  echo '<tr valign="top" class="hidden">
1504
  <th scope="row"><label for="social_skype">' . __('Skype Username', 'under-construction-page') . '</label></th>
1505
  <td><input id="social_skype" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="' . __('Skype username or account name', 'under-construction-page') . '">';
1534
 
1535
 
1536
  static function get_themes() {
1537
+ $themes = array('_pro_video' => __('Fireworks Video Background', 'under-construction-page'),
1538
  'mad_designer' => __('Mad Designer', 'under-construction-page'),
1539
  'plain_text' => __('Plain Text', 'under-construction-page'),
1540
+ '_pro_mountain' => __('Mountain Peak', 'under-construction-page'),
1541
  'under_construction' => __('Under Construction', 'under-construction-page'),
1542
  'dark' => __('Things Went Dark', 'under-construction-page'),
1543
  'forklift' => __('Forklift at Work', 'under-construction-page'),
1544
+ '_pro_watch' => __('The Watch Store', 'under-construction-page'),
1545
  'under_construction_text' => __('Under Construction Text', 'under-construction-page'),
1546
  'cyber_chick' => __('Cyber Chick', 'under-construction-page'),
1547
+ '_pro_custom' => __('Build Your Own Custom Theme', 'under-construction-page'),
1548
  'rocket' => __('Rocket Launch', 'under-construction-page'),
1549
  'loader' => __('Loader at Work', 'under-construction-page'),
1550
  'cyber_chick_dark' => __('Cyber Chick Dark', 'under-construction-page'),
1551
  'safe' => __('Safe', 'under-construction-page'),
1552
  'people' => __('People at Work', 'under-construction-page'),
1553
+ '_pro_clouds' => __('White Clouds', 'under-construction-page'),
1554
  'windmill' => __('Windmill', 'under-construction-page'),
1555
  'sad_site' => __('Sad Site', 'under-construction-page'),
1556
  'lighthouse' => __('Lighthouse', 'under-construction-page'),
1557
+ '_pro_smoothie' => __('Green Smoothie Webinar', 'under-construction-page'),
1558
+ 'hot_air_baloon' => __('Hot Air Balloon', 'under-construction-page'),
1559
  'people_2' => __('People at Work #2', 'under-construction-page'),
1560
  'rocket_2' => __('Rocket Launch #2', 'under-construction-page'),
1561
  'light_bulb' => __('Light Bulb', 'under-construction-page'),
1566
  'setup' => __('Setup', 'under-construction-page'),
1567
  'stop' => __('Stop', 'under-construction-page'),
1568
  'clock' => __('Clock', 'under-construction-page'),
1569
+ 'bulldozer' => __('Bulldozer at Work', 'under-construction-page'),
1570
+ 'christmas' => __('Christmas Greetings', 'under-construction-page'));
1571
+
1572
  $themes = apply_filters('ucp_themes', $themes);
1573
 
1574
  return $themes;
1587
  <td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b><br>';
1588
  echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
1589
 
 
 
1590
  foreach ($themes as $theme_id => $theme_name) {
1591
  if ($theme_id === $options['theme']) {
1592
  $class = ' active';
1593
  } else {
1594
  $class = '';
1595
  }
1596
+ if (substr($theme_id, 0, 4) == '_pro') {
1597
+ echo '<div class="ucp-thumb ucp-thumb-pro open-ucp-upsell" data-theme-id="' . $theme_id . '" data-tab="buy"><a href="#"><img src="' . $img_path . $theme_id . '.jpg" alt="' . $theme_name . '" title="' . $theme_name . '"></a><span>' . $theme_name . '</span><div class="ribbon"><i>PRO</i></div></div>';
1598
+ } else {
1599
+ 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></div>';
1600
+ }
1601
  } // foreach
1602
 
1603
  echo '</td></tr>';
1637
  echo '<table class="form-table">';
1638
 
1639
  echo '<tr valign="top">
1640
+ <th scope="row"><label for="whitelisted_ips">' . __('Whitelisted IP Addresses', 'under-construction-page') . '</label></th>
1641
  <td>';
1642
+ echo '<div class="toggle-wrapper">
1643
+ <input type="checkbox" id="whitelisted_ips" type="checkbox" value="1" class="skip-save open-ucp-upsell">
1644
+ <label for="whitelisted_ips" class="toggle"><span class="toggle_handler"></span></label>
1645
+ </div>';
1646
+ 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">PRO feature</a>.';
1647
+ echo '<td></tr>';
1648
+
1649
+ echo '<tr valign="top">
1650
+ <th scope="row"><label for="access_links">' . __('Secret Direct Access Links', 'under-construction-page') . '</label></th>
1651
+ <td>';
1652
+ echo '<div class="toggle-wrapper">
1653
+ <input type="checkbox" id="access_links" type="checkbox" value="1" class="skip-save open-ucp-upsell">
1654
+ <label for="access_links" class="toggle"><span class="toggle_handler"></span></label>
1655
+ </div>';
1656
+ echo '<p>The most flexible and user-friendly way (especially when working with clients) to give only selected visitors access to the "normal" site. Simply generate a new link, configure expiration options (time, number of visits or unique IPs) and share it with users to allow them access to the site. This is a <a href="#" class="open-ucp-upsell">PRO feature</a>.';
1657
  echo '<td></tr>';
1658
+
1659
  echo '<tr valign="top" id="whitelisted-roles">
1660
  <th scope="row">' . __('Whitelisted User Roles', 'under-construction-page') . '</th>
1661
  <td>';
 
1662
  foreach ($roles as $tmp_role) {
1663
  echo '<input name="' . UCP_OPTIONS_KEY . '[whitelisted_roles][]" id="roles-' . $tmp_role['val'] . '" ' . self::checked($tmp_role['val'], $options['whitelisted_roles'], false) . ' value="' . $tmp_role['val'] . '" type="checkbox" /> <label for="roles-' . $tmp_role['val'] . '">' . $tmp_role['label'] . '</label><br />';
1664
  }
1673
  echo '</select><p class="description">' . __('Selected users (when logged in) will <b>not</b> be affected by the under construction mode and will always see the "normal" site.', 'under-construction-page') . '</p>';
1674
  echo '</td></tr>';
1675
 
1676
+ echo '<tr>';
1677
+ echo '<th><label for="url_rules">URL Based Rules</label></th>';
1678
+ echo '<td><select class="skip-save open-ucp-upsell" id="url_rules">';
1679
+ echo '<option value="0">Disabled</option>';
1680
+ echo '<option class="ucp-promo" value="-1">Listed URLs will NEVER be affected by UCP</option>';
1681
+ echo '<option class="ucp-promo" value="-1">ONLY listed URLs CAN BE affected by UCP</option>';
1682
+ echo '</select>';
1683
+ echo '<p class="description">Use this option to set per URL rules and lock down the entire site except selected pages; or lock down just some pages and leave all others accessible to visitors. If second option is used all other access rules still apply. This is a <a href="#" class="open-ucp-upsell">PRO feature</a>.</p>';
1684
+ echo '</td>';
1685
+ echo '</tr>';
1686
+
1687
+
1688
  echo '</table>';
1689
  echo '</div>';
1690
 
1697
  $user = wp_get_current_user();
1698
  $theme = wp_get_theme();
1699
  $options = self::get_options();
1700
+
1701
  echo '<div id="tabs_support" class="ui-tabs ucp-tabs-2nd-level">';
1702
  echo '<ul>';
 
1703
  echo '<li><a href="#tab_support_contact">' . __('Contact Support', 'under-construction-page') . '</a></li>';
1704
+ echo '<li><a href="#tab_support_faq">' . __('FAQ', 'under-construction-page') . '</a></li>';
1705
  echo '</ul>';
1706
+
1707
  echo '<div style="display: none;" id="tab_support_faq" class="ucp-tab-content">';
1708
+
1709
+ echo '<p><b>How can I build a custom page or customize themes?</b><br>If you know how to code custom CSS a lot can be accomplished by using the <a class="change_tab" data-tab="1" href="#custom_css">custom CSS</a> option. A much faster and easier solution is to check out <a href="' . self::generate_web_link('faq-custom-page') . '" target="_blank">UCP PRO</a> with an easy-to-use drag&amp;drop builder and dozens of pre-built themes.</p>';
1710
+
1711
  echo '<p><b>Do you have a video to help me get started?</b><br>We sure do! <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">Getting started with the UnderConstructionPage plugin</a>. If that doesn\'t help we also have an <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>. In case you\'re still uncertain about something don\'t hesitate to contact our friendly support.</p>';
1712
+
1713
+ echo '<p><b>How can I check if construction mode is really enabled on my site?</b><br>If the under construction status is green in the admin bar (the very top of the page, above this text), then it\'s enabled. But we made a tool specifically for these kinds of situations so you can double-check everything. <a href="' . self::generate_web_link('faq-tester', 'under-construction-tester/', array('url' => get_home_url())) . '" target="_blank">Run under construction mode tester</a>.</p>';
1714
+
1715
  echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
1716
 
1717
  echo '<p><b>How can I log in / access WordPress admin after construction mode has been enabled?</b><br>Enable the <a class="change_tab" data-tab="2" href="#login_button_wrap">Login Button</a> option under Content, and a login link will be shown in the lower right corner of the under construction page.</p>';
1725
  echo '<p><b>How can I edit designs?</b><br>There is an option to add <a class="change_tab" data-tab="1" href="#custom_css">custom CSS</a>. If you want more than that you will have to edit the source files located in <code>/under-construction-page/themes/</code>.</p>';
1726
 
1727
  echo '<p><b>I have disabled UCP but the under construction page is still visible. How do I remove it?</b><br>Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\'t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>';
1728
+
1729
  echo '<p><b>I have disabled UCP but the site\'s favicon is still the UCP logo. How do I change/remove it?</b><br>Make sure your theme has a favicon defined and empty all caches - browser and server ones. Open the site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\'t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>';
1730
  echo '</div>'; // faq
1731
+
1732
  echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">';
1733
  echo '<p>' . __('Something is not working the way it\'s suppose to? Having problems activating UCP? Contact our friendly support, they\'ll respond ASAP.<br>You can also contact us just to say hello ;)', 'under-construction-page') . '</p>';
1734
 
1735
  echo '<table class="form-table">';
1736
+ echo '<tr valign="top">
1737
+ <th scope="row"><label for="support_priority">Ticket Priority</label></th>
1738
+ <td>';
1739
+ echo '<select class="skip-save open-ucp-upsell" id="support_priority" name="support_priority">';
1740
+ echo '<option value="0" selected>Low</option>';
1741
+ echo '<option value="-1" class="ucp-promo">Normal</option>';
1742
+ echo '<option value="-1" class="ucp-promo">High</option>';
1743
+ echo '</select>';
1744
+ echo '<p class="description">' . __('We reply to all tickets as fast as possible. However, <a href="#" class="open-ucp-upsell">PRO users</a> get to jump the queue.', 'under-construction-page') . '</p>';
1745
+ echo '</td></tr>';
1746
+
1747
  echo '<tr valign="top">
1748
  <th scope="row"><label for="support_email">' . __('Your Email Address', 'under-construction-page') . '</label></th>
1749
  <td><input id="support_email" type="text" class="regular-text skip-save" name="support_email" value="' . $user->user_email . '" placeholder="name@domain.com">';
1762
  echo '<div class="toggle-wrapper">
1763
  <input type="checkbox" id="support_info" checked type="checkbox" value="1" name="support_info">
1764
  <label for="support_info" class="toggle"><span class="toggle_handler"></span></label>
1765
+ </div>';
1766
  echo '<p class="description">Our support agents need this info to provide faster &amp; better support. The following data will be added to your message;</p>';
1767
  echo '<p>WordPress version: <code>' . get_bloginfo('version') . '</code><br>';
1768
  echo 'UCP Version: <code>' . self::$version . '</code><br>';
1776
  echo '<a id="ucp-send-support-message" href="#" class="js-action button button-primary"><span class="dashicons dashicons-update"></span>' . __('Send Message to Support', 'under-construction-page') . '</a>';
1777
  echo '</table>';
1778
  echo '</div>'; // contact
1779
+
1780
  echo '</div>'; // tabs
1781
  } // tab_support
1782
+
1783
+
1784
  // tab PRO
1785
  static function tab_pro() {
1786
+ $options = self::get_options();
1787
+
1788
  echo '<div class="ucp-tab-content">';
1789
  echo '<h3 class="ucp-pro-logo"><a href="' . self::generate_web_link('pro-tab-logo') . '" target="_blank"><img src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage"></a></h3>';
1790
+
1791
+ if (UCP_license::is_activated()) {
1792
+ $plugin = plugin_basename(__FILE__);
1793
+ $update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&amp;plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin);
1794
+ echo '<p style="text-align: center;"><a href="' . $update_url . '" class="button button-primary button-large">Update UnderConstructionPage files to PRO</a><br><br></p>';
1795
+ } else {
1796
+ echo '<div id="ucp-earlybird"><span>Build <b>landing pages, coming soon pages, maintenance &amp; under construction pages</b> faster &amp; easier!</span>';
1797
+ echo '<p class="textcenter"><a href="#" class="button button-primary button-large open-ucp-upsell">Get <b>PRO</b> now with a LIMITED <b>20% discount</b>!</a></p>';
1798
+ echo '</div>';
1799
+ }
1800
+
1801
+
1802
+ echo '<div class="ucp-tab-content">';
1803
+ echo '<table class="form-table">';
1804
+
1805
+ echo '<tr valign="top">
1806
+ <th scope="row"><label for="license_key">' . __('License Key', 'under-construction-page') . '</label></th>';
1807
+ echo '<td><input type="text" id="license_key" class="regular-text" name="' . UCP_OPTIONS_KEY . '[license_key]" value="' . esc_attr($options['license_key']) . '" placeholder="12345-12345-12345-12345" />';
1808
+ echo '<p class="description">License key is located in the confirmation email you received after purchasing.<br>In case of any problems, please contact <a href="#" data-tab="4" class="change_tab">support</a>. If you don\'t have a PRO license key - <a href="#" class="open-ucp-upsell">get it now</a>.</p>';
1809
+ echo '</td></tr>';
1810
+
1811
+ if (!empty($options['license_key'])) {
1812
+ if (UCP_license::is_activated()) {
1813
+ if ($options['license_expires'] == '2035-01-01') {
1814
+ $valid = 'indefinitely';
1815
+ } else {
1816
+ $valid = 'until ' . date('F jS, Y', strtotime($options['license_expires']));
1817
+ if (date('Y-m-d') == $options['license_expires']) {
1818
+ $valid .= '; expires today';
1819
+ } elseif (date('Y-m-d', time() + 30 * DAY_IN_SECONDS) > $options['license_expires']) {
1820
+ $tmp = (strtotime($options['license_expires'] . date(' G:i:s')) - time()) / DAY_IN_SECONDS;
1821
+ $valid .= '; expires in ' . round($tmp) . ' days';
1822
+ }
1823
+ }
1824
+ echo '<tr>
1825
+ <th scope="row"><label for="">' . __('License Status', 'under-construction-page') . '</label></th>
1826
+ <td><b style="color: #66b317;">Active</b><br>
1827
+ Type: ' . str_replace('pro', 'PRO', $options['license_type']);
1828
+ echo '<br>Valid ' . $valid . '</td>
1829
+ </tr>';
1830
+ } else {
1831
+ echo '<tr>
1832
+ <th scope="row"><label for="">' . __('License Status', 'under-construction-page') . '</label></th>
1833
+ <td><b style="color: #ea1919;">Inactive</b>';
1834
+ if (!empty($options['license_type'])) {
1835
+ echo '<br>Type: ' . $options['license_type'];
1836
+ }
1837
+ if (!empty($options['license_expires']) && $options['license_expires'] != '1900-01-01' && $options['license_expires'] != '1970-01-01') {
1838
+ echo '<br>Expired on ' . date('F jS, Y', strtotime($options['license_expires']));
1839
+ }
1840
+ echo '</td></tr>';
1841
+ }
1842
+ }
1843
+
1844
+ echo '</table>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1845
  echo '</div>';
1846
+
1847
+ echo '<p class="submit">';
1848
+ echo get_submit_button(__('Save &amp; Validate License Key', 'under-construction-page'), 'primary large', 'license-submit', false);
1849
+ echo '</p>';
1850
  } // tab_pro
1851
 
1852
 
1858
 
1859
  $options = self::get_options();
1860
  $default_options = self::default_options();
1861
+
1862
  echo '<div class="wrap">
1863
  <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>';
1864
 
1895
 
1896
  echo '</form>'; // ucp_tabs
1897
  echo '</div>'; // wrap
1898
+
1899
  echo '<div id="features-survey-dialog" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
1900
  echo '<p>We continuously add new features to <span class="ucp-logo">UnderConstructionPage</span>. In order to know what features to add we need to understand who our users are.<br><b>In what situations do you most often use UCP?</b></p>';
1901
 
1925
  echo '<a data-survey="usage" class="submit-survey button-primary button button-large" href="#">Cast my Vote</a>';
1926
  echo '<a href="#" class="dismiss-survey" data-survey="usage"><small><i>Close survey &amp; never show it again</i></small></a>';
1927
  echo '</div>';
1928
+ echo '</div>'; // features-survey-dialog
1929
+
1930
+ // upsell dialog
1931
+ echo '<div id="upsell-dialog" style="display: none;" title="UnderConstructionPage PRO"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
1932
+ echo '<div id="tabs_upsell" class="ui-tabs ucp-tabs-2nd-level">';
1933
+ echo '<ul>';
1934
+ echo '<li><a href="#tab-upsell-buy">' . __('Get PRO', 'under-construction-page') . '</a></li>';
1935
+ echo '<li><a href="#tab-upsell-features">' . __('Features', 'under-construction-page') . '</a></li>';
1936
+ echo '</ul>';
1937
+
1938
+ echo '<div class="upsell-tab" id="tab-upsell-features" style="display: none;">';
1939
+ echo '<div class="gmw-pro-feature">';
1940
+ echo '<span>Frictionless Drag &amp; Drop Builder</span>';
1941
+ echo '<p>Forget about complicated, cumbersome builders that have too many options! UCP builder was purpose-built for the task at hand. Simple, user-friendly &amp; has only the options you need to build pages fast!</p>';
1942
+ echo '</div>';
1943
+
1944
+ echo '<div class="gmw-pro-feature">';
1945
+ echo '<span>400,000+ Stunning Searchable Images</span>';
1946
+ echo '<p>There\'s nothing worse than googling for hours just to find that the perfect image you need is either copyrighted or too small. Enjoy a vast library of 4K+ sized images - categorised &amp; copyright free!</p>';
1947
+ echo '</div>';
1948
+
1949
+ echo '<div class="gmw-pro-feature">';
1950
+ echo '<span>100+ Templates</span>';
1951
+ 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>';
1952
+ echo '</div>';
1953
+
1954
+ echo '<div class="gmw-pro-feature">';
1955
+ echo '<span>Affiliate & Traffic Tracking</span>';
1956
+ echo '<p>Having traffic is nice. Having targeted traffic is better! Generate tracked inbound links &amp; share them on social media or with your affiliates to pinpoint the best traffic sources.</p>';
1957
+ echo '</div>';
1958
+
1959
+ echo '<div class="gmw-pro-feature">';
1960
+ echo '<span>Unlimited 3rd Party Integrations</span>';
1961
+ echo '<p>With our unique universal autoresponder support, you can integrate any email autoresponder or webinar system in a page within seconds. Or push data to Zapier to more than 1,000 applications.</p>';
1962
+ echo '</div>';
1963
+
1964
+ echo '<div class="gmw-pro-feature">';
1965
+ echo '<span>Suitable for Agencies &amp; Webmasters</span>';
1966
+ echo '<p>Creating sites for others? We have your back! Our support &amp; licensing options are optimised for agencies. Unlimited sites license &amp; in-house, USA based support guarantee your peace of mind.</p>';
1967
+ echo '</div>';
1968
+
1969
+ echo '<p class="upsell-footer">For a complete list of features, demos and screenshots visit <a href="' . self::generate_web_link('features-more-info') . '" target="_blank">underconstructionpage.com</a>. Already have a PRO license? <a href="#" class="go-to-license-key">Activate it</a>.</p>';
1970
+
1971
+ echo '</div>'; // features tab
1972
+ echo '<div class="upsell-tab" id="tab-upsell-buy" style="display: none;">';
1973
+ echo '<table id="ucp-pricing-table">
1974
+ <colgroup></colgroup>
1975
+ <colgroup></colgroup>
1976
+ <colgroup></colgroup>
1977
+ <tbody>
1978
+ <tr>
1979
+ <td>
1980
+ <h3>Lifetime Unlimited<br>Agency License</h3>
1981
+ </td>
1982
+ <td>
1983
+ <h3>Lifetime<br>PRO License</h3>
1984
+ </td>
1985
+ <td>
1986
+ <h3>Yearly<br>PRO License</h3>
1987
+ </td>
1988
+ </tr>
1989
+ <tr>
1990
+ <td>One Time Payment</td>
1991
+ <td><span class="dashicons dashicons-yes"></span> One Time Payment</td>
1992
+ <td>Yearly Payment</td>
1993
+ </tr>
1994
+ <tr>
1995
+ <td>Unlimited Client &amp; Personal Sites</td>
1996
+ <td><span class="dashicons dashicons-yes"></span> 1 Personal or Client Site</td>
1997
+ <td>3 Personal Sites</td>
1998
+ </tr>
1999
+ <tr>
2000
+ <td>Lifetime Priority Support &amp; Updates</td>
2001
+ <td><span class="dashicons dashicons-yes"></span> Lifetime Support &amp; Updates</td>
2002
+ <td>1 Year of Support &amp; Updates</td>
2003
+ </tr>
2004
+ <tr>
2005
+ <td>400,000+ Hi-Res Images</td>
2006
+ <td><span class="dashicons dashicons-yes"></span> 400,000+ Hi-Res Images</td>
2007
+ <td>400,000+ Hi-Res Images</td>
2008
+ </tr>
2009
+ <tr>
2010
+ <td>100+ Templates + Builder</td>
2011
+ <td><span class="dashicons dashicons-yes"></span> 50+ Templates + Builder</td>
2012
+ <td>50+ Templates + Builder</td>
2013
+ </tr>
2014
+ <tr>
2015
+ <td>Zapier Integration</td>
2016
+ <td><span class="dashicons dashicons-no"></td>
2017
+ <td><span class="dashicons dashicons-no"></td>
2018
+ </tr>
2019
+ <tr>
2020
+ <td>
2021
+ <a class="promo-button go-to-license-key" href="' . self::generate_web_link('pricing-table-20-off', 'buy/', array('p' => 'agency-lifetime-welcome', 'r' => 'UCP v' . self::$version)) . '" target="_blank">BUY NOW 20% OFF<br><del>$250</del> $200</a>
2022
+ <span class="instant-download"><span class="dashicons dashicons-yes"></span> Secure payment<br><span class="dashicons dashicons-yes"></span> Instant activation from WordPress admin<br><span class="dashicons dashicons-yes"></span> 100% No-Risk Money Back Guarantee</span>
2023
+ </td>
2024
+ <td>
2025
+ <a class="promo-button go-to-license-key" href="' . self::generate_web_link('pricing-table-20-off', 'buy/', array('p' => 'pro-lifetime-welcome', 'r' => 'UCP v' . self::$version)) . '" target="_blank">BUY NOW 20% OFF<br><del>$70</del> $56</a>
2026
+ <span class="instant-download"><span class="dashicons dashicons-yes"></span> Secure payment<br><span class="dashicons dashicons-yes"></span> Instant activation from WordPress admin<br><span class="dashicons dashicons-yes"></span> 100% No-Risk Money Back Guarantee</span>
2027
+ </td>
2028
+ <td>
2029
+ <a class="promo-button go-to-license-key" href="' . self::generate_web_link('pricing-table-20-off', 'buy/', array('p' => 'pro-yearly-welcome', 'r' => 'UCP v' . self::$version)) . '" target="_blank">BUY NOW 20% OFF<br><del>$39</del> $31<small>/year</small></a>
2030
+ <span class="instant-download"><span class="dashicons dashicons-yes"></span> Secure payment<br><span class="dashicons dashicons-yes"></span> Instant activation from WordPress admin<br><span class="dashicons dashicons-yes"></span> 100% No-Risk Money Back Guarantee</span>
2031
+ </td>
2032
+ </tr>
2033
+ </tbody>
2034
+ </table>';
2035
+ echo '<p class="upsell-footer">More pricing options &amp; details about packages are available on <a href="' . self::generate_web_link('pricing-table-more-info') . '" target="_blank">underconstructionpage.com</a>. Already have a PRO license? <a href="#" class="go-to-license-key">Activate it</a>.</p>';
2036
+ echo '</div>'; // pricing tab
2037
  echo '</div>';
2038
+
2039
+ echo '</div>'; // upsell-dialog
2040
  } // main_page
2041
 
2042
 
2047
  echo ' &nbsp; &nbsp; <a id="ucp_preview" href="' . get_home_url() . '/?ucp_preview" class="button button-large button-secondary" target="_blank">' . __('Preview', 'under-construction-page') . '</a>';
2048
  echo '</p>';
2049
  } // footer_buttons
2050
+
2051
+
2052
  // markup for deactivate dialog
2053
  static function footer_plugins() {
2054
  $support_link = admin_url('options-general.php?page=ucp&urgent-support=true#support');
2055
+
2056
  echo '<div id="ucp-deactivate-survey" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
2057
+
2058
  echo '<div class="question-wrapper-assistance" data-value="urgent">' .
2059
  '<div class="question"><b>Something\'s not working? We offer URGENT assistance!</b><br><a href="' . $support_link . '" class="button">Send a priority ticket to our friendly support agents</a><br><small><i>average response time is under 20 minutes</i></small></div>' . '</div>';
2060
+
2061
  echo '<p class="textcenter"><br>We want to improve! Please tell us:<br><b>Why are you deactivating <span class="ucp-logo">UnderConstructionPage</span>?</b></p>';
2062
+
2063
  $questions = array();
2064
  $questions[] = '<div class="question-wrapper" data-value="temporary">' .
2065
  '<div class="question">It\'s a temporary deactivation, I\'m debugging something</div>' .
2076
  $questions[] = '<div class="question-wrapper" data-value="site-live">' .
2077
  '<div class="question">It served its purpose - site is now live</div>' .
2078
  '</div>';
2079
+
2080
  $questions[] = '<div class="question-wrapper" data-value="missing-feature">' .
2081
  '<div class="question">It doesn\'t have all the features I need<div class="details">Please tell us what features are missing: <input type="text" class="normal-text ucp-deactivation-details"></div></div>' .
2082
  '</div>';
2086
  '<div class="question">Something else<div class="details">Please tell us the reason: <input type="text" class="normal-text ucp-deactivation-details"></div></div>' .
2087
  '</div>';
2088
  echo implode(' ', $questions);
2089
+
2090
 
2091
  $current_user = wp_get_current_user();
2092
  echo '<div class="footer">';
2093
  echo '<a class="ucp-cancel-deactivate js-action button-secondary button button-large" href="#">Cancel Deactivation</a> <a data-survey="deactivate" class="button-primary button button-large ucp-deactivate" href="#">Continue with Deactivation</a>';
2094
  echo '<br><br><a href="#" class="js-action ucp-deactivate-direct"><small><i>Deactivate without providing feedback</i></small></a>';
2095
  echo '</div>';
2096
+
2097
  echo '</div>';
2098
  } // footer_plugins
2099
 
2101
  // reset all pointers to default state - visible
2102
  static function reset_pointers() {
2103
  $pointers = array();
2104
+
2105
  $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.');
2106
  $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>.');
2107