registration_redirect
Filter HookDescription
Filters the registration redirect URL.Hook Information
File Location |
wp-login.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1153 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$registration_redirect
|
The redirect destination URL. |
int|WP_Error
|
$errors
|
User id if registration was successful, WP_Error object otherwise. |
Usage Examples
Basic Usage
<?php
// Hook into registration_redirect
add_filter('registration_redirect', 'my_custom_filter', 10, 2);
function my_custom_filter($registration_redirect, $errors) {
// Your custom filtering logic here
return $registration_redirect;
}
Source Code Context
wp-login.php:1153
- How this hook is used in WordPress core
<?php
1148 *
1149 * @param string $registration_redirect The redirect destination URL.
1150 * @param int|WP_Error $errors User id if registration was successful,
1151 * WP_Error object otherwise.
1152 */
1153 $redirect_to = apply_filters( 'registration_redirect', $registration_redirect, $errors );
1154
1155 login_header(
1156 __( 'Registration Form' ),
1157 wp_get_admin_notice(
1158 __( 'Register For This Site' ),
PHP Documentation
<?php
/**
* 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 int|WP_Error $errors User id if registration was successful,
* WP_Error object otherwise.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-login.php
Related Hooks
Related hooks will be displayed here in future updates.