Version Description
- Fixed password reset url from being blocked - props estebillan.
Download this release
Release Info
Developer | kevinvess |
Plugin | Force Login |
Version | 1.3 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.3
- readme.txt +14 -4
- wp-force-login.php +4 -5
readme.txt
CHANGED
@@ -2,31 +2,41 @@
|
|
2 |
Contributors: kevinvess
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kevin%40vess%2eme&lc=US&item_name=Kevin%20Vess%20-%20WordPress¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: access, closed, force user login, hidden, login, password, privacy, private, protected, registered only, restricted
|
5 |
-
Requires at least:
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Force Login is a simple lightweight plugin that requires visitors to log in to interact with the website.
|
11 |
|
|
|
12 |
== Description ==
|
13 |
|
14 |
Easily hide your WordPress site from public viewing by requiring visitors to log in first. As simple as flipping a switch.
|
15 |
|
16 |
Make your website private until it's ready to share publicly, or keep it private for members only.
|
17 |
|
|
|
18 |
== Installation ==
|
19 |
|
20 |
Upload the Force Login plugin to your site, then Activate it.
|
21 |
|
22 |
1, 2: You're done!
|
23 |
|
|
|
24 |
== Changelog ==
|
25 |
|
26 |
-
= 1.
|
|
|
27 |
|
|
|
28 |
* Streamlined code
|
29 |
|
30 |
= 1.1 =
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
|
|
2 |
Contributors: kevinvess
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kevin%40vess%2eme&lc=US&item_name=Kevin%20Vess%20-%20WordPress¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: access, closed, force user login, hidden, login, password, privacy, private, protected, registered only, restricted
|
5 |
+
Requires at least: 2.7
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 1.3
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Force Login is a simple lightweight plugin that requires visitors to log in to interact with the website.
|
11 |
|
12 |
+
|
13 |
== Description ==
|
14 |
|
15 |
Easily hide your WordPress site from public viewing by requiring visitors to log in first. As simple as flipping a switch.
|
16 |
|
17 |
Make your website private until it's ready to share publicly, or keep it private for members only.
|
18 |
|
19 |
+
|
20 |
== Installation ==
|
21 |
|
22 |
Upload the Force Login plugin to your site, then Activate it.
|
23 |
|
24 |
1, 2: You're done!
|
25 |
|
26 |
+
|
27 |
== Changelog ==
|
28 |
|
29 |
+
= 1.3 =
|
30 |
+
* Fixed password reset url from being blocked - props [estebillan](http://profiles.wordpress.org/estebillan).
|
31 |
|
32 |
+
= 1.2 =
|
33 |
* Streamlined code
|
34 |
|
35 |
= 1.1 =
|
36 |
+
* Whitelisted the Registration page and the Lost Password page - props [jabdo](http://profiles.wordpress.org/jabdo).
|
37 |
+
|
38 |
+
|
39 |
+
== Upgrade Notice ==
|
40 |
|
41 |
+
= 1.3 =
|
42 |
+
Fixes bug with password reset url from being blocked. Props estebillan.
|
wp-force-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Force Login
|
4 |
Plugin URI: http://vess.me/
|
5 |
Description: Easily hide your WordPress site from public viewing by requiring visitors to log in first. Activate to turn on.
|
6 |
-
Version: 1.
|
7 |
Author: Kevin Vess
|
8 |
Author URI: http://vess.me/
|
9 |
License: GPLv2 or later
|
@@ -31,10 +31,9 @@ function v_getUrl() {
|
|
31 |
return $url;
|
32 |
}
|
33 |
function v_forcelogin() {
|
34 |
-
$url
|
35 |
-
if( !is_user_logged_in() && ( $url
|
36 |
-
|
37 |
-
exit();
|
38 |
}
|
39 |
}
|
40 |
add_action('init', 'v_forcelogin');
|
3 |
Plugin Name: Force Login
|
4 |
Plugin URI: http://vess.me/
|
5 |
Description: Easily hide your WordPress site from public viewing by requiring visitors to log in first. Activate to turn on.
|
6 |
+
Version: 1.3
|
7 |
Author: Kevin Vess
|
8 |
Author URI: http://vess.me/
|
9 |
License: GPLv2 or later
|
31 |
return $url;
|
32 |
}
|
33 |
function v_forcelogin() {
|
34 |
+
$url = v_getUrl();
|
35 |
+
if( !is_user_logged_in() && preg_replace('/\?.*/', '', $url) != preg_replace('/\?.*/', '', wp_login_url()) ) {
|
36 |
+
wp_safe_redirect( wp_login_url(), 302 ); exit();
|
|
|
37 |
}
|
38 |
}
|
39 |
add_action('init', 'v_forcelogin');
|