login_redirect
apply_filters( ‘login_redirect’, string $redirect_to , string $requested_redirect_to , WP_User|WP_Error $user )
过滤器::过滤登录重定向URL。
Filter Hook: Filters the login redirect URL.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$redirect_to | (string) | 重定向目标URL。 |
$requested_redirect_to | (string) | 作为参数传递的请求重定向目标URL。 |
$user | (WP_User | WP_Error) | WP_User object如果登录成功,则WP_Error object否则。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.0.0 | wp-login.php:1233 | 0 | 0 |
笔记(Notes)
实例
笔记
login_redirect 为WP2原创文章,链接:https://www.wp2.cn/hook/login_redirect/