函数原型
allowed_http_request_hosts( bool $is_external, string $host ): bool
函数描述
Mark allowed redirect hosts safe for HTTP requests as well.
是否弃用
未弃用
函数参数
-
$is_external
bool
Required -
$host
string
Required
函数返回值
bool
函数位置
File: wp-includes/http.php.
函数源码
function allowed_http_request_hosts( $is_external, $host ) {
if ( ! $is_external && wp_validate_redirect( 'http://' . $host ) ) {
$is_external = true;
}
return $is_external;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |

