wpseek.com
WordPress开发者和主题制作者的搜索引擎



allowed_http_request_hosts › WordPress Function

Since3.6.0
已弃用n/a
allowed_http_request_hosts ( $is_external, $host )
参数: (2)
  • (bool) $is_external
    Required: Yes
  • (string) $host
    Required: Yes
返回:
  • (bool)
定义在:
文档:

Mark allowed redirect hosts safe for HTTP requests as well.

Attached to the {@see 'http_request_host_is_external'} filter.


源码

function allowed_http_request_hosts( $is_external, $host ) {
	if ( ! $is_external && wp_validate_redirect( 'http://' . $host ) ) {
		$is_external = true;
	}
	return $is_external;
}