Coming Soon Page & Maintenance Mode by SeedProd - Version 4.1.0

Version Description

  • Exclude default urls terms: login, admin, dashboard and account. Also provided a way to disable this behavior.
Download this release

Release Info

Developer seedprod
Plugin Icon 128x128 Coming Soon Page & Maintenance Mode by SeedProd
Version 4.1.0
Comparing to
See all releases

Code changes from version 4.0.4 to 4.1.0

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: seedprod, johnnytee
3
  Donate link: http://www.seedprod.com
4
  Tags: wordpress coming soon, wordpress under construction, wordpress maintenance mode, maintenance mode, coming soon, under construction, launch page, launch, maintenance, construction, offline, unavailable, newsletter, coming soon page, landing page
5
  Requires at least: 3.5.1
6
- Tested up to: 4.1.0
7
- Stable tag: 4.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -108,6 +108,9 @@ This is always a caching issue. Go to the caching plugin's setting page and clea
108
 
109
 
110
  == Changelog ==
 
 
 
111
  = 4.0.4 =
112
  * Added launch course and WordPress 4.1.0 compatibility
113
 
@@ -124,6 +127,9 @@ This is always a caching issue. Go to the caching plugin's setting page and clea
124
  * Initial Commit
125
 
126
  == Upgrade Notice ==
 
 
 
127
  = 4.0.4 =
128
  * Added launch course and 4.1.0 compatibility
129
 
3
  Donate link: http://www.seedprod.com
4
  Tags: wordpress coming soon, wordpress under construction, wordpress maintenance mode, maintenance mode, coming soon, under construction, launch page, launch, maintenance, construction, offline, unavailable, newsletter, coming soon page, landing page
5
  Requires at least: 3.5.1
6
+ Tested up to: 4.1.1
7
+ Stable tag: 4.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
108
 
109
 
110
  == Changelog ==
111
+ = 4.1.0 =
112
+ * Exclude default urls terms: login, admin, dashboard and account. Also provided a way to disable this behavior.
113
+
114
  = 4.0.4 =
115
  * Added launch course and WordPress 4.1.0 compatibility
116
 
127
  * Initial Commit
128
 
129
  == Upgrade Notice ==
130
+ = 4.1.0 =
131
+ * Exclude default urls terms: login, admin, dashboard and account. Also provided a way to disable this behavior.
132
+
133
  = 4.0.4 =
134
  * Added launch course and 4.1.0 compatibility
135
 
coming-soon.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Coming Soon Page & Maintenance Mode by SeedProd
4
  * Plugin URI: http://www.seedprod.com
5
  * Description: The #1 Coming Soon Page, Under Construction & Maintenance Mode plugin for WordPress.
6
- * Version: 4.0.4
7
  * Author: SeedProd
8
  * Author URI: http://www.seedprod.com
9
  * Text Domain: coming-soon
@@ -20,7 +20,7 @@ define( 'SEED_CSP4_SHORTNAME', 'seed_csp4' ); // Used to reference namespace fun
20
  define( 'SEED_CSP4_SLUG', 'coming-soon/coming-soon.php' ); // Used for settings link.
21
  define( 'SEED_CSP4_TEXTDOMAIN', 'coming-soon' ); // Your textdomain
22
  define( 'SEED_CSP4_PLUGIN_NAME', __( 'Coming Soon Page & Maintenance Mode by SeedProd', 'coming-soon' ) ); // Plugin Name shows up on the admin settings screen.
