registration_redirect WordPress Filter Hook

The registration_redirect Wordpress hook allows you to redirect a user after they register for a new account. This can be useful for directing users to a specific page or for providing a custom registration experience.

apply_filters( 'registration_redirect', string $registration_redirect, int|WP_Error $errors ) #

Filters the registration redirect URL.


Parameters

$registration_redirect

(string)The redirect destination URL.

$errors

(int|WP_Error)User id if registration was successful, WP_Error object otherwise.


Top ↑

More Information

  • The registration redirect filter is used to change the location redirected to after a user registers. This could be the location set by the “redirect_to” parameter sent to the registration page.
  • This filter is to redirect the user following registration. To filter the location of the registration page itself, use register_url.

Top ↑

Source

File: wp-login.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
5.9.0Added the $errors parameter.
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.