Skip to content

Commit 1c17a59

Browse files
authored
Merge pull request #167 from benhuson/fix/testcookie
Rename “testcookie” to fix issue with some hosts.
2 parents d00774c + 5918cfe commit 1c17a59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

theme/password-protected-login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function wp_login_viewport_meta() {
4949
}
5050

5151
// If cookies are disabled we can't log in even with a valid password.
52-
if ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
52+
if ( isset( $_POST['password_protected_cookie_test'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
5353
$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' ) );
5454
}
5555

@@ -129,7 +129,7 @@ function wp_login_viewport_meta() {
129129

130130
<p class="submit">
131131
<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="testcookie" value="1" />
132+
<input type="hidden" name="password_protected_cookie_test" value="1" />
133133
<input type="hidden" name="password-protected" value="login" />
134134
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $_REQUEST['redirect_to'] ); ?>" />
135135
</p>

0 commit comments

Comments
 (0)