Version Description
- Fix - Fixed too many redirects issue for Multisite users.
Download this release
Release Info
Developer | kevinvess |
Plugin | Force Login |
Version | 5.6.1 |
Comparing to | |
See all releases |
Code changes from version 5.6 to 5.6.1
- readme.txt +4 -1
- wp-force-login.php +7 -4
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=force
|
|
4 |
Tags: privacy, private, protected, registered only, restricted, access, closed, force user login, hidden, login, password
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.7
|
7 |
-
Stable tag: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -98,6 +98,9 @@ add_action( 'login_enqueue_scripts', 'my_forcelogin_hide_backtoblog' );
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
101 |
= 5.6 =
|
102 |
* Feature - Added filter for Multisite unauthorized error message.
|
103 |
* Tweak - Allow logged-in Multisite users to access bypassed pages of other sites.
|
4 |
Tags: privacy, private, protected, registered only, restricted, access, closed, force user login, hidden, login, password
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.7
|
7 |
+
Stable tag: 5.6.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 5.6.1 =
|
102 |
+
* Fix - Fixed too many redirects issue for Multisite users.
|
103 |
+
|
104 |
= 5.6 =
|
105 |
* Feature - Added filter for Multisite unauthorized error message.
|
106 |
* Tweak - Allow logged-in Multisite users to access bypassed pages of other sites.
|
wp-force-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Force Login
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-force-login/
|
5 |
Description: Easily hide your WordPress site from public viewing by requiring visitors to log in first. Activate to turn on.
|
6 |
-
Version: 5.6
|
7 |
Author: Kevin Vess
|
8 |
Author URI: http://vess.me/
|
9 |
|
@@ -57,9 +57,12 @@ function v_forcelogin() {
|
|
57 |
}
|
58 |
|
59 |
// Only allow Multisite users access to their assigned sites
|
60 |
-
if ( is_multisite() &&
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
// Determine redirect URL
|
3 |
Plugin Name: Force Login
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-force-login/
|
5 |
Description: Easily hide your WordPress site from public viewing by requiring visitors to log in first. Activate to turn on.
|
6 |
+
Version: 5.6.1
|
7 |
Author: Kevin Vess
|
8 |
Author URI: http://vess.me/
|
9 |
|
57 |
}
|
58 |
|
59 |
// Only allow Multisite users access to their assigned sites
|
60 |
+
if ( is_multisite() && is_user_logged_in() ) {
|
61 |
+
if ( ! is_user_member_of_blog() && ! current_user_can( 'setup_network' ) ) {
|
62 |
+
$message = apply_filters( 'v_forcelogin_multisite_message', __( "You're not authorized to access this site.", 'wp-force-login' ), $url );
|
63 |
+
wp_die( $message, get_option( 'blogname' ) . ' › ' . __( 'Error', 'wp-force-login' ) );
|
64 |
+
}
|
65 |
+
return;
|
66 |
}
|
67 |
|
68 |
// Determine redirect URL
|