mirror of
git://develop.git.wordpress.org/
synced 2025-03-22 13:00:29 +01:00
Login and Registration: Pass $errors
parameter to registration_redirect
filter.
On user registration, the `$errors` variable is the result of `register_new_user` which contains either the newly registered user's ID on success or a `WP_Error` object on failure. This change passes that context to the `registration_redirect` filter. Props Collizo4sky, aadilali, mukesh27, audrasjb. Fixes #53992. git-svn-id: https://develop.svn.wordpress.org/trunk@52091 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6815eb6f33
commit
e0ba1258dc
@ -1040,10 +1040,13 @@ switch ( $action ) {
|
||||
* Filters the registration redirect URL.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @since 5.9.0 Added the `$errors` parameter.
|
||||
*
|
||||
* @param string $registration_redirect The redirect destination URL.
|
||||
* @param string $registration_redirect The redirect destination URL.
|
||||
* @param int|WP_Error $errors User id if registration was successful,
|
||||
* WP_Error object otherwise.
|
||||
*/
|
||||
$redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
|
||||
$redirect_to = apply_filters( 'registration_redirect', $registration_redirect, $errors );
|
||||
|
||||
login_header( __( 'Registration Form' ), '<p class="message register">' . __( 'Register For This Site' ) . '</p>', $errors );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user