Make WordPress Core

Changeset 36043


Ignore:
Timestamp:
12/21/2015 03:29:49 AM (8 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.

Merges [36042] to the 4.4 branch.

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

Location:
branches/4.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-includes/general-template.php

    r35706 r36043  
    472472
    473473    $form = '
    474         <form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( wp_login_url() ) . '" 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">
  • branches/4.4/src/wp-login.php

    r35559 r36043  
    712712    login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
    713713?>
    714 
    715 <form name="registerform" id="registerform" action="<?php echo esc_url( wp_registration_url() ); ?>" 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">
    716715    <p>
    717716        <label for="user_login"><?php _e('Username') ?><br />
     
    879878?>
    880879
    881 <form name="loginform" id="loginform" action="<?php echo esc_url( wp_login_url() ); ?>" method="post">
     880<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    882881    <p>
    883882        <label for="user_login"><?php _e('Username') ?><br />
Note: See TracChangeset for help on using the changeset viewer.