A WordPress-centric search engine for devs and theme authors



allowed_http_request_hosts ›

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:

Mark allowed redirect hosts safe for HTTP requests as well.

Attached to the Array filter.


Source

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