23
- define( 'SEED_CSP4_VERSION', '4.0.4'); // Plugin Version Number. Recommend you use Semantic Versioning http://semver.org/
24
  define( 'SEED_CSP4_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // Example output: /Applications/MAMP/htdocs/wordpress/wp-content/plugins/seed_csp4/
25
  define( 'SEED_CSP4_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); // Example output: http://localhost:8888/wordpress/wp-content/plugins/seed_csp4/
26
  define( 'SEED_CSP4_TABLENAME', 'seed_csp4_subscribers' );
3
  * Plugin Name: Coming Soon Page & Maintenance Mode by SeedProd
4
  * Plugin URI: http://www.seedprod.com
5
  * Description: The #1 Coming Soon Page, Under Construction & Maintenance Mode plugin for WordPress.
6
+ * Version: 4.1.0
7
  * Author: SeedProd
8
  * Author URI: http://www.seedprod.com
9
  * Text Domain: coming-soon
20
  define( 'SEED_CSP4_SLUG', 'coming-soon/coming-soon.php' ); // Used for settings link.
21
  define( 'SEED_CSP4_TEXTDOMAIN', 'coming-soon' ); // Your textdomain
22
  define( 'SEED_CSP4_PLUGIN_NAME', __( 'Coming Soon Page & Maintenance Mode by SeedProd', 'coming-soon' ) ); // Plugin Name shows up on the admin settings screen.
23
+ define( 'SEED_CSP4_VERSION', '4.1.0'); // Plugin Version Number. Recommend you use Semantic Versioning http://semver.org/
24
  define( 'SEED_CSP4_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // Example output: /Applications/MAMP/htdocs/wordpress/wp-content/plugins/seed_csp4/
25
  define( 'SEED_CSP4_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); // Example output: http://localhost:8888/wordpress/wp-content/plugins/seed_csp4/
26
  define( 'SEED_CSP4_TABLENAME', 'seed_csp4_subscribers' );
inc/class-seed-csp4.php CHANGED
@@ -30,7 +30,7 @@ class SEED_CSP4{
30
  }
31
 
32
  // Add this script globally so we can view the notification across the admin area
33
- add_action( 'admin_enqueue_scripts', array(&$this,'add_scripts') );
34
  }
35
 
36
  /**
@@ -81,7 +81,7 @@ class SEED_CSP4{
81
  }elseif($status == '2'){
82
  $msg = __('Maintenance Mode Active','coming-soon');
83
  }
84
- //Add the main siteadmin menu item
85
  $wp_admin_bar->add_menu( array(
86
  'id' => 'seed-csp4-notice',
87
  'href' => admin_url().'options-general.php?page=seed_csp4',
@@ -128,7 +128,7 @@ class SEED_CSP4{
128
  }else{
129
  $font_family = 'Helvetica Neue, Arial, sans-serif';
130
  }
131
-
132
  echo $font_family;
133
  }
134
 
@@ -158,18 +158,12 @@ class SEED_CSP4{
158
  }
159
 
160
  // Exit if a custom login page
161
- if(preg_match("/login/i",$_SERVER['REQUEST_URI']) > 0 && $is_preview == false){
162
- return false;
163
- }
164
-
165
- if(preg_match("/account/i",$_SERVER['REQUEST_URI']) > 0 && $is_preview == false){
166
- return false;
167
  }
168
 
169
- //Exit if wysija double opt-in
170
- if(preg_match("/wysija/i",$_SERVER['REQUEST_URI']) > 0 && $is_preview == false){
171
- return false;
172
- }
173
 
174
  // Check if user is logged in.
175
  if($is_preview === false){
@@ -181,7 +175,7 @@ class SEED_CSP4{
181
 
182
  // Finally check if we should show the coming soon page.
183
  $this->comingsoon_rendered = true;
184
-
185
  // set headers
186
  if($status == '2'){
187
  header('HTTP/1.1 503 Service Temporarily Unavailable');
@@ -193,9 +187,9 @@ class SEED_CSP4{
193
  exit();
194
  }
195
  }
196
-
197
  // render template tags
198
-
199
  $template = $this->get_default_template();
200
  require_once( SEED_CSP4_PLUGIN_PATH.'/themes/default/functions.php' );
201
  $template_tags = array(
@@ -213,11 +207,7 @@ class SEED_CSP4{
213
  );
214
  echo strtr($template, $template_tags);
215
  exit();
216
-
217
  }
218
 
219
  }
220
-
221
-
222
-
223
-
30
  }
31
 
32
  // Add this script globally so we can view the notification across the admin area
33
+ add_action( 'admin_enqueue_scripts', array(&$this,'add_scripts') );
34
  }
35
 
36
  /**
81
  }elseif($status == '2'){
82
  $msg = __('Maintenance Mode Active','coming-soon');
83
  }
84
+ //Add the main siteadmin menu item
85
  $wp_admin_bar->add_menu( array(
86
  'id' => 'seed-csp4-notice',
87
  'href' => admin_url().'options-general.php?page=seed_csp4',
128
  }else{
129
  $font_family = 'Helvetica Neue, Arial, sans-serif';
130
  }
131
+
132
  echo $font_family;
133
  }
134
 
158
  }
159
 
160
  // Exit if a custom login page
161
+ if(empty($disable_default_excluded_urls)){
162
+ if(preg_match("/login|admin|dashboard|account/i",$_SERVER['REQUEST_URI']) > 0 && $is_preview == false){
163
+ return false;
164
+ }
 
 
165
  }
166
 
 
 
 
 
167
 
168
  // Check if user is logged in.
169
  if($is_preview === false){
175
 
176
  // Finally check if we should show the coming soon page.
177
  $this->comingsoon_rendered = true;
178
+
179
  // set headers
180
  if($status == '2'){
181
  header('HTTP/1.1 503 Service Temporarily Unavailable');
187
  exit();
188
  }
189
  }
190
+
191
  // render template tags
192
+
193
  $template = $this->get_default_template();
194
  require_once( SEED_CSP4_PLUGIN_PATH.'/themes/default/functions.php' );
195
  $template_tags = array(
207
  );
208
  echo strtr($template, $template_tags);
209
  exit();
210
+
211
  }
212
 
213
  }
 
 
 
 
inc/config-settings.php CHANGED
@@ -360,6 +360,17 @@ function seed_csp4_get_options(){
360
  "label" => __( "Scripts", 'coming-soon' )
361
  );
362
 
 
 
 
 
 
 
 
 
 
 
 
363
  $seed_csp4_options[ ] = array(
364
  "type" => "textarea",
365
  "id" => "header_scripts",
360
  "label" => __( "Scripts", 'coming-soon' )
361
  );
362
 
363
+ $seed_csp4_options[ ] = array(
364
+ "type" => "checkbox",
365
+ "id" => "disable_default_excluded_urls",
366
+ "label" => __( "Disable Default Excluded URLs", 'coming-soon' ),
367
+ "desc" => __("By default we exclude urls with the terms: login, admin, dashboard and account to prevent lockouts. Check to disable.", 'coming-soon'),
368
+ "option_values" => array(
369
+ '1' => __( 'Disable', 'coming-soon' ),
370
+ ),
371
+ "default" => "1",
372
+ );
373
+
374
  $seed_csp4_options[ ] = array(
375
  "type" => "textarea",
376
  "id" => "header_scripts",