underConstruction - Version 1.13

Version Description

  • Minor options page update
Download this release

Release Info

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

Code changes from version 1.12 to 1.13

Files changed (4) hide show
  1. ajax-loader.gif +0 -0
  2. readme.txt +6 -3
  3. ucOptions.php +21 -4
  4. underConstruction.php +28 -5
ajax-loader.gif ADDED
Binary file
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === underConstruction ===
2
  Contributors: Jeremy Massel
3
- Tags: construction, under construction, private, preview, security, coming soon, landing page, welcome mat, welcome gate
4
  Requires at least: 2.7
5
- Tested up to: 3.8
6
- Stable tag: 1.12
7
 
8
  Creates a 'Coming Soon' page that will show for all users who are not logged in
9
 
@@ -42,6 +42,9 @@ Sorry, I get a lot of questions. But visit the homepage for this plugin and leav
42
 
43
  == Changelog ==
44
 
 
 
 
45
  = 1.12 =
46
  * Minor UI update to work nicely with WP 2.8
47
  * Added the ability to bundle an under-construction.php file with your theme and have the plugin use that
1
  === underConstruction ===
2
  Contributors: Jeremy Massel
3
+ Tags: construction, under construction, private, preview, security, coming soon
4
  Requires at least: 2.7
5
+ Tested up to: 4.2.2
6
+ Stable tag: 1.13
7
 
8
  Creates a 'Coming Soon' page that will show for all users who are not logged in
9
 
42
 
43
  == Changelog ==
44
 
45
+ = 1.13 =
46
+ * Minor options page update
47
+
48
  = 1.12 =
49
  * Minor UI update to work nicely with WP 2.8
50
  * Added the ability to bundle an under-construction.php file with your theme and have the plugin use that
ucOptions.php CHANGED
@@ -147,13 +147,34 @@ if(isset($_POST['required_role'])){
147
  }
148
 
149
  $current_theme_has_uc_page = file_exists(get_template_directory() . '/under-construction.php');
 
 
 
 
 
 
150
  ?>
151
  <noscript>
152
  <div class='updated' id='javascriptWarn'>
153
  <p><?php _e('JavaScript appears to be disabled in your browser. For this plugin to work correctly, please enable JavaScript or switch to a more modern browser.', 'underconstruction');?></p>
154
  </div>
155
  </noscript>
 
 
 
156
  <div class="wrap">
 
 
 
 
 
 
 
 
 
 
 
 
157
  <div id="icon-options-general" class="icon32">
158
  <br />
159
  </div>
