wpseek.com
A WordPress-centric search engine for devs and theme authors



allowed_http_request_hosts › WordPress Function

Since3.6.0
Deprecatedn/a
allowed_http_request_hosts ( $is_external, $host )
Parameters: (2)
  • (bool) $is_external
    Required: Yes
  • (string) $host
    Required: Yes
Returns:
  • (bool)
Defined at:
Codex:

Marks allowed redirect hosts safe for HTTP requests as well.

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


Source

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