Version Description
- Fix - Fixed issue for sites with a custom login URL.
Download this release
Release Info
Developer | kevinvess |
Plugin | Force Login |
Version | 5.6.2 |
Comparing to | |
See all releases |
Code changes from version 5.6.1 to 5.6.2
- readme.txt +4 -1
- wp-force-login.php +6 -1
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.1 =
|
102 |
* Fix - Fixed too many redirects issue for Multisite users.
|
103 |
|
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.2
|
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.2 =
|
102 |
+
* Fix - Fixed issue for sites with a custom login URL.
|
103 |
+
|
104 |
= 5.6.1 =
|
105 |
* Fix - Fixed too many redirects issue for Multisite users.
|
106 |
|
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 |
|
@@ -30,6 +30,11 @@ function v_forcelogin() {
|
|
30 |
$schema = isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ? 'https://' : 'http://';
|
31 |
$url = $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* Whitelist filter.
|
35 |
*
|
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.2
|
7 |
Author: Kevin Vess
|
8 |
Author URI: http://vess.me/
|
9 |
|
30 |
$schema = isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ? 'https://' : 'http://';
|
31 |
$url = $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
32 |
|
33 |
+
// Bail if visiting the login URL. Fix for custom login URLs
|
34 |
+
if ( wp_login_url() === preg_replace( '/\?.*/', '', $url ) ) {
|
35 |
+
return;
|
36 |
+
}
|
37 |
+
|
38 |
/**
|
39 |
* Whitelist filter.
|
40 |
*
|