Version Description
- Adds
password_protected_cookie_name
filter for the cookie name. Props Jose Castaneda. - Let developers override the capability needed to see the options page via a
password_protected_options_page_capability
filter. Props Nicola Peluchetti. - Don't use a "testcookie" POST query as it is blocked by Namecheap (and possibly other hosts).
- Fix warnings in W3 validator - script and style type attribute not required. Props @dianamurcia.
- Translations now via translate.wordpress.org.
- Updated URL references. Props Garrett Hyder.
Download this release
Release Info
Developer | husobj |
Plugin | Password Protected |
Version | 2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.5 to 2.3
- CHANGELOG.md +15 -2
- README.md +3 -0
- admin/admin-caching.php +1 -0
- admin/admin.php +2 -1
- languages/password-protected.pot +46 -75
- password-protected.php +6 -3
- readme.txt +12 -3
- theme/password-protected-login.php +6 -6
CHANGELOG.md
CHANGED
@@ -2,7 +2,19 @@
|
|
2 |
All notable changes to this project will be documented in this file.
|
3 |
This project adheres to [Semantic Versioning](http://semver.org/).
|
4 |
|
5 |
-
## [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
## [2.2.5] - 2019-06-04
|
8 |
|
@@ -226,7 +238,8 @@ Check that `$_SERVER['REMOTE_ADDR']` is set.
|
|
226 |
### Added
|
227 |
- First Release. If you spot any bugs or issues please [log them here](https://github.com/benhuson/password-protected/issues).
|
228 |
|
229 |
-
[Unreleased]: https://github.com/benhuson/password-protected/compare/2.
|
|
|
230 |
[2.2.5]: https://github.com/benhuson/password-protected/compare/2.2.4...2.2.5
|
231 |
[2.2.4]: https://github.com/benhuson/password-protected/compare/2.2.3...2.2.4
|
232 |
[2.2.3]: https://github.com/benhuson/password-protected/compare/2.2.2...2.2.3
|
2 |
All notable changes to this project will be documented in this file.
|
3 |
This project adheres to [Semantic Versioning](http://semver.org/).
|
4 |
|
5 |
+
## [2.3] - 2020-05-17
|
6 |
+
|
7 |
+
### Added
|
8 |
+
- Adds `password_protected_cookie_name` filter for the cookie name. Props [Jose Castaneda](https://github.com/jocastaneda).
|
9 |
+
- Let developers override the capability needed to see the options page via a `password_protected_options_page_capability` filter. Props [Nicola Peluchetti](https://github.com/nicoladj77).
|
10 |
+
|
11 |
+
### Fixed
|
12 |
+
- Don't use a "testcookie" POST query as it is blocked by Namecheap (and possibly other hosts).
|
13 |
+
- Fix warnings in W3 validator - script and style “type” attribute not required. Props [@dianamurcia](https://github.com/dianamurcia).
|
14 |
+
|
15 |
+
### Changed
|
16 |
+
- Translations now via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/password-protected/).
|
17 |
+
- Updated URL references. Props [Garrett Hyder](https://github.com/garretthyder).
|
18 |
|
19 |
## [2.2.5] - 2019-06-04
|
20 |
|
238 |
### Added
|
239 |
- First Release. If you spot any bugs or issues please [log them here](https://github.com/benhuson/password-protected/issues).
|
240 |
|
241 |
+
[Unreleased]: https://github.com/benhuson/password-protected/compare/2.3...HEAD
|
242 |
+
[2.2.5]: https://github.com/benhuson/password-protected/compare/2.2.5...2.3
|
243 |
[2.2.5]: https://github.com/benhuson/password-protected/compare/2.2.4...2.2.5
|
244 |
[2.2.4]: https://github.com/benhuson/password-protected/compare/2.2.3...2.2.4
|
245 |
[2.2.3]: https://github.com/benhuson/password-protected/compare/2.2.2...2.2.3
|
README.md
CHANGED
@@ -69,6 +69,9 @@ If you would like to translate this plugin you can easily contribute at the [Tra
|
|
69 |
Upgrade Notice
|
70 |
--------------
|
71 |
|
|
|
|
|
|
|
72 |
### 2.2.5
|
73 |
Added `password_protected_login_password_title` filter to allow customizing the "Password" label on the login form.
|
74 |
|
69 |
Upgrade Notice
|
70 |
--------------
|
71 |
|
72 |
+
### 2.3
|
73 |
+
Fixed an issue with "testcookie" on some hosts. Added `password_protected_cookie_name` and `password_protected_options_page_capability` filters.
|
74 |
+
|
75 |
### 2.2.5
|
76 |
Added `password_protected_login_password_title` filter to allow customizing the "Password" label on the login form.
|
77 |
|
admin/admin-caching.php
CHANGED
@@ -108,6 +108,7 @@ class Password_Protected_Admin_Caching {
|
|
108 |
public function field_cookies() {
|
109 |
|
110 |
echo '<p><code>' . esc_html( $this->plugin->cookie_name() ) . '</code></p>';
|
|
|
111 |
|
112 |
}
|
113 |
|
108 |
public function field_cookies() {
|
109 |
|
110 |
echo '<p><code>' . esc_html( $this->plugin->cookie_name() ) . '</code></p>';
|
111 |
+
echo '<p class="description">' . __( 'Can be changed using the `password_protected_cookie_name` filter.', 'password-protected' ) . '</p>';
|
112 |
|
113 |
}
|
114 |
|
admin/admin.php
CHANGED
@@ -43,7 +43,8 @@ class Password_Protected_Admin {
|
|
43 |
*/
|
44 |
public function admin_menu() {
|
45 |
|
46 |
-
$
|
|
|
47 |
add_action( 'load-' . $this->settings_page_id, array( $this, 'add_help_tabs' ), 20 );
|
48 |
|
49 |
}
|
43 |
*/
|
44 |
public function admin_menu() {
|
45 |
|
46 |
+
$capability = apply_filters( 'password_protected_options_page_capability', 'manage_options' );
|
47 |
+
$this->settings_page_id = add_options_page( __( 'Password Protected', 'password-protected' ), __( 'Password Protected', 'password-protected' ), $capability, 'password-protected', array( $this, 'settings_page' ) );
|
48 |
add_action( 'load-' . $this->settings_page_id, array( $this, 'add_help_tabs' ), 20 );
|
49 |
|
50 |
}
|
languages/password-protected.pot
CHANGED
@@ -5,7 +5,7 @@ msgid ""
|
|
5 |
msgstr ""
|
6 |
"Project-Id-Version: Password Protected\n"
|
7 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/password-protected\n"
|
8 |
-
"POT-Creation-Date:
|
9 |
"PO-Revision-Date: 2015-05-14 23:15-0000\n"
|
10 |
"Last-Translator: Ben Huson <ben@thewhiteroom.net>\n"
|
11 |
"Language-Team: LANGUAGE\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
-
"X-Generator: Poedit 2.
|
17 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c\n"
|
18 |
"X-Poedit-Basepath: .\n"
|
19 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
@@ -51,23 +51,27 @@ msgstr ""
|
|
51 |
msgid "If your site uses a caching plugin or your web hosting uses server-side caching, you may need to configure your caching setup to disable caching for the Password Protected cookie:"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: ../admin/admin-caching.php:
|
55 |
-
msgid "
|
56 |
msgstr ""
|
57 |
|
58 |
#: ../admin/admin-caching.php:122
|
|
|
|
|
|
|
|
|
59 |
msgid "In order for Password Protected to work with WP Engine's caching configuration you must ask them to disable caching for the Password Protected cookie."
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: ../admin/admin-caching.php:
|
63 |
msgid "It looks like you may be using the W3 Total Cache plugin?"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: ../admin/admin-caching.php:
|
67 |
msgid "In order for Password Protected to work with W3 Total Cache you must disable caching when the Password Protected cookie is set."
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: ../admin/admin-caching.php:
|
71 |
#, php-format
|
72 |
msgid "You can adjust the cookie settings for W3 Total Cache under <a href=\"%s\">Performance > Page Cache > Advanced > Rejected Cookies</a>."
|
73 |
msgstr ""
|
@@ -83,178 +87,145 @@ msgstr ""
|
|
83 |
msgid "Password Protected Plugin"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: ../admin/admin.php:
|
87 |
msgid "Password Protected"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: ../admin/admin.php:
|
91 |
msgid "Password Protected Settings"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: ../admin/admin.php:
|
95 |
msgid "Save Changes"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: ../admin/admin.php:
|
99 |
msgid "<p><strong>Password Protected Status</strong><br />Turn on/off password protection.</p>"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: ../admin/admin.php:
|
103 |
msgid ""
|
104 |
"<p><strong>Protected Permissions</strong><br />Allow access for logged in users and administrators without needing to enter a password. You will need to enable this option if you want administrators to be able to preview the site in "
|
105 |
"the Theme Customizer. Also allow RSS Feeds to be accessed when the site is password protected.</p>"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: ../admin/admin.php:
|
109 |
msgid "<p><strong>Password Fields</strong><br />To set a new password, enter it into both fields. You cannot set an `empty` password. To disable password protection uncheck the Enabled checkbox.</p>"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: ../admin/admin.php:
|
113 |
msgid "Password Protected Status"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: ../admin/admin.php:
|
117 |
msgid "Protected Permissions"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: ../admin/admin.php:
|
121 |
msgid "New Password"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: ../admin/admin.php:
|
125 |
msgid "Allow IP Addresses"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: ../admin/admin.php:
|
129 |
msgid "Allow Remember me"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: ../admin/admin.php:
|
133 |
msgid "Remember for this many days"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: ../admin/admin.php:
|
137 |
msgid "New password not saved. When setting a new password please enter it in both fields."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: ../admin/admin.php:
|
141 |
msgid "New password not saved. Password fields did not match."
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: ../admin/admin.php:
|
145 |
msgid "New password saved."
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: ../admin/admin.php:
|
149 |
msgid "Password protect your web site. Users will be asked to enter a password to view the site."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: ../admin/admin.php:
|
153 |
msgid "For more information about Password Protected settings, view the \"Help\" tab at the top of this page."
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: ../admin/admin.php:
|
157 |
msgid "Enabled"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: ../admin/admin.php:
|
161 |
msgid "Allow Administrators"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: ../admin/admin.php:
|
165 |
msgid "Allow Logged In Users"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: ../admin/admin.php:
|
169 |
msgid "Allow RSS Feeds"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: ../admin/admin.php:
|
173 |
msgid "Allow REST API Access"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: ../admin/admin.php:
|
177 |
msgid "If you would like to change the password type a new one. Otherwise leave this blank."
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: ../admin/admin.php:
|
181 |
msgid "Type your new password again."
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: ../admin/admin.php:
|
185 |
msgid "Enter one IP address per line."
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: ../admin/admin.php:
|
189 |
#, php-format
|
190 |
msgid "Your IP is address %s."
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: ../admin/admin.php:
|
194 |
msgid "http://github.com/benhuson/password-protected"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: ../admin/admin.php:
|
198 |
msgid "GitHub"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: ../admin/admin.php:
|
202 |
msgid "https://translate.wordpress.org/projects/wp-plugins/password-protected"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: ../admin/admin.php:
|
206 |
msgid "Translate"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: ../admin/admin.php:
|
210 |
msgid "Settings"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: ../admin/admin.php:
|
214 |
msgid "You have enabled password protection but not yet set a password. Please set one below."
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: ../admin/admin.php:
|
218 |
msgid "You have enabled password protection and allowed administrators and logged in users - other users will still need to enter a password to view the site."
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: ../admin/admin.php:
|
222 |
msgid "You have enabled password protection and allowed administrators - other users will still need to enter a password to view the site."
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: ../admin/admin.php:
|
226 |
msgid "You have enabled password protection and allowed logged in users - other users will still need to enter a password to view the site."
|
227 |
msgstr ""
|
228 |
-
|
229 |
-
#: ../password-protected.php:165
|
230 |
-
#, php-format
|
231 |
-
msgid "Feeds are not available for this site. Please visit the <a href=\"%s\">website</a>."
|
232 |
-
msgstr ""
|
233 |
-
|
234 |
-
#: ../password-protected.php:324
|
235 |
-
msgid "Incorrect Password"
|
236 |
-
msgstr ""
|
237 |
-
|
238 |
-
#: ../password-protected.php:462 ../password-protected.php:466
|
239 |
-
msgid "Logout"
|
240 |
-
msgstr ""
|
241 |
-
|
242 |
-
#: ../password-protected.php:808
|
243 |
-
msgid "Only authenticated users can access the REST API."
|
244 |
-
msgstr ""
|
245 |
-
|
246 |
-
#: ../theme/password-protected-login.php:53
|
247 |
-
msgid "<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."
|
248 |
-
msgstr ""
|
249 |
-
|
250 |
-
#: ../theme/password-protected-login.php:120
|
251 |
-
msgid "Password"
|
252 |
-
msgstr ""
|
253 |
-
|
254 |
-
#: ../theme/password-protected-login.php:126
|
255 |
-
msgid "Remember Me"
|
256 |
-
msgstr ""
|
257 |
-
|
258 |
-
#: ../theme/password-protected-login.php:131
|
259 |
-
msgid "Log In"
|
260 |
-
msgstr ""
|
5 |
msgstr ""
|
6 |
"Project-Id-Version: Password Protected\n"
|
7 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/password-protected\n"
|
8 |
+
"POT-Creation-Date: 2020-05-18 14:21+0100\n"
|
9 |
"PO-Revision-Date: 2015-05-14 23:15-0000\n"
|
10 |
"Last-Translator: Ben Huson <ben@thewhiteroom.net>\n"
|
11 |
"Language-Team: LANGUAGE\n"
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"X-Generator: Poedit 2.3\n"
|
17 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c\n"
|
18 |
"X-Poedit-Basepath: .\n"
|
19 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
51 |
msgid "If your site uses a caching plugin or your web hosting uses server-side caching, you may need to configure your caching setup to disable caching for the Password Protected cookie:"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: ../admin/admin-caching.php:111
|
55 |
+
msgid "Can be changed using the `password_protected_cookie_name` filter."
|
56 |
msgstr ""
|
57 |
|
58 |
#: ../admin/admin-caching.php:122
|
59 |
+
msgid "We have detected your site may be running on WP Engine hosting."
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: ../admin/admin-caching.php:123
|
63 |
msgid "In order for Password Protected to work with WP Engine's caching configuration you must ask them to disable caching for the Password Protected cookie."
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: ../admin/admin-caching.php:134
|
67 |
msgid "It looks like you may be using the W3 Total Cache plugin?"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: ../admin/admin-caching.php:135
|
71 |
msgid "In order for Password Protected to work with W3 Total Cache you must disable caching when the Password Protected cookie is set."
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: ../admin/admin-caching.php:136
|
75 |
#, php-format
|
76 |
msgid "You can adjust the cookie settings for W3 Total Cache under <a href=\"%s\">Performance > Page Cache > Advanced > Rejected Cookies</a>."
|
77 |
msgstr ""
|
87 |
msgid "Password Protected Plugin"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: ../admin/admin.php:47 ../admin/admin.php:98
|
91 |
msgid "Password Protected"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: ../admin/admin.php:60
|
95 |
msgid "Password Protected Settings"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: ../admin/admin.php:66
|
99 |
msgid "Save Changes"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: ../admin/admin.php:99
|
103 |
msgid "<p><strong>Password Protected Status</strong><br />Turn on/off password protection.</p>"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: ../admin/admin.php:100
|
107 |
msgid ""
|
108 |
"<p><strong>Protected Permissions</strong><br />Allow access for logged in users and administrators without needing to enter a password. You will need to enable this option if you want administrators to be able to preview the site in "
|
109 |
"the Theme Customizer. Also allow RSS Feeds to be accessed when the site is password protected.</p>"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: ../admin/admin.php:101
|
113 |
msgid "<p><strong>Password Fields</strong><br />To set a new password, enter it into both fields. You cannot set an `empty` password. To disable password protection uncheck the Enabled checkbox.</p>"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: ../admin/admin.php:120
|
117 |
msgid "Password Protected Status"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: ../admin/admin.php:128
|
121 |
msgid "Protected Permissions"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: ../admin/admin.php:136
|
125 |
msgid "New Password"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: ../admin/admin.php:144
|
129 |
msgid "Allow IP Addresses"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: ../admin/admin.php:152
|
133 |
msgid "Allow Remember me"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: ../admin/admin.php:160
|
137 |
msgid "Remember for this many days"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: ../admin/admin.php:192
|
141 |
msgid "New password not saved. When setting a new password please enter it in both fields."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: ../admin/admin.php:195
|
145 |
msgid "New password not saved. Password fields did not match."
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: ../admin/admin.php:198
|
149 |
msgid "New password saved."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: ../admin/admin.php:245
|
153 |
msgid "Password protect your web site. Users will be asked to enter a password to view the site."
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: ../admin/admin.php:246
|
157 |
msgid "For more information about Password Protected settings, view the \"Help\" tab at the top of this page."
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: ../admin/admin.php:255
|
161 |
msgid "Enabled"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: ../admin/admin.php:264
|
165 |
msgid "Allow Administrators"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: ../admin/admin.php:265
|
169 |
msgid "Allow Logged In Users"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: ../admin/admin.php:266
|
173 |
msgid "Allow RSS Feeds"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: ../admin/admin.php:267
|
177 |
msgid "Allow REST API Access"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: ../admin/admin.php:276
|
181 |
msgid "If you would like to change the password type a new one. Otherwise leave this blank."
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: ../admin/admin.php:277
|
185 |
msgid "Type your new password again."
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: ../admin/admin.php:288
|
189 |
msgid "Enter one IP address per line."
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: ../admin/admin.php:290
|
193 |
#, php-format
|
194 |
msgid "Your IP is address %s."
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: ../admin/admin.php:351
|
198 |
msgid "http://github.com/benhuson/password-protected"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: ../admin/admin.php:351
|
202 |
msgid "GitHub"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: ../admin/admin.php:352
|
206 |
msgid "https://translate.wordpress.org/projects/wp-plugins/password-protected"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: ../admin/admin.php:352
|
210 |
msgid "Translate"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: ../admin/admin.php:369
|
214 |
msgid "Settings"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: ../admin/admin.php:397
|
218 |
msgid "You have enabled password protection but not yet set a password. Please set one below."
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: ../admin/admin.php:402
|
222 |
msgid "You have enabled password protection and allowed administrators and logged in users - other users will still need to enter a password to view the site."
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: ../admin/admin.php:404
|
226 |
msgid "You have enabled password protection and allowed administrators - other users will still need to enter a password to view the site."
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: ../admin/admin.php:406
|
230 |
msgid "You have enabled password protection and allowed logged in users - other users will still need to enter a password to view the site."
|
231 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
password-protected.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Password Protected
|
5 |
Plugin URI: https://wordpress.org/plugins/password-protected/
|
6 |
Description: A very simple way to quickly password protect your WordPress site with a single password. Please note: This plugin does not restrict access to uploaded files and images and does not work with some caching setups.
|
7 |
-
Version: 2.
|
8 |
Author: Ben Huson
|
9 |
Text Domain: password-protected
|
10 |
Author URI: http://github.com/benhuson/password-protected/
|
@@ -42,7 +42,7 @@ $Password_Protected = new Password_Protected();
|
|
42 |
|
43 |
class Password_Protected {
|
44 |
|
45 |
-
var $version = '2.
|
46 |
var $admin = null;
|
47 |
var $errors = null;
|
48 |
|
@@ -643,7 +643,10 @@ class Password_Protected {
|
|
643 |
*/
|
644 |
public function cookie_name() {
|
645 |
|
646 |
-
|
|
|
|
|
|
|
647 |
|
648 |
}
|
649 |
|
4 |
Plugin Name: Password Protected
|
5 |
Plugin URI: https://wordpress.org/plugins/password-protected/
|
6 |
Description: A very simple way to quickly password protect your WordPress site with a single password. Please note: This plugin does not restrict access to uploaded files and images and does not work with some caching setups.
|
7 |
+
Version: 2.3
|
8 |
Author: Ben Huson
|
9 |
Text Domain: password-protected
|
10 |
Author URI: http://github.com/benhuson/password-protected/
|
42 |
|
43 |
class Password_Protected {
|
44 |
|
45 |
+
var $version = '2.3';
|
46 |
var $admin = null;
|
47 |
var $errors = null;
|
48 |
|
643 |
*/
|
644 |
public function cookie_name() {
|
645 |
|
646 |
+
/**
|
647 |
+
* Filters the cookie name
|
648 |
+
*/
|
649 |
+
return apply_filters( 'password_protected_cookie_name', $this->get_site_id() . '_password_protected_auth', $this );
|
650 |
|
651 |
}
|
652 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: husobj
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DXRJDNCMK9U3N
|
4 |
Tags: password, protect, password protect, login
|
5 |
Requires at least: 4.6
|
6 |
-
Tested up to: 5.
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
A very simple way to quickly password protect your WordPress site with a single password.
|
@@ -80,7 +80,13 @@ If you would like to translate this plugin you can easily contribute at the [Tra
|
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
= 2.2.5 =
|
86 |
- Added `password_protected_login_password_title` filter to allow customizing the "Password" label on the login form. Props [Jeremy Herve](https://github.com/jeherve).
|
@@ -214,6 +220,9 @@ If you would like to translate this plugin you can easily contribute at the [Tra
|
|
214 |
|
215 |
== Upgrade Notice ==
|
216 |
|
|
|
|
|
|
|
217 |
= 2.2.5 =
|
218 |
Added `password_protected_login_password_title` filter to allow customizing the "Password" label on the login form.
|
219 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DXRJDNCMK9U3N
|
4 |
Tags: password, protect, password protect, login
|
5 |
Requires at least: 4.6
|
6 |
+
Tested up to: 5.4
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.3
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
A very simple way to quickly password protect your WordPress site with a single password.
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 2.3 =
|
84 |
+
- Adds `password_protected_cookie_name` filter for the cookie name. Props [Jose Castaneda](https://github.com/jocastaneda).
|
85 |
+
- Let developers override the capability needed to see the options page via a `password_protected_options_page_capability` filter. Props [Nicola Peluchetti](https://github.com/nicoladj77).
|
86 |
+
- Don't use a "testcookie" POST query as it is blocked by Namecheap (and possibly other hosts).
|
87 |
+
- Fix warnings in W3 validator - script and style “type” attribute not required. Props [@dianamurcia](https://github.com/dianamurcia).
|
88 |
+
- Translations now via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/password-protected/).
|
89 |
+
- Updated URL references. Props [Garrett Hyder](https://github.com/garretthyder).
|
90 |
|
91 |
= 2.2.5 =
|
92 |
- Added `password_protected_login_password_title` filter to allow customizing the "Password" label on the login form. Props [Jeremy Herve](https://github.com/jeherve).
|
220 |
|
221 |
== Upgrade Notice ==
|
222 |
|
223 |
+
= 2.3 =
|
224 |
+
Fixed an issue with "testcookie" on some hosts. Added `password_protected_cookie_name` and `password_protected_options_page_capability` filters.
|
225 |
+
|
226 |
= 2.2.5 =
|
227 |
Added `password_protected_login_password_title` filter to allow customizing the "Password" label on the login form.
|
228 |
|
theme/password-protected-login.php
CHANGED
@@ -17,7 +17,7 @@ if ( ! function_exists( 'wp_shake_js' ) ) {
|
|
17 |
return;
|
18 |
}
|
19 |
?>
|
20 |
-
<script
|
21 |
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
22 |
function s(id,pos){g(id).left=pos+'px';}
|
23 |
function g(id){return document.getElementById(id).style;}
|
@@ -49,7 +49,7 @@ if ( SITECOOKIEPATH != COOKIEPATH ) {
|
|
49 |
}
|
50 |
|
51 |
// If cookies are disabled we can't log in even with a valid password.
|
52 |
-
if ( isset( $_POST['
|
53 |
$Password_Protected->errors->add( 'test_cookie', __( "<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress.", 'password-protected' ) );
|
54 |
}
|
55 |
|
@@ -83,7 +83,7 @@ if ( version_compare( $wp_version, '3.9-dev', '>=' ) ) {
|
|
83 |
|
84 |
?>
|
85 |
|
86 |
-
<style
|
87 |
#login_error, .login .message, #loginform { margin-bottom: 20px; }
|
88 |
</style>
|
89 |
|
@@ -92,7 +92,7 @@ if ( version_compare( $wp_version, '3.9-dev', '>=' ) ) {
|
|
92 |
if ( $is_iphone ) {
|
93 |
?>
|
94 |
<meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" />
|
95 |
-
<style
|
96 |
.login form, .login .message, #login_error { margin-left: 0px; }
|
97 |
.login #nav, .login #backtoblog { margin-left: 8px; }
|
98 |
.login h1 a { width: auto; }
|
@@ -129,7 +129,7 @@ do_action( 'password_protected_login_head' );
|
|
129 |
|
130 |
<p class="submit">
|
131 |
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Log In' ); ?>" tabindex="100" />
|
132 |
-
<input type="hidden" name="
|
133 |
<input type="hidden" name="password-protected" value="login" />
|
134 |
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $_REQUEST['redirect_to'] ); ?>" />
|
135 |
</p>
|
@@ -139,7 +139,7 @@ do_action( 'password_protected_login_head' );
|
|
139 |
|
140 |
</div>
|
141 |
|
142 |
-
<script
|
143 |
try{document.getElementById('password_protected_pass').focus();}catch(e){}
|
144 |
if(typeof wpOnload=='function')wpOnload();
|
145 |
</script>
|
17 |
return;
|
18 |
}
|
19 |
?>
|
20 |
+
<script>
|
21 |
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
22 |
function s(id,pos){g(id).left=pos+'px';}
|
23 |
function g(id){return document.getElementById(id).style;}
|
49 |
}
|
50 |
|
51 |
// If cookies are disabled we can't log in even with a valid password.
|
52 |
+
if ( isset( $_POST['password_protected_cookie_test'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
|
53 |
$Password_Protected->errors->add( 'test_cookie', __( "<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress.", 'password-protected' ) );
|
54 |
}
|
55 |
|
83 |
|
84 |
?>
|
85 |
|
86 |
+
<style media="screen">
|
87 |
#login_error, .login .message, #loginform { margin-bottom: 20px; }
|
88 |
</style>
|
89 |
|
92 |
if ( $is_iphone ) {
|
93 |
?>
|
94 |
<meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" />
|
95 |
+
<style media="screen">
|
96 |
.login form, .login .message, #login_error { margin-left: 0px; }
|
97 |
.login #nav, .login #backtoblog { margin-left: 8px; }
|
98 |
.login h1 a { width: auto; }
|
129 |
|
130 |
<p class="submit">
|
131 |
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Log In' ); ?>" tabindex="100" />
|
132 |
+
<input type="hidden" name="password_protected_cookie_test" value="1" />
|
133 |
<input type="hidden" name="password-protected" value="login" />
|
134 |
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $_REQUEST['redirect_to'] ); ?>" />
|
135 |
</p>
|
139 |
|
140 |
</div>
|
141 |
|
142 |
+
<script>
|
143 |
try{document.getElementById('password_protected_pass').focus();}catch(e){}
|
144 |
if(typeof wpOnload=='function')wpOnload();
|
145 |
</script>
|