Site Offline or Coming Soon - Version 1.6.5

Version Description

  • Coming soon plugin is now compatible with WordPress 4.3.
Download this release

Release Info

Developer wpecommerce
Plugin Icon 128x128 Site Offline or Coming Soon
Version 1.6.5
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.5

Files changed (3) hide show
  1. main.php +14 -9
  2. readme.txt +29 -5
  3. site-offline-options.php +1 -1
main.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /*
3
  Plugin Name: Site Offline or Coming Soon
4
- Version: 1.6.3
5
- Plugin URI: http://wp-ecommerce.net/
6
  Author: wpecommerce
7
- Author URI: http://wp-ecommerce.net/
8
  Description: Make safe changes to your site by enabling site offline mode with this plugin you'll be able to navigate your site normally but your regular visitor will se a site offline or coming soon page
9
  */
10
 
@@ -38,11 +38,18 @@ function cp_siteoffline_options_page_content() {
38
  include_once('site-offline-options.php');
39
  }
40
 
41
- function cp_siteoffline_message() {
 
 
 
 
 
42
  $options = get_option('sp_siteoffline_options');
43
- if ($options['enabled'] === false)
44
  return;
45
- if (!current_user_can('edit_posts')) {
 
 
46
  $protocol = "HTTP/1.0";
47
  if ("HTTP/1.1" == $_SERVER["SERVER_PROTOCOL"]) {
48
  $protocol = "HTTP/1.1";
@@ -83,10 +90,8 @@ function cpso_login_form_msg()
83
  * if the user have manage_options capabaility he can easily navigate,test,make changes without letting the general public know.
84
  * */
85
  add_action('init', 'cp_siteoffline_activate');
 
86
  add_action('admin_menu', 'cp_siteoffline_options_page');
87
- if (!is_admin()) {
88
- add_action('send_headers', 'cp_siteoffline_message');
89
- }
90
 
91
  if (is_admin()) {
92
  add_action('admin_notices', 'cpso_maintenance_mode_check_msg');
1
  <?php
2
  /*
3
  Plugin Name: Site Offline or Coming Soon
4
+ Version: 1.6.5
5
+ Plugin URI: https://wp-ecommerce.net/
6
  Author: wpecommerce
7
+ Author URI: https://wp-ecommerce.net/
8
  Description: Make safe changes to your site by enabling site offline mode with this plugin you'll be able to navigate your site normally but your regular visitor will se a site offline or coming soon page
9
  */
10
 
38
  include_once('site-offline-options.php');
39
  }
40
 
41
+ function cp_siteoffline_check() {
42
+
43
+ if(is_admin()){//Don't show on admin side of the site
44
+ return;
45
+ }
46
+
47
  $options = get_option('sp_siteoffline_options');
48
+ if ($options['enabled'] === false){
49
  return;
50
+ }
51
+
52
+ if (!current_user_can('edit_posts') && !in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ))) {
53
  $protocol = "HTTP/1.0";
54
  if ("HTTP/1.1" == $_SERVER["SERVER_PROTOCOL"]) {
55
  $protocol = "HTTP/1.1";
90
  * if the user have manage_options capabaility he can easily navigate,test,make changes without letting the general public know.
91
  * */
92
  add_action('init', 'cp_siteoffline_activate');
93
+ add_action('init', 'cp_siteoffline_check');
94
  add_action('admin_menu', 'cp_siteoffline_options_page');
 
 
 
95
 
96
  if (is_admin()) {
97
  add_action('admin_notices', 'cpso_maintenance_mode_check_msg');
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Site Offline or Coming Soon ===
2
  Contributors: wpecommerce
3
- Donate link: http://wp-ecommerce.net/
4
- Tags: coming soon,site is down,maintenance, maintenance mode, offline, google, post, page, google, admin, aweber, mailchimp, administration, construction, mode, unavailable,
5
  Requires at least: 3.0
6
- Tested up to: 3.8
7
- Stable tag: 1.6.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -21,6 +21,7 @@ Use this plugin to enable/disable site offline mode. If Site offline Mode is ena
21
  * Perform maintenance work on the back-end and front-end while logged in as an administrator.
22
  * Admin dashboard notice. This allows the admin to easily notice when the site is in maintenance mode.
23
  * The login screen will show a "site offline" message when you keep the site in offline mode.
 
24
 
25
  = Site Offline Plugin Usage =
26
 
@@ -30,7 +31,24 @@ Once you have installed the plugin you can enable "offline/maintenance mode" in
30
 
31
  This section contains a textarea which allows you to customize the page that your visitors will see when your site is offline. You can customize the message as well as the look and feel of the page.
32
 
33
- For more advanced features be sure to check out our premium version of the plugin, <a href="http://wp-ecommerce.net/wp-coming-soon-plugin-easily-create-a-coming-soon-page-for-your-wordpress-blog-2328">WordPress Site offline/Coming Soon Plugin</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  == Installation ==
36
 
@@ -51,6 +69,12 @@ Yes.
51
 
52
  == Changelog ==
53
 
 
 
 
 
 
 
54
  = 1.6.3 =
55
  * Added an admin dashboard notice for when the site offline/maintenance mode is enabled.
56
  * Fixed some minor HTML errors in the admin interface.
1
  === Site Offline or Coming Soon ===
2
  Contributors: wpecommerce
3
+ Donate link: https://wp-ecommerce.net/
4
+ Tags: coming soon, site is down, maintenance, maintenance mode, offline, google, post, page, admin, aweber, mailchimp, administration, construction, mode, unavailable, coming soon page, under construction, login, landing page, launch, launch page, newsletter
5
  Requires at least: 3.0
6
+ Tested up to: 4.3
7
+ Stable tag: 1.6.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
21
  * Perform maintenance work on the back-end and front-end while logged in as an administrator.
22
  * Admin dashboard notice. This allows the admin to easily notice when the site is in maintenance mode.
23
  * The login screen will show a "site offline" message when you keep the site in offline mode.
24
+ * Responsive coming soon/site offline page
25
 
26
  = Site Offline Plugin Usage =
27
 
31
 
32
  This section contains a textarea which allows you to customize the page that your visitors will see when your site is offline. You can customize the message as well as the look and feel of the page.
33
 
34
+ For more advanced features be sure to check out our premium version of the plugin, <a href="https://wp-ecommerce.net/wordpress-coming-soon-plugin">WordPress Site offline/Coming Soon Plugin</a>
35
+
36
+ = Site offline/Coming Soon Premium =
37
+
38
+ * Responsive maintenance page
39
+ * Social icons to link to your profiles (Example: Facebook, Google+, Twitter, LinkedIn)
40
+ * Subscribe users to your MailChimp list
41
+ * Automatic countdown to show your users when the site will be up
42
+ * Customizable background (change colour/image)
43
+ * Customize the page title and header
44
+ * Display a login form so users can sign in with their WordPress account credentials
45
+ * Ability to set HTTP 503 error in the header. This will tell search engine crawlers that the site is undergoing maintenance and the downtime is temporary
46
+ * Google Analytics integration
47
+ * Display your own logo and header image
48
+ * Create a gallery of images which will automatically slide in the background
49
+ * Easily add HTML content to your coming soon page
50
+
51
+ Check out the [coming soon pro plugin](https://wp-ecommerce.net/wordpress-coming-soon-plugin)
52
 
53
  == Installation ==
54
 
69
 
70
  == Changelog ==
71
 
72
+ = 1.6.5 =
73
+ * Coming soon plugin is now compatible with WordPress 4.3.
74
+
75
+ = 1.6.4 =
76
+ * Updated the site offline check logic to be more robust.
77
+
78
  = 1.6.3 =
79
  * Added an admin dashboard notice for when the site offline/maintenance mode is enabled.
80
  * Fixed some minor HTML errors in the admin interface.
site-offline-options.php CHANGED
@@ -4,7 +4,7 @@
4
  <div id="poststuff"><div id="post-body">
5
 
6
  <div class="premium_plugin_notice">
7
- <h3 style="margin:5px;"><a href="http://wp-ecommerce.net/wp-coming-soon-plugin-easily-create-a-coming-soon-page-for-your-wordpress-blog-2328" target="_blank">Premium Version: WordPress Site offline/Coming Soon Plus Plugin</a></h3>
8
  </div>
9
  <div id="icon-options-general" class="icon32"><br /></div>
10
 
4
  <div id="poststuff"><div id="post-body">
5
 
6
  <div class="premium_plugin_notice">
7
+ <h3 style="margin:5px;"><a href="https://wp-ecommerce.net/wordpress-coming-soon-plugin" target="_blank">Premium Version: WordPress Site offline/Coming Soon Plus Plugin</a></h3>
8
  </div>
9
  <div id="icon-options-general" class="icon32"><br /></div>
10