过滤登录重定向URL。
原型
apply_filters( 'login_redirect', string $redirect_to, string $requested_redirect_to, WP_User|WP_Error $user )
参数
$redirect_to
(string)
重定向目标网址。
$requested_redirect_to
(string)
请求的重定向目标URL作为参数传递。
$user
(WP_User|WP_Error)
如果登录成功则为WP_User对象,否则为WP_Error对象。
源文件
路径:wp-login.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/login_redirect/