@@ -162,10 +183,6 @@ $current_theme_has_uc_page = file_exists(get_template_directory() . '/under-cons
162
  id="ucoptions">
163
  <h2><?php _e('Under Construction', 'underconstruction');?></h2>
164
  <table>
165
- <tr>
166
- <td>Check out our other free plugin, <a target="_blank" href="http://wordpress.org/plugins/sumome">SumoMe (free tools to grow your website's traffic)! <a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/underconstruction">Leave a 5-star review</a>
167
- </td>
168
- </tr>
169
  <tr>
170
  <td>
171
  <h3><?php _e('Activate or Deactivate', 'underconstruction');?></h3>
147
  }
148
 
149
  $current_theme_has_uc_page = file_exists(get_template_directory() . '/under-construction.php');
150
+
151
+ add_thickbox();
152
+
153
+ if ($_GET['underconstruction_global_notification'] == 0) {
154
+ update_option('underconstruction_global_notification', 0);
155
+ }
156
  ?>
157
  <noscript>
158
  <div class='updated' id='javascriptWarn'>
159
  <p><?php _e('JavaScript appears to be disabled in your browser. For this plugin to work correctly, please enable JavaScript or switch to a more modern browser.', 'underconstruction');?></p>
160
  </div>
161
  </noscript>
162
+ <style type="text/css">
163
+ #underconstruction_global_notification a.button:active {vertical-align:baseline;}
164
+ </style>
165
  <div class="wrap">
166
+ <?php
167
+ if (!is_plugin_active( 'sumome/sumome.php' ))
168
+ {
169
+ ?>
170
+ <div id="underconstruction_global_notification" style="border:3px solid #31964D;position:relative;background:#6AB07B;color:#ffffff;height:70px;margin:5px 0 15px;padding:1px 12px;">
171
+ <p style="font-size:16px;line-height:40px;">
172
+ <?php _e('Tools to grow your Email List, Social Sharing and Analytics.'); ?> &nbsp;<a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a>
173
+ </p>
174
+ </div>
175
+ <?php
176
+ }
177
+ ?>
178
  <div id="icon-options-general" class="icon32">
179
  <br />
180
  </div>
183
  id="ucoptions">
184
  <h2><?php _e('Under Construction', 'underconstruction');?></h2>
185
  <table>
 
 
 
 
186
  <tr>
187
  <td>
188
  <h3><?php _e('Activate or Deactivate', 'underconstruction');?></h3>
underConstruction.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: Under Construction
4
- Plugin URI: http://www.masseltech.com/
5
  Description: Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
6
- Version: 1.12
7
- Author: Jeremy Massel
8
- Author URI: http://www.masseltech.com/
9
  */
10
 
11
  /*
@@ -299,6 +299,27 @@ class underConstruction
299
  }
300
 
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  }
303
 
304
  $underConstructionPlugin = new underConstruction();
@@ -356,4 +377,6 @@ add_filter('plugin_action_links', 'underConstructionPluginLinks', 10, 2);
356
 
357
  add_action('wp_ajax_uc_get_ip_address', 'uc_get_ip_address');
358
 
359
- ?>
 
 
1
  <?php
2
  /*
3
  Plugin Name: Under Construction
4
+ Plugin URI: https://wordpress.org/plugins/underconstruction/
5
  Description: Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
6
+ Version: 1.13
7
+ Author: Noah Kagan
8
+ Author URI: http://SumoMe.com/
9
  */
10
 
11
  /*
299
  }
300
 
301
 
302
+ function global_notice() {
303
+ if (!is_plugin_active('sumome/sumome.php') && in_array(substr(basename($_SERVER['REQUEST_URI']), 0, 11), array('plugins.php', 'index.php')) && get_option('underconstruction_global_notification') == 1) {
304
+ ?>
305
+ <style type="text/css">
306
+ #underconstruction_global_notification a.button:active {vertical-align:baseline;}
307
+ </style>
308
+ <div class="updated" id="underconstruction_global_notification" style="border:3px solid #317A96;position:relative;background:##3c9cc2;background-color:#3c9cc2;color:#ffffff;height:70px;">
309
+ <a class="notice-dismiss" href="<?php echo admin_url('options-general.php?page=underConstructionMainOptions&underconstruction_global_notification=0'); ?>" style="right:165px;top:0;"></a>
310
+ <a href="<?php echo admin_url('options-general.php?page=underConstructionMainOptions&wp_google_fonts_global_notification=0'); ?>" style="position:absolute;top:9px;right:15px;color:#ffffff;">Dismiss and go to settings</a>
311
+ <p style="font-size:16px;line-height:50px;">
312
+ <?php _e('Looking for more sharing tools?'); ?> &nbsp;<a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a>
313
+ </p>
314
+ </div>
315
+ <?php
316
+ }
317
+ }
318
+
319
+ function plugin_deactivate() {
320
+ delete_option('underconstruction_global_notification');
321
+ }
322
+
323
  }
324
 
325
  $underConstructionPlugin = new underConstruction();
377
 
378
  add_action('wp_ajax_uc_get_ip_address', 'uc_get_ip_address');
379
 
380
+ add_option('underconstruction_global_notification', 1);
381
+ add_action( 'admin_notices', array($underConstructionPlugin, 'global_notice') );
382
+ register_deactivation_hook( __FILE__, array($underConstructionPlugin, 'plugin_deactivate') );