白名单也允许重定向主机以获取安全的HTTP请求。
原型
allowed_http_request_hosts( bool $is_external, string $host )
描述
附加到’http_request_host_is_external’过滤器。
参数
$is_external
(bool)
(Required)
$host
(string)
(Required)
返回值
(bool)
源文件
路径:wp-includes/http.php
<?php
...
function allowed_http_request_hosts( $is_external, $host ) {
if ( ! $is_external && wp_validate_redirect( 'http://' . $host ) )
$is_external = true;
return $is_external;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/allowed_http_request_hosts/