Version Description
- Set login page not to index if privacy setting is on.
- Allow redirection to a different URL when logging out using 'redirect_to' query and full URL.
Download this release
Release Info
Developer | husobj |
Plugin | Password Protected |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
- password-protected.php +7 -2
- readme.txt +10 -3
- theme/login.php +3 -0
password-protected.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Password Protected
|
5 |
Plugin URI: http://wordpress.org/extend/plugins/password-protected/
|
6 |
Description: A very simple way to quickly password protect your WordPress site with a single password. Integrates seamlessly into your WordPress privacy settings.
|
7 |
-
Version: 1.6.
|
8 |
Author: Ben Huson
|
9 |
Text Domain: password-protected
|
10 |
Author URI: http://www.benhuson.co.uk/
|
@@ -42,7 +42,7 @@ $Password_Protected = new Password_Protected();
|
|
42 |
|
43 |
class Password_Protected {
|
44 |
|
45 |
-
var $version = '1.6.
|
46 |
var $admin = null;
|
47 |
var $errors = null;
|
48 |
|
@@ -160,6 +160,11 @@ class Password_Protected {
|
|
160 |
// Log out
|
161 |
if ( isset( $_REQUEST['password-protected'] ) && $_REQUEST['password-protected'] == 'logout' ) {
|
162 |
$this->logout();
|
|
|
|
|
|
|
|
|
|
|
163 |
$redirect_to = remove_query_arg( array( 'password-protected', 'redirect_to' ), ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
164 |
$query = array(
|
165 |
'password-protected' => 'login',
|
4 |
Plugin Name: Password Protected
|
5 |
Plugin URI: http://wordpress.org/extend/plugins/password-protected/
|
6 |
Description: A very simple way to quickly password protect your WordPress site with a single password. Integrates seamlessly into your WordPress privacy settings.
|
7 |
+
Version: 1.6.2
|
8 |
Author: Ben Huson
|
9 |
Text Domain: password-protected
|
10 |
Author URI: http://www.benhuson.co.uk/
|
42 |
|
43 |
class Password_Protected {
|
44 |
|
45 |
+
var $version = '1.6.2';
|
46 |
var $admin = null;
|
47 |
var $errors = null;
|
48 |
|
160 |
// Log out
|
161 |
if ( isset( $_REQUEST['password-protected'] ) && $_REQUEST['password-protected'] == 'logout' ) {
|
162 |
$this->logout();
|
163 |
+
if ( isset( $_REQUEST['redirect_to'] ) ) {
|
164 |
+
$redirect_to = esc_url_raw( $_REQUEST['redirect_to'], array( 'http', 'https' ) );
|
165 |
+
wp_redirect( $redirect_to );
|
166 |
+
exit();
|
167 |
+
}
|
168 |
$redirect_to = remove_query_arg( array( 'password-protected', 'redirect_to' ), ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
169 |
$query = array(
|
170 |
'password-protected' => 'login',
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: husobj
|
3 |
Donate link: http://www.benhuson.co.uk/donate/
|
4 |
Tags: password, protect, password protect, login
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
A very simple way to quickly password protect your WordPress site with a single password.
|
@@ -69,6 +69,10 @@ If you can, please [fork the code](https://github.com/benhuson/password-protecte
|
|
69 |
|
70 |
== Changelog ==
|
71 |
|
|
|
|
|
|
|
|
|
72 |
= 1.6.1 =
|
73 |
* Language updates by wp-translations.org (Arabic, Dutch, French, Persian, Russian).
|
74 |
|
@@ -116,6 +120,9 @@ If you can, please [fork the code](https://github.com/benhuson/password-protecte
|
|
116 |
|
117 |
== Upgrade Notice ==
|
118 |
|
|
|
|
|
|
|
119 |
= 1.6 =
|
120 |
Added support for Uber Login Logo plugin.
|
121 |
|
2 |
Contributors: husobj
|
3 |
Donate link: http://www.benhuson.co.uk/donate/
|
4 |
Tags: password, protect, password protect, login
|
5 |
+
Requires at least: 3.2
|
6 |
+
Tested up to: 3.8
|
7 |
+
Stable tag: 1.6.2
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
A very simple way to quickly password protect your WordPress site with a single password.
|
69 |
|
70 |
== Changelog ==
|
71 |
|
72 |
+
= 1.6.2 =
|
73 |
+
* Set login page not to index if privacy setting is on.
|
74 |
+
* Allow redirection to a different URL when logging out using 'redirect_to' query and full URL.
|
75 |
+
|
76 |
= 1.6.1 =
|
77 |
* Language updates by wp-translations.org (Arabic, Dutch, French, Persian, Russian).
|
78 |
|
120 |
|
121 |
== Upgrade Notice ==
|
122 |
|
123 |
+
= 1.6.2 =
|
124 |
+
Allow redirection to a different URL when logging out.
|
125 |
+
|
126 |
= 1.6 =
|
127 |
Added support for Uber Login Logo plugin.
|
128 |
|
theme/login.php
CHANGED
@@ -44,6 +44,9 @@ $shake_error_codes = array( 'empty_password', 'incorrect_password' );
|
|
44 |
if ( $Password_Protected->errors->get_error_code() && in_array( $Password_Protected->errors->get_error_code(), $shake_error_codes ) )
|
45 |
add_action( 'password_protected_login_head', 'wp_shake_js', 12 );
|
46 |
|
|
|
|
|
|
|
47 |
/**
|
48 |
* Support 3rd party plugins
|
49 |
*/
|
44 |
if ( $Password_Protected->errors->get_error_code() && in_array( $Password_Protected->errors->get_error_code(), $shake_error_codes ) )
|
45 |
add_action( 'password_protected_login_head', 'wp_shake_js', 12 );
|
46 |
|
47 |
+
// Obey privacy setting
|
48 |
+
add_action( 'password_protected_login_head', 'noindex' );
|
49 |
+
|
50 |
/**
|
51 |
* Support 3rd party plugins
|
52 |
*/
|