Login: Revert [34213] and [35897]. It has become apparent that there is a need for a separate function (and corresponding filter) which allows for the login form action URL to differ from the URL used to access the login form, so that plugins or implementations which change the login URL do not need to worry about handling the form submission at the same URL.

For now, we'll revert to the pre-4.4 behaviour of hard-coding the login form action URL as `wp-login.php` and look at implementing a separate function and corresponding filter in 4.5.

Props KrissieV, salcode, JPry
Fixes #34925
See #35103


git-svn-id: https://develop.svn.wordpress.org/trunk@36042 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2015-12-21 03:22:32 +00:00
parent 817013978d
commit da011967e7
2 changed files with 3 additions and 3 deletions

View File

@ -471,7 +471,7 @@ function wp_login_form( $args = array() ) {
$login_form_bottom = apply_filters( 'login_form_bottom', '', $args );
$form = '
<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( set_url_scheme( wp_login_url(), 'login_post' ) ) . '" method="post">
<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( site_url( 'wp-login.php', 'login_post' ) ) . '" method="post">
' . $login_form_top . '
<p class="login-username">
<label for="' . esc_attr( $args['id_username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>

View File

@ -711,7 +711,7 @@ case 'register' :
$redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
?>
<form name="registerform" id="registerform" action="<?php echo esc_url( set_url_scheme( wp_registration_url(), 'login_post' ) ); ?>" method="post" novalidate="novalidate">
<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
<p>
<label for="user_login"><?php _e('Username') ?><br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label>
@ -877,7 +877,7 @@ default:
}
?>
<form name="loginform" id="loginform" action="<?php echo esc_url( set_url_scheme( wp_login_url(), 'login_post' ) ); ?>" method="post">
<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
<p>
<label for="user_login"><?php _e('Username') ?><br />
<input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" /></label>