Version Description
- Rewrote v_getUrl function to include the server port - props Nicolas.
Download this release
Release Info
Developer | kevinvess |
Plugin | Force Login |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1
- readme.txt +5 -2
- wp-force-login.php +5 -3
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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.
|
7 |
-
Stable tag: 2.
|
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.
|
@@ -26,6 +26,9 @@ Upload the Force Login plugin to your site, then Activate it.
|
|
26 |
|
27 |
== Changelog ==
|
28 |
|
|
|
|
|
|
|
29 |
= 2.0 =
|
30 |
* Added redirect to send user to the url they tried to visit after logging in.
|
31 |
|
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.1
|
7 |
+
Stable tag: 2.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.
|
26 |
|
27 |
== Changelog ==
|
28 |
|
29 |
+
= 2.1 =
|
30 |
+
* Rewrote v_getUrl function to include the server port - props [Nicolas](http://profiles.wordpress.org/nottavi).
|
31 |
+
|
32 |
= 2.0 =
|
33 |
* Added redirect to send user to the url they tried to visit after logging in.
|
34 |
|
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: 2.
|
7 |
Author: Kevin Vess
|
8 |
Author URI: http://vess.me/
|
9 |
License: GPLv2 or later
|
@@ -26,8 +26,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
26 |
*/
|
27 |
|
28 |
function v_getUrl() {
|
29 |
-
$url =
|
30 |
-
$url .= $_SERVER[
|
|
|
|
|
31 |
return $url;
|
32 |
}
|
33 |
function 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: 2.1
|
7 |
Author: Kevin Vess
|
8 |
Author URI: http://vess.me/
|
9 |
License: GPLv2 or later
|
26 |
*/
|
27 |
|
28 |
function v_getUrl() {
|
29 |
+
$url = isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ? 'https' : 'http';
|
30 |
+
$url .= '://' . $_SERVER['SERVER_NAME'];
|
31 |
+
$url .= in_array( $_SERVER['SERVER_PORT'], array('80', '443') ) ? '' : ':' . $_SERVER['SERVER_PORT'];
|
32 |
+
$url .= $_SERVER['REQUEST_URI'];
|
33 |
return $url;
|
34 |
}
|
35 |
function v_forcelogin() {
|