Make WordPress Core

Changeset 36042


Ignore:
Timestamp:
12/21/2015 03:22:32 AM (9 years ago)
Author:
johnbillion
Message:

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

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r35897 r36042  
    472472
    473473    $form = '
    474         <form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( set_url_scheme( wp_login_url(), 'login_post' ) ) . '" method="post">
     474        <form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( site_url( 'wp-login.php', 'login_post' ) ) . '" method="post">
    475475            ' . $login_form_top . '
    476476            <p class="login-username">
  • trunk/src/wp-login.php

    r35897 r36042  
    712712    login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
    713713?>
    714 <form name="registerform" id="registerform" action="<?php echo esc_url( set_url_scheme( wp_registration_url(), 'login_post' ) ); ?>" method="post" novalidate="novalidate">
     714<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
    715715    <p>
    716716        <label for="user_login"><?php _e('Username') ?><br />
     
    878878?>
    879879
    880 <form name="loginform" id="loginform" action="<?php echo esc_url( set_url_scheme( wp_login_url(), 'login_post' ) ); ?>" method="post">
     880<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    881881    <p>
    882882        <label for="user_login"><?php _e('Username') ?><br />
Note: See TracChangeset for help on using the changeset viewer.