allowed_redirect_hosts
apply_filters( ‘allowed_redirect_hosts’, string[] $hosts , string $host )
过滤器::过滤要重定向到的主机的白名单。
Filter Hook: Filters the whitelist of hosts to redirect to.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$hosts | (string[]) | 允许的主机名数组。 |
$host | (string) | 重定向目标的主机名;如果未设置,则为空字符串。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.3.0 | wp-includes/pluggable.php:1466 | 1 | 0 |
笔记(Notes)
允许其他重定向主机
allowed_redirect_hosts 为WP2原创文章,链接:https://www.wp2.cn/hook/allowed_redirect_hosts/